Debian Meetup Nantes 2015

introduction

image

salt introduction

  • remote execution
  • configuration management system
  • python (very flexible and extensible)
  • event bus with ZMQ
  • young project, very active community
  • debian packaged from the start (official packages and http://repo.saltstack.com/)

salt overview

image

install with debian

apt-get install apache2
vim /etc/apache2/apache2.conf
vim /etc/apache2/sites-enabled/default-ssl.conf
service apache2 restart

install at infrastructure level

image

upgrade / checkrestart

apt-get update; apt-get upgrade
apt-get install debian-goodies
checkrestart
service apache2 restart

upgrade / checkrestart at infrastructure level

salt '*' cmd.run 'checkrestart'
salt -I 'role:webserver' service.restart apache2
salt -I 'role:db' service.restart postgresql

cron

crontab -l
crontab -e
crontab -e -u user
cat "* * * * * /bin/echo 'hello'" > /etc/cron.d/hello_world

cron at infrastructure level

schedule:
  job1:
    function: cmd.run
    seconds: 30
    args:
        - echo 'hello'
    splay: 15

sudo

sudoedit
vim /etc/sudoers.d/allow_this

sudo at infrastructure level

client_acl:
  alice:
    - web\*:
      - pkg.list_pkgs
      - apache.*
  bob:
    - db\*:
        - postgres.*

orchestration

ssh root@machine1
...
ssh root@machine2
...
ssh root@machine3
...

orchestration at infrastructure level

image

reactor at infrastructure level

image

The End

image