Goroza7/DevOps-Midterm-
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
This project is a simple web application built using Flask that allows users to post messages via a form. Submitted messages are dynamically displayed below the form, functioning as a basic message board. Project includes: - A dynamic route to handle message submissions. - Unit tests to verify route functionality. - GitHub version control, with main and dev branches - A CI pipeline with GitHub Actions to automatically run tests on push or pull requests - Ansible for setup automation - Simulated Blue-Green Deployment, - Basic Monitoring (health_check, manual rollback and automated rollback if health_check fails) ## In order to Run just Local application ```bash ansible-playbook build.yml python3 run.py pytest # for tests ``` ## Simulating Blue-Green Deployment ```bash ansible-playbook build.yml ansible-playbook deploy.yml # First it will create blue on C:/Midterm(DevOps) production folder with only blue, for green rerun the deploy.yml, # you can also see on localport 5000 which envrionment it is currently running on. # If you want to manually rollback run ansible-playbook rollback.yml # In order to check its health run ansible-playbook health_check.yml # logs will be saved in deployment.log(it will be also copied into appropriate production folder, you can also see logs on /status page) # In order to kill the running application ansible-playbook kill_app.yml # And finally if you want to rollback automatically run ansible-playbook health_check.yml # app should be killed for this otherwise it will just save health log into log file. ```