This project is for my master thesis about DevOps: Implemetation of CI/CD for container based applications at the FOM Dortmund.
The complete thesis can be downloaded here.
It contains a Phoenix Framework based project that is build by Circle CI and automatically deployed to AWS, with the following features:
- Static code analysis, formatting checks and test for every commit using GitHub actions
- Cirlce CI pipeline with various tests for every pull request
- Automatic serverless deployment using AWS Fargate and terraform
- Automatic preview environments for pull requests
- Automatic cleanup of preview environments when pull requests are closed or merged
- Automatic deployment into production for merged pull requests
The workflow for the CI/CD pipeline is:
A Linux OS is the recommended environment for running this application.
Install Docker and asdf and execute the following plugins:
# Elixir/Erlang
apt-get -y install build-essential autoconf m4 libncurses5-dev libwxgtk3.0-dev libgl1-mesa-dev libglu1-mesa-dev libpng-dev libssh-dev unixodbc-dev xsltproc fop
asdf plugin-add erlang
asdf plugin-add elixir
# NodeJS
apt-get install dirmngr gpg
asdf plugin-add nodejs
# Add the following to your ~/.bashrc to make global package installation work
export PATH=$PATH:/usr/local/lib/npm/bin
# Terrform
asdf plugin-add terraform
# While being the application main folder run this install the versions specified in the .tool-versions file:
asdf installYou can set up the application by running the following make commands:
make setup
make runNow you can visit localhost:4000 from your browser.
To build a docker image and run it you can use this commands:
make docker
make run_docker
