Upload
leo-medovyy
View
143
Download
5
Embed Size (px)
DESCRIPTION
Presentation by Brian Stoltz
Citation preview
Automatic Provisioning and Configuration
By Brian Stolz @tecnobrat - http://www.tecnobrat.com/
Who am I?Developer at Articulate
Creator of MumbleBoxes.com
Proud Dad of an 8 year old son.
!Soooo .. I need automation!
@tecnobrat http://www.tecnobrat.com/
What is automatic provisioning and configuration?
• Provision new machines with a “click of a button”.
• Continuous configuration from a central location, change configs once.
Benefits:
What tools do I use?
linode.com
theforeman.org
puppetlabs.com
mumble.sourceforge.net
Why
• Supports IP failover, allowing me to set up cluster pairs to ensure maximum redundancy.
• Supports StackScripts to bootstrap machine.
• High bandwidth limits.
What is
• Define classes to complete automated tasks.
• Same concept as “Chef”.
• Can be used in standalone or in a Server/Client role using PuppetMaster.
• Used in Boxen!
Puppet Classes
• Think of it like a recipe.
• Simple, yet powerful.
• Accept “parameters”.
• Many community provided classes available.
What is
• WebUI for Puppet (and more).
• Rails project, open source.
• Basic reporting and monitoring.
My StackScript• Simple bash script that runs when machine first
boots.
• Configures hostname.
• Installs puppet.
• Adds puppetmaster server hostname to /etc/puppet/puppet.conf
• Runs `puppet agent --waitforcert 60 --test`
Spawn a New ServerUse our StackScript!
After Creating the Server
• Server boots.
• Installs puppet.
• Sends certificate request.
Now what?
Use Foreman to Accept Certificate Request
• Log in to Foreman.
• Go to certificate requests.
• Sign the certificate.
Add Host to Hostgroup
Wait, Whats a Hostgroup?
• Specifies a group of puppet classes to run on that Host Group.
• Can still add individual classes as well.
Smart ParametersPass Host specific parameters to a puppet class
Defaults:
Overrides
Now What?• The puppet client on the new Host contacts the
PuppetMaster and receives a new catalog, with the Smart Parameter settings.
• Puppet runs that catalog.
• Puppet reports back to foreman.
Wait, It Reports Back?Yuuuup!
What About Errors?
Those are handled too!
What Does it Configure for MumbleBoxes?
• MySQL with Master-Master replication.
• Mumble daemon including SSL certs.
• Heartbeat cluster with IP failover.
• Static webserver to redirect web traffic to our main website.
• Automatic monitoring using Icinga (Nagios port).
How Long Does it Take?
• About 5 minutes from the time we setup the Smart Parameters.
• 10 minutes or so end-to-end.
• SSL authentication, Hostgroup setting, and Smart Parameters are the only “hands on” part.
What Could be Better?• Puppet has “facts” which we
could auto configure some of the base details such as networking.
• Better “sharing” of Smart parameters, we set the IP several times right now.
• Requires a reboot after first-time configuration. I am sure I could make that unneeded.
What Else Can I Do With Foreman?
• Extremely powerful.
• Automatic provisioning of EC2, VMWare, Ovirt, Rackspace Cloud, etc.
• DHCP, DNS, TFTP, and PXE-based unattended installations.
• Full support for portioning schemes, network configuration, multiple OS’s, etc.
Thanks!
Email: [email protected]!Twitter: @tecnobrat