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

Ansible in a world of containers

Ansible in a world of containers

Presentation from the Ansible meetup in Antwerp on 12-12-2015. Mostly existed out of live demo's

Vincent Van der Kussen

December 12, 2015
Tweet

More Decks by Vincent Van der Kussen

Other Decks in Technology

Transcript

  1. .

  2. F R O M c e n t o s

    M A I N T A I N E R V i n c e n t V a n d e r K u s s e n < v i n c e n t @ v a n d e r k u s s e n . o r g > E N V R E D I S _ U S E R = r e d i s \ R E D I S _ D A T A _ D I R = / v a r / l i b / r e d i s \ R E D I S _ L O G _ D I R = / v a r / l o g / r e d i s R U N y u m ­ y u p d a t e \ & & y u m ­ y i n s t a l l e p e l ­ r e l e a s e ; y u m c l e a n a l l \ & & y u m ­ y i n s t a l l r e d i s s u d o ; y u m c l e a n a l l \ & & s e d ' s / ^ d a e m o n i z e y e s / d a e m o n i z e n o / ' ­ i / e t c / r e d i s . c o n f \ & & s e d ' s / ^ b i n d 1 2 7 . 0 . 0 . 1 / b i n d 0 . 0 . 0 . 0 / ' ­ i / e t c / r e d i s . c o n f \ & & s e d ' s / ^ # u n i x s o c k e t / u n i x s o c k e t / ' ­ i / e t c / r e d i s . c o n f \ & & s e d ' s / ^ # u n i x s o c k e t p e r m 7 0 0 / u n i x s o c k e t p e r m 7 7 7 / ' ­ i / e t c / r e d i s . c o n f \ & & s e d ' / ^ l o g f i l e / d ' ­ i / e t c / r e d i s . c o n f C O P Y e n t r y p o i n t . s h / s b i n / e n t r y p o i n t . s h
  3. LOCAL ANSIBLE RUN Pros: Reuse existing playbooks Use for both

    vms / containers Support multiple base image Conditions Cons*: Ansible in container Playbook source in container * workaround
  4. ­ h o s t s : l o c

    a l h o s t c o n n e c t i o n : l o c a l b e c o m e : y e s t a s k s : ­ n a m e : b u i l d d o c k e r i m a g e d o c k e r _ i m a g e : p a t h : / h o m e / v i n c e n t / D o c u m e n t s / p r e s e n t a t i o n s / k a n g a r o o t / a n s i b l e _ m e e t u p _ 2 0 1 n a m e : v i n c e n t v d k / r e d i s s t a t e : b u i l d
  5. DEMO: DOCKER SWARM Deploy instances on Openstack (Atomic hosts) Update

    the rpm-ostree Deploy a Docker Swarm Cluster
  6. DEMO: KUBERNETES Deploy instances on Openstack (Atomic hosts) Update the

    rpm-ostree Configure k8s Master Configure k8s minions Configure Flannel ovelay network
  7. WHERE CAN WE USE ANSIBLE AND DOCKER Ansible can be

    used to orchestrate small Docker deployments Control the environment rather than the runtime (Swarm, Kubernetes, Cloud, ..) Use Docker for Ansible development / testing Ansible is flexible to adapt.
  8. WHAT IS (CURRENTLY) MISSING Module to push to a registry

    Modules: Kubernetes Docker Swarm/Compose Ansible connection driver lacks remote capability