Skip to content

Commit

Permalink
Merge pull request #315 from govuk-one-login/BAU/update-infra-readme
Browse files Browse the repository at this point in the history
BAU: Update infrastructure README
  • Loading branch information
billrdunn committed Jun 20, 2024
2 parents 1103ad9 + 3e87c4e commit 3af1de8
Showing 1 changed file with 16 additions and 23 deletions.
39 changes: 16 additions & 23 deletions infrastructure/README.md
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_.

0 comments on commit 3af1de8

Please sign in to comment.