Name | ASU ID |
---|---|
Gaurav Kulkarni | 1225477253 |
Parth Shah | 1225457038 |
Shreyas Kirtane | 1225453736 |
- Researched about Amazon Cloudwatch metrics and alarm, Autoscaling groups and scaling policies
- Tested out different simple step and target tracking policies along with custom metrics
- Evaluated individual policies against the required time limit and scaling requirements
- Managed the documentation of the project
- Implement SQS method in web tier to push messages to request queue
- Implement SQS method in app tier to push results to response queue
- Add multithreading to app tier and web tier to poll SQS queues in background
- Implement Web Tier using Flask
- Incorporate image classification in app tier server
- Implement multiple reader single writer lock to poll result dict efficiently
- Implement S3 methods to download and upload files
- Create dockerfile, Makefile, configs, venv requirements file
- Figure out deployment
- user: demo
- default region: us-east-1
Usage:
chmod 600 web-tier-key.pem
ssh -i web-tier-key.pem ec2-user@[public-ip]
- Base AMI: AWS-Linux
- user: ec2-user
- public-ip: assigned when started/launced (see ec2 console)
-
request queue: requests
-
request queue url: https://sqs.us-east-1.amazonaws.com/583586231865/requests
-
response queue: responses
-
response queue url: https://sqs.us-east-1.amazonaws.com/583586231865/responses
- input bucket: cse546images
- resuls bucket: cse546results
- Create queues and buckets
- Create an ec2 instance name "web-instance" and install docker on it.
- Configure aws credentials using aws configure or env variables
- Clone the git repo and do:
make run_wt
- Create an ec2 instance named "app-instance" and install docker.
- Configure aws credentials using aws configure or env variables
- Clone the git repo and do:
make run_at
- Create an AMI out of app-instance.
- Create a launch template using this AMI
- Create an Alarm based on ApproximateNumberOfVissibleMessages on request queue
- Create an AutoScalingGroup with a step policy
- Create steps:
- set 1 capacity for metric >= 1 and < 2.
- set 2 capacity for metric >= 2 and < 3.
- ...
- ...
- set 20 capacity for metric >= 20 and < +ve infinity
- Create a simple scale in policy to scale in: configure to remove 20 instances when alarm in OK state
- Attach alarm to the scaling policy
- Run the workload generator on public ip of web instance