Slide 1

Slide 1 text

Imobach González Sosa YaST Developer [email protected] Adding Salt to AutoYaST Integrating AutoYaST and Configuration Managment Systems

Slide 2

Slide 2 text

AutoYaST

Slide 3

Slide 3 text

What is AutoYaST? ● Tool to perform unattended installation/upgrade of openSUSE/SUSE systems ● Allow configuration of already installed systems ● Partitioning, network configuration, software installation… ● ... and configuration of additional services

Slide 4

Slide 4 text

AutoYaST Profiles

Slide 5

Slide 5 text

A minimal profile false root 0 /root /bin/bash nots3cr3t root

Slide 6

Slide 6 text

Writing a profile ● From scratch ● Clone an installed system (and tune it if needed) – AutoYaST UI – Command line

Slide 7

Slide 7 text

Limitations ● Limited to YaST modules ● Installation not always 100% reproducible ● Only applies to openSUSE/SUSE distributions

Slide 8

Slide 8 text

Configuration Management Software

Slide 9

Slide 9 text

At a glance ● Enable administrators to configure systems and track changes ● Usually the administrator describes how the system should look like ● Automated and reproducible ● Many options with a wide range of features

Slide 10

Slide 10 text

Salt ● Configuration management and remote execution engine ● Event-driven ● Pretty flexible architecture ● Superb documentation ● Library of reusable components

Slide 11

Slide 11 text

Salt jargon ● Roles: master and minions ● State: system configuration description ● Pillar: data to be used in states ● Formula: reusable and pre-written Salt states ● Grains: data associated to Minions

Slide 12

Slide 12 text

Example State apache: pkg.installed: [] service.running: - watch: - pkg: apache - file: /etc/httpd/conf/httpd.conf - user: apache /etc/httpd/conf/httpd.conf: file.managed: - source: salt://apache/httpd.conf - user: root - group: root - mode: 644

Slide 13

Slide 13 text

AutoYaST + Salt

Slide 14

Slide 14 text

The best of both worlds ● AutoYaST does the initial installation: partitioning, network configuration, software installation, etc. ● Salt performs additional configuration: more software installation, services configuration, etc.

Slide 15

Slide 15 text

Example 1: master based ● Keys are pre-accepted by the Salt Master ● Multiple keys can be stored at the same place salt salt.my-network.lan http://my-network.lan/salt/keys

Slide 16

Slide 16 text

See in it action! https://youtu.be/BOnhUtj-mFA

Slide 17

Slide 17 text

Example 2: master based ● Minion needs to be accepted on the Salt master ● System administrator intervention is needed salt salt.my-network.lan 3 50

Slide 18

Slide 18 text

Example 3: masterless mode ● Salt server is not required ● The module will retrieve states/formulas and pillars salt http://my-network.lan/salt/redis.tar.gz http://my-network.lan/salt/redis-conf.tar.gz

Slide 19

Slide 19 text

Experimental features

Slide 20

Slide 20 text

Puppet support puppet http://my-network.lan/puppet/webserver.tgz puppet puppet.my-network.lan http://my-network.lan/salt/keys

Slide 21

Slide 21 text

SUSE Manager Parametrizable Salt Formulas ● Mechanism to describe Pillars data ● Enable developers to build a UI to expose them timezone: name: "Atlantic/Canary" utc: true

Slide 22

Slide 22 text

SUSE Manager Parametrizable Salt Formulas timezone: $type: hidden-group name: $type: select $values: ["UTC", "Atlantic/Canary", "Europe/Berlin", "US/Mountain"] $default: Europe/Berlin utc: $type: boolean $default: True

Slide 23

Slide 23 text

SUSE Manager Parametrizable Salt Formulas

Slide 24

Slide 24 text

See in it action! https://youtu.be/3pBUaWGeomo

Slide 25

Slide 25 text

Future

Slide 26

Slide 26 text

Some wild ideas ● Improve UI integration within the installer ● AutoYaST UI ● Cloning support ● Puppet Hiera ● Git

Slide 27

Slide 27 text

Thanks!

Slide 28

Slide 28 text

Thanks! ● My beloved YaST team for taking care of this module ● Duncan Mac-Vicar for his contribution and help ● Hannes Kühnemund for creating the feature request ● The openSUSE Project!

Slide 29

Slide 29 text

References ● YaST2 Configuration Management module https://github.com/yast/yast-configuration-management ● AutoYaST documentation for openSUSE http://doc.opensuse.org/projects/autoyast/ ● SaltStack homepage https://saltstack.com/ ● Puppet Labs homepage https://puppetlabs.com/ ● “Forms are the Formula for Success” by Joachim Werner https://www.suse.com/communities/blog/forms-formula-success/ ● YaST2 integration with Salt (Hack Week proof of concept demostration) https://www.youtube.com/watch?v=2em_R84XVYg

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

Questions?

Slide 32

Slide 32 text

Join Us at www.opensuse.org

Slide 33

Slide 33 text

License This slide deck is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license. It can be shared and adapted for any purpose (even commercially) as long as Attribution is given and any derivative work is distributed under the same license. Details can be found at https://creativecommons.org/licenses/by-sa/4.0/ General Disclaimer This document is not to be construed as a promise by any participating organisation to develop, deliver, or market a product. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. openSUSE makes no representations or warranties with respect to the contents of this document, and specifically disclaims any express or implied warranties of merchantability or fitness for any particular purpose. The development, release, and timing of features or functionality described for openSUSE products remains at the sole discretion of openSUSE. Further, openSUSE reserves the right to revise this document and to make changes to its content, at any time, without obligation to notify any person or entity of such revisions or changes. All openSUSE marks referenced in this presentation are trademarks or registered trademarks of SUSE LLC, in the United States and other countries. All third-party trademarks are the property of their respective owners. Credits Template Richard Brown [email protected] Design & Inspiration openSUSE Design Team http://opensuse.github.io/branding- guidelines/