1. The document discusses moving from a Dev to DevOps model by addressing issues like siloization between development and operations teams and embracing concepts like infrastructure as code.
2. It recommends several DevOps tools for infrastructure automation including Puppet, Vagrant, and VeeWee which allow developers to define infrastructure in code and provision environments.
3. The Puppet Domain Specific Language (DSL) is demonstrated for declaring resources like users, files, packages, and services with attributes and relationships between them in a declarative way.
11. DevOps addresses
Fear of change
Risky deployments
It works on my machine!
Siloisation
Dev Change vs. Ops stability
12. Individuals and interactions over processes and tools
Working software over comprehensive documentation
Customer collaboration over contract negotiation
Responding to change over following a plan
13. Our highest priority is to satisfy the customer through early and
continuous delivery of valuable software.
Welcome changing requirements, even late in development.
Agile processes harness change for the customer's competitive
advantage.
Deliver working software frequently, from a couple of weeks
to a couple of months, with a preference to the shorter timescale.
Business people and developers must work together daily
throughout the project.
The most efficient and effective method of conveying information
to and within a development team is face-to-face
conversation.
Agile processes promote sustainable development. The
sponsors, developers, and users should be able to maintain
a constant pace indefinitely.
54. Vagrant
Oracle VirtualBox cmdline automation
Easy Puppet and Chef provisioning
Keep VM configuration for different projects
Share boxes and configuration files across teams
base box + configuration files
55. Vagrant
Oracle VirtualBox cmdline automation
Easy Puppet and Chef provisioning
Keep VM configuration for different projects
Share boxes and configuration files across teams
base box + configuration files
58. Vagrant
Vagrant::Config.run do |config|
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "centos-6.0-x86_64"
# The url from where the 'config.vm.box' box will be fetched
config.vm.box_url = "http://dl.dropbox.com/u/1627760/centos-6.0-x86_64.box"
# Boot with a GUI so you can see the screen. (Default is headless)
#config.vm.boot_mode = :gui
# Assign this VM to a host only network IP, allowing you to access it via the IP.
# config.vm.network "33.33.33.10"
# Forward a port from the guest to the host, which allows for outside
# computers to access the VM, whereas host only networking does not.
config.vm.forward_port "sonar", 9000, 19000
# Enable provisioning with Puppet stand alone.
config.vm.share_folder("templates", "/tmp/vagrant-puppet/templates", "templates")
config.vm.provision :puppet do |puppet|
puppet.manifest_file = "base.pp"
puppet.module_path = "mymodules"
puppet.options = ["--templatedir","/tmp/vagrant-puppet/templates"]
puppet.options = "-v -d"
end
end
74. variables
$longthing = "Imagine I have something really
long in here. Like an SSH key, let's say."
file {'authorized_keys':
path => '/root/.ssh/authorized_keys',
content => $longthing,
}
75. facts
host {'self':
ensure => present,
name => $::fqdn,
host_aliases => ['puppet', $::hostname],
ip => $::ipaddress,
}
file {'motd':
ensure => file,
path => '/etc/motd',
mode => 0644,
content => "Welcome to ${::hostname},na $
{::operatingsystem} island in the sea of ${::domain}.
n",
}
76. conditionals
if $is_virtual {
service {'ntpd':
ensure => stopped,
enable => false,
}
}
else {
service { 'ntpd':
name => 'ntpd',
ensure => running,
enable => true,
hasrestart => true,
require => Package['ntp'],
}
}
87. What am I doing to automate deployment
Ant tasks plugin
ssh commands
Assembly plugin
Cargo
88. What can I do to automate deployment
Handle full deployment including infrastructure
not just webapp deployment
Help Ops with clear, automated manifests
Ability to reproduce production environments
in local box using Vagrant / VirtualBox / VMWare
89. Maven-Puppet module
A Maven Puppet module
https://github.com/maestrodev/puppet-maven
fetches Maven artifacts from the repo
manages them with Puppet
no more extra packaging
90. Requirements
Java JDK
Apache Buildr
preinstalled in the box
chicken and egg problem
91. New Maven type
maven { "/tmp/maven-core-2.2.1.jar":
id => "org.apache.maven:maven-core:jar:2.2.1",
repos => ["http://repo1.maven.apache.org/maven2",
"http://mirrors.ibiblio.org/pub/mirrors/maven2"],
}
92. New Maven type
maven { "/tmp/maven-core-2.2.1.jar":
groupId => "org.apache.maven",
artifactId => "maven-core",
version => "2.2.1",
packaging => "jar",
repos => ["http://repo1.maven.apache.org/maven2",
"http://mirrors.ibiblio.org/pub/mirrors/maven2"],
}
93. Example code
Available at
http://github.carlossanchez.eu
http://blog.carlossanchez.eu
https://github.com/maestrodev/puppet-modules
96. Photo Credits
Son of Man Lego - Alex Eylar
http://www.flickr.com/photos/hoyvinmayvin/4702772452/
Brick wall - Luis Argerich
http://www.flickr.com/photos/lrargerich/4353397797/
Agile vs. Iterative flow - Christopher Little
http://en.wikipedia.org/wiki/File:Agile-vs-iterative-flow.jpg
DevOps - Rajiv.Pant
http://en.wikipedia.org/wiki/File:Devops.png
Pimientos de Padron - Howard Walfish
http://www.flickr.com/photos/h-bomb/4868400647/
Printer in 1568 - Meggs, Philip B
http://en.wikipedia.org/wiki/File:Printer_in_1568-ce.png