running ansible within salt
play

Running Ansible within Salt How to smoothly migrate away from - PowerPoint PPT Presentation

Running Ansible within Salt How to smoothly migrate away from Ansible to Salt Pablo Surez Hernndez Don Vosburg SUSE Senior Software Engineer SUSE Technology Specialist psuarezhernandez@suse.com dvosburg@suse.com People are using Ansible


  1. Running Ansible within Salt How to smoothly migrate away from Ansible to Salt Pablo Suárez Hernández Don Vosburg SUSE Senior Software Engineer SUSE Technology Specialist psuarezhernandez@suse.com dvosburg@suse.com

  2. People are using Ansible out there! 2

  3. People are running Ansible out there! ● Customer’s IT infrastructure already defined with Ansible ● Efforts already invested. Security audit. ● Ansible modules and playbooks all over the places. 3

  4. … and they always face the same problems! ● Real-time monitoring ● Event-driven Orchestration ● Scalability 4

  5. Salt enables you! Let’s put Salt in your IT. ● Real-time monitoring → beacons! ● Event-driven Orchestration → reactors! ● Scalability → zeromq, syndics! 5

  6. But wait! We have a problem! 6

  7. But wait! We have a problem! ● Customer IT infrastructure already defined with Ansible ● Efforts already invested. Security audit. ● Ansible modules and playbooks all over the place. No way of a smooth, step-by-step, planned migration. Only the hard way. UNTIL NOW! 7

  8. Don’t panic! 8

  9. What would happen if ... we could just simply consider the whole Ansible as a subset of the functionality that Salt provides ? 9

  10. Ansible Gate: Cooking Ansible with a bit of Salt ● New module in Salt 2019.2.0 “Fluorine” release ● An innovation coming from SUSE ● Execute Ansible modules from Salt ● Run your playbooks! 10

  11. Ansible Gate: Cooking Ansible with a bit of Salt The Salt “Fluorine” release package is available in: ● SLE15 and SLE15SP1. Base system package ● OpenSUSE Leap 15/15.1, 42.3 and Tumbleweed ● “systemsmanagement:saltstack:products:next/salt” at OBS [1] [1] - https://build.opensuse.org/package/show/systemsmanagement:saltstack:products:next/salt 11

  12. How does the Ansible Gate work? 12

  13. How does the Ansible Gate work? ● Ma n a g e y o u r A n s i b l e f r o m S a l t ● E x e c u t e S a l t c o mma n d s o n y o u r A n s i b l e ma n a g e d s y s t e ms ( s a l t - ma s t e r & s a l t - s s h ) 13

  14. How does the Ansible Gate work? # Some examples: # Ansible needs to be installed on the running system. $ salt-call --local ansible.list $ salt-call --local ansible.help system.ping $ salt-call --local ansible.system.ping data=”Hello from Salt” 14

  15. How does the Ansible Gate work? # Some examples: # Ansible needs to be installed on “ansiblenode” minion. # Playbooks are already stored on the “ansiblenode” minion. $ salt “ansiblenode” ansible.system.ping $ salt “ansiblenode” ansible.packaging.os.zypper name=”iotop” state=”installed” $ salt “ansiblenode” ansible.playbook playbook=/srv/playbooks/install_nginx.yml 15

  16. ● Ma n a g e y o u r A n s i b l e f r o m S a l t ● E n a b l e s r e a l - t i me mo n i t o r i n g a n d e v e n t - d r i v e n o r c h e s t r a t i o n . ● A d d t h e wh o l e mi n i o n f u n c t i o n a l i t y t o t h e A n s i b l e ma n a g e d s y s t e ms . 16

  17. Reusing the Ansible Inventory /etc/ansible/hosts susecon-fluorine-minion1.tf.local Susecon-fluorine-minion2.tf.local [webservers] # Example of running Salt commands susecon-fluorine-minion1.tf.local # on Ansible managed systems. [py3-hosts] susecon-fluorine-minion1.tf.local susecon-fluorine-minion2.tf.local [py3-hosts:vars] ansible_python_interpreter=/usr/bin/python3 $ salt-ssh --roster=ansible --roster-file=/etc/ansible/hosts -N all test.ping $ salt-ssh --roster=ansible --roster-file=/etc/ansible/hosts -N webservers service.stop apache2 17

  18. How to smoothly migrate from Ansible to Salt 18

  19. The common Ansible scenario A n s i b l e mo d u l e s ● P l a y b o o k s ● 19

  20. Step 0: Adding just few grains of Salt 20

  21. Adding some grains of Salt ... A n s i b l e mo d u l e s ● P l a y b o o k s ● E x e c u t e S a l t c o mma n d s ( s a l t - s s h ) o n A n s i b l e ● ma n a g e d s y s t e ms 21

  22. Step 1: Salt makes it tasty! 22

  23. Salt makes it tasty! R u n n i n g p l a y b o o k s a s S a l t j o b s . ● E x e c u t e A n s i b l e mo d u l e s o n t h e ● s a l t - mi n i o n s y s t e m. A n s i b l e mo d u l e s ● R u n n i n g p l a y b o o k s i n S L S fj l e s ! ● P l a y b o o k s ● E x e c u t e S a l t c o mma n d s ( s a l t - s s h ) o n A n s i b l e ma n a g e d ● s y s t e ms 23

  24. N e w g r o wi n g S a l t ● ma n a g e d I T E v e n t - d r i v e n ● o r c h e s t r a t i o n o n a h y b r i d e n v i r o n me n t A n s i b l e mo d u l e s ● P l a y b o o k s ● E x e c u t e S a l t c o mma n d s ( s a l t - s s h ) o n ● A n s i b l e ma n a g e d s y s t e ms 24

  25. Step 2: Spreading the Salt all over the place! 25

  26. Ma n a g e y o u r l e g a c y A n s i b l e a s S a l t j o b s . ● R e a l - t i me mo n i t o r i n g a n d e v e n t - d r i v e n o r c h e s t r a t i o n i n a l l y o u r I T ( s a l t - mi n i o n ) ● T h e wh o l e mi n i o n f u n c t i o n a l i t y o n t h e o l d A n s i b l e ma n a g e d s y s t e ms . ● 26

  27. Demo time! 27

  28. Questions? 28

  29. T h a n k Y o u !

  30. 31

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend