Creating a Django CI/CD Pipeline with Travis CI and AWS Elasticbeanstalk
Published in
4 min readMar 17, 2020
This article goes through the full process of setting up a CI/CD pipeline for a Django application with Github, Travis CI and AWS ElasticBeanstalk
Components used:
- Github: For version control and code hosting
- Travis CI: For application build and deployment to AWS ElasticBeanstalk
- AWS Elasticbeanstalk: For hosting the Django application.
This article is going to focus on setting up the CI/CD pipeline and not the Django application as the steps used in this pipeline are common across all Django applications. However, I am including a small note on the application to add some context.
Application details:
The application is the simple ‘polls’ app discussed in Django documentation.
Let’s get started.
Step 1: Creating a python package
- Let’s start by creating a virtual env
Navigate to the root of your Django-project and create a virtual environment.
python -m venv <name_of_virtualenv>
- Activate the virtual env. The command differs from Windows to Linux
- Install the required dependencies present in the requirements.txt file.
pip install -r requirements.txt