Commit Graph

17340 Commits

Author SHA1 Message Date
hc-github-team-secure-vault-core
ac380ce1d3 [QT-576] Optimize build workflow (#21486) (#21594)
Improve our build workflow execution time by using custom runners,
improved caching and conditional Web UI builds.

Runners
-------
We improve our build times[0] by using larger custom runners[1] when
building the UI and Vault.

Caching
-------
We improve Vault caching by keeping a cache for each build job. This
strategy has the following properties which should result in faster
build times when `go.sum` hasn't been changed from prior builds, or
when a pull request is retried or updated after a prior successful
build:

* Builds will restore cached Go modules and Go build cache according to
  the Go version, platform, architecture, go tags, and hash of `go.sum`
  that relates to each individual build workflow. This reduces the
  amount of time it will take to download the cache on hits and upload
  the cache on misses.
* Parallel build workflows won't clobber each others build cache. This
  results in much faster compile times after cache hits because the Go
  compiler can reuse the platform, architecture, and tag specific build
  cache that it created on prior runs.
* Older modules and build cache will not be uploaded when creating a new
  cache. This should result in lean cache sizes on an ongoing basis.
* On cache misses we will have to upload our compressed module and build
  cache. This will slightly extend the build time for pull requests that
  modify `go.sum`.

Web UI
------
We no longer build the web UI in every build workflow. Instead we separate
the UI building into its own workflow and cache the resulting assets.
The same UI assets are restored from cache during build worklows. This
strategy has the following properties:

* If the `ui` directory has not changed from prior builds we'll restore
  `http/web_ui` from cache and skip building the UI for no reason.
* We continue to use the built-in `yarn` caching functionality in
  `action/setup-node`. The default mode saves the `yarn` global cache.
  to improve UI build times if the cache has not been modified.

Changes
-------
* Add per platform/archicture Go module and build caching
* Move UI building into a separate job and cache the result
* Restore UI cache during build
* Pin workflows

Notes
-----
[0] https://hashicorp.atlassian.net/browse/QT-578
[1] https://github.com/hashicorp/vault/actions/runs/5415830307/jobs/9844829929

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2023-07-05 14:53:38 -06:00
hc-github-team-secure-vault-core
ea967860f3 backport of commit 772cda4eb2 (#21572)
Co-authored-by: Peter Wilson <peter.wilson@hashicorp.com>
2023-07-05 14:47:30 +01:00
hc-github-team-secure-vault-core
73f835d814 backport of commit eecae3a827 (#21550) (#21555)
Co-authored-by: miagilepner <mia.epner@hashicorp.com>
2023-07-04 17:07:01 +02:00
hc-github-team-secure-vault-core
f1c57d7d1f backport of commit f1c6ab41fc (#21534)
Co-authored-by: Rebecca Willett <47540675+rebwill@users.noreply.github.com>
2023-06-30 15:51:34 -04:00
hc-github-team-secure-vault-core
e109339322 backport of commit 5b41148bfc (#21487) 2023-06-28 17:51:21 +00:00
hc-github-team-secure-vault-core
c3dde090e6 backport of commit aca58d81a1 (#21469)
Co-authored-by: Bianca Moreira <48203644+biazmoreira@users.noreply.github.com>
2023-06-28 11:07:54 +02:00
hc-github-team-secure-vault-core
2dc73dd2b2 backport of commit c3741b0177 (#21484)
Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
2023-06-27 15:54:22 -04:00
hc-github-team-secure-vault-core
8d13ab49dd backport of commit fd1683698b (#21476)
Co-authored-by: Ryan Cragun <me@ryan.ec>
2023-06-27 16:57:00 +00:00
hc-github-team-secure-vault-core
84d2bb154a enos: use on-demand targets (#21459) (#21463)
Add an updated `target_ec2_instances` module that is capable of
dynamically splitting target instances over subnet/az's that are
compatible with the AMI architecture and the associated instance type
for the architecture. Use the `target_ec2_instances` module where
necessary. Ensure that `raft` storage scenarios don't provision
unnecessary infrastructure with a new `target_ec2_shim` module.

After a lot of trial, the state of Ec2 spot instance capacity, their
associated APIs, and current support for different fleet types in AWS
Terraform provider, have proven to make using spot instances for
scenario targets too unreliable.

The current state of each method:
* `target_ec2_fleet`: unusable due to the fact that the `instant` type
  does not guarantee fulfillment of either `spot` or `on-demand`
  instance request types. The module does support both `on-demand` and
  `spot` request types and is capable of bidding across a maximum of
  four availability zones, which makes it an attractive choice if the
  `instant` type would always fulfill requests. Perhaps a `request` type
  with `wait_for_fulfillment` option like `aws_spot_fleet_request` would
  make it more viable for future consideration.
* `target_ec2_spot_fleet`: more reliable if bidding for target instances
  that have capacity in the chosen zone. Issues in the AWS provider
  prevent us from bidding across multiple zones succesfully. Over the
  last 2-3 months target capacity for the instance types we'd prefer to
  use has dropped dramatically and the price is near-or-at on-demand.
  The volatility for nearly no cost savings means we should put this
  option on the shelf for now.
* `target_ec2_instances`: the most reliable method we've got. It is now
  capable of automatically determing which subnets and availability
  zones to provision targets in and has been updated to be usable for
  both Vault and Consul targets. By default we use the cheapest medium
  instance types that we've found are reliable to test vault.

* Update .gitignore
* enos/modules/create_vpc: create a subnet for every availability zone
* enos/modules/target_ec2_fleet: bid across the maximum of four
  availability zones for targets
* enos/modules/target_ec2_spot_fleet: attempt to make the spot fleet bid
  across more availability zones for targets
* enos/modules/target_ec2_instances: create module to use
  ec2:RunInstances for scenario targets
* enos/modules/target_ec2_shim: create shim module to satisfy the
  target module interface
* enos/scenarios: use target_ec2_shim for backend targets on raft
  storage scenarios
* enos/modules/az_finder: remove unsed module

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2023-06-26 16:46:12 -06:00
hc-github-team-secure-vault-core
39eb1d65c2 Add known issue about update_primary_addrs panic (#21443) (#21444)
* add known issue about update_primary_addrs panic

* Fix partial

* Fix render

Co-authored-by: Jason O'Donnell <2160810+jasonodonnell@users.noreply.github.com>
2023-06-23 16:02:53 +00:00
hc-github-team-secure-vault-core
11a211c631 backport of commit 5de6af6076 (#21439)
Co-authored-by: Ryan Cragun <me@ryan.ec>
2023-06-22 22:40:21 -06:00
hc-github-team-secure-vault-core
9f2d073427 backport of commit 9290d5f188 (#21427)
Co-authored-by: claire bontempo <68122737+hellobontempo@users.noreply.github.com>
2023-06-22 22:04:15 +00:00
hc-github-team-secure-vault-core
737d25348f [QT-572][VAULT-17391] enos: use ec2 fleets for consul storage scenarios (#21400) (#21420)
Begin the process of migrating away from the "strongly encouraged not to
use"[0] Ec2 spot fleet API to the more modern `ec2:CreateFleet`.
Unfortuantely the `instant` type fleet does not guarantee fulfillment
with either on-demand or spot types. We'll need to add a feature similar
to `wait_for_fulfillment` on the `spot_fleet_request` resource[1] to
`ec2_fleet` before we can rely on it.

We also update the existing target fleets to support provisioning generic
targets. This has allowed us to remove our usage of `terraform-enos-aws-consul`
and replace it with a smaller `backend_consul` module in-repo.

We also remove `terraform-enos-aws-infra` and replace it with two smaller
in-repo modules `ec2_info` and `create_vpc`. This has allowed us to simplify
the vpc resources we use for each scneario, which in turn allows us to
not rely on flaky resources.

As part of this refactor we've also made it possible to provision
targets using different distro versions.

[0] https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-best-practices.html#which-spot-request-method-to-use
[1] https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/spot_fleet_request#wait_for_fulfillment

* enos/consul: add `backend_consul` module that accepts target hosts.
* enos/target_ec2_spot_fleet: add support for consul networking.
* enos/target_ec2_spot_fleet: add support for customizing cluster tag
  key.
* enos/scenarios: create `target_ec2_fleet` which uses a more modern
  `ec2_fleet` API.
* enos/create_vpc: replace `terraform-enos-aws-infra` with smaller and
  simplified version. Flatten the networking to a single route on the
  default route table and a single subnet.
* enos/ec2_info: add a new module to give us useful ec2 information
  including AMI id's for various arch/distro/version combinations.
* enos/ci: update service user role to allow for managing ec2 fleets.

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
2023-06-22 20:11:23 +00:00
hc-github-team-secure-vault-core
1333dfd96b backport of commit 7144523b83 (#21414)
Co-authored-by: Alexander Scheel <alex.scheel@hashicorp.com>
2023-06-22 17:07:47 +00:00
Kit Haines
b154bf37aa Add missing documentation on cert metrics (#21073) (#21409)
Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
Co-authored-by: Alexander Scheel <alex.scheel@hashicorp.com>
2023-06-22 11:51:35 -04:00
Josh Black
3f90a66049 bump lib/pq to 1.10.9 (#20594) (#21372)
* bump lib/pq to 1.10.9

* bump jackc/pgx/v4 also
2023-06-21 21:49:41 +00:00
hc-github-team-secure-vault-core
335623929b backport of commit 15aee2e0ba (#21397)
Co-authored-by: Alexander Scheel <alex.scheel@hashicorp.com>
2023-06-21 21:07:15 +00:00
hc-github-team-secure-vault-core
2b9a117721 Backport of VAULT-16905: Add upgrade description about non entity tokens into release/1.13.x (#21257)
* Automatic license utilization reporting (#20898)

* Add license utilization reporting doc

* Updated the title

* Incorporated the review feedback

* Update website/content/docs/enterprise/license/utilization-reporting.mdx

Co-authored-by: Mike Palmiotto <mike.palmiotto@hashicorp.com>

* Update website/content/docs/enterprise/license/utilization-reporting.mdx

Co-authored-by: Mike Palmiotto <mike.palmiotto@hashicorp.com>

* Fix the self reminder note

---------

Co-authored-by: Mike Palmiotto <mike.palmiotto@hashicorp.com>

* Add the payload parameter description (#21050)

* Add the payload parameter description

* Update website/content/docs/enterprise/license/utilization-reporting.mdx

Co-authored-by: Mike Palmiotto <mike.palmiotto@hashicorp.com>

* Update website/content/docs/enterprise/license/utilization-reporting.mdx

Co-authored-by: Mike Palmiotto <mike.palmiotto@hashicorp.com>

* Update website/content/docs/enterprise/license/utilization-reporting.mdx

Co-authored-by: Mike Palmiotto <mike.palmiotto@hashicorp.com>

* Adjust spacing

---------

Co-authored-by: Mike Palmiotto <mike.palmiotto@hashicorp.com>

* VAULT-16905: Add upgrade description about non entity tokens (#21245)

* add to utilization reporting

* add known issue

* fixes

* Add additional reporting versions to the documentation (#21304)

* add additional versions to the documentation

* pr fixes

* pr fixes

---------

Co-authored-by: Yoko Hyakuna <yoko@hashicorp.com>
Co-authored-by: Mike Palmiotto <mike.palmiotto@hashicorp.com>
Co-authored-by: miagilepner <mia.epner@hashicorp.com>
2023-06-21 16:02:57 +00:00
Hamid Ghaf
c8cd4bc523 update version 1.13.5 (#21343) 2023-06-20 12:20:43 -07:00
hc-github-team-secure-vault-core
a212330c7b backport of commit f12c128559 (#21347)
Co-authored-by: Nick Cabatoff <ncabatoff@hashicorp.com>
v1.13.4
2023-06-19 11:40:05 -04:00
hc-github-team-secure-vault-core
63035d530a backport of commit 3347e5d56b (#21325)
Co-authored-by: Alexander Scheel <alex.scheel@hashicorp.com>
2023-06-16 17:40:30 +00:00
hc-github-team-secure-vault-core
7e1762b80b backport of commit 30aac443d0 (#21323)
Co-authored-by: miagilepner <mia.epner@hashicorp.com>
2023-06-16 13:10:16 -04:00
hc-github-team-secure-vault-core
65f8e67ce8 backport of commit c5549cdac6 (#21271)
Co-authored-by: Nick Cabatoff <ncabatoff@hashicorp.com>
2023-06-16 12:32:51 -04:00
Nick Cabatoff
b118ab7442 Setup Go before calling the test package test script (#21308) (#21313) 2023-06-16 10:57:57 -04:00
Alexander Scheel
2f634f7a11 Move OCSP/PKI interop test to PKI engine (#20273) (#21291)
This prevents SDK from having a circular import on the main Vault
package.

Manual backport due to import conflicts.

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
2023-06-15 20:26:46 +00:00
hc-github-team-secure-vault-core
00060e2643 backport of commit d3ae2085ae (#21287)
Co-authored-by: Nick Cabatoff <ncabatoff@hashicorp.com>
2023-06-15 15:55:03 -04:00
Hamid Ghaf
dbde35ca5b Go v1.20.5 bump for Vault 1.13.x (#21276) 2023-06-15 12:52:35 -07:00
hc-github-team-secure-vault-core
c5f41d83df backport of commit 7b56b69959 (#21266)
Co-authored-by: Nick Cabatoff <ncabatoff@hashicorp.com>
2023-06-15 17:00:12 +00:00
hc-github-team-secure-vault-core
b970274cbf backport of commit 6b87a087af (#21253)
Co-authored-by: Nick Cabatoff <ncabatoff@hashicorp.com>
2023-06-15 16:22:26 +00:00
Mike Palmiotto
b4a9266b1f Bump protoc-gen-go to v1.29.1 (#21101) 2023-06-15 11:29:49 -04:00
hc-github-team-secure-vault-core
9a317e2101 backport of commit 58f029d608 (#21239)
Co-authored-by: Victor Rodriguez <vrizo@hashicorp.com>
2023-06-14 22:23:44 +00:00
Anton Averchenkov
9b308bebe4 Backport of agent: Fix bug with 'cache' stanza validation into release/1.13.x 2023-06-14 21:41:03 +00:00
Mike Palmiotto
fa4153dc1f backports for ActivityLog and Reporting 1.13.x (#21140)
* backport of commit 9f7f8d5bfa

* backport of commit e3c59773e9

* backport of commit b4fab6ac2a

* backport of commit 54904e4cd6

* backport of commit 4b6ec4079d

* backport of commit 05ba6bbddd

* backport of commit 002a59a370

* backport of commit 77f83d9fe8

* backport of commit 730d0e2821

* backport of commit 35e2c1665f

* backport of commit 810d504e4f

* backport of commit 5b23dd506f

* backport of commit 018ea84997

* backport of commit 541f18eeb7

* backport of commit b4e2751a09

* backport of commit dc5dd71c72

* backport of commit 5002489d27

---------

Co-authored-by: miagilepner <mia.epner@hashicorp.com>
Co-authored-by: Nick Cabatoff <ncabatoff@hashicorp.com>
2023-06-14 17:07:26 -04:00
Rachel Culpepper
43bdbde214 update sdk to 1.13.4 (#21107)
Co-authored-by: Divya Pola <87338962+divyapola5@users.noreply.github.com>
2023-06-14 15:13:59 -05:00
hc-github-team-secure-vault-core
5d70ee7b2d backport of commit ddff68c82a (#21229)
Co-authored-by: Ryan Cragun <me@ryan.ec>
2023-06-14 12:39:25 -06:00
hc-github-team-secure-vault-core
e85fd21c62 backport of commit a2993878f1 (#21218)
Co-authored-by: Sarah Thompson <sthompson@hashicorp.com>
2023-06-14 17:20:06 +01:00
Nick Cabatoff
d15c8fd922 Backport 1.13: Document known issues surrounding update-primary on PR secondaries. (… (#21196) 2023-06-14 10:08:31 -04:00
hc-github-team-secure-vault-core
3bc54aaf71 backport of commit 8946911078 (#21211)
Co-authored-by: Theron Voran <tvoran@users.noreply.github.com>
2023-06-13 21:24:40 +00:00
Jordan Reimer
6000b16689 Clients config updates for census reporting (#20125) (#21201)
* updates clients config view for census reporting

* adds changelog entry

* fixes issue with modal staying open and error not showing on clients config save failure

* adds min retention months to clients config model and form validation
2023-06-13 21:08:02 +00:00
hc-github-team-secure-vault-core
40a6cf887d backport of commit 567917efac (#21204)
Co-authored-by: Kuba Wieczorek <kuba.wieczorek@hashicorp.com>
2023-06-13 20:28:19 +00:00
hc-github-team-secure-vault-core
5f9638050f Backport of Telemetry Metrics Configuration. into release/1.13.x (#21070)
* backport of commit 2dd4528ed8

* Add missing documentation on cert metrics (#21073)

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>

---------

Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
Co-authored-by: Kit Haines <khaines@mit.edu>
Co-authored-by: Alexander Scheel <alex.scheel@hashicorp.com>
2023-06-13 18:55:45 +00:00
hc-github-team-secure-vault-core
8bde6d7efe backport of commit a3657dc604 (#21183)
Co-authored-by: Theron Voran <tvoran@users.noreply.github.com>
2023-06-13 17:49:36 +00:00
hc-github-team-secure-vault-core
074e72c742 backport of commit 65157a6d3f (#21180)
Co-authored-by: Nick Cabatoff <ncabatoff@hashicorp.com>
2023-06-13 17:39:21 +00:00
hc-github-team-secure-vault-core
a27c15a19e backport of commit 820f7ee22f (#21174)
Co-authored-by: Steven Clark <steven.clark@hashicorp.com>
2023-06-13 12:38:33 -04:00
hc-github-team-secure-vault-core
a610bec185 backport of commit f2887a2535 (#21138)
Co-authored-by: Paul Banks <pbanks@hashicorp.com>
2023-06-13 14:21:44 +00:00
hc-github-team-secure-vault-core
15ac3f3815 backport of commit 810bb6ccb2 (#21157)
Co-authored-by: Kyle Schochenmaier <kschoche@gmail.com>
2023-06-12 16:04:20 -05:00
Josh Black
3ef4a14a9e OSS changes for fixing bug in update-primary (#21119) (#21125)
* OSS changes for fixing bug in update-primary (#21119)

* whoops
2023-06-12 18:47:08 +00:00
hc-github-team-secure-vault-core
e10f7f757e backport of commit 2ec5a28f51 (#21147)
Co-authored-by: Ryan Cragun <me@ryan.ec>
2023-06-12 17:20:08 +00:00
hc-github-team-secure-vault-core
1ebb80c484 backport of commit 27621e05d6 (#21136)
Co-authored-by: Ryan Cragun <me@ryan.ec>
2023-06-12 09:44:27 -06:00
hc-github-team-secure-vault-core
a239eb6a49 backport of commit b0aa808baa (#21113)
Co-authored-by: Ryan Cragun <me@ryan.ec>
2023-06-09 13:35:06 -06:00