-
Notifications
You must be signed in to change notification settings - Fork 3
Update documentation to clarify support for multiple AWS accounts and multiple applications #589
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
base: main
Are you sure you want to change the base?
Conversation
|
@lorenyu This PR is really close to being fully done, but I would appreciate if you could give a WIP review of this draft so we can get aligned on the high level changes. This should be a documentation-only PR. The current draft includes changes to |
|
Also, this PR does not yet incorporate recent PRs that have been merged, so I would also need to merge those changes in and update this documentation. |
|
@lorenyu Also, if it's not clear, the entrypoint to review should be:
|
| @@ -0,0 +1,38 @@ | |||
| # Multiple Applications | |||
|
|
|||
| You can use this template with multiple applications. By default, this template assumes your project has one application named `app`. However, it's straightforward to add additional applications. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was actually thinking that we change install-template.sh so that it doesn't add any apps by default. Or we could call install-app at the end of install-template.
| ### 4. Configure the application as usual | ||
|
|
||
| Follow the per-application steps in [`/infra/README.md`](/infra/README.md) to complete setup. No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was thinking maybe we can make install-app.sh interactive where we can ask some initial configuration questions then configure the app for them. could also be a future enhancement
| sedi () { | ||
| if sed --version >/dev/null 2>&1; then | ||
| sed -i -- "$@" | ||
| else | ||
| sed -i "" "$@" | ||
| fi | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this necessary? we already use sed in the template in a lot of places and i don't recall needing this.
| # Enforce kebab-case | ||
| APP_NAME_KEBAB=$(echo "$APP_NAME" | tr "_" "-") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i agree the convention should be dasherized, but i don't know how i feel about silently coercing it since if we normalize here we'll have to normalize in a lot of other places, and i don't think it should be the template's responsibility to do that. if we want to prevent underscores i'd rather just error out here. or even simpler i am ok with just leaving it as a convention but not actually preventing someone from using underscores.
Ticket
Changes
Context for reviewers
This PR provides a comprehensive revision for all of the setup documentation, with an emphasis on providing clear and consistent guidance on how to set up a new project with one or more applications. It addresses existing setup and update instructions that are not clear and/or have circular dependencies (e.g. should you set up network first or app first?).
The new documentation uses the same format for all set up documents:
All of the documentation has been revised for basic technical writing best practices (e.g. active voice over passive voice, short clear sentences, define new terms, etc).
Note: this PR does not attempt to address #581.
Testing
Testing setup
Our current scripting process recommends that users curl from the
mainbranch of this repo, so the changes in this PR follow that same pattern. That means that testing requires a manual (noted below).rocket/multi-app)./template-only-bin/download-and-install-app.sh, replacemain/template-only-binwithrocket/multi-app/template-only-bin./template-only-bin/update-template.sh, replacemain/template-only-binwithrocket/multi-app/template-only-bin.Test 1: Install into a project with a single app
Clone the nextjs template into a new directory.
Change into the new project directory
cd test-one-appDog-food the revised documentation in this PR. Start with the main README.md.
mainof the infra template.git commitafter installing and before configuring the infra template, so you can easily verify changes usinggit diff.Verify that the the full infra set up works as expected.
Screenshot showing a fully configured project
(No gif I created fit under the github file size limit of 10MB)Test 2: Update a project with a single app
Using the
test-one-appproject dir from Test 1, follow the update directions.curlcommand, but because that runs the version of the script onmainwithout the changes in this PR and you want to test the changes in this PR, instead run the following to update to the latest release version of the template:Read the output and run
git diffto verify changes.Example output for updating to a branch
Example output for updating to a tag
Test 3: Install into a project with multiple apps
Clone the nextjs template into a new directory.
Change into the new project directory
cd test-multiple-appsInstall the infra template. Run the normal install script to install the latest
mainof the infra template:curl https://raw.githubusercontent.com/navapbc/template-infra/main/template-only-bin/download-and-install-template.sh | bash -sRun
git committo commit the installed infra template.Before continuing with the remaining infra template installation steps, install a second app to the project by following these instructions.
second-app.curlcommand, but because that runs the version of the script onmainwithout the changes in this PR and you want to test the changes in this PR, instead run the following to update to the latest release version of the template:Run
git committo commit the installed second app.Dog-food the revised documentation in this PR. Start with the main README.md. Make sure to follow the "For exach application" sections!
Verify that the the full infra set up works as expected
Screenshot showing a configured account + network
Screenshot showing the first configured app
Screenshot showing the second configured app
Test 4: Update a project with multiple apps
Using the
test-multiple-appproject dir from Test 3, follow the update directions.curlcommand, but because that runs the version of the script onmainwithout the changes in this PR and you want to test the changes in this PR, instead run the following to update to the latest release version of the template:Read the output and run
git diffto verify changes.Example output for updating to a branch