-
Notifications
You must be signed in to change notification settings - Fork 2
Production deployment
Deployment done with Github Actions and Azure App Service.
You first need to merge your changes to master
using if possible the git flow release start vXX.X.X
command.
Don't forget to update the version number on the swagger
file and on the package.json
file on the release
branch before running git flow release finish vXX.X.X
.
When the merge on master
is completed, you should create a release for the newly pushed tag.
You first need to install the az
CLI.
az login
az account list-locations
az group create --location francecentral --name grottocenter-api
az appservice plan create --resource-group grottocenter-api --name grottocenter-api-plan --is-linux --sku B2
az webapp create --resource-group grottocenter-api --plan grottocenter-api-plan --name grottocenter-api --https-only true --runtime "NODE:18-lts"
az webapp log config --resource-group grottocenter-api --name grottocenter-api --web-server-logging filesystem
az webapp config appsettings set --resource-group grottocenter-api --name grottocenter-api --settings WEBSITE_HTTPLOGGING_RETENTION_DAYS=7
az webapp log config --resource-group grottocenter-api --name grottocenter-api --docker-container-logging filesystem
Add all outbound IPs of the azure web app into :
- the firewall of the AWS RDS (database)
- the firewall of the LightSail instance (ES)
- set all environmental variables :
- Custom domain (api.grottocenter.org)
- Deployment slot (to master instead of develop)
Deployment of the PostGreSQL database on Amazon RDS : https://docs.google.com/document/d/1nmfGdScWYBWa91L0SRd7LrH5XK_DQKbkGMtVdDQlmgg/edit?usp=sharing
Now the production API is deployed on Azure Deployment of the Grottocenter3 application on EC2 : https://docs.google.com/document/d/1h8cdmlkZJG5SANKLfQQpOR1kNjMQiSKqb-N-LhM1Zlk/edit?usp=sharing
- Creation and configuration of the Lightsail server : https://docs.google.com/document/d/1hRB9sJ6gXm2nrepli0ipBozq4agg36qQaQCSicxkxQk/edit?usp=sharing
- Deployment of ElasticSearch and Logstash on Lightsail : https://docs.google.com/document/d/1ZarlIOUUWfZvo3jOQ28w8NVA9q9GmK9dIUONhkUw7ZA/edit?usp=sharing
On LightSail instance, you will find a folder called docker-elk/gc_scripts
. It contains various scripts to help you monitor and manage ES and LS instances.