Platform - GitOps
Set of pieces able to act as a Docker Training Lab. Key points:
- Docker Powered
- Fully automated
- Infrastructure as Code provisioning
- DevOps / GitOps (2) mindset
- Compliant with The Devops Hispano Challenge (1)
Learn to work on a platform composed of different components (services and products) with a kind of microservice architecture. Each piece of the platform can be developed, implemented and operated separately.
- Docker installed
- Ayuda Digital - Devcontrol Tool installed (3)
Developed by the Business Teams. Defined as the things that the customers or the end users can use.
- Web Application Server GP Webapp.
- Statics Server GP Statics.
Developed by the Platform Teams. Used to develop, build and operate the products.
- HAProxy from GP HAProxy.
- Jenkins from GP Jenkins.
- Mail from GP Mail.
- Statics with Nginx from GP Nginx.
- Artifacts with Sonatype Nexus from GP Nexus.
- Webapp with PHP from GP PHP.
- Passbolt fromn Official Passbolt docker-compose recipie.
- Sonar from GP Sonarqube.
- Install assets with
devcontrol assets-install
- Configure the pieces (products and services); review each piece documentation of how to setup.
- Start all components with
devcontrol platform start
- Check the health of the products and services:
- Webapp product: http://localhost:8001
- Statics product: http://localhost:8002
- Jenkins service: http://localhost:4001
- Sonar service: http://localhost:4002
- Nexus service: http://localhost:4003
- Passbolt Service: http://localhost:4004
- Make backups of the platform with
sudo devcontrol backup
. Note the use ofsudo
for the backups. - Stop the platform with
devcontrol platform stop
- Destroy the platform with
devcontrol platform destroy
Execute a backup of the static data, configurations and databases with sudo devcontrol backup
.
Find three directories under /var/backups/docker
directory with the configurations ad data for:
products
: all productsservices
: all servicesvolumes
: the docker volumes of products and services
There are two sets of backups, with filenames beginning with "latest_" for the most recent ones, and "previous_" prefix for the oldest. The backup script will rotate the files from latest_
to previous_
with every execution.
You can put a crontab file under /etc/cron.d/gp_backup
to set a daily backup task.
# cat /etc/cron.d/gp_backup
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
00 04 * * * root (cd /home/master/platform; devcontrol backup > /var/log/gp_backup.log 2>&1)
- Fulfill the The DevOps Hispano Challenge github project (1)
- Build with GitOps Mindset (2)
- Bash Scripts managed using Devcontrol) tool (3)