Puppet Basics
Puppet is the system used to configure the Accessdev VM. It is a configuration management tool - basically you specify the state you'd like the system to be in, then Puppet does its best to put the system in that state.
Accessing Puppet
The Accessdev puppet code lives at https://vlrepos.nci.org.au/tg8/puppet
To access this website you need to contact NCI to get your account approved
It works like github, you can check out the puppet code with
git clone git@vlrepos.nci.org.au:tg8/puppet
Before making any changes, make a branch, preferably with a somewhat descriptive name
git checkout -b add_root_account
Making Changes
There are two places you may want to make changes
- The 'Heira' configuration, under 'hieradata/'. These are Yaml configuration files where you can configure basic settings, like software versions.
The main file to look at here is 'hieradata/node/accessdev.yaml'
- The 'Puppet' configuration under 'modules'. These are programmed in the Puppet language, and control the specifics of what files are created or modified. These are used for more complex setup of program installs. See the Puppet documentation at https://puppet.com/docs/puppet/latest/puppet_index.html
The main file to look at here is 'modules/accessdevnode/manifests/init.pp'
NCI have supplied a number of modules under 'corefw/', these can be used by our puppet code but should not be modified.
In general, try grepping for the file or setting you want to change to see if that has already been set up in the system before making a change.
Testing and Applying Changes
Before applying changes to Accessdev they should be tested on the test system 'accessdev-test.nci.org.au'.
Commit your changes, then upload your branch using
git push -u origin add_root_account
Log in to accessdev-test, then apply the changes with
sudo puppet-update --environment add_root_account
Test the system to make sure your changes work as you expect
Once you are confident the change is working, merge your branch into 'production', either on vlrepos.nci.org.au or via the command line.
Put accessdev-test back on the production branch with
sudo puppet-update --environment production
Then log into accessdev proper and update it with
sudo puppet-update