Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Continuous integration with Docker and Ansible

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.

Continuous integration with Docker and Ansible

Avatar for Dmytro Slupytskyi

Dmytro Slupytskyi

September 26, 2015
Tweet

Other Decks in Technology

Transcript

  1. About project • 70+ repositories • 10+ microservices • 4+

    technologies (golang, php, ruby, nodejs) • 65 build and deploy scripts
  2. Why Docker? • Easily to manager containers • Build specify

    environment for project • Isolated workspace • Package it and be portable • Replicable - lower barrier to entry for new environments, teams • No “dependence hell”
  3. Build • Use Dockerfile • Keep layers to minimum •

    Use tags for version control • Use .dockerignore
 (the same syntax as .gitignore) • One container per service • Manage output • GNU Make is optional Just for presentation, 
 make better one
 for your services
  4. Private Docker registry • Version 0.9.1 (version 2 required docker

    version 1.6.0 and higher) • Nginx + LDAP authentication
 (https://hub.docker.com/r/h3nrik/nginx-ldap/) • Dockerized
  5. Pros • Logs • Build specify environment for target service

    • Service management (start, stop, restart) • Manage environment variables (one container for few environments)
  6. Cons • SSH • Time to build (can be depends

    on various factor, for example docker cache) • Jenkins plugin exit with 0, even if fails, that bring up misunderstanding • Unmounted volumes