- Navigate to AWS Event Page
- Enter the code
54be-13a09159a4-77
- Choose how to sign in (AWS Recommends Email One Time Password)
- Enter the one time password
- On Event Page, press "AWS Console button"
- Click "Open AWS Console"
- Follow E-Love for setting up Cloud9 instance
- Click the blue copy button
- Paste the text into the Cloud9 console and press Enter.
We'll run a script in Cloud9 to perform the following:
- Removes unnecessary software (PHP, etc)
- Install
kubectl
Kubernetes CLI - Pull down and fork helm charts repo (https://github.com/ZSuiteTech/fintech_devcon_charts)
git clone https://github.com/ZSuiteTech/fintech_devcon.git
cd fintech_devcon
./setup.sh
- Follow instructions in console (copy one-time code) 😊
- Click on link and select "Open"
- Switch to tab/window and follow instructions
Example Output:
! First copy your one-time code: ....-....
- Press Enter to open github.com in your browser...
! Failed opening a web browser at https://github.com/login/device
exec: "xdg-open,x-www-browser,www-browser,wslview": executable file not found in $PATH
Please try entering the URL in your browser manually
✓ Authentication complete. Press Enter to continue...
-
Create s3 bucket from command prompt 1.
YOUR_BUCKET_NAME=zstfdemo-ftdc21-${GH_USER,,}
-
aws s3 mb s3://$YOUR_BUCKET_NAME
-
-
Initialize Terraform
terraform init -backend-config="bucket=$YOUR_BUCKET_NAME"
-
Run Terraform, passing in the variable file
terraform apply -var-file=demo.tfvars
-
Approve changes by typing
yes
and pressing Enter. -
Creating resources will take over 10 minutes.
-
Setup
kubectl
export KUBECONFIG=./kubeconfig_zsuite-devcon-<RANDOM>
-
Run
EKS_UTILS='aws-iam-authenticator' curl --remote-name-all "https://amazon-eks.s3.us-west-2.amazonaws.com/1.21.2/2021-07-05/bin/linux/amd64/$EKS_UTILS" && chmod +x $EKS_UTILS && mkdir -p $HOME/bin && cp $EKS_UTILS $HOME/bin/ && rm $EKS_UTILS
-
Test command via
kubectl get namespace
-
Replace repoUrl in
argocd/manifests/apps.yaml
with your forked Helm charts repositorygh repo view --json url --jq '.url'
-
Uncomment
argocd
module usage inmain.tf
-
Run
terraform init
again to install new dependency -
Run terraform apply again
terraform apply -var-file=demo.tfvars
-
Confirm
argocd
namespace exists cluster namespaces -
Check ArgoCD services
kubectl -n argocd get all
-
Log in to UI
-
Get argo password 1.
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
- Do not include the last character
%
that's a newline
- Do not include the last character
-
Get argo-server pod
kubectl -n argocd get pods -l app.kubernetes.io/name=argocd-server
-
Port forward to pod 1.
ARGO_POD=argocd-server-?????????-?????
-
kubectl -n argocd port-forward pod/$ARGO_POD 8080:8080
-
-
NOPE: In browser go to localhost:8080
-
Login with username
admin
and password from above
-
-
Go to forked helm charts repo
-
Edit
apps/values.yaml
- Set
deployWatchman
totrue
- Commit and push changes
- Set
-
Confirm watchman resources exist
kubectl -n moov get all
-
Test watchman api
-
Get pod
kubectl -n moov get pods -l app.kubernetes.io/instance=my-watchman
-
Port forward to pod 1.
MOOV_POD=my-watchman-?????????-?????
-
kubectl -n moov port-forward pod/$MOOV_POD 8081:8080
-
-
Test endpoint http://localhost:8081/downloads
curl -uri http://localhost:8081/downloads
-
-
Install AWS Load Balancer controller
-
Uncomment
alb_ingress_controller
module in main.tf -
Run
terraform init
again to install new dependency
-
Run terraform apply again
terraform apply -var-file=demo.tfvars
-
-
In helm charts repo, set
deployWatchmanIngress
variable totrue
-
Commit and push changes for helm charts repo
-
Aws load balancer provisioning can take several minutes
- Can view load balancer in aws console
-
Get dns entry for watchman api from argocd
- Open
watchman-gateway
app - Select
ingress
- Go to
live manifest
- Find dns address
- Open
-
Test api from public address 1.
MOOV_DNS=??????.us-east-1.elb.amazonaws.com
-
curl -uri http://$MOOV_DNS:8081/downloads
-
-
Delete argo apps
- Disable variables in helm charts repo
deployWatchman
deployWatchmanIngress
- This cleans up ELB nicely
- Disable variables in helm charts repo
-
Run terraform destroy 1.
terraform destroy -var-file=demo.tfvars
- Confirm by typing
yes
- This will take around 4 minutes
- Confirm by typing