Skip to content

Commit bfb88a8

Browse files
committed
Small corrections to quickstart after QA'ing recent changes to Dockerfile from non-root user to root
1 parent c6884f8 commit bfb88a8

File tree

2 files changed

+50
-21
lines changed

2 files changed

+50
-21
lines changed

cdk.context.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,37 @@
6363
},
6464
"key-provider:account=905418347382:aliasName=alias/eks/lower-envs:region=ca-central-1": {
6565
"keyId": "2c710e12-cad3-42f5-a92f-e7d7980aebea"
66+
},
67+
"vpc-provider:account=905418347382:filter.isDefault=false:filter.tag:Name=lower-envs-vpc:filter.vpc-id=vpc-0f79593fc83da0b82:region=ca-central-1:returnAsymmetricSubnets=true": {
68+
"vpcId": "vpc-0f79593fc83da0b82",
69+
"vpcCidrBlock": "10.99.0.0/16",
70+
"ownerAccountId": "905418347382",
71+
"availabilityZones": [],
72+
"subnetGroups": [
73+
{
74+
"name": "Private",
75+
"type": "Private",
76+
"subnets": [
77+
{
78+
"subnetId": "subnet-05cc9568f5db856f2",
79+
"cidr": "10.99.32.0/19",
80+
"availabilityZone": "ca-central-1a",
81+
"routeTableId": "rtb-010c7b9bdb7d1d475"
82+
},
83+
{
84+
"subnetId": "subnet-0cc493d68888b47ca",
85+
"cidr": "10.99.64.0/19",
86+
"availabilityZone": "ca-central-1b",
87+
"routeTableId": "rtb-010c7b9bdb7d1d475"
88+
},
89+
{
90+
"subnetId": "subnet-00e3b357b26ccd5d0",
91+
"cidr": "10.99.96.0/19",
92+
"availabilityZone": "ca-central-1d",
93+
"routeTableId": "rtb-010c7b9bdb7d1d475"
94+
}
95+
]
96+
}
97+
]
6698
}
6799
}

docs/03_Quickstart/Quickstart.md

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ POLICYFILE
123123
aws iam create-role \
124124
--role-name $ROLE_NAME \
125125
--max-session-duration 3600 \
126-
--tags '{"Key": "Role Generated Using Docs In", "Value": "https://github.com/doitintl/eks-cdk-quickstart"}' \
126+
--tags '{"Key": "Role Generated Using Docs In", "Value": "https://github.com/doitintl/easyeks"}' \
127127
'{"Key": "Purpose", "Value": "Allows named human user to easily manually generate ephemeral IAM admin credentials for use by local docker IaC Automation"}' \
128128
--assume-role-policy-document file:///tmp/assume-role-policy.json
129129
aws iam attach-role-policy \
@@ -210,19 +210,19 @@ chmod +x /home/cloudshell-user/.local/bin/gencreds
210210
`[admin-user@local-machine:~]`
211211
```shell
212212
cd ~
213-
git clone https://$TOKEN_NAME:$TOKEN_PASS@github.com/doitintl/eks-cdk-quickstart.git
214-
cd ~/eks-cdk-quickstart
213+
git clone https://$TOKEN_NAME:$TOKEN_PASS@github.com/doitintl/easyeks.git
214+
cd ~/easyeks
215215
```
216216

217217
### Step 4: Use a Dockerfile in the repo to build a custom docker image for local use
218-
* `[admin-user@local-machine:~/eks-cdk-quickstart]`
218+
* `[admin-user@local-machine:~/easyeks]`
219219
```shell
220-
cd ~/eks-cdk-quickstart
220+
cd ~/easyeks
221221
time docker build . --tag local-image
222222
```
223223

224224
### Step 5: Run the local-image with an interactive shell
225-
* `[admin-user@local-machine:~/eks-cdk-quickstart]`
225+
* `[admin-user@local-machine:~/easyeks]`
226226
```shell
227227
docker run -it --hostname dockerized-cdk-runner local-image bash
228228
```
@@ -250,7 +250,7 @@ chmod +x /home/cloudshell-user/.local/bin/gencreds
250250

251251
### Step 1: Use docker shell to bootstrap cdk
252252
* Verify IAM rights, then Bootstrap cdk:
253-
`[user@dockerized-cdk-runner:/app $]`
253+
`[root@dockerized-cdk-runner:/app $]`
254254
```shell
255255
aws sts get-caller-identity
256256
export AWS_REGION="ca-central-1"
@@ -269,25 +269,25 @@ cdk bootstrap
269269

270270
### Step 2: Use docker shell to list stacks and deploy VPC
271271
* run cdk list:
272-
`[user@dockerized-cdk-runner:/app $]`
272+
`[root@dockerized-cdk-runner:/app $]`
273273
```shell
274274
export AWS_REGION="ca-central-1"
275275
time cdk list
276276
cdk deploy lower-envs-vpc
277277
```
278-
* Note: cdk list won't be instant, for me it took about 7 seconds.
278+
* Note: cdk list won't be instant, it took about 15 seconds on an M3 Mac.
279279
* Also you'll notice a prompt 'Do you wish to deploy these changes (y/n)?'
280-
* ETA on VPC deployment = 3.5 minutes
280+
* ETA on deployment of lower-envs-vpc = 3.5 minutes
281281

282282
### Step 3: Use docker shell to list stacks and deploy dev1-eks (cluster)
283283
* run cdk list:
284-
`[user@dockerized-cdk-runner:/app $]`
284+
`[root@dockerized-cdk-runner:/app $]`
285285
```shell
286286
export AWS_REGION="ca-central-1"
287287
time cdk list
288288
cdk deploy dev1-eks
289289
```
290-
* ETA on VPC deployment = ~15 minutes
290+
* ETA on deployment of dev1-eks = ~18 minutes
291291
* At the end you should see feedback similar to the following:
292292
```console
293293
Do you wish to deploy these changes (y/n)? y
@@ -296,18 +296,15 @@ dev1-eks: creating CloudFormation changeset...
296296

297297
✅ dev1-eks
298298

299-
✨ Deployment time: 893.2s
299+
✨ Deployment time: 1052.74s
300300

301301
Outputs:
302-
dev1-eks.KarpenterInstanceNodeRole = dev1-eks-dev1ekskarpenternoderoleF6445C46-xvJZpMysh8oo
303-
dev1-eks.KarpenterInstanceProfilename = KarpenterNodeInstanceProfile-1f463f4eccef4793d856668b2c84dd9a
304-
dev1-eks.dev1eksClusterName701CF81F = dev1-eks
305-
dev1-eks.dev1eksConfigCommand9B300592 = aws eks update-kubeconfig --name dev1-eks --region ca-central-1 --role-arn arn:aws:iam::905418347382:role/dev1-eks-dev1eksAccessRole5BA1A9E3-w3E8P0T0L4nj
306-
dev1-eks.dev1eksGetTokenCommandDE6D6947 = aws eks get-token --cluster-name dev1-eks --region ca-central-1 --role-arn arn:aws:iam::905418347382:role/dev1-eks-dev1eksAccessRole5BA1A9E3-w3E8P0T0L4nj
302+
dev1-eks.dev1eksConfigCommand9B300592 = aws eks update-kubeconfig --name dev1-eks --region ca-central-1 --role-arn arn:aws:iam::905418347382:role/dev1-eks-assumableEKSAdminAccessRoleC284FA0F-F22KjKQrjLpO
303+
dev1-eks.dev1eksGetTokenCommandDE6D6947 = aws eks get-token --cluster-name dev1-eks --region ca-central-1 --role-arn arn:aws:iam::905418347382:role/dev1-eks-assumableEKSAdminAccessRoleC284FA0F-F22KjKQrjLpO
307304
Stack ARN:
308-
arn:aws:cloudformation:ca-central-1:905418347382:stack/dev1-eks/7c3ff440-a6cc-11ef-8c11-02f264ebaca7
305+
arn:aws:cloudformation:ca-central-1:905418347382:stack/dev1-eks/60d97430-27d0-11f0-ae18-0e71104456e5
309306

310-
✨ Total time: 898.35s
307+
✨ Total time: 1069.52s
311308
```
312-
* Note: When done, you can see results here
309+
* Note: When done, you should see Status CREATE_COMPLETE in this location
313310
https://ca-central-1.console.aws.amazon.com/cloudformation/home?region=ca-central-1

0 commit comments

Comments
 (0)