ougn 2014 - provisioning oracle fusion middleware using puppet and chef

30
1 | x Provisioning Fusion Middleware using Puppet and Chef Ronald van Luttikhuizen 3-April-2014 | OUGN 2014

Upload: ronald-van-luttikhuizen

Post on 11-May-2015

881 views

Category:

Technology


1 download

DESCRIPTION

Puppet and Chef are very popular tools used to automate complex infrastructure builds. This session will introduce Chef and Puppet. These tools allow you to describe the desired (to-be) state of your servers by declaring resources. These declarations can describe user accounts, security settings, packages, directories, files, executable statements, services, and so on. The session will include a demo that will automatically provision WebLogic Server using Puppet.

TRANSCRIPT

Page 1: OUGN 2014 - Provisioning Oracle Fusion Middleware using Puppet and Chef

1 | x

Provisioning Fusion Middleware using

Puppet and Chef

Ronald van Luttikhuizen

3-April-2014 | OUGN 2014

Page 2: OUGN 2014 - Provisioning Oracle Fusion Middleware using Puppet and Chef

2 | x

Ronald van Luttikhuizen • Managing Partner at Vennster

• Oracle ACE Director for Fusion Middleware and SOA

• Author of different articles, co-author Oracle SOA Book 11g book

• Upcoming book SOA Made Simple

• Architect, consultant, trainer for Oracle, SOA, EDA, Java

• More than 10 years of software development and architecture

experience

• Contact: [email protected]

• Blog: blog.vennster.nl

• Twitter: rluttikhuizen

Page 3: OUGN 2014 - Provisioning Oracle Fusion Middleware using Puppet and Chef

3 | x

Agenda

● Demo | start

● Server provisioning

● Puppet

● Chef

● Demo | result

Page 4: OUGN 2014 - Provisioning Oracle Fusion Middleware using Puppet and Chef

4 | x

DEMO

Start

Page 5: OUGN 2014 - Provisioning Oracle Fusion Middleware using Puppet and Chef

5 | x

Demo VM (manager)

Chef Server Browser

console

VM (database01)

Chef Client

Oracle Database EE

VM (server01)

Chef Client

JDK

WLS 11g AS

WLS 11g MS1

RCU

SOA 11g

VM (server02)

Chef Client

JDK WLS 11g MS1

SOA 11g pro

visi

on

ing

Workstation knife

• Required packages • JDK, WLS, SOA Suite • Patches • Kernel params, users, entropy, etc.

• NM and Domain configuration • NFS share for JCA configuration • Deployment of test composites

Page 6: OUGN 2014 - Provisioning Oracle Fusion Middleware using Puppet and Chef

6 | x

SERVER PROVISIONING

Page 7: OUGN 2014 - Provisioning Oracle Fusion Middleware using Puppet and Chef

7 | x

• Automated installations and rollbacks • Inject environment variables, smoke-testing

• Automated builds, tests, and packaging from version control • Central archiving in repository or artifactory

• Automated provisioning of middleware • High frequency of changes to servers (e.g. patches)

• Automated provisioning of OS-ready images • Low frequency of changes to images

Server provisioning | introduction

Machine Provisioning

Server & Middleware Provisioning

Application Building & Packaging

Application Deployment

Page 8: OUGN 2014 - Provisioning Oracle Fusion Middleware using Puppet and Chef

8 | x

Server provisioning | evolution

Artisan Server Crafting

Specific & Custom Scripts

Continuous management using

standard tools

Page 9: OUGN 2014 - Provisioning Oracle Fusion Middleware using Puppet and Chef

9 | x

Server provisioning | the traditional way

Artisan server crafting

● Boring

● Stressful

● Error-prone

● Time-consuming

● Non-scalable & expensive

Page 10: OUGN 2014 - Provisioning Oracle Fusion Middleware using Puppet and Chef

10 | x

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

337 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

Page 11: OUGN 2014 - Provisioning Oracle Fusion Middleware using Puppet and Chef

11 | x

Server provisioning | 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

● Predictable results

● (Near) real-time provisioning

● Keep servers in sync

Page 12: OUGN 2014 - Provisioning Oracle Fusion Middleware using Puppet and Chef

12 | x

Server provisioning | infrastructure as code

Advantages

● Configuration is documentation and always up-to-date

