All commands below must be run as root.
The configuration has been tested with:
- Debian 9 (Stretch)
- Ubuntu 16.04 LTS (Xenial)
- Ubuntu 18.04 LTS (Bionic)
It does not work with Debian 8 (Jessie).
This is what needs to be done for the initial deployment of Regovar on a brand new server.
mkdir -p /srv
apt install git
git clone https://github.com/REGOVAR/ServerConfiguration.git /srv/salt
git clone https://github.com/REGOVAR/ServerConfigurationBrownie.git /srv/pillar # Use your own repository here
Note: if you have troubles even getting apt to access the network, it may be because your operating system is configured to prefer IPv6 while your network is IPv4 only. In this case, you can use the following command to make your operating system prefer IPv4:
sed -i 's@^#\(precedence ::ffff:0:0/96 10\)@\1@' /etc/gai.conf
Edit /srv/pillar/settings.sls
as appropriate (the file is self-documented):
$EDITOR /srv/pillar/settings.sls
apt update
apt install salt-minion
salt-call --local state.highstate
This step may take some time, mainly depending on your network speed.
Note: if you have an error stating that "pip.installed is not available" when running highstate, then it may be that you are using a buggy version of pip (9.0.1 or 9.0.2). A fix is shipped with pip 9.0.3 that you can apply manually to /usr/lib/python3/dist-packages/pip/locations.py
.
apt upgrade
reboot now
This is what needs to be done as root to update a server on which Regovar as already been installed.
cd /srv/salt
git pull
cd /srv/pillar
git pull
apt update
salt-call --local state.highstate
apt upgrade
reboot now