23
Automatic Provisioning and Configuration By Brian Stolz @tecnobrat - http://www.tecnobrat.com/

Deployment Provisioning

Embed Size (px)

DESCRIPTION

Presentation by Brian Stoltz

Citation preview

Page 1: Deployment Provisioning

Automatic Provisioning and Configuration

By Brian Stolz @tecnobrat - http://www.tecnobrat.com/

Page 2: Deployment Provisioning

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/

Page 3: Deployment Provisioning

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:

Page 4: Deployment Provisioning

What tools do I use?

linode.com

theforeman.org

puppetlabs.com

mumble.sourceforge.net

Page 5: Deployment Provisioning

Why

• Supports IP failover, allowing me to set up cluster pairs to ensure maximum redundancy.

• Supports StackScripts to bootstrap machine.

• High bandwidth limits.

Page 6: Deployment Provisioning

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!

Page 7: Deployment Provisioning

Puppet Classes

• Think of it like a recipe.

• Simple, yet powerful.

• Accept “parameters”.

• Many community provided classes available.

Page 8: Deployment Provisioning

What is

• WebUI for Puppet (and more).

• Rails project, open source.

• Basic reporting and monitoring.

Page 9: Deployment Provisioning

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`

Page 10: Deployment Provisioning

Spawn a New ServerUse our StackScript!

Page 11: Deployment Provisioning

After Creating the Server

• Server boots.

• Installs puppet.

• Sends certificate request.

Now what?

Page 12: Deployment Provisioning

Use Foreman to Accept Certificate Request

• Log in to Foreman.

• Go to certificate requests.

• Sign the certificate.

Page 13: Deployment Provisioning

Add Host to Hostgroup

Page 14: Deployment Provisioning

Wait, Whats a Hostgroup?

• Specifies a group of puppet classes to run on that Host Group.

• Can still add individual classes as well.

Page 15: Deployment Provisioning

Smart ParametersPass Host specific parameters to a puppet class

Defaults:

Overrides

Page 16: Deployment Provisioning

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.

Page 17: Deployment Provisioning

Wait, It Reports Back?Yuuuup!

Page 18: Deployment Provisioning

What About Errors?

Those are handled too!

Page 19: Deployment Provisioning

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).

Page 20: Deployment Provisioning

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.

Page 21: Deployment Provisioning

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.

Page 22: Deployment Provisioning

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.

Page 23: Deployment Provisioning

Thanks!

Email: [email protected]!Twitter: @tecnobrat