Agenda
Fast and Easy Deploys
• From Heath Robinson
Fast and Easy Deploys
• From Heath Robinson to Production Line
Eliminating Configuration Drift
• Once deployed a machine will
  inevitably drift from a known state
Infrastructure as Code
• Synthesizing machines from a known
  codebase
Operating System Platform




•   Customisable
•   Easily automated
•   Packaging friendly
•   Free alternatives available
http://www.1900s.org.uk/life-times-images/cobbler-shop.jpg
$ info cobbler

Cobbler is a Linux installation server that
allows for rapid setup of network installation
environments. It glues together and automates
many associated Linux tasks so you do not have to
hop between lots of various commands and
applications when rolling out new systems, and,
in some cases, changing existing ones.

$



    http://www.1900s.org.uk/life-times-images/cobbler-shop.jpg
Command line access is simple: Setup:
$ cobbler import --name=RHEL5 --mirror=/mnt/dvd
$ cobbler import --name=Centos5 --path=rsync://foo

Create and edit distros:
$ cobbler distro edit --name=RHEL5-i386 --kopts="noapic x=y z=4"

Define some roles for your systems to fill:
$ cobbler profile edit --name=RHEL5-i386 --
kickstart=/path/to/template.ks --ksmeta="somevar=1 othervar=2"
$ cobbler profile copy --name=RHEL5-i386 --newname=webservers

Also help manage updates as they relate to installation and post-
installation:
$ cobbler repo add --name=f10-updates --mirror=http://foo
$ cobbler reposync
$ cobbler profile edit --name=desktops --repos="f10-updates"



      http://www.1900s.org.uk/life-times-images/cobbler-shop.jpg
Puppet




http://www.wallpaperstop.com/wallpapers/cartoon-wallpapers/cartoon-puppet-wallpaper-1680x1050-0074.jpg
Puppet


           $ info puppet

           Puppet is a tool designed to manage the
           configuration of Unix-like and Microsoft Windows
           systems declaratively. In the Puppet manifests,
           the user describes system resource and resource
           state either in Puppet or Ruby DSL (domain-
           specific language).

           $



http://www.wallpaperstop.com/wallpapers/cartoon-wallpapers/cartoon-puppet-wallpaper-1680x1050-0074.jpg
Puppet


           class ssh{
                   package { "openssh-server":
                            ensure => latest,
                   }
                   file { "/etc/ssh/sshd_config":
                           owner   => root,
                           group   => root,
                           mode    => 644,
                           source => "puppet:///ssh/sshd_config",
                   }
                   service { ssh:
                           ensure           => running,
                           hasrestart       => true,
                           subscribe        => File["/etc/ssh/sshd_config"],
                   }




http://www.wallpaperstop.com/wallpapers/cartoon-wallpapers/cartoon-puppet-wallpaper-1680x1050-0074.jpg
Marionette Collective
$ info mcollective

MCollective is a framework to build server
orchestration or parallel job execution systems.
It enables real-time discovery of network
resources and can select which resources to
affect based on configuration data from leading
systems management platforms, including Puppet.).

$



      Marionette Collective
Detect all live nodes on the network

$ mc-ping
chidori.uncommonsense.local            time=47.59   ms
byakugan.uncommonsense.local           time=80.71   ms
mokuton.uncommonsense.local            time=80.94   ms
rinnegan.uncommonsense.local           time=84.10   ms
amaterasu.uncommonsense.local          time=86.92   ms

$




      Marionette Collective
Geppetto
Questions and a Call to Action



Lets make things suck just a little bit less!
Questions and a Call to Action



$ info svn
    Lets make things suck just a little bit less!
Apache Subversion is a software versioning and a
revision control system. Developers use
Subversion to maintain current and historical
versions of files such as source code, web pages,
and documentation.

$
Questions and a Call to Action


Who changed what, when and why

[actionjack@rasengan manifests]# svn log nodes.pp
   Lets make things suck just a little bit less!
------------------------------------------------------------------------
r5 | crazybob | 2011-05-24 12:19:10 +0100 (Tue, 24 May 2011) | 1 line

Feature #24 - User accounts cleaned up and Crazy Bobs account added
------------------------------------------------------------------------
r4 | madmonkey | 2011-05-24 09:34:28 +0100 (Tue, 24 May 2011) | 1 line

Feature #22 - Disabling developer access
------------------------------------------------------------------------
r3 | actionjack | 2011-05-23 12:21:32 +0100 (Mon, 23 May 2011) | 1 line

Feature #1 - Initial commit of puppet code
------------------------------------------------------------------------
[actionjack@rasengan manifests]#
$ info redmine

