Skip to content

Commit cdc56df

Browse files
authored
Update ref-arc-setup guide (#190)
1 parent 70d8af3 commit cdc56df

File tree

3 files changed

+178
-49
lines changed

3 files changed

+178
-49
lines changed

docs/guides/reference-architecture/configuration-guide/index.md

Lines changed: 49 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ We recommend that you use the Gruntwork CLI tool to automate most of this proces
1212

1313
:::
1414

15-
:::caution
15+
:::note
1616

17-
Caveat: at this time, the Reference Architecture does not configure or manage the root/management account of an AWS Organization set up. That is, it does not include the [`account-baseline-root` module](https://github.com/gruntwork-io/terraform-aws-service-catalog/tree/master/modules/landingzone/account-baseline-root). Gruntwork is planning to add this in a future enhancement to the reference architecture.
17+
At this time, the Reference Architecture does not configure or manage the root/management account of an AWS Organization set up. That is, it does not include the [`account-baseline-root` module](https://github.com/gruntwork-io/terraform-aws-service-catalog/tree/master/modules/landingzone/account-baseline-root). Gruntwork is planning to add this in a future enhancement to the reference architecture.
1818

1919
:::
2020

@@ -24,15 +24,15 @@ The very first step is to clone this repository to your local machine. You must
2424

2525
1. Clone the repository.
2626

27-
```bash
28-
git clone [email protected]:gruntwork-clients/<this-repo>.git
29-
```
27+
```bash
28+
git clone [email protected]:gruntwork-clients/<this-repo>.git
29+
```
3030

31-
1. Check out a new branch with your changes:
31+
2. Check out a new branch with your changes:
3232

33-
```bash
34-
git checkout -b ref-arch-form
35-
```
33+
```bash
34+
git checkout -b ref-arch-form
35+
```
3636

3737
## Create and configure AWS Accounts
3838

@@ -49,16 +49,18 @@ The very first step is to clone this repository to your local machine. You must
4949

5050
1. These account IDs will go under `AWSAccounts` in the reference architecture form.
5151

52+
:::info
53+
5254
For the best results, use [Gruntwork CLI](https://github.com/gruntwork-io/gruntwork) to create the accounts. The Gruntwork CLI automatically grants Gruntwork engineers access to your accounts through an IAM role. However, **if you choose to create the accounts manually and do not use the Gruntwork CLI, you still MUST run the `gruntwork aws grant` command to grant the Gruntwork team access to these accounts**. MFA is enforced for all Gruntwork access. You can use the same tool to revoke access when the deployment is complete. See [CLI documentation](https://github.com/gruntwork-io/gruntwork) for details.
5355

54-
:::info
56+
:::
57+
58+
**Important**:
5559

5660
- The accounts must be new, empty accounts, with no resources present. That means no EC2 instances, RDS databases, CloudTrail trails, AWS Config recorders, etc.
5761
- Do not apply any Service Control Policies to the accounts as they may interfere with the Terraform resources in the Reference Architecture.
5862
- You can name the _dev, stage,_ and _prod_ accounts anything you like, but the others must be named _shared_, _logs_, and _security_.
5963

60-
:::
61-
6264
## Purchase and register domain names
6365

6466
The Reference Architecture uses Route 53 to setup public DNS records for several aspects of the infrastructure, such as the network bastion and the [AWS Sample App](https://github.com/gruntwork-io/aws-sample-app/). For this to work, we ask that you set up domains for each application account (_dev_, _stage_, and _prod_) and, if you’re using Jenkins, in the _shared_ account. These domains should be configured as public hosted zones in Route 53. There are two options for domain registration:
@@ -101,27 +103,27 @@ Once everything is configured up correctly, check that you can resolve the domai
101103

102104
1. On MacOS or Linux, use `dig` to confirm that the domain can be resolved correctly over the Internet:
103105

104-
```bash
105-
$ dig gruntwork.in +short ns
106-
ns-1202.awsdns-22.org.
107-
ns-1749.awsdns-26.co.uk.
108-
ns-559.awsdns-05.net.
109-
ns-67.awsdns-08.com.
110-
```
106+
```bash
107+
$ dig gruntwork.in +short ns
108+
ns-1202.awsdns-22.org.
109+
ns-1749.awsdns-26.co.uk.
110+
ns-559.awsdns-05.net.
111+
ns-67.awsdns-08.com.
112+
```
111113

112114
1. On Windows, use `nslookup`:
113115

114-
```bash
115-
$ nslookup -type=mx gruntwork.in
116-
Server: 8.8.8.8
117-
Address: 8.8.8.8#53
116+
```bash
117+
$ nslookup -type=mx gruntwork.in
118+
Server: 8.8.8.8
119+
Address: 8.8.8.8#53
118120
119-
Non-authoritative answer:
120-
gruntwork.in nameserver = ns-1202.awsdns-22.org.
121-
gruntwork.in nameserver = ns-1749.awsdns-26.co.uk.
122-
gruntwork.in nameserver = ns-559.awsdns-05.net.
123-
gruntwork.in nameserver = ns-67.awsdns-08.com.
124-
```
121+
Non-authoritative answer:
122+
gruntwork.in nameserver = ns-1202.awsdns-22.org.
123+
gruntwork.in nameserver = ns-1749.awsdns-26.co.uk.
124+
gruntwork.in nameserver = ns-559.awsdns-05.net.
125+
gruntwork.in nameserver = ns-67.awsdns-08.com.
126+
```
125127

126128
Notice that the NS records in the image match the values returned by the commands. The same process applies if you’re using subdomains. Make sure to validate each domain or subdomain in this manner.
127129

@@ -132,8 +134,12 @@ Notice that the NS records in the image match the values returned by the command
132134
3. `InfraLiveRepoSSHURL` is where you enter this repo’s SSH URL (e.g. <[email protected]>:gruntwork-io/infrastructure-live.git).
133135
4. `InfraLiveDefaultBranchName` is where you enter your repo’s default branch name (e.g. main).
134136

137+
:::info
138+
135139
This current repository will contain all of the infrastructure code you need to extend and operate the environment. For you to have access to all the code, you should copy this code into your newly created _infrastructure-live_ repo once the deployment is done.
136140

141+
:::
142+
137143
## Set up the machine user
138144

139145
Whatever VCS platform you are using, do this:
@@ -182,28 +188,32 @@ The [reference architecture form](https://github.com/gruntwork-clients/infrastru
182188

183189
You’ll need all the information you’ve noted in the previous steps. This is where you’ll also be able to customize your infrastructure by choosing a compute option (e.g. ASG, ECS, or EKS), a cache cluster (Redis or Memcached), and a database (e.g. MySQL, PostgreSQL, Aurora, etc). The form contains detailed descriptions of each field.
184190

191+
:::caution
192+
185193
YAML files are space-sensitive. As you edit the file, be sure to retain the correct whitespace! This should be apparent as you review the file.
186194

195+
:::
196+
187197
1. Open `reference-architecture-form.yml` in a text editor.
188-
1. Update the _replace-me_ placeholder text in each field. Use double quotes (`""`) to wrap the values, as shown in the examples.
198+
2. Update the _replace-me_ placeholder text in each field. Use double quotes (`""`) to wrap the values, as shown in the examples.
189199

190200
If you’re unsure about how to answer any of the questions, email <[email protected]> and let us know!
191201

192202
## Complete the set up process and open a pull request for Gruntwork
193203

194204
1. Review your changes. If you notice any errors, correct them, and rerun:
195205

196-
```bash
197-
git diff
198-
```
206+
```bash
207+
git diff
208+
```
199209

200210
1. Commit the changes and push to the remote repository:
201211

202-
```bash
203-
git add reference-architecture-form.yml
204-
git commit -m 'Completed reference architecture form.'
205-
git push origin ref-arch-form
206-
```
212+
```bash
213+
git add reference-architecture-form.yml
214+
git commit -m 'Completed reference architecture form.'
215+
git push origin ref-arch-form
216+
```
207217

208218
1. [Open a pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request). Gruntwork will review the pull request, resolve any open questions or issues, then merge and begin the deployment.
209219

@@ -231,7 +241,6 @@ Choose a name for the secret (we’ve chosen _GitHubPAT_ here), then click _Next
231241

232242
In the ref arch form, `VCSPATSecretsManagerARN` is where you enter this ARN.
233243

234-
235244
<!-- ##DOCS-SOURCER-START
236-
{"sourcePlugin":"local-copier","hash":"745a1271cf4657c0800489c9de81cac6"}
245+
{"sourcePlugin":"ref-arc-setup","hash":"a2773bd8ff6be8f327c128ca7e4575b8"}
237246
##DOCS-SOURCER-END -->

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"typescript": "^4.3.5"
4747
},
4848
"optionalDependencies": {
49-
"docs-sourcer": "git+ssh://[email protected]/gruntwork-io/docs-sourcer.git#v0.0.10"
49+
"docs-sourcer": "git+ssh://[email protected]/gruntwork-io/docs-sourcer.git#v0.0.12"
5050
},
5151
"browserslist": {
5252
"production": [

0 commit comments

Comments
 (0)