Term-Project-Knights
To move away from the use of tools container (tools/shell.sh), we need to install the dependencies outside of the tools container. The following list of dependencies serve as pre-requisites for further steps in this project.
PRE-REQUISITES:
Install ==> where is , 1) kubectl 2) eksctl 3) minicube 4) istioctl 5) helm 6) k9s
REPO:
Clone the git repo for term-project-knights (or pull latest from main to make sure you have latest changes).
The githubid is unique for every user. Before proceeding, make sure to replace your githubuserid in all places, if not already done.
CONFIGURATIONS:
Make sure your aws configurations and kube configurations from the course assignments are carried forward towards the term project. We will re-use several components from earlier assignments. This includes the "*-tpl" template files from which the actual configurations and executables will be derived from.
GENERATE ARTEFACTS FROM TEMPLATES:
tools/process-templates.shEKS CLUSTER:
To start the cluster,
make -f eks.mak startTo delete the cluster,
make -f eks.mak stopNOTE: Do not forget to delete the cluster after the end of the day's work. You will be billed for its continued execution.
EKS CLUSTER NAMESPACES & CONTEXTS:
kubectl config use-context aws756kubectl create ns c756nskubectl config set-context aws756 --namespace=c756nsistioctl install -y --set profile=demo --set hub=gcr.io/istio-releasekubectl label namespace c756ns istio-injection=enabledSteps, 1-3 should deploy all your services into your EKS clusters
- TO BUILD DOCKER IMAGES:
make -f k8s.mak cri- TO PROVISION/DEPLOY THE EKS CLUSTER:
make -f k8s.mak provision- TO LOAD THE DATA INTO DYNAMODB:
make -f k8s.mak loader- TO DELETE ALL PODS AND DEPLOYMENTS:
kubectl delete deployment --all- TO CLEAN LOGS AND PREPARE FRESH DEPLOYMENT:
make -f k8s.mak cleanK9S:
You can check the deployments using k9s. Open a new terminal and type "k9s". k9s control terminal should open up to track the status of deployments.
GET EXTERNAL IP OF EKS CLUSTER:
The following command should give you the EXTERNAL_IP of the EKS Cluster, which will serve as an entry point.
kubectl get svc --all-namespaces | cut -c -140You should now be able to connect to this EXTERNAL_IP via the mcli and execute commands. In case of error, you can check the logs using commands mentioned in Assignment 4 to retrieve the logs and address the issues.
TO REMOVE ALL DOCKER IMAGES (USE WITH CAUTION):
docker rmi -f $(docker images -a -q)make -f k8s.mak grafana-urlmake -f k8s.mak prometheus-url-
Go to tools/gatling-1-music.sh and add your cluster ip
-
To run from root folder:
tools/gatling-1-music.sh- To stop call:
tools/kill-gatling.sh-
Run 3 terminal windows.
-
In the first window, run the db:
cd dynamodb_local_latest
java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb- In the second window, run the app:
cd leaderboard_local
python app.py 30001 - In the third window, run the mcli to test:
cd leaderboard_local
python mcli.py localhost 30001 After that you can test "read", "create", and "delete" functionalities.