WebLogic Hackathon: Introduction to Puppet & Chef
-
Upload
ronald-van-luttikhuizen -
Category
Technology
-
view
3.519 -
download
3
description
Transcript of WebLogic Hackathon: Introduction to Puppet & Chef
1 | 10 1 | 28
Simon Haslam & Ronald van Luttikhuizen
December 1st | UKOUG Tech 2013
Super Sunday | WebLogic Hackathon
Introduction to Puppet & Chef
2 | 10 2 | 28
Agenda
Configuration management
● Intro, How it was & How it can be
Real world case
Puppet
Chef
Intro to the Hands-on-Labs
3 | 10 3 | 28
• Automated installations and rollbacks • Inject environment variables, smoke-testing
• Automated builds, tests, and packaging from version control • Central archiving in (artifact) repository
• Automated provisioning of middleware • High frequency of changes to images (e.g. patches)
• Automated provisioning of OS-ready images • Low frequency of changes to images
Configuration management | introduction
Machine Provisioning
Server & Middleware Provisioning
Application Building & Packaging
Application Deployment
4 | 10 4 | 28
Configuration management | the traditional way
Artisan server crafting
Boring
Stressful
Error-prone
Time-consuming
Non-scalable & expensive
5 | 10 5 | 28
Configuration management | how it can be
Automated configuration
management Describe a system once, apply as often
as you want
Automate the repetitive
Focus on improvements and “real”
problems as admin
Predictable results
(Near) real-time provisioning
6 | 10 6 | 28
Configuration management | how it can be
Infrastructure as code & DevOps
Eliminate tedious and repetitive work
Configurations are defined in a machine- and OS-independent domain
language so the manifests are portable and can be reused
Keep servers in sync and know what is running on what server
Configuration can be used as documentation: since configuration is
applied by the documentation is always up-to-date
Configuration can be version controlled and managed the same way you
manage other code
7 | 10 7 | 28
WLS, OSB, SOA Suite Database Server
Operating System
WebLogic
OSB
SOA Suite
Domain creation
Initial Domain
setup
Operating system
Database
software
Database
creation
SOA Suite
Repository
40
X Total actions
13
8
10
10
40
40
30
5
8
YUM + Packages / JVM /
Ulimits / Kernel / User /
Group / Directories
WebLogic / BSU /
NodeManager
OSB / OPatch
SOA Suite / OPatch
Create Domain
Logs / Security / JMS /
WebApps / DataSources /
Resource Adapters
Source: Roll Out a Complete Oracle Fusion Middleware Env in Less than 10min by Edwin Biemond
8 | 10 8 | 28
Automation
Automating repetitive steps is nothing new
● OS tools (jumpstart, kickstart, shell scripts, etc., etc.)
But…
● provisioning more environments than ever (cloudy)
● very complex multi-tier environments
New breed tools to standardise such a process
● platform-agnostic
● centralised
● fashionable
9 | 10 9 | 28
Puppet
10 | 10 10 | 28
Puppet Example | Apache HTTP Server
package { "httpd":
name => "httpd.x86_64",
ensure => "present",
}
file { "http.conf":
path => "/etc/httpd/conf/httpd.conf",
owner => root,
group => root,
mode => 0644,
source => "puppet:///modules/apache/httpd.conf",
require => Package["httpd"],
}
service { "httpd":
ensure => running,
enable => true,
subscribe => File["http.conf"],
}
Manifests
Resources
● Name
● Attributes and
values
Ordering and
dependencies
11 | 10 11 | 28
More on Puppet | building blocks
Manifests
Variables and (custom) facts
Node declarations
Classes and Modules
Defined resource types
Templates
Console
if $operatingsystem == 'CentOS'
node 'www1.example.com' {
include common
include apache
}
node 'db1.example.com' {
include common
include mysql
}
file { "http.conf":
path => "/etc/httpd/conf/httpd.conf",
owner => 'root',
group => 'root',
mode => '0644',
content => template('config/httpd.erb'),
}
12 | 10 12 | 28
More on Puppet | console
13 | 10 13 | 28
More on Puppet | products, price, etc.
Enterprise vs. Open Source
Puppet Forge
Market presence
Pricing (27-nov-2013)
14 | 10 14 | 28
More on Puppet | runtime
Versus
15 | 10 15 | 28
If you want to know more about Puppet …
16 | 10 16 | 28
Chef
17 | 10 17 | 28
Chef architecture
Central Chef Server
Multiple Administrators
One Repository
18 | 10 18 | 28
Chef| terminology
Node, Server, Workstation
Chef-client asks Chef-server about the policy for the node
Resources: a component and the desired state
Recipes: describe resources and desired state
Cookbooks: sets of recipes grouped together, also includes templates
and source files etc
Run List: recipes from cookbooks you want to run
Role: type of node
19 | 10 19 | 28
Example Recipe
paca
Policy says package
should be installed
This service should be
enabled on reboot, and
must be running
Template specifies the
contents required
Source: Chef Fundamentals Webinar 1 #LEARNCHEF
20 | 10 20 | 28
Open Source Chef Console
I couldn’t find a screenshot of enterprise one!
21 | 10 21 | 28
Configuration Drift
Not just used for initial installation
Chef’s policies means it knows desired state
Chef client runs periodically on node & checks state against policy
22 | 10 22 | 28
Chef in the wild
Enterprise vs. Open Source
Community & Popularity
Pricing (30-nov-2013)
23 | 10 23 | 28
More about Chef
24 | 10 24 | 28
Labs & Competition
25 | 10 25 | 28
Lab| intro
Teams of 3
Choose your poison
Setup & preparation
Hello World
Provision JDK 7
Provision WLS 12c
26 | 10 26 | 28
Lab
VM
controller
JDK 7 WLS 12c
Browser
pro
visi
on
ing
pro
vision
ing
dashboard
VM
agent
JDK 7 WLS 12c pro
visi
on
ing
pro
vision
ing
VM
agent
JDK 7 WLS 12c pro
visi
on
ing
pro
vision
ing
27 | 10 27 | 28
Lab| eternal glory
Best Puppet team !!!
Best Chef team !!!
Best overall team !!!
Prize: Short interview with OTN @ 17.30