+ All Categories
Home > Technology > Docker SQL Continuous Integration Flow

Docker SQL Continuous Integration Flow

Date post: 12-Apr-2017
Category:
Upload: andrii-podanenko
View: 133 times
Download: 0 times
Share this document with a friend
14
YMCA of FFW internals of the project Docker SQL development flow
Transcript

YMCA of FFWinternals of the project

Docker SQL development flow

Multisiting● drupal.192.168.56.132.xip.io

○ -> ymca.ffwua.com/buildX

○ -> ymcamn.org

● openy.192.168.56.132.xip.io

○ -> openy.ffwua.com/buildX

○ -> openymca.org

● redwing.192.168.56.132.xip.io

○ -> redwing.ffwua.com/buildX

○ -> prod...

DevOps● SQL Flow => Docker SQL Flow (Multiprocessing speed improved a

lot!!!)● Lazy PR Builders

○ Parent(main) PR builder○ Child OpenY builder (non blocking, lazy)○ Child Redwing builder (non blocking, lazy)○ Child Behat tests job (non blocking, lazy)

● Local dev - Reinstall with Docker container. Speedup for reinstall a lot!!!

Docker images, containers, huh?● Image - gzipped aufs(layered* filesystem) of the files (eats filesystem size

only)● Container - running image (eats memory).

● Layers are gzipped aufs images that are shared between similar images and containers in order to save filesystem space.

Same as Vagrant box and running virtual machine.

Multisiting CI DevOps - lazy builders

Multisiting CI DevOps - lazy builders

Multisiting CI DevOps - parent PR builderParent PR builder

1. Deploys code /var/www/buildX

2. Runs sniffers3. Runs reinstall.yml for YMCA

site4. Posts comment to GitHub5. Runs sub-projects builds

Child PR builders1. Deploy code /var/www/prjY

&& /var/www/prjZ2. Run reinstalls there

Multisiting CI DevOps - Docker DB tricksIntroduced script get_latest_db.sh (1-5 minutes for a run)

1. Pulls cibox/mysql Docker image locally2. Runs it as a DBPROD container3. Imports 3 databases from productions within4. Commits DBPROD as dbprod Docker image locally5. Cleanup everything

Reinstall process1. Introduced docker_sql_flow.yml when docker_sql:

true2. Instead of importing PROD db every reinstall(1 -5

minutes), pulls* a docker container from dbprod as buildX named container (1 sec)

*pull means check if image changed on own hub on CI server

Decoupling CIBox ^^^

How it works on CI side

How it works on local DEV and CI builds

Multisite GitHub comments && statuses. Behat.

Issues● Docker %)● Docker is not stable, tough versions dependency (1.12.0 should be used)● Docker able to leave a lot of garbage within your system

○ Make sure docker images and docker ps -as commands make you happy enough in

terms of count and sizes.

● Overall CI complexity, can bring us some unexpected behaviours

Thanks for listeningAndrii Podanenko for FTT

[email protected]

2016


Recommended