Download - Puppet - Instant Data Center
![Page 2: Puppet - Instant Data Center](https://reader034.vdocument.in/reader034/viewer/2022042716/55a64adf1a28abb96d8b467f/html5/thumbnails/2.jpg)
![Page 3: Puppet - Instant Data Center](https://reader034.vdocument.in/reader034/viewer/2022042716/55a64adf1a28abb96d8b467f/html5/thumbnails/3.jpg)
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
![Page 4: Puppet - Instant Data Center](https://reader034.vdocument.in/reader034/viewer/2022042716/55a64adf1a28abb96d8b467f/html5/thumbnails/4.jpg)
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
![Page 5: Puppet - Instant Data Center](https://reader034.vdocument.in/reader034/viewer/2022042716/55a64adf1a28abb96d8b467f/html5/thumbnails/5.jpg)
The Basic Blocks
http://git-scm.com
http://ruby-lang.orghttp://vagrantup.com
http://virtualbox.org
![Page 6: Puppet - Instant Data Center](https://reader034.vdocument.in/reader034/viewer/2022042716/55a64adf1a28abb96d8b467f/html5/thumbnails/6.jpg)
Other Requirements
• vagrant-oscar:
vagrant plugin install oscar
• vagrant-vbguest:
vagrant plugin install vagrant-vbguest
• librarian-puppet gem:
gem install librarian-puppet
• nokogiri gem:
gem install --install-dir ~/.vagrant.d/gems nokogiri -v '1.6.4.1'
• vagrant-centos7_fix:
vagrant plugin install vagrant-centos7_fix
• puppet gem:
gem install puppet
![Page 7: Puppet - Instant Data Center](https://reader034.vdocument.in/reader034/viewer/2022042716/55a64adf1a28abb96d8b467f/html5/thumbnails/7.jpg)
Other Considerations
• You’ll need an i5 or better processor
• You need a minimum of 8 GB
• 16 GB is recommended
![Page 8: Puppet - Instant Data Center](https://reader034.vdocument.in/reader034/viewer/2022042716/55a64adf1a28abb96d8b467f/html5/thumbnails/8.jpg)
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
![Page 9: Puppet - Instant Data Center](https://reader034.vdocument.in/reader034/viewer/2022042716/55a64adf1a28abb96d8b467f/html5/thumbnails/9.jpg)
boxes.yaml Finds Vagrant
Boxes# Boxes
# Updated: 2014-12-03 --- PT
boxes:
'fs_centos-65-x64-vbox4320-nocm':
‘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 Name
Every Box has
a Location
![Page 10: Puppet - Instant Data Center](https://reader034.vdocument.in/reader034/viewer/2022042716/55a64adf1a28abb96d8b467f/html5/thumbnails/10.jpg)
pe_build.yaml Downloads
Puppet Enterprise---
pe_build:
version: 3.3.2
download_root: "http://s3.amazonaws.com/pe-builds/released/:version"
Puppet Enterprise
Version
![Page 11: Puppet - Instant Data Center](https://reader034.vdocument.in/reader034/viewer/2022042716/55a64adf1a28abb96d8b467f/html5/thumbnails/11.jpg)
roles.yaml Configures a Node
---
roles:
pe-puppet-master:
vbguest:
auto_update: true
provider:
type: virtualbox
customize:
- [modifyvm, !ruby/sym id, '--memory', 4096, '--cpus', 4]
private_networks:
- {ip: '0.0.0.0', auto_network: true}
forwarded_ports:
- {guest: 443, host: 8443}
provisioners:
- {type: hosts}
- {type: pe_bootstrap, role: !ruby/sym master}
- {type: shell, inline: 'ln -s -f /opt/puppet/bin/puppet /usr/bin/puppet'}
- {type: puppet, manifests_path: puppet/manifests, manifest_file: site.pp,
module_path: puppet/modules,
options: '--verbose --debug --hiera_config /vagrant/puppet/hiera.yaml'}
- {type: shell, inline: '/usr/local/bin/puppet agent -t'}
Every Role has a Name
Puppet command
configures the
master
Shell script kicks the
agent
![Page 12: Puppet - Instant Data Center](https://reader034.vdocument.in/reader034/viewer/2022042716/55a64adf1a28abb96d8b467f/html5/thumbnails/12.jpg)
vms.yaml Glues Boxes and
Roles Together---
vms:
- name: master
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 has a Name
Every VM Needs a Box
Every VM Needs a Role
![Page 13: Puppet - Instant Data Center](https://reader034.vdocument.in/reader034/viewer/2022042716/55a64adf1a28abb96d8b467f/html5/thumbnails/13.jpg)
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: [email protected]
• PW: puppetlabs
![Page 14: Puppet - Instant Data Center](https://reader034.vdocument.in/reader034/viewer/2022042716/55a64adf1a28abb96d8b467f/html5/thumbnails/14.jpg)
See The Following Project
and Detailed Setup
https://github.com/azcender/puppet-r10k.git
![Page 15: Puppet - Instant Data Center](https://reader034.vdocument.in/reader034/viewer/2022042716/55a64adf1a28abb96d8b467f/html5/thumbnails/15.jpg)
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
![Page 16: Puppet - Instant Data Center](https://reader034.vdocument.in/reader034/viewer/2022042716/55a64adf1a28abb96d8b467f/html5/thumbnails/16.jpg)
site.pp
• Install r10k
• Export the hosts — Import External Ones
• Install Hiera
• Kick the Agent
![Page 17: Puppet - Instant Data Center](https://reader034.vdocument.in/reader034/viewer/2022042716/55a64adf1a28abb96d8b467f/html5/thumbnails/17.jpg)
Special Thanks
Full Frontal Ingenuity