https://github.com/shikhar97/project-iaas
An elastic application that can automatically scale out and in on-demand and cost-effectively by using the IaaS cloud
https://github.com/shikhar97/project-iaas
autoscaling aws-ec2 aws-s3 aws-sqs iaas image-classification
Last synced: about 2 months ago
JSON representation
An elastic application that can automatically scale out and in on-demand and cost-effectively by using the IaaS cloud
- Host: GitHub
- URL: https://github.com/shikhar97/project-iaas
- Owner: Shikhar97
- License: mit
- Created: 2023-09-29T19:29:18.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-11T04:12:45.000Z (about 2 years ago)
- Last Synced: 2025-02-17T03:42:27.937Z (8 months ago)
- Topics: autoscaling, aws-ec2, aws-s3, aws-sqs, iaas, image-classification
- Language: Python
- Homepage:
- Size: 241 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CSE546-Project1-IaaS
## Project Description
This project is completed in a group of three students. It consists of three-tier architecute (web-tier,
app-tier and the data-storage) along with an auto-scaler to scale in and scale out with respect to the load.### WebTier
The webtier is a GoLang HTTP server which provides an end point for the user to upload the images. These images are then encoded using base64 and sent to a request SQS queue.### AppTier
The app-tier keeps polling(long-polling) the request queue and once it receives an image, it classifies the image using the
given deep learning model. It then returns the results to the response queue and as well as upload to s3 input bucket.
It also uploads the output from the model to a different bucket.### AutoScaler
It keeps polling the size of the request queue once the size reaches a threshold it scales out and similarly once the threshold is less it scales in.### DataStorage
The data storage tier consists of two S3 buckets, one to store input by user and other to store the images_name and the class.# Getting Started
1. For webtier and autoscaler :
1. Clone this repository to your machine.
2. Copy the AWS credentials to a .env file inside webtier/ and autoscaler/ directories.
3. Run the ./setup.sh scripts to install dependencies for both Python and Go.
4. To build a binary from the main.go, we can simply run `go build .` when we are inside the webtier directory. This will create a binary file named ./webtier.
5. After this, we can simply execute the binary by running ./webtier. This will start up the Go server at port 8001.
6. User can then send requests at http://:8001/upload_images
7. Run python3 autoscale.py to start the autoscaler script.2. For app-tier :
1. Clone this repository to your machine.
2. Copy the AWS credentials to a .env file inside webtier/ and autoscaler/ directories.
3. Run the ./setup.sh scripts to install dependencies for Python.
3. After this, we can simply start the script using python2 apptier.py.
3. We added a crontab entry for the script to start on boot:
@reboot /usr/bin/python3 /home/ubuntu/Project-IaaS/apptier/apptier.py