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

ConLi2014: Docker and Saltstack

ConLi2014: Docker and Saltstack

**Docker saltstack talk**

Here you find my docker slide deck container from my [Continuous Lifecycle 2014 - GER: Schnell und effizient mit Salt Infrastruktur gestalten ][1] talk.

- start with `docker run -d -p 8012:80 rossbachp/docker-salt:conli2014`
- open your browser with `http :8012/docker-salt`
- view english slides [Build your infrastructure fast and effective with saltstack and docker][2]

Feedback welcome

[Peter Rossbach][3]

[1]: http://www.continuouslifecycle.de/lecture.php?id=4576
[2]: https://speakerdeck.com/rossbachp/conli2014-docker-and-saltstack
[3]: https://twitter.com/PRossbach

Peter Rossbach

November 18, 2014
Tweet

More Decks by Peter Rossbach

Other Decks in Programming

Transcript

  1. 10 / 44 © 2014 <[email protected]>, @PRossbach, Continuous Lifecycle Mannheim

    salt '*' test.ping salt -C 'G@os:Ubuntu and webser* or E@database.*' test.ping salt -L 'asterix,oberlix,idefix' test.ping salt '*' state.sls openssl-hotfix salt '*' grains.items salt '*' pillar.items
  2. 11 / 44 © 2014 <[email protected]>, @PRossbach, Continuous Lifecycle Mannheim

    $ salt saltmaster grains.items saltmaster: ---------- SSDs: - zram0 biosreleasedate: 12/01/2006 biosversion: VirtualBox cpu_flags: - fpu - vme ...
  3. 12 / 44 © 2014 <[email protected]>, @PRossbach, Continuous Lifecycle Mannheim

    base: ` `: - users {% for user, uid in pillar.get('users', {}).items() %} {{user}}: user.present: - uid: {{uid}} {% endfor %}“ salt-call --local state.highstate -l debug
  4. 13 / 44 © 2014 <[email protected]>, @PRossbach, Continuous Lifecycle Mannheim

    base: '*': - data - users users: rossbachp: 2121 bee42: 4242 infrabricks: 8484
  5. 30 / 44 © 2014 <[email protected]>, @PRossbach, Continuous Lifecycle Mannheim

    docker_index_container: docker.installed: - name: docker_index - image: mydockerregistry:5000/rossbachp/docker-index:dev - environment: - "REDIS_HOST": "192.168.1.100" - "REDIS_PORT": "6379" - "PORT": "5100" - ports: - "5100/tcp" - require: - docker: docker_index_image - order: 120
  6. 31 / 44 © 2014 <[email protected]>, @PRossbach, Continuous Lifecycle Mannheim

    docker_index_image: docker.pulled: - name: mydockerregistry:5000/rossbachp/docker-index:dev - force: True - order: 100 docker_index_stop_if_old: cmd.run: - name: docker stop docker_index - unless: docker inspect --format "{{ .Image }}" docker_index | grep - require: - docker: docker_index_image - order: 111
  7. 42 / 44 © 2014 <[email protected]>, @PRossbach, Continuous Lifecycle Mannheim

    $ docker run -d -p 8000:80 rossbachp/docker-salt:conli2014 $ open http://<docker host>:8000/docker-salt