Changes between Version 1 and Version 2 of Puppet/Basics


Ignore:
Timestamp:
Apr 16, 2020 10:19:40 AM (20 months ago)
Author:
Scott Wales
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Puppet/Basics

    v1 v2  
    33Puppet 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.
    44
    5 Accessdev is based around the [browser:/puppet/modules/accessdev-node/manifests/init.pp@master accessdev-node] Puppet module. This specifies a list of puppet classes and resources that must be installed on the system.
     5== Accessing Puppet ==
    66
    7 Puppet has two main types of resources - classes and defines. A class can only appear once, it defines a self-contained package (e.g. the UMUI). A define can be used several times; you can use it to define multiple versions of the same type of resource (e.g. multiple subversion repositories)
     7The Accessdev puppet code lives at https://vlrepos.nci.org.au/tg8/puppet
     8
     9To access this website you need to contact NCI to get your account approved
     10
     11It works like github, you can check out the puppet code with
     12
     13    `git clone git@vlrepos.nci.org.au:tg8/puppet`
     14
     15Before making any changes, make a branch, preferably with a somewhat descriptive name
     16
     17    `git checkout -b add_root_account`
     18
     19== Making Changes ==
     20
     21There are two places you may want to make changes
     22
     231.  The 'Heira' configuration, under 'hieradata/'. These are Yaml configuration files where you can configure basic settings, like software versions.
     24
     25    The main file to look at here is 'hieradata/node/accessdev.yaml'
     26
     272.  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
     28
     29    The main file to look at here is 'modules/accessdevnode/manifests/init.pp'
     30
     31    NCI have supplied a number of modules under 'corefw/', these can be used by our puppet code but should not be modified.
     32
     33In 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.
     34
     35== Testing and Applying Changes ==
     36
     37Before applying changes to Accessdev they should be tested on the test system 'accessdev-test.nci.org.au'.
     38
     39Commit your changes, then upload your branch using
     40
     41    `git push -u origin add_root_account`
     42
     43Log in to accessdev-test, then apply the changes with
     44
     45    `sudo puppet-update --environment add_root_account`
     46
     47Test the system to make sure your changes work as you expect
     48
     49Once you are confident the change is working, merge your branch into 'production', either on vlrepos.nci.org.au or via the command line.
     50
     51Put accessdev-test back on the production branch with
     52
     53    `sudo puppet-update --environment production`
     54
     55Then log into accessdev proper and update it with
     56
     57    `sudo puppet-update`