You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/01-Set-Up-AWS-Account-and-Config-Repo.md
+161Lines changed: 161 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,3 +77,164 @@ This is not to be confused with Prefix or S3 object prefix. This is purely for n
77
77
If supplied this will pre-pend this value to all S3 buckets created by infrastructure stacks (as long as it is included in the template).
78
78
79
79
This can be used to provide permissions (requires templates to only create S3 buckets under this prefix) and shorten the bucket name. If this is not required and not supplied then bucket names will include the account and region. This makes for a unique but long name. S3 names have a limit of 63 characters. If your organization requires a prefix, it is up to you to make sure they are unique.
80
+
81
+
### Set up defaults
82
+
83
+
Update `defaults/defaults.json` and `defaults/settings.json`
84
+
85
+
#### defaults.json
86
+
87
+
If SAM has been used on your account before, AWS SAM will have created an S3 bucket with the name `cf-*`. You may use that as both the `atlantis.s3_bucket` and `parameter_overrides.S3ArtifactsBucket` values in `defaults.json`.
88
+
89
+
If you do not require a `PermissionsBoundary` then remove the arn value from `parameter_overrides.PermissionsBoundary`.
90
+
91
+
Be sure to change `atlantis.region` and `parameter_overrides.S3BucketNameOrgPrefix` for your organization.
92
+
93
+
Finally, though the rest of the values are recommended, update to suit your needs.
94
+
95
+
You may also create `*-defaults.json` for each Prefix. After creating the Pipeline service role you will include the servie role's ARN in the appropriate defaults file.
96
+
97
+
#### settings.json
98
+
99
+
Out of the box, settings.json can remain the way it is with the default values.
100
+
101
+
##### templates
102
+
103
+
```json
104
+
{
105
+
"templates": [
106
+
{
107
+
"bucket": "63klabs",
108
+
"prefix": "atlantis/templates/v2",
109
+
"anonymous": true
110
+
}
111
+
]
112
+
}
113
+
```
114
+
115
+
Out of the box you can use the public templates provided by 63klabs. This is recommended for those just getting started or using these templates for training and educational purposes.
116
+
117
+
This is an S3 bucket that acts as a central source containing all the templates and template modules to be used for pipelines, storage, roles, and networks.
118
+
119
+
If you or or organization wants to manage your own S3 bucket of templates, you can use the deployment scripts and templates found on [Atlantis Template Repository for Serverless Deployments using AWS SAM and CloudFormation](https://github.com/63Klabs/atlantis-cfn-template-repo-for-serverless-deployments) which is the source repository for the 63klabs bucket.
120
+
121
+
Because the 63klabs bucket is public, `anonymous` is set to `true`. When using your own private bucket set it to `false` and ensure your developers have permission to access it when running the cli commands for configuration and deployments.
122
+
123
+
Since `template` is an array, you can list more than one bucket.
124
+
125
+
##### app_starters
126
+
127
+
```json
128
+
{
129
+
"app_starters": [
130
+
{
131
+
"bucket": "63klabs",
132
+
"prefix": "atlantis/app-starters/v2",
133
+
"anonymous": true
134
+
}
135
+
]
136
+
}
137
+
```
138
+
139
+
Like the templates bucket, this is a bucket for downloading starter code into a repository. Also, like the template bucket settings, more than one bucket may be used as a source.
140
+
141
+
Developers can run the `create_repo.py` command to automatically create a repository and seed it with starter code to quickly get started.
142
+
143
+
The `app-starters` provided by the 63klabs bucket are zipped directly from releases of their perpective GitHub repository. For a sampling of apps available, visit the [63Klabs GitHub](https://github.com/63klabs).
144
+
145
+
Developers can also point the `--source` to any public repository or zip file when invoking the `create_repo.py` script.
146
+
147
+
##### repositories
148
+
149
+
```json
150
+
{
151
+
"repositories": {
152
+
"provider": "codecommit"
153
+
}
154
+
}
155
+
```
156
+
157
+
There is only one setting for `repositories` at this time: `provider`.
158
+
159
+
This is the default provider for the `create_repo.py` script if `--provider` is not provided as a script argument.
160
+
161
+
The values are either `codecommit` or `github`.
162
+
163
+
If provider is `codecommit` when running the `create_repo` script then a CodeCommit repository is created. If it is `github` then a GitHub repository is created.
When running the `update.py` script, this is where the updates will come from. The `source` needs to be a public GitHub repository or an S3 bucket the user profile has access to.
178
+
179
+
The `ver` value can be locked to a specific release, the latest release, or even the latest commit (only if you are brave).
180
+
181
+
For GitHub as a source, `ver` can be:
182
+
183
+
-`commit:latest`
184
+
-`release:latest`
185
+
-`release:<tag>`
186
+
187
+
For S3 as a source, `ver` can be:
188
+
189
+
-`latest`
190
+
-`<version_id>` of the S3 object
191
+
192
+
You can specify either `docs`, `cli` or both to update. It is recommended you perform regular updates to receive the latest fixes and features.
Get the ARN of the service role from the output and add to the `*-defaults.json` file for the prefix.
231
+
232
+
For example, for the prefix `acme`, update `defaults/acme-defaults.json` and set `atlantis.PipelineServiceRoleArn`.
233
+
234
+
Be sure to commit your changes to the SAM config repository for others to use.
235
+
236
+
## Set-Up Complete
237
+
238
+
Do a run through of using the `create_repo.py`, `config.py`, and `deploy.py` scripts to ensure everything is working.
239
+
240
+
For information on using these scripts see the [In-Depth Guide](./in-depth/10-In-Depth-Guide.md)) or the [Atlantis Tutorials repository](http://github.com/63klabs/atlantis-tutorials).
0 commit comments