34. Set
A
collec+on
of
"things"
(objects
or
numbers,
etc).
Each
member
is
called
an
element
of
the
set.
There
should
be
only
one
of
each
member
(all
members
are
unique).
35. Evaluation Order Matters
• Works
class
{
'pe':
instance_id
=>
'central';
}
class
{
'pe::puppet_master':
}
• Breaks
class
{
'pe::puppet_master':
}
class
{
'pe':
instance_id
=>
'central';
}
45. Anchors
class
pe
(
...
)
{
#
ANCHORS
#
When
building
a
complex
multi-‐tier
model,
it
is
not
known
up
front
which
#
profiles
will
be
deployed
to
a
given
node.
However,
some
profiles
when
#
deployed
together
have
dependencies
which
must
be
expressed.
For
example,
#
the
CA
must
be
set
up
and
configured
before
certificates
can
be
requested.
#
Therefore
the
CA
must
be
configured
before
any
certificate-‐requiring
#
service.
Since
the
profiles
cannot
express
those
dependencies
directly
#
against
each
other,
since
they
may
or
may
not
exist
in
a
given
node's
#
catalog,
we
instead
have
them
express
dependencies
against
common
anchors.
anchor
{
'barrier:
pe
certificate_authority':
}
-‐>
anchor
{
'barrier:
pe
puppetdb_database':
}
-‐>
anchor
{
'barrier:
pe
puppetdb':
}
-‐>
...
46. Puppetizing Multi-Tier Architecture
• Model the app as a class
– Most important consideration is the interface
• Assign parameters to app, not just nodes
– Complementary to the assignment of classes to nodes
• Take central control of Puppet run schedule
– Or else account for eventual consistency