Our application is a simple "Hello World" example, and for the purpose of demostrating CI/CD using Github action we have included s test case as well.
Our Flask application is going to be deployed to AWS Elastic Beanstalk which is a service that automates the deployement and scalling of a web application. It takes your source code and takes care of all the infrustructure configuration.
Make sure you have the following libraries installed before beginning:
- python3-dev
- redis-server
- git (Configuring ssh)
- pip (Installing pip)
- virtualenv & virtualenvwrapper https://github.com/yyuu/pyenv
From your terminal go to the directory you want to clone the project into.
$ cd path/to/your/directory
Clone the project.
$ git clone [email protected]:NYARAS/aws-elastic-beanstalk-demo.git
Navigate into the project directory from the terminal.
Setup the following dependencies.
$ cd path/to/your/directory/aws-elastic-beanstalk-demo
Create a virtual environment to use for your project
# Ignore this if you are not using virtualwrapper
$ mkvirtualenv --python=/usr/bin/python3 env # env is the name of your virtual environment
From your virtualenv do the following.
(env)$ pip install -r requirements.txt # run this in a clean virtualenv