Skip to content

Latest commit

 

History

History
117 lines (84 loc) · 2.96 KB

README.md

File metadata and controls

117 lines (84 loc) · 2.96 KB

cse546-project1

Cloud Computing Project 1

Group: CCP

Team Members

Name ASU ID
Gaurav Kulkarni 1225477253
Parth Shah 1225457038
Shreyas Kirtane 1225453736

Project Report


Gaurav's Tasks:
  • 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

Parth's Tasks:
  • 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

Shreyas's Tasks:
  • 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

AWS Credentials

  • user: demo
  • default region: us-east-1

Usage:

chmod 600 web-tier-key.pem
ssh -i web-tier-key.pem ec2-user@[public-ip]

Web Tier details

  • Base AMI: AWS-Linux
  • user: ec2-user
  • public-ip: assigned when started/launced (see ec2 console)

SQS


S3

  • input bucket: cse546images
  • resuls bucket: cse546results

Deploy on your aws account

  1. Create queues and buckets
  2. Create an ec2 instance name "web-instance" and install docker on it.
  3. Configure aws credentials using aws configure or env variables
  4. Clone the git repo and do:
    make run_wt
    
  5. Create an ec2 instance named "app-instance" and install docker.
  6. Configure aws credentials using aws configure or env variables
  7. Clone the git repo and do:
    make run_at
    
  8. Create an AMI out of app-instance.
  9. Create a launch template using this AMI
  10. Create an Alarm based on ApproximateNumberOfVissibleMessages on request queue
  11. Create an AutoScalingGroup with a step policy
  12. 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
  13. Create a simple scale in policy to scale in: configure to remove 20 instances when alarm in OK state
  14. Attach alarm to the scaling policy
  15. Run the workload generator on public ip of web instance