saltstack presentation for august - bangpyper demo
HTML JavaScript SaltStack CSS
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


This tutorial is meant for saltstack demo in August Bangpypers meet.
To understand various saltstack concepts like, minion, master, grains, pillars, state files, salt modules.

There are salt state files added in srv folder. 
On running salt '*' state.highstate in salt master, a `hello world` nodejs web application
will be installed as a systemd service and made up and running. You can view the running 
application at http://guestIp:3010.
'present' folder contains the ppt stuff, which i recommend others to go through before attending workshop
 index.html contains 9 slides, and use the url ------ 
 to see the contents. Press down/up key to navigate between the slides......
Prerequisites for the workshop attendees:
Four steps:
1) Install hypervisor, virt-manager
2) Bring up a Centos Vm Instance
3) Login to Vm
4) ssh to Vm
5) Change hostname

1) Install hypervisor, virt-manager
  sudo apt-get install virt-manager
2) Bring up a Centos Vm Instance
Download image, say centos7_bangpydemo.qcow2 from
Create a new guest machine following the instructions at,
Try to boot the virtual instance. If it throws error as, "No bootable device", refer this post and fix it, &&
3) Login to Vm
  Now, try to login as root user into the VM. If it asks for password authentication, use guestfish to remove password for root user,
    sudo apt-get install libguestfs-tools  # Debian/Ubuntu
    guestfish --ro -i -a disk.img
  Now you must be able to login into vm via virt-manager
  Run ifconfig inside Vm to get eth0 IPAddress. If eth0 is not up and running,
  and reboot the Vm
  Note down eth0's Ip address.
4) ssh to Vm
  Try ssh root@guestIp. It may fail, because ssh protocol by default doesnot allow ssh login with empty passwords.
  Add these three lines to /etc/ssh/sshd_config,
    StrictModes yes 
    PermitEmptyPasswords yes
    PermitRootLogin yes
  Restart ssh daemon as, sudo service sshd restart
  Confirm, you are able to do, ssh root@guestIp from the host machine
5) Change hostname
   Change guestmachine hostname as 'salt-at-redhat' in /etc/hostname
   Get the guestmachine's ip by running this command on host machine --- `arp -an` 
   In /etc/hosts on the host machine, add an entry `guestIp salt-at-redhat`
   Try `ping salt-at-redhat` and `ssh salt-at-redhat` from the host m/c and both must work.
6) Install salt
   - For CentOs machines, you need to add EPEL to yum.repos.d before installing salt packages
     -- rpm -Uvh
   - On master(host machine):
     `yum install salt-master` #use apt-get if you have a ubuntu machine
     `service salt-master status`
     must say, service is up and running
   - On minion(Centos vm):
     `yum install salt-minion`
     `service salt-minion status`
   In case you face errors during  `yum install salt-*`, try the debugging steps given here -
Now, all the necessary resources are set up in place.
Go through the presentation in github repo, bangpy-aug-saltstack/present/index.html and do those steps, as much as you can before coming for the workshop