salt stack setup on beaglebone black rev c debian arm

I’ve been having fun playing around with my new ARM processor mini computer.  It’s a Beagle Bone Black (aka bbb) Revision C which has 512mb ram, 4gb flash storage, and comes pre-installed with Debian.

See my previous post on the Getting Started Experience: https://vmsec.wordpress.com/2014/05/22/beaglebone-black-rev-c-setup-experience/

Here are the details of the salt stack minion install.

WHAT IS SALT?
SaltStack takes a new approach to infrastructure management by developing software that is easy enough to get running in seconds, scalable enough to manage tens of thousands of servers, and fast enough to control and communicate with them in milliseconds. SaltStack delivers a dynamic infrastructure communication bus used for orchestration, remote execution, configuration management and much more.

Before you start this procedure you should have the following things ready:

  1. BBB unit
  2. USB cable
  3. Ethernet cable
  4. Internet access
  5. Admin console computer to drive the setup – I used an apple mac mini running windows 8.1 enterprise
  6. admin console should be setup with the BBB drivers the come with it and you will need basic apps like Putty for terminal access
  7. Salt Master server already setup and on the network

This process took about 15 minutes. I used the following guide as a reference: http://docs.saltstack.com/en/latest/topics/installation/debian.html

Procedure to install salt minion:

  1. plug everything in following the BBB getting started guide. the bbb i used was
  2. open a terminal window to the BBB. I used putty to connect to the BBB three different ways:
    1. with ssh to the local USB NDIS ip address 192.168.7.2
    2. to the COM3 serial port
    3. with ssh to the dhcp assigned ethernet address (check the dhcp server logs for “beaglebone”)
  3. Login as root – there is no root password for the bbb out of the box configuration
  4. Since i have a few BBB units it’s important to change the hostname so I’m able to differentiate them in the logs, dhcp servers, and salt configurations:
    vi /etc/hostname # change beaglebone to something unique
    vi /etc/hosts # change beaglebone to something unique
    reboot # or manually restart each service using the hostname
  5. This block of code will perform the four following steps: update apt repo list, import the APT repo signing key, update the package DB, and install the salt-minion.
    echo 'deb http://debian.saltstack.com/debian wheezy-saltstack main' >> /etc/apt/sources.list
    wget -q -O- "http://debian.saltstack.com/debian-salt-team-joehealy.gpg.key" | apt-key add -
    apt-get update
    apt-get -y install salt-minion
    #copy and paste these 4 lines to your terminal session
  6. Configure the minion by editing this file
    vi /etc/salt/minion
  7. Insert a new line to configure the master either for an IP address or hostname:
    #master: salt
    master: 192.168.100.100

    In this example I am pointing the master to 192.168.100.100

  8. Now you need to start the salt stack minion daemon
    salt-minion -d
  9. The next part is done on the salt master server. Open a console to your master, view the pending key requests, and accept them:
    salt-key
    salt-key -A
  10. That’s it!  You can test the install by running a few commands:
     salt '*' grains.items
    beaglebone:
     cpu_flags: swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls
     cpu_model: ARMv7 Processor rev 2 (v7l)
     cpuarch: armv7l
     defaultencoding: UTF-8
     defaultlanguage: en_US
     domain:
     fqdn: beaglebone
     fqdn_ip4:
     127.0.1.1
     fqdn_ip6:
     gpus:
     host: beaglebone
     hwaddr_interfaces: {'lo': '00:00:00:00:00:00', 'usb0': '96:b3:d1:ff:ff:ff', 'eth0': '1c:ba:8c:ff:ff:ff'}
     id: beaglebone
     ip_interfaces: {'lo': ['127.0.0.1'], 'usb0': ['192.168.7.2'], 'eth0': ['192.168.100.117']}
     ipv4:
     127.0.0.1
     192.168.100.117
     192.168.7.2
     ipv6:
     ::1
     fe80::ffff
     fe80::ffff
     kernel: Linux
     kernelrelease: 3.8.13-bone47
     localhost: beaglebone
     lsb_distrib_codename: wheezy
     lsb_distrib_description: Debian GNU/Linux 7.4 (wheezy)
     lsb_distrib_id: Debian
     lsb_distrib_os: GNU/Linux
     lsb_distrib_release: 7.4
     master: 192.168.100.100
     mem_total: 497
     nodename: beaglebone
     num_cpus: 1
     num_gpus: 0
     os: Debian
     os_family: Debian
     osarch: armhf
     oscodename: wheezy
     osfullname: Debian
     osrelease: 7.4
     path: /sbin:/usr/sbin:/bin:/usr/bin
     ps: ps -efHww
     pythonpath:
     /usr/bin
     /usr/local/lib/python2.7/dist-packages/distribute-0.7.3-py2.7.egg
     /usr/local/lib/python2.7/dist-packages/setuptools-3.4.4-py2.7.egg
     /usr/lib/python2.7
     /usr/lib/python2.7/plat-linux2
     /usr/lib/python2.7/lib-tk
     /usr/lib/python2.7/lib-old
     /usr/lib/python2.7/lib-dynload
     /usr/local/lib/python2.7/dist-packages
     /usr/lib/python2.7/dist-packages
     /usr/lib/python2.7/dist-packages/gtk-2.0
     /usr/lib/pymodules/python2.7
     pythonversion: 2.7.3.final.0
     saltpath: /usr/lib/python2.7/dist-packages/salt
     saltversion: 2014.1.4
     saltversioninfo:
     2014
     1
     4
     server_id: 546237894
     shell: /bin/sh
     virtual: physical
     zmqversion: 3.2.3

 

Here is a detailed log of the install process:

root@beaglebone:~# echo 'deb http://debian.saltstack.com/debian wheezy-saltstack main' >> /etc/apt/sources.list
root@beaglebone:~# wget -q -O- "http://debian.saltstack.com/debian-salt-team-joehealy.gpg.key" | apt-key add -
OK
root@beaglebone:~# apt-get update
Hit http://security.debian.org wheezy/updates Release.gpg
Get:1 http://debian.saltstack.com wheezy-saltstack Release.gpg [836 B]
Hit http://ftp.us.debian.org wheezy Release.gpg
Hit http://security.debian.org wheezy/updates Release
Hit http://debian.beagleboard.org wheezy-bbb Release.gpg
Get:2 http://debian.saltstack.com wheezy-saltstack Release [5204 B]
Hit http://ftp.us.debian.org wheezy-updates Release.gpg
Hit http://ftp.us.debian.org wheezy Release
Hit http://debian.beagleboard.org wheezy-bbb Release
Get:3 http://ftp.debian.org wheezy-backports Release.gpg [836 B]
Hit http://security.debian.org wheezy/updates/main armel Packages
Hit http://ftp.us.debian.org wheezy-updates Release
Hit http://security.debian.org wheezy/updates/contrib armel Packages
Get:4 http://debian.saltstack.com wheezy-saltstack/main armel Packages [2921 B]
Get:5 http://ftp.debian.org wheezy-backports Release [147 kB]
Hit http://ftp.us.debian.org wheezy/main armel Packages
Hit http://security.debian.org wheezy/updates/non-free armel Packages
Get:6 http://debian.saltstack.com wheezy-saltstack/main armhf Packages [3414 B]
Hit http://debian.beagleboard.org wheezy-bbb/main armhf Packages
Hit http://security.debian.org wheezy/updates/main armhf Packages
Hit http://ftp.us.debian.org wheezy/contrib armel Packages
Hit http://security.debian.org wheezy/updates/contrib armhf Packages
Hit http://ftp.us.debian.org wheezy/non-free armel Packages
Hit http://security.debian.org wheezy/updates/non-free armhf Packages
Hit http://ftp.us.debian.org wheezy/main armhf Packages
Hit http://security.debian.org wheezy/updates/contrib Translation-en
Hit http://ftp.us.debian.org wheezy/contrib armhf Packages
Hit http://security.debian.org wheezy/updates/main Translation-en
Ign http://debian.saltstack.com wheezy-saltstack/main Translation-en
Hit http://ftp.us.debian.org wheezy/non-free armhf Packages
Hit http://security.debian.org wheezy/updates/non-free Translation-en
Ign http://debian.beagleboard.org wheezy-bbb/main Translation-en
Get:7 http://ftp.debian.org wheezy-backports/main armel Packages [434 kB]
Hit http://ftp.us.debian.org wheezy/contrib Translation-en
Hit http://ftp.us.debian.org wheezy/main Translation-en
Hit http://ftp.us.debian.org wheezy/non-free Translation-en
Hit http://ftp.us.debian.org wheezy-updates/main armel Packages
Get:8 http://ftp.debian.org wheezy-backports/contrib armel Packages [2459 B]
Hit http://ftp.us.debian.org wheezy-updates/contrib armel Packages
Hit http://ftp.us.debian.org wheezy-updates/non-free armel Packages
Get:9 http://ftp.debian.org wheezy-backports/non-free armel Packages [4819 B]
Hit http://ftp.us.debian.org wheezy-updates/main armhf Packages
Get:10 http://ftp.debian.org wheezy-backports/main armhf Packages [450 kB]
Hit http://ftp.us.debian.org wheezy-updates/contrib armhf Packages
Hit http://ftp.us.debian.org wheezy-updates/non-free armhf Packages
Hit http://ftp.us.debian.org wheezy-updates/contrib Translation-en
Hit http://ftp.us.debian.org wheezy-updates/main Translation-en/DiffIndex
Hit http://ftp.us.debian.org wheezy-updates/non-free Translation-en
Get:11 http://ftp.debian.org wheezy-backports/contrib armhf Packages [4958 B]
Get:12 http://ftp.debian.org wheezy-backports/non-free armhf Packages [4819 B]
Get:13 http://ftp.debian.org wheezy-backports/contrib Translation-en [5113 B]
Get:14 http://ftp.debian.org wheezy-backports/main Translation-en [257 kB]
Get:15 http://ftp.debian.org wheezy-backports/non-free Translation-en [18.8 kB]
Fetched 1342 kB in 7s (178 kB/s)
Reading package lists... Done

root@beaglebone:~# apt-get -y install salt-minion
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
 dctrl-tools debconf-utils dmidecode libjs-jquery libpgm-5.1-0 libzmq3 msgpack-python python-async
 python-crypto python-git python-gitdb python-jinja2 python-m2crypto python-mako python-markupsafe
 python-smmap python-yaml python-zmq salt-common
Suggested packages:
 debtags python-crypto-dbg python-crypto-doc python-jinja2-doc python-beaker python-mako-doc salt-doc
 python-augeas
The following NEW packages will be installed:
 dctrl-tools debconf-utils dmidecode libjs-jquery libpgm-5.1-0 libzmq3 msgpack-python python-async
 python-crypto python-git python-gitdb python-jinja2 python-m2crypto python-mako python-markupsafe
 python-smmap python-yaml python-zmq salt-common salt-minion
0 upgraded, 20 newly installed, 0 to remove and 19 not upgraded.
Need to get 4503 kB of archives.
After this operation, 16.2 MB of additional disk space will be used.
Get:1 http://debian.saltstack.com/debian/ wheezy-saltstack/main libzmq3 armhf 3.2.3+dfsg-1~bpo70~dst+1 [344 kB]
Get:2 http://ftp.us.debian.org/debian/ wheezy/main libpgm-5.1-0 armhf 5.1.118-1~dfsg-0.1 [180 kB]
Get:3 http://ftp.debian.org/debian/ wheezy-backports/main dmidecode armhf 2.12-2~bpo70+1 [51.8 kB]
Get:4 http://debian.saltstack.com/debian/ wheezy-saltstack/main python-zmq armhf 13.1.0-1~bpo70~dst+1 [357 kB]
Get:5 http://ftp.us.debian.org/debian/ wheezy/main dctrl-tools armhf 2.22.2 [151 kB]
Get:6 http://ftp.us.debian.org/debian/ wheezy/main debconf-utils all 1.5.49 [55.8 kB]
Get:7 http://debian.saltstack.com/debian/ wheezy-saltstack/main salt-common all 2014.1.4+ds-2~bpo70+1 [1674 kB]
Get:8 http://ftp.us.debian.org/debian/ wheezy/main libjs-jquery all 1.7.2+dfsg-1 [80.1 kB]
Get:9 http://ftp.us.debian.org/debian/ wheezy/main msgpack-python armhf 0.1.10-1 [48.3 kB]
Get:10 http://ftp.us.debian.org/debian/ wheezy/main python-crypto armhf 2.6-4+deb7u3 [521 kB]
Get:11 http://ftp.us.debian.org/debian/ wheezy/main python-async armhf 0.6.1-1 [41.8 kB]
Get:12 http://ftp.us.debian.org/debian/ wheezy/main python-smmap all 0.8.2-1 [20.9 kB]
Get:13 http://ftp.us.debian.org/debian/ wheezy/main python-gitdb armhf 0.5.4-1 [56.7 kB]
Get:14 http://ftp.us.debian.org/debian/ wheezy/main python-git all 0.3.2~RC1-1 [314 kB]
Get:15 http://debian.saltstack.com/debian/ wheezy-saltstack/main salt-minion all 2014.1.4+ds-2~bpo70+1 [27.4 kB]
Get:16 http://ftp.us.debian.org/debian/ wheezy/main python-markupsafe armhf 0.15-1 [14.3 kB]
Get:17 http://ftp.us.debian.org/debian/ wheezy/main python-jinja2 armhf 2.6-1 [167 kB]
Get:18 http://ftp.us.debian.org/debian/ wheezy/main python-m2crypto armhf 0.21.1-2 [174 kB]
Get:19 http://ftp.us.debian.org/debian/ wheezy/main python-mako all 0.7.0-1.1 [59.3 kB]
Get:20 http://ftp.us.debian.org/debian/ wheezy/main python-yaml armhf 3.10-4 [164 kB]
Fetched 4503 kB in 8s (516 kB/s)
Selecting previously unselected package libpgm-5.1-0.
(Reading database ... 59253 files and directories currently installed.)
Unpacking libpgm-5.1-0 (from .../libpgm-5.1-0_5.1.118-1~dfsg-0.1_armhf.deb) ...
Selecting previously unselected package libzmq3:armhf.
Unpacking libzmq3:armhf (from .../libzmq3_3.2.3+dfsg-1~bpo70~dst+1_armhf.deb) ...
Selecting previously unselected package dmidecode.
Unpacking dmidecode (from .../dmidecode_2.12-2~bpo70+1_armhf.deb) ...
Selecting previously unselected package dctrl-tools.
Unpacking dctrl-tools (from .../dctrl-tools_2.22.2_armhf.deb) ...
Selecting previously unselected package debconf-utils.
Unpacking debconf-utils (from .../debconf-utils_1.5.49_all.deb) ...
Selecting previously unselected package libjs-jquery.
Unpacking libjs-jquery (from .../libjs-jquery_1.7.2+dfsg-1_all.deb) ...
Selecting previously unselected package msgpack-python.
Unpacking msgpack-python (from .../msgpack-python_0.1.10-1_armhf.deb) ...
Selecting previously unselected package python-crypto.
Unpacking python-crypto (from .../python-crypto_2.6-4+deb7u3_armhf.deb) ...
Selecting previously unselected package python-async.
Unpacking python-async (from .../python-async_0.6.1-1_armhf.deb) ...
Selecting previously unselected package python-smmap.
Unpacking python-smmap (from .../python-smmap_0.8.2-1_all.deb) ...
Selecting previously unselected package python-gitdb.
Unpacking python-gitdb (from .../python-gitdb_0.5.4-1_armhf.deb) ...
Selecting previously unselected package python-git.
Unpacking python-git (from .../python-git_0.3.2~RC1-1_all.deb) ...
Selecting previously unselected package python-markupsafe.
Unpacking python-markupsafe (from .../python-markupsafe_0.15-1_armhf.deb) ...
Selecting previously unselected package python-jinja2.
Unpacking python-jinja2 (from .../python-jinja2_2.6-1_armhf.deb) ...
Selecting previously unselected package python-m2crypto.
Unpacking python-m2crypto (from .../python-m2crypto_0.21.1-2_armhf.deb) ...
Selecting previously unselected package python-mako.
Unpacking python-mako (from .../python-mako_0.7.0-1.1_all.deb) ...
Selecting previously unselected package python-yaml.
Unpacking python-yaml (from .../python-yaml_3.10-4_armhf.deb) ...
Selecting previously unselected package python-zmq.
Unpacking python-zmq (from .../python-zmq_13.1.0-1~bpo70~dst+1_armhf.deb) ...
Selecting previously unselected package salt-common.
Unpacking salt-common (from .../salt-common_2014.1.4+ds-2~bpo70+1_all.deb) ...
Selecting previously unselected package salt-minion.
Unpacking salt-minion (from .../salt-minion_2014.1.4+ds-2~bpo70+1_all.deb) ...
Processing triggers for man-db ...
Setting up libpgm-5.1-0 (5.1.118-1~dfsg-0.1) ...
Setting up libzmq3:armhf (3.2.3+dfsg-1~bpo70~dst+1) ...
Setting up dmidecode (2.12-2~bpo70+1) ...
Setting up dctrl-tools (2.22.2) ...
Setting up debconf-utils (1.5.49) ...
Setting up libjs-jquery (1.7.2+dfsg-1) ...
Setting up msgpack-python (0.1.10-1) ...
Setting up python-crypto (2.6-4+deb7u3) ...
Setting up python-async (0.6.1-1) ...
Setting up python-smmap (0.8.2-1) ...
Setting up python-gitdb (0.5.4-1) ...
Setting up python-git (0.3.2~RC1-1) ...
Setting up python-markupsafe (0.15-1) ...
Setting up python-jinja2 (2.6-1) ...
Setting up python-m2crypto (0.21.1-2) ...
Setting up python-mako (0.7.0-1.1) ...
Setting up python-yaml (3.10-4) ...
Setting up python-zmq (13.1.0-1~bpo70~dst+1) ...
Setting up salt-common (2014.1.4+ds-2~bpo70+1) ...
Setting up salt-minion (2014.1.4+ds-2~bpo70+1) ...
[ ok ] Starting salt-minion (via systemctl): salt-minion.service.
Processing triggers for python-support ...
root@beaglebone:~#
Advertisements