Slides for a presentation I gave at VlbgWebDev 10/2016.
To reduce risks on conference wifi i've embedded videos.
Sorry but these are not visible on speaker deck.
PRACTICES ▸ Use a code repository / version control system ▸ Use a branching model ▸ Commit early - commit often ▸ Automate the build, tests and deployments ▸ Use an integration machine ▸ Use continuous feedback mechanisms
on-premise GitHub ▸ Full featured webgui for git version control system ▸ Integrated very powerful CI environment ▸ Workflows / Permissions supported out-of-the-box ▸ http://about.gitlab.com
package your application into a standardized unit for software development ▸ Often called "lightweight" virtualization approach. ▸ very fast growing and wide spreaded in open source community ▸ insanely great! ▸ http://docker.io
code and acts as coordinator ▸ GitLab CI runners connect to the coordinator using a REST api ▸ Redis job queue consumed by runners, execute it and upload artifacts back to coordinator. ▸ The more (powerful) runners you connect, the more builds you can run in parallel
multiple executors: ▸ shell run build locally ▸ docker run build using Docker container ▸ ssh run build remotely with SSH ▸ parallels run build using Parallels VM ▸ virtualbox run build using VirtualBox VM ▸ docker+machine like docker, but uses auto-scaled docker machines ▸ kubernetes (experimental)
hosted on gitlab.com or your on-premise gitlab installation ▸ add a .gitlab-ci.yml file ▸ connect a gitlab ci runner - use following command to install on macOS with homebrew: brew install gitlab-ci-multi-runner --without-docker gitlab-runner register --url https://gitlab.com --token <token>
hosted on gitlab.com or your on-premise gitlab installation ▸ add a .gitlab-ci.yml file ▸ connect a gitlab ci runner - use following command to install on macOS with homebrew: brew install gitlab-ci-multi-runner --without-docker gitlab-runner register --url https://gitlab.com --token <token> ▸ start the runner gitlab-runner gitlab-runner install gitlab-runner start
hosted on gitlab.com or your on-premise gitlab installation ▸ add a .gitlab-ci.yml file ▸ connect a gitlab ci runner - use following command to install on macOS with homebrew: brew install gitlab-ci-multi-runner --without-docker gitlab-runner register --url https://gitlab.com --token <token> ▸ start the runner gitlab-runner gitlab-runner install gitlab-runner start ▸ commit and push to remote to trigger ci pipeline.
in https://gitlab.com/widerin/vlbg-webdev-1016/ tree/pyramid ▸ Just output the foo in route http://localhost:8080/hello/foo ▸ pytest covered ▸ build and tested on gitlab in docker
your application requires a database like postgresql ▸ your application requires a message queue like redis or rabbitmq ▸ your application requires a index engine like solr or elasticsearch ▸ very time consuming test setup in default ci-scenarios APPLICATION DATABASE INDEX
▸ Found in https://gitlab.com/widerin/vlbg-webdev-1016/ tree/master/example-1 ▸ Ping application responses with "pong!" http://localhost:5000/ping ▸ pytest covered ▸ build and tested on gitlab in docker
▸ Found in https://gitlab.com/widerin/vlbg-webdev-1016/ tree/master/example-2 ▸ Ping application responses with "pong!" and outputs the number of pings you sent to it. http://localhost:5000/ping ▸ redis as persistence layer ▸ pytest covered ▸ build and tested on gitlab in docker
Use your favourite linux docker image ▸ build within the image ▸ compile your application for your production servers in same linux distribution ▸ use caches for node_modules/, .m2/repository, ... ▸ you can build your own docker base and/or test images