● Configuration is version controlled

● Configurations are defined in a machine- and OS-independent domain

language so the manifests are portable and can be reused

● Change and test configuration, not the server, and re-apply

Page 13: OUGN 2014 - Provisioning Oracle Fusion Middleware using Puppet and Chef

13 | x

PUPPET

Introduction to

Page 14: OUGN 2014 - Provisioning Oracle Fusion Middleware using Puppet and Chef

14 | x

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

Page 15: OUGN 2014 - Provisioning Oracle Fusion Middleware using Puppet and Chef

15 | x

More on Puppet | building blocks

● Variables and (custom) facts

● Node declarations

● Classes and Modules

● Defined resource types

● Templates

if $operatingsystem == 'CentOS'

node 'www1.example.com' {

include common

include apache

}

node 'db1.example.com' {

include common

include oraclexe

}

file { "http.conf":

path => "/etc/httpd/conf/httpd.conf",

owner => 'root',

group => 'root',

mode => '0644',

content => template('config/httpd.erb'),

}

Page 16: OUGN 2014 - Provisioning Oracle Fusion Middleware using Puppet and Chef

16 | x

More on Puppet | architecture & runtime

versus

Page 17: OUGN 2014 - Provisioning Oracle Fusion Middleware using Puppet and Chef

17 | x

More on Puppet | console

Page 18: OUGN 2014 - Provisioning Oracle Fusion Middleware using Puppet and Chef

18 | x

More on Puppet | products, price, etc.

● Enterprise vs. Open Source

● Puppet Forge

● Market presence

● Pricing (27-nov-2013)

● Apache license

Page 19: OUGN 2014 - Provisioning Oracle Fusion Middleware using Puppet and Chef

19 | x

If you want to know more about Puppet …

Page 20: OUGN 2014 - Provisioning Oracle Fusion Middleware using Puppet and Chef

20 | x

CHEF

Introduction to

Page 21: OUGN 2014 - Provisioning Oracle Fusion Middleware using Puppet and Chef

21 | x

Chef | architecture

Central Chef Server

Multiple Administrators

Repository

Page 22: OUGN 2014 - Provisioning Oracle Fusion Middleware using Puppet and Chef

22 | x

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

● LWRP: custom actions

Page 23: OUGN 2014 - Provisioning Oracle Fusion Middleware using Puppet and Chef

23 | x

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

Page 24: OUGN 2014 - Provisioning Oracle Fusion Middleware using Puppet and Chef

24 | x

Open Source Chef Console

Page 25: OUGN 2014 - Provisioning Oracle Fusion Middleware using Puppet and Chef

25 | x

Chef in the wild

● Enterprise vs. Open Source

● Community & Popularity

● Chef Community Cookbooks

● Pricing (30-nov-2013)

Page 26: OUGN 2014 - Provisioning Oracle Fusion Middleware using Puppet and Chef

26 | x

More about Chef

Page 27: OUGN 2014 - Provisioning Oracle Fusion Middleware using Puppet and Chef

27 | x

Starting with Server Provisioning

● Chef versus Puppet versus …

• Support for OS & platforms

• Pricing model

• Language

• Dependencies and ordering of resources

• Hosting

● DTAP

● Idempotency

● Style guides & coding standards

● OSS versus Enterprise

● Plugins and tools

Page 28: OUGN 2014 - Provisioning Oracle Fusion Middleware using Puppet and Chef

28 | x

DEMO

Result

Page 29: OUGN 2014 - Provisioning Oracle Fusion Middleware using Puppet and Chef

29 | x

Demo VM (manager)

Chef Server Browser

console

VM (database01)

Chef Client

Oracle Database EE

VM (server01)

Chef Client

JDK

WLS 11g AS

WLS 11g MS1

RCU

SOA 11g

VM (server02)

Chef Client

JDK WLS 11g MS1

SOA 11g pro

visi

on

ing

Workstation knife

• Required packages • JDK, WLS, SOA Suite • Patches • Kernel params, users, entropy, etc.

• NM and Domain configuration • NFS share for JCA configuration • Deployment of test composites

Page 30: OUGN 2014 - Provisioning Oracle Fusion Middleware using Puppet and Chef

30 | x

Thank you!

Ronald van Luttikhuizen

[email protected]