1. Instant Data
Center
A Data Center on your Laptop
Bryan Belanger bbelanger@azcender.com
2.
3. Why Developing in Your Data
Center is a Bad Idea
• Virtual Machines / Nodes tend to be expensive
• You’ll break your nodes… lots
• You can break your Puppet Master
4. Do It All on your Local Box
• Easy way to test and run your Puppet architecture
• No overhead in maintaining dev nodes
• Tear down and rebuild nodes quickly and easily
• If you break the Puppet Master who cares
5. The Basic Blocks
http://git-scm.com
http://ruby-lang.org
http://vagrantup.com
http://virtualbox.org
7. Other Considerations
• You’ll need an i5 or better processor
• You need a minimum of 8 GB
• 16 GB is recommended
8. Using the Oscar Plugin
• boxes.yaml
• Hash of boxes and their location
• pe_build.yaml
• Specifies location and version of
Puppet Enterprise
• roles.yaml
• Virtual machine configuration
details
• vms.yaml
• Ties boxes and configuration
together
9. boxes.yaml Finds Vagrant
Boxes
# Boxes
# Updated: 2014-12-03 --- PT
boxes:
'fs_centos-65-x64-vbox4320-nocm':
Every Box has a Name
‘http://file.azcender.com/boxes/fs_centos-65-x64-vbox4320-nocm.box'
'fs_centos-7-x64-vbox4320-nocm':
‘http://file.azcender.com/boxes/fs_centos-7-x64-vbox4320-nocm.box'
‘fs_ubuntu-server-14041-x64-vbox4320-nocm':
‘http://file.azcender.com/boxes/fs_ubuntu-server-14041-x64-vbox4320-nocm.box'
'fs_win-2012r2-standard-amd64-vbox4316-nocm':
'http://file.azcender.com/boxes/fs_win-2012r2-standard-amd64-vbox4316-nocm.box'
Every Box has
a Location
12. vms.yaml Glues Boxes and
Roles Together
---
vms:
- name: master
Every VM has a Name
box: fs_centos-7-x64-vbox4320-nocm
roles:
- pe-puppet-master
- name: centos0
box: fs_centos-7-x64-vbox4320-nocm
roles:
- pe-puppet-agent-linux
- name: centos1
box: fs_centos-7-x64-vbox4320-nocm
roles:
- pe-puppet-agent-linux
- name: windows0
box: fs_win-2012r2-standard-amd64-vbox4316-nocm
roles:
- pe-puppet-agent-windows
Every VM Needs a Box
Every VM Needs a Role
13. Quick Start
1. Install Vagrant, VirtualBox, git and Ruby
2. Clone the puppet-r10k project
• git clone https://github.com/azcender/puppet-r10k.git
3. Make sure you install your modules
• cd puppet
• librarian-puppet install
4. Change to project directory
• cd puppet-r10k
5. Start the Vagrant master
• vagrant up master
6. Once complete start a Puppet node
• vagrant up centos0
7. Visit your new Puppet console
• https://localhost:8443
• User: admin@puppetlabs.com
• PW: puppetlabs
14. See The Following Project
and Detailed Setup
https://github.com/azcender/puppet-r10k.git
15. What’s Happening
Oscar Downlads
Puppet
Oscar Installs the
Puppet Master Using
an Answer File
The Default site.pp is
Applied to the Master
An Agent Node is
Started
The Agent Node
Issues a CURL
Command to Install
Puppet from the
Paster
Master Install
Agent Install
16. site.pp
• Install r10k
• Export the hosts — Import External Ones
• Install Hiera
• Kick the Agent