Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'how to run' instructions for each Enos scenario #27959

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

rebwill
Copy link
Collaborator

@rebwill rebwill commented Aug 2, 2024

Description

Adds 'how to run' instructions for each Enos scenario. https://hashicorp.atlassian.net/browse/VAULT-29011?atlOrigin=eyJpIjoiZjYyN2JiN2YwMDcyNDM0NTg0Zjk2MzkzNzZkMGEyNTciLCJwIjoiaiJ9

TODO only if you're a HashiCorp employee

  • Labels: If this PR is the CE portion of an ENT change, and that ENT change is
    getting backported to N-2, use the new style backport/ent/x.x.x+ent labels
    instead of the old style backport/x.x.x labels.
  • Labels: If this PR is a CE only change, it can only be backported to N, so use
    the normal backport/x.x.x label (there should be only 1).
  • ENT Breakage: If this PR either 1) removes a public function OR 2) changes the signature
    of a public function, even if that change is in a CE file, double check that
    applying the patch for this PR to the ENT repo and running tests doesn't
    break any tests. Sometimes ENT only tests rely on public functions in CE
    files.
  • Jira: If this change has an associated Jira, it's referenced either
    in the PR description, commit message, or branch name.
  • RFC: If this change has an associated RFC, please link it in the description.
  • ENT PR: If this change has an associated ENT PR, please link it in the
    description. Also, make sure the changelog is in this PR, not in your ENT PR.

@rebwill rebwill requested a review from a team as a code owner August 2, 2024 19:40
@rebwill rebwill changed the title Adds 'how to run' instructions for each Enos scenario Add 'how to run' instructions for each Enos scenario Aug 2, 2024
Please note that this scenario requires several inputs variables to be set in order to function
RUNNING THIS SCENARIO

1. Set input variables
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be 4.?

Copy link
Collaborator Author

@rebwill rebwill Aug 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably, still working on polishing the dev scenarios.

Comment on lines 90 to 91
with vault. If using Ubuntu, your SSH user will be `ubuntu`; if using any of the other
supported distros, it will be `ec2-user`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. Always trips me up.

Comment on lines 61 to 62
$ enos scenario launch agent arch:amd64 artifact_source:crt artifact_type:bundle backend:consul config_mode:env consul_edition:ent consul_version:1.16.3 distro:ubuntu edition:ent.hsm.fips1402 seal:pkcs11

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO this should be a code block and maybe use line breaks to make it more readable:

enos scenario launch agent \
    arch:amd64 \
    artifact_source:crt \
    artifact_type:bundle \
    backend:consul \
    config_mode:env \
    consul_edition:ent \
    consul_version:1.16.3 \
    distro:ubuntu \
    edition:ent.hsm.fips1402 \
    seal:pkcs11

Comment on lines +73 to +74
arm64 AMI: https://aws.amazon.com/marketplace/server/procurement?productId=a516e959-df54-4035-bb1a-63599b7a6df9
amd64 AMI: https://aws.amazon.com/marketplace/server/procurement?productId=5535c495-72d4-4355-b169-54ffa874f849
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: turn these into links.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't get put in markdown at any point, it's just a blurb of HCL.

5. Choose the matrix variants you want to use, and launch the scenario with the appropriate
filter for those variants, e.g.:

$ enos scenario launch proxy arch:arm64 artifact_source:artifactory artifact_type:bundle backend:raft config_mode:file consul_edition:ce consul_version:1.17.0 distro:leap edition:ent seal:shamir
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same recommendation as above: code block and newlines will make this more readable

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see your point but I think we will leave this as one-liner for the purpose of the docs -- formatting changes may vary by personal preference and also be shell dependent.

5. Choose the matrix variants you want to use, and launch the scenario with the appropriate
filter for those variants, e.g.:

$ enos scenario launch replication arch:amd64 artifact_source:artifactory artifact_type:bundle config_mode:env consul_edition:ce consul_version:1.16.3 distro:sles edition:ent primary_backend:raft primary_seal:shamir secondary_backend:raft secondary_seal:shamir
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same recommendation as above: code block and newlines will make this more readable

5. Choose the matrix variants you want to use, and launch the scenario with the appropriate
filter for those variants, e.g.:

$ enos scenario launch seal_ha arch:amd64 artifact_source:artifactory artifact_type:package distro:rhel edition:ent.hsm.fips1402 backend:raft config_mode:file consul_edition:ce consul_version:1.17.0 primary_seal:pkcs11 secondary_seal:pkcs11
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same recommendation as above: code block and newlines will make this more readable

Copy link
Contributor

@jasonodonnell jasonodonnell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nits but looks great. I stopped flagging the same nit over but it should be applied across the documentation.

@heatherezell heatherezell added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Aug 5, 2024
Copy link
Collaborator

@ryancragun ryancragun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure exactly what I think. That's totally okay and perhaps we should have a conversation. It feels to me like this is very useful information but might be too verbose and sort of scary if you're just getting started.

I'm leaning towards the scenario description being information that is unique to each scenario, which would include required variables and then having like 80% of what you've done in the README. What do you think?


4. Choose what type of Vault artifact you want to use, and set the appropriate variables.

a. 'artifact:local'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The actual path of the zip bundle we create for local is probably not all that useful for configuration. Can we remove it?

This will download a Vault .zip bundle from releases.hashicorp.com with the version and
edition you specify.

TODO: add required variable
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be none other than version.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's also important to note that versions between dev and CI scenarios are a bit different right now. In dev scenarios you just use the 'major.minor.patch` form whereas in CI scenarios it's 'major.minor.patch.edition-prerelease'


$ enos scenario list dev_single_cluster

Once you know what filter you want to use to obtain your desired combination of matrix variants,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be useful to mention that you can reduce the list by providing partial filters?


$ enos scenario destroy dev_pr_replication <filter>


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: seems like a bit of extra whilte space here.


The scenario supports finding and installing any released 'linux/amd64' or 'linux/arm64' Vault
artifact as long as its version is >= 1.8. You can also use the 'artifact:local' variant to
build and deploy the current branch!

In order to execute this scenario you'll need to install the enos CLI:
You can use the following command to get a textual outline of the entire
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a lot of information. I'm trying figure out whether it all really should be in the scenario outline now or just information that is specific to each scenario. It almost feels like half of this information would be more apt to a README than in every scenario description.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And I realize that is the opposite of what I've previously said. But seeing it here has me questioning that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/ent/1.16.x+ent Changes are backported to 1.16.x+ent hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed pr/no-changelog pr/no-milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants