How to add a new host (salt era)

This example will use einstein12 as a sample machine which before was known as ra15. Before you begin, you need to have ssh-agent forwarding enabled to automatically commit/push to the various repos involved.

Steps to perform:


All of this is done on our central salt master machine:
  1. Create a set of ssh hostkeys, e.g. by running
    /srv/salt/bin/salt_add_ssh_hostkeys einstein12
    followed by running
  2. Add host under
    e.g. in this case
    e.g. in this case einstein12.atlas.local einstein12 mgeinstein12.atlas.local mgeinstein12 ipeinstein12.atlas.local ipeinstein12
  3. Commit these changes and push upstream, e.g.
    git add einstein.hosts
    git commit -m "Add einstein12 to DNS" einstein.hosts
    git push
    The actual /etc/hosts will be auto-created via a git hook and this change will be also automatically propagated to condormaster via a hooked salt state.apply
  4. Check if the new host is already part of the appropriate nodegroups (/srv/salt/master.d/nodegroups.conf) and if the appropriate states are defined as the machine will run a salt highstate upon first reboot. Changes to nodegroups.conf or salt's top.sls may require a reload/restart of the salt-master process.


All of this is done on our FAI server
  1. Add/change MAC address to IP mapping under /etc/dhcp. In this case ra15 was the progenitor of einstein12, hence the old entries for ra15 needed to be moved from {data,mgmt}/radio.part to {data,mgmt}/einstein.part.
  2. Committing the changes will automatically trigger a DHCP server restart
    git commit -am "Rename ra15 to einstein12"
  3. Check configuration under /srv/fai/config if it is suitable for the base installation. Usually, this involves checking if the appropriate classes are set (class/50-host-classes) and depending on hostname/classes files under disk_config/, package_config/ and ZFS/.
  4. Tell FAI to install the machine upon next reboot by running
    /usr/local/bin/ -v einstein12
    Please note that you need to automatically log into our salt server for this to work, e.g. you need to have ssh-agent forwarding enabled.

-- CarstenAulbert - 26 Oct 2016
Topic revision: r5 - 02 Nov 2016, CarstenAulbert
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback