-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploying_changes.erb
More file actions
69 lines (59 loc) · 3.85 KB
/
deploying_changes.erb
File metadata and controls
69 lines (59 loc) · 3.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<h1 class="govuk-heading-l">Deploying changes</h1>
<p class="govuk-body">
This page has a summary about how to deploy changes to different repositories/applications.
<p>
<p class="govuk-body">
For a more in depth explanation, you should read <a class="govuk-link" href="https://github.com/govuk-forms/forms-team/wiki/Deploying-to-production%3A-applications">Deploying to production: applications</a> and <a class="govuk-link" href="https://github.com/govuk-forms/forms-team/wiki/Deploying-to-production%3A-Terraform"> Deploying to production: Terraform</a> on the team wiki.
</p>
<h2 class="govuk-heading-m">GOV.UK Forms applications</h2>
<p class="govuk-body">
All GOV.UK Forms applications (
<a class="govuk-link" href="https://github.com/govuk-forms/forms-admin">forms-admin</a>,
<a class="govuk-link" href="https://github.com/govuk-forms/forms-runner">forms-runner</a> and
<a class="govuk-link" href="https://github.com/govuk-forms/forms-product-page">forms-product-page</a>)
have a pipeline per environment. Each pipeline exists in the account into which it deploys.
</p>
<p class="govuk-body">
To deploy a change to these applications, merge the change into the <code>main</code> branch. The change will be automatically deployed to staging, production, and user research environments in turn.
</p>
<p class="govuk-body">
To deploy a change to the infrastructure running these applications, see the
<a class="govuk-link" href="https://github.com/govuk-forms/forms-deploy">forms-deploy</a>
repository and <a class="govuk-link" href="#apply-terraform">Apply Terraform</a> pipelines.
</p>
<h2 class="govuk-heading-m">Pipeline visualiser (this tool)</h2>
<p class="govuk-body">
The pipeline visualiser tool lives <a class="govuk-link" href="https://github.com/govuk-forms/forms-deploy/tree/main/support/pipeline-visualiser">at <code>support/pipeline-visualiser/</code> in the forms-deploy repository</a>. It has a single pipeline that deploys changes to its one environment in the 'deploy' account.
</p>
<p class="govuk-body">
To deploy a change to it, or its infrastructure, merge the change into the <code>main</code> branch and it will be automatically picked up and deployed.
</p>
<h2 id="apply-terraform" class="govuk-heading-m">Apply Terraform (infrastructure)</h2>
<p class="govuk-body">
<a class="govuk-link" href="https://github.com/govuk-forms/forms-deploy">forms-deploy</a> has an 'Apply Terraform' pipeline per environment. The pipelines exist in the account into which it deploys.
</p>
<p class="govuk-body">
To deploy a change to the infrastructure, first merge the change into the <code>main</code> branch. The next step depends on what area of the infrastructure you have made a change to
</p>
<ul>
<li>
<p class="govuk-body"><strong>Infrastructure in the environment accounts </strong></p>
<p class="govuk-body">The change will be picked up by the pipelines and deployed automatically.</p>
</li>
<li>
<p class="govuk-body"><strong>Infrastructure in the 'deploy' account</strong></p>
<p class="govuk-body">Run <code>gds aws forms-deploy-admin – make deploy deploy/ROOT apply</code>,
where ROOT is the directory under <code>infra/deployments/deploy/</code> that you
have made a change to (or uses the module which you have made a change to)
</p>
<p class="govuk-body">
For example, if you made a change to files in <code>infra/deployments/deploy/ecr/</code>, the command
would be <code>gds aws forms-deploy-admin -- make deploy deploy/ecr apply</code>.
</p>
</li>
<li>
<p class="govuk-body"><strong>Infrastructure at the account level (under <code>infra/deployments/forms/account/</code>)</strong></p>
<p class="govuk-body">Run <code>gds aws forms-ENV-admin – make ENV forms/account apply</code></p>
<p class="govuk-body">where ENV is the name of the environment account you want to deploy to</p>
</li>
</ul>