Redmine is a free and open source, web-based
project management and bug-tracking tool. It
includes calendar and Gantt charts to aid visual
representation of projects and their deadlines.
It supports multiple projects. Redmine provides
integrated project management features, issue
tracking, and support for multiple version
control options.

$
$ info jenkins

Jenkins provides continuous integration services
for software development, primarily in the Java
programming language. It supports SCM tools
including CVS, Subversion, Git and Clearcase and
can execute Apache Ant and Apache Maven based
projects, as well as arbitrary shell scripts and
Windows batch commands.

$
$ info cucumber

Cucumber lets software development teams describe
how software should behave in plain text. The
text is written in a business-readable domain-
specific language and serves as documentation,
automated tests and development-aid - all rolled
into one format.

$
Red Hat Package Manager
Red Hat Package Manager


$ info rpm

RPM Package Manager (RPM) is a package management
system. The name RPM variously refers to the .rpm
file format, files in this format, software
packaged in such files, and the package manager
itself. RPM was intended primarily for GNU/Linux
distributions; the file format is the baseline
package format of the Linux Standard Base.

$
Red Hat Package Manager

Name: foo
 Summary: The foo package does foo
 Version: 1.0
 Release: 1
 License: GPL
 Group: Applications/Internet
 URL: http://www.example.org/
 Source0 : foo-1.0.tar.gz
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root

 %description
 This package performs the foo operation.

 %setup -q

 %install
 mkdir -p %{buildroot}/%{_datadir}/%{name}
 cp -p foo.spec %{buildroot}/%{_datadir}/%{name}

 %clean
 rm -fr %{buildroot}

 %files
 %defattr(-,root,root)
 %{_datadir}/%{name}

 %changelog
 * Mon Jun 16 2003 Some One <one@example.com>
 - fixed the broken frobber (#86434)
Futures
Vagrant
$ info vagrant

Vagrant is a tool for building and
distributing virtualized development
environments.

By providing automated creation and
provisioning of virtual machines using
Oracle’s VirtualBox, Vagrant provides
the tools to create and configure
lightweight, reproducible, and portable
virtual environments that can be run on
development workstations and laptops.
$
Vagrant
Creating a multi-vm environment on your laptop

Vagrant::Config.run do |config|
  config.vm.define :proxy do |web_config|
    web_config.vm.box = "proxy"
    web_config.vm.forward_port("https", 443, 443)
  end

 config.vm.define :tomcat do |web_config|
   web_config.vm.box = "tomcat"
   web_config.vm.forward_port("http", 8080, 8080)
 end

  config.vm.define :db do |db_config|
    db_config.vm.box = "db"
    db_config.vm.forward_port("db", 3306, 3306)
  end
end
$ info katello

Katello helps you take control of your software and
your systems in an easy-to-use and scalable manner.
Katello can pull in content from remote repositories,
local directories and ISOs. You can then organize that
content into repositories that are easily searchable,
filtered, manipulated and controlled in a locked-down
container called an Environment.
Katello integrates the open-source projects Pulp,
Candlepin, and Foreman with a modern Rails front end
and a Python CLI to make it easier than ever to manage
your systems and content the way you do business.

$
$ info katello

Liquibase is a database-independent library for tracking,
managing and applying database changes. It is built on a
simple premise: All database changes are stored in a human
readable yet trackable form and checked into source control.

Liquibase Supports:

•   Extensibility
•   Merging changes from multiple developers
•   Code branches
•   Multiple Databases
•   Managing production data as well as various test datasets
•   Cluster-safe database upgrades
•   Automated updates or generation of SQL scripts that can be
    approved and applied by a DBA
•   Update rollbacks
•   Database ”diff“s
•   Generating starting change logs from existing databases
•   Generating database change documentation

$
What can
 you do to
make your
deploys go
   through
  quicker?
Subversion Branches
Subversion Branches

• Provide URLs to complete code
  branches that need to be deployed
  e.g. web site assets
Subversion Branches

• Provide URLs to complete code
  branches that need to be deployed
  e.g. web site assets

• Hint: If the code that is part of an
  asset resides in two separate branches
  in subversion, use svn:externals to
  pull in all the code assets don’t try to
  manually merge or maintain them
  separately.
Externalize your Configuration
Externalize your Configuration
Externalize your Configuration
Externalize your Configuration
Externalize your Configuration
Questions
Links
•   http://www.infrastructures.org
•   http://puppetlabs.com
•   http://www.redhat.com
•   http://www.centos.org
•   https://fedorahosted.org/cobbler
•   http://puppetlabs.com/mcollective/introduction
•   https://github.com/cloudsmith/geppetto
•   http://subversion.apache.org
•   http://www.redmine.org
•   http://www.redmine.org/projects/redmine/wiki/PluginKanban
•   http://jenkins-ci.org
•   http://cukes.info
•   http://auxesis.github.com/cucumber-nagios
•   http://www.rpm.org
•   http://vagrantup.com
•   http://katello.org
•   http://www.pulpproject.org
•   http://www.candlepinproject.org
•   http://www.theforeman.org
•   http://www.liquibase.org

Build Automation 101

  • 2.
  • 6.
    Fast and EasyDeploys • From Heath Robinson
  • 7.
    Fast and EasyDeploys • From Heath Robinson to Production Line
  • 11.
    Eliminating Configuration Drift •Once deployed a machine will inevitably drift from a known state
  • 12.
    Infrastructure as Code •Synthesizing machines from a known codebase
  • 16.
    Operating System Platform • Customisable • Easily automated • Packaging friendly • Free alternatives available
  • 17.
  • 18.
    $ info cobbler Cobbleris a Linux installation server that allows for rapid setup of network installation environments. It glues together and automates many associated Linux tasks so you do not have to hop between lots of various commands and applications when rolling out new systems, and, in some cases, changing existing ones. $ http://www.1900s.org.uk/life-times-images/cobbler-shop.jpg
  • 19.
    Command line accessis simple: Setup: $ cobbler import --name=RHEL5 --mirror=/mnt/dvd $ cobbler import --name=Centos5 --path=rsync://foo Create and edit distros: $ cobbler distro edit --name=RHEL5-i386 --kopts="noapic x=y z=4" Define some roles for your systems to fill: $ cobbler profile edit --name=RHEL5-i386 -- kickstart=/path/to/template.ks --ksmeta="somevar=1 othervar=2" $ cobbler profile copy --name=RHEL5-i386 --newname=webservers Also help manage updates as they relate to installation and post- installation: $ cobbler repo add --name=f10-updates --mirror=http://foo $ cobbler reposync $ cobbler profile edit --name=desktops --repos="f10-updates" http://www.1900s.org.uk/life-times-images/cobbler-shop.jpg
  • 20.
  • 21.
    Puppet $ info puppet Puppet is a tool designed to manage the configuration of Unix-like and Microsoft Windows systems declaratively. In the Puppet manifests, the user describes system resource and resource state either in Puppet or Ruby DSL (domain- specific language). $ http://www.wallpaperstop.com/wallpapers/cartoon-wallpapers/cartoon-puppet-wallpaper-1680x1050-0074.jpg
  • 22.
    Puppet class ssh{ package { "openssh-server": ensure => latest, } file { "/etc/ssh/sshd_config": owner => root, group => root, mode => 644, source => "puppet:///ssh/sshd_config", } service { ssh: ensure => running, hasrestart => true, subscribe => File["/etc/ssh/sshd_config"], } http://www.wallpaperstop.com/wallpapers/cartoon-wallpapers/cartoon-puppet-wallpaper-1680x1050-0074.jpg
  • 23.
  • 24.
    $ info mcollective MCollectiveis a framework to build server orchestration or parallel job execution systems. It enables real-time discovery of network resources and can select which resources to affect based on configuration data from leading systems management platforms, including Puppet.). $ Marionette Collective
  • 25.
    Detect all livenodes on the network $ mc-ping chidori.uncommonsense.local time=47.59 ms byakugan.uncommonsense.local time=80.71 ms mokuton.uncommonsense.local time=80.94 ms rinnegan.uncommonsense.local time=84.10 ms amaterasu.uncommonsense.local time=86.92 ms $ Marionette Collective
  • 26.
  • 27.
    Questions and aCall to Action Lets make things suck just a little bit less!
  • 28.
    Questions and aCall to Action $ info svn Lets make things suck just a little bit less! Apache Subversion is a software versioning and a revision control system. Developers use Subversion to maintain current and historical versions of files such as source code, web pages, and documentation. $
  • 29.
    Questions and aCall to Action Who changed what, when and why [actionjack@rasengan manifests]# svn log nodes.pp Lets make things suck just a little bit less! ------------------------------------------------------------------------ r5 | crazybob | 2011-05-24 12:19:10 +0100 (Tue, 24 May 2011) | 1 line Feature #24 - User accounts cleaned up and Crazy Bobs account added ------------------------------------------------------------------------ r4 | madmonkey | 2011-05-24 09:34:28 +0100 (Tue, 24 May 2011) | 1 line Feature #22 - Disabling developer access ------------------------------------------------------------------------ r3 | actionjack | 2011-05-23 12:21:32 +0100 (Mon, 23 May 2011) | 1 line Feature #1 - Initial commit of puppet code ------------------------------------------------------------------------ [actionjack@rasengan manifests]#
  • 31.
    $ info redmine Redmineis a free and open source, web-based project management and bug-tracking tool. It includes calendar and Gantt charts to aid visual representation of projects and their deadlines. It supports multiple projects. Redmine provides integrated project management features, issue tracking, and support for multiple version control options. $
  • 34.
    $ info jenkins Jenkinsprovides continuous integration services for software development, primarily in the Java programming language. It supports SCM tools including CVS, Subversion, Git and Clearcase and can execute Apache Ant and Apache Maven based projects, as well as arbitrary shell scripts and Windows batch commands. $
  • 36.
    $ info cucumber Cucumberlets software development teams describe how software should behave in plain text. The text is written in a business-readable domain- specific language and serves as documentation, automated tests and development-aid - all rolled into one format. $
  • 38.
  • 39.
    Red Hat PackageManager $ info rpm RPM Package Manager (RPM) is a package management system. The name RPM variously refers to the .rpm file format, files in this format, software packaged in such files, and the package manager itself. RPM was intended primarily for GNU/Linux distributions; the file format is the baseline package format of the Linux Standard Base. $
  • 40.
    Red Hat PackageManager Name: foo Summary: The foo package does foo Version: 1.0 Release: 1 License: GPL Group: Applications/Internet URL: http://www.example.org/ Source0 : foo-1.0.tar.gz Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root %description This package performs the foo operation. %setup -q %install mkdir -p %{buildroot}/%{_datadir}/%{name} cp -p foo.spec %{buildroot}/%{_datadir}/%{name} %clean rm -fr %{buildroot} %files %defattr(-,root,root) %{_datadir}/%{name} %changelog * Mon Jun 16 2003 Some One <one@example.com> - fixed the broken frobber (#86434)
  • 41.
  • 42.
    Vagrant $ info vagrant Vagrantis a tool for building and distributing virtualized development environments. By providing automated creation and provisioning of virtual machines using Oracle’s VirtualBox, Vagrant provides the tools to create and configure lightweight, reproducible, and portable virtual environments that can be run on development workstations and laptops. $
  • 43.
    Vagrant Creating a multi-vmenvironment on your laptop Vagrant::Config.run do |config| config.vm.define :proxy do |web_config| web_config.vm.box = "proxy" web_config.vm.forward_port("https", 443, 443) end config.vm.define :tomcat do |web_config| web_config.vm.box = "tomcat" web_config.vm.forward_port("http", 8080, 8080) end config.vm.define :db do |db_config| db_config.vm.box = "db" db_config.vm.forward_port("db", 3306, 3306) end end
  • 45.
    $ info katello Katellohelps you take control of your software and your systems in an easy-to-use and scalable manner. Katello can pull in content from remote repositories, local directories and ISOs. You can then organize that content into repositories that are easily searchable, filtered, manipulated and controlled in a locked-down container called an Environment. Katello integrates the open-source projects Pulp, Candlepin, and Foreman with a modern Rails front end and a Python CLI to make it easier than ever to manage your systems and content the way you do business. $
  • 47.
    $ info katello Liquibaseis a database-independent library for tracking, managing and applying database changes. It is built on a simple premise: All database changes are stored in a human readable yet trackable form and checked into source control. Liquibase Supports: • Extensibility • Merging changes from multiple developers • Code branches • Multiple Databases • Managing production data as well as various test datasets • Cluster-safe database upgrades • Automated updates or generation of SQL scripts that can be approved and applied by a DBA • Update rollbacks • Database ”diff“s • Generating starting change logs from existing databases • Generating database change documentation $
  • 48.
    What can youdo to make your deploys go through quicker?
  • 54.
  • 55.
    Subversion Branches • ProvideURLs to complete code branches that need to be deployed e.g. web site assets
  • 56.
    Subversion Branches • ProvideURLs to complete code branches that need to be deployed e.g. web site assets • Hint: If the code that is part of an asset resides in two separate branches in subversion, use svn:externals to pull in all the code assets don’t try to manually merge or maintain them separately.
  • 62.
  • 63.
  • 64.
  • 65.
  • 66.
  • 67.
  • 68.
    Links • http://www.infrastructures.org • http://puppetlabs.com • http://www.redhat.com • http://www.centos.org • https://fedorahosted.org/cobbler • http://puppetlabs.com/mcollective/introduction • https://github.com/cloudsmith/geppetto • http://subversion.apache.org • http://www.redmine.org • http://www.redmine.org/projects/redmine/wiki/PluginKanban • http://jenkins-ci.org • http://cukes.info • http://auxesis.github.com/cucumber-nagios • http://www.rpm.org • http://vagrantup.com • http://katello.org • http://www.pulpproject.org • http://www.candlepinproject.org • http://www.theforeman.org • http://www.liquibase.org