-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #315 from govuk-one-login/BAU/update-infra-readme
BAU: Update infrastructure README
- Loading branch information
Showing
1 changed file
with
16 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,30 @@ | ||
### Setup | ||
## Setup | ||
|
||
Clone the repo https://github.com/alphagov/di-devplatform-deploy in a directory next to this repo. | ||
|
||
### Required CLIs | ||
Install required CLIs: | ||
|
||
To run this tool you will need the below CLI's | ||
|
||
* aws cli for management of Cloudformation stacks | ||
* jq for formatting and conversion | ||
* `aws-cli` for management of CloudFormation stacks | ||
* `jq` for formatting and conversion | ||
|
||
## How to use | ||
|
||
Login into AWS with SSO on the browser. Choose an account, and select `Command line or programmatic access`. In your | ||
terminal, run `aws configure sso` and enter the start URL and region from AWS on your browser. This will create a | ||
profile that you can set as an environment variable, by running `export AWS_PROFILE=<profile>`. | ||
Login into AWS with SSO on the browser. Choose an account, and select _Access Keys_. | ||
|
||
Run `aws configure sso` and enter the start URL and region from AWS on your browser. | ||
|
||
Set the resulting profile as an environment variable, by running `export AWS_PROFILE=<profile>`. | ||
|
||
Run `./provision_all.sh <environment>`, replacing `<environment>` with `dev` or `build`. | ||
|
||
After this you can then run the below, replacing `<environment>`with one | ||
of `dev`, `build`: | ||
|
||
```shell | ||
./provision_all.sh <environment> | ||
``` | ||
|
||
## Provisioning Dev | ||
## Provisioning dev ECR | ||
|
||
When provisioning the dev resources there are some that need to be done manually. This is due to the dev environment being in | ||
the same account as other environments. As a temporary way to deploy provisioned resources the `provision_dev.sh` script should be run in addition to the `provision_all.sh` script. The `provision_dev.sh` script is needed to deploy a `dev` ECR as the stack needs to be uniquely named. | ||
The dev ECR resource needs to be provisioned separately, because the dev environment is in the same account as other environments, which causes naming conflicts. | ||
|
||
```shell | ||
./provision_dev.sh | ||
``` | ||
To provision the dev ECR, run `./provision_dev.sh` (after running `./provision_all.sh dev`). This is temporary workaround until dev exists in its own AWS account. | ||
|
||
## How to update | ||
## Updating stack parameters | ||
|
||
To update the parameters used for our stacks, please update the parameters in | ||
the `configuration/[ENVIRONMENT]/[PIPELINE]/parameters.json` files. | ||
Stack parameters can be updated in /_configuration/\<environment>/\<pipeline>/parameters.json_. |