Introduction
PCMS is a configuration management systems (CMS) based on GNU Make. It is still in development.
Prologue
- Log in as root on tty1.
Can’t copy and paste from here into the terminal?
Depending whether you are installing a physical machine, virtual machine or a container, you may or may not be able to copy content from here and paste it directly into the console.
- You may wish to continue over ssh by running:
echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config systemctl restart ssh ip addr # note the IP address into which to ssh
but beware that, later, pcms must be run from the console (because it can change the system’s IP address).
Installing a released version of PCMS
- Download the svn-cache-passwd script as follows:
apt -y install wget cd /tmp wget https://svn.pasta.freemyip.com/main/smalltools/trunk/bin/svn-cache-passwd chmod 755 svn-cache-passwd
(More details about this script and the procedure to install and use it can be found here.)
- Insert the password for the Subversion repository hosting the PCMS module into the plain-text password store by running:
/tmp/svn-cache-passwd https://svn.pasta.freemyip.com/private/
- Run:
cd /tmp wget https://repo.pasta.freemyip.com/debian/pool/ade_2.0.9-1_all.deb wget https://repo.pasta.freemyip.com/debian/pool/pcms_2.0.20-1_all.deb dpkg -i --force-depends *.deb apt -y --fix-broken install
- Download the site-specific PCMS configuration module by running:
mkdir -p /etc/pcms svn co -q https://svn.pasta.freemyip.com/private/pcms-config/trunk \ /etc/pcms/pcms-config ln -s pcms-config /etc/pcms/site-config
and following the prompts (if any).
Installing the development version of PCMS
- Set up a minimal ~/.vimrc containing:
:syntax on :set paste :set background=dark :set noi
- Download the svn-cache-passwd script as follows:
apt-get -y install wget cd /tmp wget https://svn.pasta.freemyip.com/main/smalltools/trunk/bin/svn-cache-passwd chmod 755 svn-cache-passwd
(More details about this script and the procedure to install and use it can be found here.)
- Insert the password for the Subversion repository hosting the PCMS module into the plain-text password store by running:
/tmp/svn-cache-passwd https://svn.pasta.freemyip.com/main/ /tmp/svn-cache-passwd https://svn.pasta.freemyip.com/private/
- Run:
# install ADE and ADE's prerequisites wget https://repo.pasta.freemyip.com/debian/pool/ade_2.0.9-1_all.deb dpkg -i --force-depends *.deb apt-get -y --fix-broken install # install PCMS's prerequisites apt-get -y install subversion debfoster vim apt-transport-https network-manager libeatmydata1 gnupg bridge-utils # install PCMS from source mkdir -p /usr/local/opt cd /usr/local/opt svn co -q https://svn.pasta.freemyip.com/main/pcms/trunk pcms make -C pcms # use the example pcms.conf file as the real pcms.conf file mkdir -p /etc/pcms cp pcms/doc/examples/pcms.conf /etc/pcms/
- Download the site-specific PCMS configuration module by running:
mkdir -p /etc/pcms svn co -q https://svn.pasta.freemyip.com/private/pcms-config/trunk \ /etc/pcms/pcms-config ln -s pcms-config /etc/pcms/site-config
and following the prompts (if any).
- Run the PCMS development shell:
/usr/local/opt/pcms/bin/pcmsdevsh
Adding a new host to the site-specific PCMS configuration module
- Edit /etc/pcms/site-config/hosts/gen-facility-local and add the host.
Running PCMS
- Verify that PCMS can find all its components by running:
pcms -h > /dev/null
Any output is an error in PCMS or this documentation.
- Run PCMS as follows:
pcms --no-update-os -- -n > /dev/null
- If the previous command failed then modify the site-specific PCMS configuration module and rerun this test command.
- Make sure you are logged in on the console (optional instructions above mean you may have connected by ssh).
- Then run it for real as follows:
pcms -v
- Remember to commit your edits to the site-specific PCMS configuration module!