7070cat /etc/os-release
7171uname -r
7272# ^-- The above commands say we're on an rpm based x86_64 distro of Amazon Linux 2023
73- wget https://downloads.flox.dev/by-env/stable/rpm/flox-1.3.2 .x86_64-linux.rpm
73+ wget https://downloads.flox.dev/by-env/stable/rpm/flox-1.4.1 .x86_64-linux.rpm
7474sudo rpm --import https://downloads.flox.dev/by-env/stable/rpm/flox-archive-keyring.asc
7575sudo rpm -ivh ~ /flox-* .rpm
7676flox --version
7777rm ~ /flox-* .rpm
78- # 1.3.2
78+ # 1.4.1
7979` ` `
8080
81- 4. Install node.js modules
82- ` ` ` shell
83- # flox [flox.dev]
84- # [admin@workstation:~/easyeks]
85- npm install
86- # ^-- will populate a /node_modules/, based on package.json
87- ` ` `
8881
8982--------------------------------------------------------------------------------------------------------------
9083
@@ -107,7 +100,7 @@ npm install
107100# # Phase 3: Git Repo Setup
108101
109102# ## Phase 3A: Git Repo Setup (Generic Overview)
110- 2 . Gain the ability to clone a private git repo (here' s an example based on private github)
103+ 1 . Gain the ability to clone a private git repo (here' s an example based on private github)
111104 1. create a classic readonly GitHub Token to clone private doit repo
112105 * https://github.com/settings/tokens/new
113106 * note = test <-- note this value represents TOKEN_NAME
@@ -119,7 +112,7 @@ npm install
119112 `ghp_jwiZWtzLWNkay1xdWlja3N0YXJ0CgwMjQtMD`
120113
121114### Phase 3B: Git Repo Setup (Detailed Instructions for Private GitHub Repo)
122- 3 . Copy Paste Commands (one line at a time) to clone private github repo from AWS Cloud Shell
115+ 1 . Copy Paste Commands (one line at a time) to clone private github repo from AWS Cloud Shell
123116```shell
124117# [ec2-user@ec2-bastion-with-iam-admin-role:~]
125118sudo dnf update -y
@@ -130,19 +123,22 @@ export TOKEN_PASS="ghp_jwiZWtzLWNkay1xdWlja3N0YXJ0CgwMjQtMD"
130123cd ~
131124git clone https://$TOKEN_NAME:[email protected] /doitintl/easyeks.git 132125cd ~/easyeks
126+ cdk context --clear
127+ # ^-- resets cdk.context.json to {}
128+ # (Technically not necessary, done for the sake of housekeeping / keeping things tidy.)
133129```
134130
135131--------------------------------------------------------------------------------------------------------------
136132
137133## Phase 4: CDK Bootstrap
138- 5 . Change current working directory to the repo, which has a .flox folder
134+ 1 . Change current working directory to the repo, which has a .flox folder
139135```shell
140- #[ec2-user@ec2-bastion-with-iam-admin-role:~]#
141- ls -lah ~/easyeks | grep .flox
136+ #[ec2-user@ec2-bastion-with-iam-admin-role:~/easyeks]#
142137cd ~/easyeks
138+ ls -lah | grep .flox
143139```
144140
145- 6 . Run flox activate in that folder
141+ 1 . Run flox activate in that folder
146142```shell
147143#[ec2-user@ec2-bastion-with-iam-admin-role:~/easyeks]#
148144flox activate
@@ -156,13 +152,15 @@ cdk --version
156152npm --version
157153` ` `
158154
159- * Bootstrap cdk
155+ 1. Install node.js modules
160156` ` ` shell
161- export AWS_REGION=ca-central-1
162- cdk bootstrap
157+ # flox [flox.dev]
158+ # [admin@workstation:~/easyeks]
159+ npm install
160+ # ^-- will populate a /node_modules/, based on package.json
163161` ` `
164162
165- 7. CDK Bootstrap and Deploy
163+ 1. Bootstrap CDK
166164` ` ` shell
167165# [ec2-user@ec2-bastion-with-iam-admin-role:~/easyeks]#
168166aws sts get-caller-identity
@@ -171,8 +169,16 @@ export AWS_REGION="ca-central-1"
171169# ^-- recommend add a region to ~/.bashrc, or `aws configure`
172170export AWS_ACCOUNT_ID=$( aws sts get-caller-identity | jq .Account | tr -d ' \"' )
173171echo $AWS_ACCOUNT_ID
174- cdk bootstrap aws://$AWS_ACCOUNT_ID /ca-central-1
172+ time cdk bootstrap aws://$AWS_ACCOUNT_ID /$AWS_REGION
175173# ^-- bootstraps the region, after which you'll see a Stack name of "CDKToolkit"
176174# in AWS Web GUI Console > CloudFormation > Stacks (for that region)
177175# Note you can only deploy into region's that have been bootstrapped
178176` ` `
177+
178+ 1. Deploy cdk stacks
179+ ` ` ` shell
180+ # [ec2-user@ec2-bastion-with-iam-admin-role:~/easyeks]#
181+ time cdk list
182+ time cdk deploy lower-envs-vpc
183+ time cdk deploy dev1-eks
184+ ` ` `
0 commit comments