Skip to content

Commit d1631b7

Browse files
authored
DEV-2485: AtmosWorkflow Component (#660)
1 parent 83fd1ae commit d1631b7

File tree

33 files changed

+260
-272
lines changed

33 files changed

+260
-272
lines changed

.github/actions/build-website/action.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ runs:
9393
- name: "Render Documentation for Terraform Components"
9494
shell: bash
9595
run: |
96-
rm -rf tmp/components/terraform-aws-components
9796
./scripts/render-docs-for-components.sh
9897
9998
- name: "Render Documentation for Terraform Modules"

docs/layers/accounts/account-baseline.mdx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import KeyPoints from '@site/src/components/KeyPoints';
88
import Steps from '@site/src/components/Steps';
99
import Step from '@site/src/components/Step';
1010
import StepNumber from '@site/src/components/StepNumber';
11+
import AtmosWorkflow from '@site/src/components/AtmosWorkflow';
1112

1213
<Intro>
1314
Now that all the accounts have been deployed, we need to finalize the setup of the accounts. This includes deploying CloudTrail and ECR. These foundational components will be necessary to move forward with the rest of the deployment.
@@ -23,8 +24,6 @@ Now that all the accounts have been deployed, we need to finalize the setup of t
2324

2425
Deploy CloudTrail and ECR with the following workflow:
2526

26-
```bash
27-
atmos workflow deploy -f baseline
28-
```
27+
<AtmosWorkflow workflow="deploy" fileName="baseline" />
2928
</Step>
3029
</Steps>

docs/layers/accounts/deploy-accounts.mdx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import Steps from '@site/src/components/Steps';
1010
import Step from '@site/src/components/Step';
1111
import StepNumber from '@site/src/components/StepNumber';
1212
import Note from '@site/src/components/Note';
13+
import AtmosWorkflow from '@site/src/components/AtmosWorkflow';
1314

1415
<Intro>
1516
This step-by-step process outlines how to deploy AWS accounts using `atmos` workflows and ClickOps steps. It covers necessary preparations, such as configuring the AWS Organization, increasing account quotas, and verifying account configurations. The guide details the deployment processes and post-deployment configurations, including setting up account settings, enabling AWS RAM for Organizations, and performing certain manual configurations via ClickOps.
@@ -42,9 +43,8 @@ This step-by-step process outlines how to deploy AWS accounts using `atmos` work
4243
<Step>
4344
## <StepNumber/> Deploy the AWS Organization:
4445

45-
```bash
46-
atmos workflow deploy/organization -f accounts
47-
```
46+
<AtmosWorkflow workflow="deploy/organization" fileName="accounts" />
47+
4848
</Step>
4949

5050
<Step>
@@ -78,9 +78,7 @@ This step-by-step process outlines how to deploy AWS accounts using `atmos` work
7878

7979
Once confident, begin the accounts deployment:
8080

81-
```bash
82-
atmos workflow deploy/accounts -f accounts
83-
```
81+
<AtmosWorkflow workflow="deploy/accounts" fileName="accounts" />
8482

8583
These deployments will create all AWS member accounts and store relevant account metadata as "mappings" in the Terraform
8684
outputs of the `account-map` component. Rather than querying this `account` component each time we need an Account ID or
@@ -90,8 +88,9 @@ This step-by-step process outlines how to deploy AWS accounts using `atmos` work
9088
Always run `atmos terraform apply account-map -s core-gbl-root` after provisioning accounts.
9189
</Note>
9290

93-
Once you've created the accounts, you'll need to provision the baseline configuration within the accounts themselves.
94-
This is accomplished by running `atmos workflow deploy/account-settings -f accounts`.
91+
Once you've created the accounts, you'll need to provision the baseline configuration within the accounts themselves. Run the following:
92+
93+
<AtmosWorkflow workflow="deploy/account-settings" fileName="accounts" />
9594

9695
The workflows will kick off several sequential Terraform runs to provision all the AWS member account settings for
9796
member accounts in the Organization.

docs/layers/accounts/initialize-tfstate.mdx

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ import Intro from '@site/src/components/Intro';
77
import KeyPoints from '@site/src/components/KeyPoints';
88
import Note from '@site/src/components/Note';
99
import Steps from '@site/src/components/Steps';
10+
import Step from '@site/src/components/Step';
11+
import StepNumber from '@site/src/components/StepNumber';
12+
import AtmosWorkflow from '@site/src/components/AtmosWorkflow';
1013

1114
<Intro>
1215
Follow these steps to configure and initialize the Terraform state backend using Atmos, ensuring proper setup of the infrastructure components and state management.
@@ -27,20 +30,32 @@ If you're unfamiliar with atmos, you can read more about it [here](https://atmos
2730
If you look at `components/terraform/`, you'll see a bunch of directories. These contain Terraform "root modules" that are provisioned with Atmos. At first they'll only have their vendor files, such as `components/terraform/tfstate-backend/component.yaml`.
2831

2932
<Steps>
30-
1. You can use `atmos workflow vendor -f baseline` to vendor all the `baseline` modules, if the Terraform files are not
31-
present. You'll want to at least see Terraform files in `tfstate-backend` and `account-map`.
33+
<Step>
34+
## <StepNumber/> Vendor the Terraform State Backend component
3235

33-
2. Once you've done that, you can run `atmos workflow init/tfstate -f baseline` to deploy the Terraform Backend.
34-
<Note>it can take a minute for the S3 buckets you created to become available. The workflow will attempt to wait until the bucket is created and available, with a 5-second delay between each check.</Note>
36+
Vendor the Terraform State Backend component by running the following command. The steps here require the `tfstate-backend` and `account-map` components.
3537

36-
3. Wait until you see the following prompt
38+
<AtmosWorkflow workflow="vendor" fileName="baseline" />
39+
40+
</Step>
41+
<Step>
42+
## <StepNumber/> Initialize the Terraform State Backend
43+
44+
Initialize the Terraform State Backend by running the following command:
45+
46+
<AtmosWorkflow workflow="init/tfstate" fileName="baseline" />
47+
</Step>
48+
49+
<Step>
50+
## <StepNumber/> Migrate all workspaces to S3
51+
52+
When prompted, type `yes` to migrate all workspaces to S3.
3753

3854
```shell
3955
Initializing the backend...
4056
Do you want to migrate all workspaces to "s3"?
4157
```
42-
43-
4. Type `yes` to continue. This will migrate the state from the local backend to the s3 backend.
58+
</Step>
4459
</Steps>
4560

4661
:::info Granting SuperAdmin Access to Terraform State

docs/layers/alerting/setup.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ sidebar_position: 2
55
---
66
import Intro from '@site/src/components/Intro';
77
import KeyPoints from '@site/src/components/KeyPoints';
8+
import AtmosWorkflow from '@site/src/components/AtmosWorkflow';
89

910
## Quick Start
1011

@@ -16,9 +17,9 @@ Please follow the sign up steps in [How to Sign Up for OpsGenie](/layers/alertin
1617

1718
### Vendor
1819

19-
Like most other components we need to vendor in the component. This can be done with
20+
Like most other components we need to vendor in the component. This can be done with the following:
2021

21-
`atmos workflow vendor -f alerting` or `atmos vendor pull --component opsgenie-team`.
22+
<AtmosWorkflow workflow="vendor" fileName="alerting" />
2223

2324
### Deploy
2425

docs/layers/data/setup.mdx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import Intro from '@site/src/components/Intro';
88
import KeyPoints from '@site/src/components/KeyPoints';
99
import Steps from '@site/src/components/Steps'
1010
import Note from '@site/src/components/Note'
11+
import AtmosWorkflow from '@site/src/components/AtmosWorkflow';
1112

1213
## Quick Start
1314

@@ -49,9 +50,7 @@ At the moment we have support for:
4950

5051
Vendor all data components with the following workflow:
5152

52-
```bash
53-
atmos workflow vendor -f data
54-
```
53+
<AtmosWorkflow workflow="vendor" fileName="data" />
5554

5655
These run several vendor commands for each included component. You can always run these commands individually to update
5756
any single component. For example:
@@ -67,6 +66,4 @@ atmos vendor pull -c aurora-postgres
6766
In order to deploy database, deploy both the cluster and the resources component (if applicable). Applying changes to
6867
the resources component requires a VPN connection. For example,
6968

70-
```bash
71-
atmos workflow deploy/all -f data
72-
```
69+
<AtmosWorkflow workflow="deploy/all" fileName="data" />

docs/layers/ecs/deploy-clusters.mdx

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import KeyPoints from '@site/src/components/KeyPoints';
88
import Steps from '@site/src/components/Steps'
99
import Step from '@site/src/components/Step'
1010
import StepNumber from '@site/src/components/StepNumber'
11+
import AtmosWorkflow from '@site/src/components/AtmosWorkflow';
1112

1213
## Quick Start
1314

@@ -38,16 +39,7 @@ All deployment steps below assume that the environment has been successfully set
3839

3940
Vendor these components with the included Atmos Workflows.
4041

41-
```bash
42-
atmos workflow vendor -f ecs
43-
```
44-
45-
or for each component:
46-
47-
```bash
48-
atmos vendor pull --component ecs
49-
atmos vendor pull --component ecs-service
50-
```
42+
<AtmosWorkflow workflow="vendor" fileName="ecs" />
5143

5244
</Step>
5345

@@ -66,11 +58,9 @@ All deployment steps below assume that the environment has been successfully set
6658

6759
First deploy all required ACM certificates for each ECS cluster. These certificates validate the given service domain. You can deploy these certificates before associating the given Route 53 Hosted Zone with the purchased domain in your chosen Domain Registrar, but the certificate will not be ISSUED until the registered domain and Hosted Zone are connected.
6860

69-
Run the following Atmos Workflow to deploy every required ACM certificate for ECS.
61+
Run the following to deploy every required ACM certificate for ECS.
7062

71-
```bash
72-
atmos workflow deploy/ecs-acm -f ecs
73-
```
63+
<AtmosWorkflow workflow="deploy/ecs-acm" fileName="ecs" />
7464

7565
</Step>
7666

@@ -91,11 +81,9 @@ All deployment steps below assume that the environment has been successfully set
9181
<Step>
9282
## <StepNumber/> Deploy All Clusters
9383

94-
Run the following Atmos Workflow to deploy every ECS cluster. This workflow will deploy every required platform cluster.
84+
Run the following to deploy every ECS cluster. This workflow will deploy every required platform cluster.
9585

96-
```bash
97-
atmos workflow deploy/clusters -f ecs
98-
```
86+
<AtmosWorkflow workflow="deploy/clusters" fileName="ecs" />
9987

10088
</Step>
10189
</Steps>

docs/layers/ecs/provision-services.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import KeyPoints from '@site/src/components/KeyPoints';
88
import Steps from '@site/src/components/Steps'
99
import Step from '@site/src/components/Step'
1010
import StepNumber from '@site/src/components/StepNumber'
11+
import AtmosWorkflow from '@site/src/components/AtmosWorkflow';
1112

1213
<Intro>
1314
Provision an example service like the Echo server to test your cluster’s functionality. This will ensure you can access the service remotely via the load balancer, both publicly and privately through the VPN.
@@ -25,12 +26,10 @@ Once the cluster is up and running, continue with the first ECS service deployme
2526
<Step>
2627
## <StepNumber/> Deploy Echo Server
2728

28-
Run the following Atmos Workflow to deploy `ecs/platform/service/echo-server` and
29+
Run the following to deploy `ecs/platform/service/echo-server` and
2930
`ecs/platform/service/echo-server-private` to every cluster.
3031

31-
```bash
32-
atmos workflow deploy/echo-server -f ecs
33-
```
32+
<AtmosWorkflow workflow="deploy/echo-server" fileName="ecs" />
3433

3534
</Step>
3635

docs/layers/eks/deploy-clusters.mdx

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import Steps from '@site/src/components/Steps'
99
import Step from '@site/src/components/Step'
1010
import StepNumber from '@site/src/components/StepNumber'
1111
import Note from '@site/src/components/Note'
12+
import AtmosWorkflow from '@site/src/components/AtmosWorkflow';
1213

1314
## Quick Start
1415

@@ -48,15 +49,7 @@ All deployment steps below assume that the environment has been successfully set
4849

4950
Vendor these components with the included Atmos Workflows.
5051

51-
```bash
52-
atmos workflow vendor -f eks
53-
```
54-
55-
or for each component. See `stacks/workflows/eks.yaml` for a complete list.
56-
57-
```bash
58-
atmos vendor pull --component eks/cluster
59-
```
52+
<AtmosWorkflow workflow="vendor" fileName="eks" />
6053
</Step>
6154

6255
<Step>
@@ -79,9 +72,7 @@ All deployment steps below assume that the environment has been successfully set
7972
In order for Karpenter to reserve Spot Instances, the cluster needs to have a Service-Linked Role. Deploy these to all
8073
cluster accounts with `iam-service-linked-roles`
8174

82-
```bash
83-
atmos workflow deploy/iam-service-linked-roles -f eks
84-
```
75+
<AtmosWorkflow workflow="deploy/iam-service-linked-roles" fileName="eks" />
8576
</Step>
8677

8778
<Step>
@@ -90,9 +81,7 @@ All deployment steps below assume that the environment has been successfully set
9081
First deploy the cluster and AWS EFS. Since Karpenter will be used in the following steps, the initial cluster is
9182
deployed without Nodes.
9283

93-
```bash
94-
atmos workflow deploy/cluster -s plat-use1-dev -f eks
95-
```
84+
<AtmosWorkflow workflow="deploy/cluster" fileName="eks" stack="plat-use1-dev"/>
9685
</Step>
9786

9887
<Step>
@@ -104,9 +93,7 @@ All deployment steps below assume that the environment has been successfully set
10493

10594
Run the Atmos Workflow to deploy all required `plat` components.
10695

107-
```bash
108-
atmos workflow deploy/resources -s plat-use1-dev -f eks
109-
```
96+
<AtmosWorkflow workflow="deploy/resources" fileName="eks" stack="plat-use1-dev"/>
11097

11198
Validate the cluster deployment with `eks/echo-server` and the targeted service domain. The following URL should return
11299
a success message for `dev`:
@@ -121,10 +108,8 @@ All deployment steps below assume that the environment has been successfully set
121108

122109
Repeat the same deployment steps in `staging`
123110

124-
```bash
125-
atmos workflow deploy/cluster -s plat-use1-staging -f eks
126-
atmos workflow deploy/resources -s plat-use1-staging -f eks
127-
```
111+
<AtmosWorkflow workflow="deploy/cluster" fileName="eks" stack="plat-use1-staging"/>
112+
<AtmosWorkflow workflow="deploy/resources" fileName="eks" stack="plat-use1-staging"/>
128113

129114
Validate `staging`: https://echo.use1.staging.plat.acme-svc.com/
130115
</Step>
@@ -134,10 +119,8 @@ All deployment steps below assume that the environment has been successfully set
134119

135120
Then deploy `prod`
136121

137-
```bash
138-
atmos workflow deploy/cluster -s plat-use1-prod -f eks
139-
atmos workflow deploy/resources -s plat-use1-prod -f eks
140-
```
122+
<AtmosWorkflow workflow="deploy/cluster" fileName="eks" stack="plat-use1-prod"/>
123+
<AtmosWorkflow workflow="deploy/resources" fileName="eks" stack="plat-use1-prod"/>
141124

142125
Validate `prod`: https://echo.use1.prod.plat.acme-svc.com/
143126
</Step>

docs/layers/github-actions/eks-github-actions-controller.mdx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import KeyPoints from '@site/src/components/KeyPoints';
77
import Note from '@site/src/components/Note';
88
import Step from '@site/src/components/Step';
99
import StepNumber from '@site/src/components/StepNumber';
10+
import AtmosWorkflow from '@site/src/components/AtmosWorkflow';
1011

1112
<Intro>
1213
The GitHub Action Runner Controller (ARC) is a Kubernetes operator that automates the management of self-hosted GitHub Actions runners in a Kubernetes cluster, that works very well together with Karpenter for EKS.
@@ -120,9 +121,7 @@ GitHub Repository or Organization
120121
<Note title="Tip">
121122
The first three steps before are all included in the following workflow:
122123

123-
```bash
124-
atmos workflow deploy/github-runners -f github
125-
```
124+
<AtmosWorkflow workflow="deploy/github-runners" fileName="github" />
126125
</Note>
127126

128127
<Step>
@@ -141,10 +140,8 @@ GitHub Repository or Organization
141140

142141
Deploy the cluster with the same commands as `plat` cluster deployments:
143142

144-
```bash
145-
atmos workflow deploy/cluster -f eks -s core-use1-auto
146-
atmos workflow deploy/resources -f eks -s core-use1-auto
147-
```
143+
<AtmosWorkflow workflow="deploy/cluster" fileName="eks" stack="core-use1-auto"/>
144+
<AtmosWorkflow workflow="deploy/resources" fileName="eks" stack="core-use1-auto"/>
148145

149146
Validate the `core-auto` deployment using Echo Server. For example: https://echo.use1.auto.core.acme-svc.com/
150147
</Step>

0 commit comments

Comments
 (0)