Professional Documents
Culture Documents
Config Management
Config Management
Management
for
System
Administrators & DevOps
Contents
1 Introduction to Configuration Management 3
2 Abstraction, intention and state 55
3 Growing and planning 57
4 The same but different 59
Index 61
Copyright notice
This work is
c 2016, 2017 Mike Ciavarella. All rights reserved.
You are granted a non-exclusive right to use any example code included in these notes without fee, payment
or notification. If your organisation does not permit such usage without fee, then I ask that you make a small
donation to your local adult literacy program in lieu of any fee. Alternatively, please consider donating some
unneeded computer hardware to a technology education program for under-privileged children.
The class content and delivery can also be tailored in other ways, such as:
Use of your organisations existing configurations and policy as example and exercise material (Subject
to Non-Disclosure Agreement).
For larger teams and to reduce impact on local workloads, running two interleaved classes over a week,
with a morning session and an afternoon session.
Attaching to other classes with topics such as Shell Programming (Introductory and Advanced), Founda-
tions of System Administration, and Documentation Techniques for System Administrators, etc.
If you would like to discuss this option further, please send a short e-mail outlining your requirements to:
2 c 2017. M Ciavarella
7 @mxcia r1.2
Introduction to
Configuration
1
Management
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
Course objectives
learn.itmasters.edu.au www.itpa.org.au
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
Course structure
learn.itmasters.edu.au www.itpa.org.au
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
Technology choices
4 c 2017. M Ciavarella
7 @mxcia r1.2
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
Course support
Webinar Q&A
Forums
Your experiences may be different and relevant to the
class - please share!
Remember!
The only stupid question is the question you didnt ask
(Attributed to Dr Paul Macready)
learn.itmasters.edu.au www.itpa.org.au
Question and answers in lecture and forums, to refine and clarify learnings
How you make use of these resources will, ultimately, be the main factor in determining your learning
experience in this course. If you have limited time, then the best advice I can give you is to spend 1520
minutes reading the course notes for each week before listening to the webinar. At the very least this will start
you thinking about the content. Obviously attempting the hands-on work is important too, but if you have to
make a choice, then prepare before the webinar, You can always do the exercises later, when you have more
time. I hope this helps!
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
Disclaimer
learn.itmasters.edu.au www.itpa.org.au
The following notes are taken from the Wikipedia entry for Chatham House Rule, accessed 22 October 2006, from http:
//en.wikipedia.org/wiki/Chatham_House_Rule.
The Chatham House Rule (colloquial use: under Chatham House Rules) is a rule that governs the confi-
dentiality of the source of information received at a meeting. Since its refinement in 2002, the rule states:
When a meeting, or part thereof, is held under the Chatham House Rule, participants are free
to use the information received, but neither the identity nor the affiliation of the speaker(s), nor that
of any other participant, may be revealed.
The rule originated in June 1927 at what is now best known as Chatham House (officially: The Royal
Institute of International Affairs) with the aim of guaranteeing anonymity to those speaking within its walls in
order that better international relations could be achieved. It is now used throughout the world as an aid to free
discussion. The original rule was refined in October 1992 and again in 2002.
Meetings, or parts of meetings, may be held on the record or under the Chatham House Rule. In the
latter case, the participants are understood to have agreed that it would be conducive to free discussion that they
should be subject to the rule for the relevant part of the meeting. The success of the rule may depend on its
being considered morally binding, particularly in circumstances where a failure to comply with the rule may
result in no sanction.
The Rule allows people to speak as individuals, and to express views that may not be those of their organi-
zations, and therefore it encourages free discussion. Speakers are then free to voice their own opinions, without
concern for their personal reputation or their official duties and affiliations.
The Chatham House Rule resolves a boundary problem faced by many communities of practice, in that it
permits acknowledgement of the community or conversation while protecting the freedom of interaction that is
necessary for the community to carry out its conversations.
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
6 c 2017. M Ciavarella
7 @mxcia r1.2
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
A simple question
learn.itmasters.edu.au www.itpa.org.au
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
Basic lifecycle
Identify
Requirement
Procure
Decommission
learn.itmasters.edu.au www.itpa.org.au
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
8 c 2017. M Ciavarella
7 @mxcia r1.2
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
Logical installation
1
Install operating system
2
Configure operating system (incl. security)
3
Apply operating system patches
4
Install application software
5
Configure application software
6
Do some testing
7
Do some integration, communicate
8
More testing
9
Ready for production!
learn.itmasters.edu.au www.itpa.org.au
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
Operation
1
Operating system patching
2
Operating system upgrades
3
Operating system reconfiguration
4
Application patching
5
Application upgrades
6
Application reconfiguration
7
Diagnosis
8
Monitoring
9
More testing
10
etc.
learn.itmasters.edu.au www.itpa.org.au
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
10 c 2017. M Ciavarella
7 @mxcia r1.2
A simple lifecycle (2)
Slide borders have been omitted here to make the diagram easier to read in your class notes.
Identify
Requirement
Proactive patching, O/S upgrades
Application upgrades
Procure
Oops
Operating
Physical Install Configure Integration Handover to
system Operate
installation Applications Applications Testing Operations
setup
Defect remediation
Functional Develop- (bug fixes) Fault
testing ment Diagnosis
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
From notes:
Application $4000
Hardware $4000
Setup $1240 (about 25% of HW)
Operational budget 23 events over lifetime
learn.itmasters.edu.au www.itpa.org.au
Note that the cost of application/site development is not considered, but is likely to be substantially more
than the cost of hardware in any case.
t = (4000 1240)/120
= 23 Number of activities before ops cost >= H
12 c 2017. M Ciavarella
7 @mxcia r1.2
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
learn.itmasters.edu.au www.itpa.org.au
What is the cost of a single change to one server? (Hint: cost is not just in dollars. . . )
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
Reasons to automate
Professional laziness
Repetition
Consistency
Assurance
Support Delegation
Complex tasks are easy to . . . get wrong
Cant avoid it. Think: scale
learn.itmasters.edu.au www.itpa.org.au
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
14 c 2017. M Ciavarella
7 @mxcia r1.2
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
Automation Lies
///// Fibs
////// Myths
learn.itmasters.edu.au www.itpa.org.au
In the very specific case where you have large numbers of identical (i.e. homogeneous) servers, then au-
tomation certainly allows you to manage that server fleet with less staff. When it comes to fleets with varied
server configurations and applications (heterogeneous servers), its less clear on whether fewer staff will be
required. It turns out that that is a function of overall process maturity, which well talk about next. If youd
like to discuss hiring policy/philosophy for system staff, lets wait until the class is completed.
Relax, were not going to learn Windows scripting today. This bullet point is here to point out that systems
which are traditionally managed using GUIs can also have great scripting capability. Microsofts PowerShell
has some neat features that suit Windows environments, similarly AppleScript on OSX. Both PowerShell and
AppleScript have access to platform objects and standardised methods, which is a fancy way of saying that
they can deal with more than streams of characters (aka pipes). For the programmers among you, think:
marshalled objects (including collections of objects) being passed between processes. Event-driven scripts are
also possible. Neat!
z See next slide
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
Targeting tasks
learn.itmasters.edu.au www.itpa.org.au
z Automation doesnt remove the need to actually know what youre doing. An automation mistake has the
potential to be much more than Oops. Think about how youd stop a script running incorrectly on a single
server. Now imagine how youd stop that script running on 20 servers. . .
Think back to our opening question: Where do servers come from?
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
16 c 2017. M Ciavarella
7 @mxcia r1.2
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
learn.itmasters.edu.au www.itpa.org.au
Depending on who you ask and the particular industry or field youre asking about, a maturity model can mean
very different things.
One simplistic way to start thinking about maturity models is to consider that any process is subject to
going wrong. What matters is how you respond to a problem. At one extreme, where you have no idea what
to do, you might Panic. At the other extreme, you know exactly how you are going to handle the problem
youre Prepared. Its pretty clear that its better to be Prepared, and the way to get there is by Planning.
Perfecting
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
18 c 2017. M Ciavarella
7 @mxcia r1.2
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
learn.itmasters.edu.au www.itpa.org.au
The model shown here is almost identical to the Capability Maturity Model (CMM) originally developed in the
1980s by the Software Engineering Institute (https://sei.cmu.edu) at Carnegie Mellon University. Part
of the motivation in developing the CMM was to provide a way to objectively assess whether subcontractors
had a high likelihood of successfully delivering a software project. Analysis of previous software projects had
identified organisational and process attributes which were common to success (and failure). By mapping those
attributes to different levels, the hope was that a useful assessment model would result. The CMM has now
been replaced by the Capability Maturity Model Integrated (CMMI) but the same principles apply.
Note that its entirely possible to have different parts of an organisation and its processes at different levels.
For example, software development could be assessed at Defined and software release management could be
Ad-hoc.
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
Ad-hoc Repeatible
Managed
Scripting
Manual Schedule
and Generalise
Commands and deploy
Doco
Tools for
Review &
specific
Analysis
problems
Optimising
Defined
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
20 c 2017. M Ciavarella
7 @mxcia r1.2
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
learn.itmasters.edu.au www.itpa.org.au
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
22 c 2017. M Ciavarella
7 @mxcia r1.2
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
Local settings
Setting
A setting is a value which specifies or determines the behavior
of a system (or a part of a system).
A setting may be changeable, but doesnt have to be.
Changing a setting may not have an immediate effect.
learn.itmasters.edu.au www.itpa.org.au
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
learn.itmasters.edu.au www.itpa.org.au
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
24 c 2017. M Ciavarella
7 @mxcia r1.2
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
Configuration files
Plain text
Semi-structured text e.g. ini, yaml files
Fully structured e.g. XML, JSON
Executable code
learn.itmasters.edu.au www.itpa.org.au
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
Settings in databases
learn.itmasters.edu.au www.itpa.org.au
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
26 c 2017. M Ciavarella
7 @mxcia r1.2
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
learn.itmasters.edu.au www.itpa.org.au
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
Common concerns
learn.itmasters.edu.au www.itpa.org.au
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
28 c 2017. M Ciavarella
7 @mxcia r1.2
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
learn.itmasters.edu.au www.itpa.org.au
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
1
Pre-check: Its working now
2
Make a copy: Just in case
3
Make the change
4
Verify the change was made
5
Activate the change
learn.itmasters.edu.au www.itpa.org.au
Question: How would this process apply to dependent changes? What about co-dependent changes (e.g. a
multi-part change where all changes must be successful, or none, in order for the change to be successfully
applied)?
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
30 c 2017. M Ciavarella
7 @mxcia r1.2
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
learn.itmasters.edu.au www.itpa.org.au
A configuration here is a collection of all attributes which uniquely define a system at a point in time. This
includes, for example, configuration files, software installed, which processes are allowed or required to be
running, which processes should never be run, etc. The description of that configuration is given various names
by configuration management tools,with the names generally reflecting the particular approach taken by that
tool. For example:
CFE NGINE uses promise to describe desired/enforceable attributes, and policy to describe a collection of
promises
A NSIBLE uses playbooks which describe sequences of operations (tasks) grouped into roles.
P UPPET uses manifests to describe managed resources (including methods for management), and catalog for
a compiled collection of manifests to be applied to a target,
C HEF uses recipe files to hold descriptions of resources and resource management directives, cookbooks to
group recipes that are related, and roles to mark and group instantiations of cookbooks
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
learn.itmasters.edu.au www.itpa.org.au
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
32 c 2017. M Ciavarella
7 @mxcia r1.2
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
DSL Examples
Context is important!
The following examples are excerpts showing typical activities
in popular configuration management tools. These examples
will not work as-is.
Activities:
File owner/group and permissions, file contents
Service status
Software packages
learn.itmasters.edu.au www.itpa.org.au
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
learn.itmasters.edu.au www.itpa.org.au
Please see following page for the shell script discussed in this slide. Typical usage would be to call this
from another shell script.
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
34 c 2017. M Ciavarella
7 @mxcia r1.2
1 #!/bin/sh
2 # Test that a file exists, with given owner & group & permissions.
3 # Assumptions:
4 # * The stat command is present on your system
5 # * The owner and group given are alphanumeric, not UIDs
6 # * Permissions are given in octal, and exclude SUID/SGID
7 # * You have sufficient access to ALL directories above file
8
9 usage() {
10 echo Usage: checkfile file owner group perms
11 echo e.g. checkfile /etc/passwd root root 644
12 exit 1
13 }
14
15 case $# in
16 4) FILE="$1"
17 USER="$2"
18 GROUP="$3"
19 PERMS="$4"
20 ;;
21 *) usage()
22 ;;
23 esac
24
25 if [ ! test -e "${FILE}" ]; then
26 echo "${FILE} does not exist"
27 exit 11
28 fi
29
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
This example actually does more than the shell script on page 35, although some of the additions arent exactly
obvious:
If a target file doesnt exist, then it gets created. Adding this to the shell script is admittedly pretty easy.
but the CFE NGINE snippet can easily be extended to specify how to generate the contents of the new file
(see below for one way this can be done), or even to ensure that it has (or does not have) certain contents.
This rule (or as CFE NGINE calls it, a files promise) has a name, and a description. The name is sim-
ilar to creating a dedicated shell script to check owner/group/permissions for each file of interest, and
consistently appears in log output.
If the promise detects that the given file doesnt conform, CFE NGINE will fix the file according to the
promise specification and log that a promise was repaired.
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
36 c 2017. M Ciavarella
7 @mxcia r1.2
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
file { "/var/run/hello-world.txt":
ensure => "present",
mode => "644",
owner => "mikec",
group => "staff",
content => "hello everyone",
}
learn.itmasters.edu.au www.itpa.org.au
The P UPPET syntax is pretty straightforward. Although it resembles CFE NGINE, thats partly coincidence. The
big hint is the trailing comma that follows the last clause in this P UPPET file resource. The Ruby programmers
among you will recognise Ruby Hash syntax P UPPET is a DSL mainly implemented in Ruby.
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
file /var/run/hello-world.txt do
owner mikec
group staff
mode 0644
content hello everyone!
end
learn.itmasters.edu.au www.itpa.org.au
Like Puppet, Chef makes heavy use of the Ruby programming language, but with a different approach. As
you can see in this example, individual attributes are specified by commands executed in a function (in this
case: the file function). This makes it very easy to leverage Ruby when a particular configuration item needs
something extra. The tradeoff is that more care is needed to keep separate code and data.
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
38 c 2017. M Ciavarella
7 @mxcia r1.2
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
learn.itmasters.edu.au www.itpa.org.au
Our first A NSIBLE example! This particular snippet uses the A NSIBLE lineinfile module, which is specif-
ically designed to implement rules about line-based files. If you wanted a more fair comparison to the shell
script, that would use the A NSIBLE file module as shown below (additions and modifications to the slide
highlighted):
1 ---
2 - name: Hello ITPA and ITMasters students
3 file : >
4 dest=/var/run/hello-world.txt
5 state=file
6 owner=mikec
7 group=staff
8 mode=0644
9 # Removed: /line=hello/
////////////////// /everyone
///////////////
A NSIBLE configuration files use the YAML (Yet Another Markup Language) file format. This is a plain text
format, able to represent structured data. If you look at the last line above youll see an example of a YAML
comment. Like many other file formats, YAML uses the # (hash) to mark the start of a comment. A NSIBLE
will ignore anything after the # and you should make use of this to document all of your A NSIBLE plays.
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
---
- name: NTP | Create ntp.conf
template: >
src=ntp.conf.j2
dest=/etc/ntp.conf
owner=root
group=wheel
mode=0644
register: ntp_changed
learn.itmasters.edu.au www.itpa.org.au
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
40 c 2017. M Ciavarella
7 @mxcia r1.2
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
learn.itmasters.edu.au www.itpa.org.au
Full example:
Note that this is not related to the YML file on the previous slide; this example was chosen to illustrate
general Jinja2 syntax.
1 <html>
2 <head><title>{{ title }}</title></head>
3 <body>
4 <ul>
5 {% for item in people %}
6 <li>{{ item.name }}</li>
7 {% endfor %}
8 </ul>
9 </body>
10 </html>
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
42 c 2017. M Ciavarella
7 @mxcia r1.2
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
learn.itmasters.edu.au www.itpa.org.au
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
44 c 2017. M Ciavarella
7 @mxcia r1.2
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
Services summary
learn.itmasters.edu.au www.itpa.org.au
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
learn.itmasters.edu.au www.itpa.org.au
5 centos::
6 "httpd"
7 policy => "present",
8 version => "latest",
9 package_module => yum;
10
11 freebsd::
12 "apache2"
13 policy => "present",
14 version => "latest",
15 package_module => pkg;
16 }
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
46 c 2017. M Ciavarella
7 @mxcia r1.2
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
learn.itmasters.edu.au www.itpa.org.au
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
Software summary
learn.itmasters.edu.au www.itpa.org.au
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
48 c 2017. M Ciavarella
7 @mxcia r1.2
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
Discussion
learn.itmasters.edu.au www.itpa.org.au
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
Welcome System Lifecycles and Maturity Models System Administration activities Is this DevOps?
learn.itmasters.edu.au www.itpa.org.au
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
...............................................................................................
50 c 2017. M Ciavarella
7 @mxcia r1.2
Week 1 Homework
Overview
This weeks exercises are aimed at:
1. Providing extra background about configuration management history and theory; and
2. Getting your personal machine set-up and ready for the hands-on part of the course.
Reading
This weeks reading list is a mix of history and basic background.
Before you start reading, review the questions below so that you have some idea of why you are reading
these particular articles. When you have a new question, write it down immediately so that you dont forget.
M Burgess. A Site Configuration Engine. Computing systems (MIT Press: Cambridge MA). 1995. Avail-
able at https://www.usenix.org/legacy/publications/compsystems/1995/sum_burgess.
pdf.
When reading this paper, concentrate on the features that the original version of the
r CFE NGINE language implemented, rather than the language itself (which has changed
a lot since those days).
Group Policy is not a complete configuration management system, but its interesting
r because of the features it does provide. You might want to do some additional reading
about Microsofts Active Directory.
Questions
1. What are the benefits of separating system configuration from system control?
2. Where does the order of changes matter? Where does the order not matter?
3. What features of a Configuration Management system would be of most benefit to your site: software
distribution, file permissions, settings, rapid deployment, state consistency?
4. Why are you being asked to read papers describing systems that originated more than 15 years ago?
GitLab https://gitlab.com/users/sign_in
BitBucket [ https://bitbucket.org/account/signup/
Github https://github.com/join
Youll need to have at least one free private repository available, and a basic understanding of how Git
works including:
Tip: Some people will find it easier to use a text editor which has built-in support for Git, or a dedi-
cated Git client. I personally swap between Git Tower (https://www.git-tower.com/) and Source-
Tree (https://www.sourcetreeapp.com); both are available for Mac and Windows machines but
are paid software. You can also find a fairly comprehensive list of GUI clients, including free options, at
https://git-scm.com/downloads/guis. The same site includes a Git tutorial and documentation
that might be helpful.
52 c 2017. M Ciavarella
7 @mxcia r1.2
Exercise 2: Create a Linux Virtual Machine (VM) and install Ansible
The objective of this exercise is to have a current version of Ansible and suitable Git repository available for
use in following weeks.
Create the VM
Using your preferred Virtulasation platform, and then install Ansible into your new VM (Virtual Machine). In
this exercise, you need to install Linux in a Virtual environment on your own machine,
1.
There are three reasons why this exercise is structured around installing Linux into your own
VM:
Isolation means that your class work is kept separate from your local machine you wont
(well, shouldnt) accidentally break anything and lose access to your local machine.
Gaining experience with installing Linux manually, assuming you havent already. Think of
3 this as learning how to do things the hard way so that you can better appreciate the
easy way.
Commonality of platforms. Not all students will be running a Unix-like platform, and this
means everyone has the same base, making it easier to provide support in forums
If youre comfortable using Python and working locally on your own machine, thats OK, but
please remember that youll be primary support for that environment.
54 c 2017. M Ciavarella
7 @mxcia r1.2
Abstraction,
intention and state
2
In conjunction with IT Masters & ITPA (IT Professionals Association) 55
Configuration Management for System Administrators & DevOps
To be released
56 c 2017. M Ciavarella
7 @mxcia r1.2
Growing and
planning
3
In conjunction with IT Masters & ITPA (IT Professionals Association) 57
Configuration Management for System Administrators & DevOps
To be released
58 c 2017. M Ciavarella
7 @mxcia r1.2
The same but
different
4
In conjunction with IT Masters & ITPA (IT Professionals Association) 59
Configuration Management for System Administrators & DevOps
To be released
60 c 2017. M Ciavarella
7 @mxcia r1.2
Index
Active Directory (AD), 51 OSX, 15
Amazon Web Services (AWS), 54 OSX, 15
EC2, 54 AppleScript, 15
A NSIBLE, 31, 39
Ansible modules PowerShell, 15
file, 39 P UPPET, 31, 37
lineinfile, 39 Python, 50
API, 21
Scripting Languages
Apple
AppleScript, 15
OSX, 15
PowerShell, 15
AppleScript, 15
Python, 50
Application Programming Interface (API), 21
Templating language
Capability Maturity Model (CMM), 19
Jinja2, 41
Integrated (CMMI), 19
CFE NGINE, 31, 36, 37, 51 Windows
Chatham House Rule, The, 6 PowerShell, 15
C HEF, 31 Windows Server
Cloud services Active Directory, 51
Amazon Web Services (AWS), 54 Group Policy, 51
Configuration management
A NSIBLE, 31, 39 XML (eXtensible Markup Language), 25
CF ENGINE, 31, 36, 37, 51
C HEF, 31 YAML (Yet Another Markup Language), 25, 39
Git, 50, 52
P UPPET, 31, 37
Git, 50, 52
Group Policy, 51
Heterogeneous systems, 15
Homogeneous systems, 15
ini files, 25
Microsoft
Active Directory, 51
Group Policy, 51
Operating systems