banner



How To Update Chef Cookbook To Oracle 7.5

edwin

With Edwin Biemond

Oracle official sample Chef cookbooks and Puppet modules are now available on Oracle'due south official GitHub page at https://github.com/oracle/chef-samples and https://github.com/oracle/puppet-samples for Java, WebLogic and Fusion Middleware.

Chef and Boob are arguably the nigh popular provisioning frameworks and we would like to help you lot with your WebLogic and Fusion Middleware provisioning by publishing samples for Chef and Boob.  The Chef and Puppet sample modules and cookbooks are nigh the same and are using the same development frameworks.

We starting time this series of posts with an introduction what these cookbooks and modules can do and provide a simple quickstart how to create a WebLogic domain in Chef or Puppet on a Windows, Linux or Solaris host. In the following posts we will install FMW software, patch and extend a domain with FMW software.

These Chef cookbooks and Puppet modules allow you install WebLogic together with Fusion Middleware on any Linux, Solaris or Windows host. The cookbooks should work in Chef 11 & 12 and can be used with Chef server or with Chef Solo. The modules should work on Boob 3 & four and it should not matter if you use Puppet Enterprise, an agent or merely utilise puppet apply.

The outset release on github volition contain the following cookbooks and modules:

  • fmw_jdk, installs JDK seven or 8 and optionally configures the urandom random number generator service for Linux distributions.
  • fmw_wls, installs WebLogic 11g or 12c and optionally create thes Oracle user and group on solaris and linux.
  • fmw_bsu, patches a WebLogic 11g middleware home.
  • fmw_opatch, patches WebLogic 12c or any Fusion Middleware 11g, 12c production.
  • fmw_inst, installs FMW 11g, 12c product including Oracle SOA Suite, Service Omnibus, MFT, OIM, ADF Runtime, and WebCenter.
  • fmw_rcu, creates a 11g, 12c Mutual or SOA Suite FMW repository on an Oracle Database.
  • fmw_domain, creates a domain in evolution mode, configures the node manager, outset the admin server and extend the domain with ADF/JRF, Service Bus, SOA Suite and optionally with BAM and Enterprise Scheduler.

A couple of important notes about these cookbooks and modules:

  • They don't download any (free or licensed) software from OTN, Oracle support or edelivery, this is the responsibility of the user/client.
  • Oracle Support won't support these cookbooks or modules but y'all can raise issues or send us pull requests on github.
  • Binaries should be locally attainable in a directory or a network share.
  • They volition create a domain merely in development mode.
  • They won't do multi-node provisioning like pack/unpack of a domain on cluster nodes.
  • Passwords in Chef can be divers in databags and in Puppet you need to do it yourself in Hiera.
  • They take dependencies to each other and volition automatically include or require the depended manifest or recipe.
  • The default recipe/manifest does not do anything, you have to utilize the specific recipes or manifests. In Puppet the default manifest will be used to set some module defaults.

Detailed overview

These cookbooks and modules contains recipes and manifests with resource/providers in Chef and blazon/providers for Puppet. The recipes and manifest are a quick way to get you lot started and these minimal recipes are just calling the matching resource/type providers. You can telephone call these yourself in one of your ain cookbooks.

fmw_jdk

  • install, installs JDK 7 or 8 and supports the following distributions like RPM on RedHat Family distributions, tar.gz for Linux and Solaris, Tar.Z for Solaris and exe for Windows
  • rng_service, configure the urandom rng service on RedHat or Debian Linux distributions.

fmw_wls

  • setup, optional stride and will create a Linux or Solaris operating system user and group volition exist used by the install recipe/manifest.
  • install, installs Weblogic 10.3.6 (11g), 12.1.i, 12.ane.2, 12.1.three or 12.2.one (12c). This can likewise install the WebLogic infrastructure edition when version is > 12.1.ii.

fmw_bsu

  • weblogic, patch WebLogic 10.3.6, 12.1.1 middleware home, will not work on 12.1.ii or higher (utilize fmw_opatch)

fmw_opatch

  • weblogic, patch WebLogic 12.ane.2 or higher
  • service_bus, patch Service Bus 11g or 12c
  • soa_suite, patch SOA Suite 11g or 12c

fmw_inst

  • jrf, install JRF/ ADF runtime 11g, 12c
  • service_bus, install Service Bus 11g, 12c
  • soa_suite, install SOA Suite 11g, 12c
  • mft, install MFT 12c
  • oim, install OIM eleven.1.ii.3
  • webcenter, install WebCenter 11g

fmw_rcu

  • common, creates a mutual 11g,12c repository for ADF/JRF, EM, OPSS etc.
  • soa_suite, creates a SOA Suite 11g,12c repository with tin can be used for SOA Suite with BAM, ESS or Oracle Service Double-decker

fmw_domain

  • domain, creates a 11g or 12c WebLogic domain in development mode
  • nodemanager, configure and starts the nodemanager service
  • adminserver, starts the adminserver past connecting to the nodemanager
  • extension_jrf, extend the domain with JRF/ADF together with EM (Enterprise Director webapp), 12c requires a common/soa_suite rcu repository
  • extension_service_bus, extend the domain with Oracle Service Bus, requires a soa_suite rcu repository
  • extension_soa_suite, extend the domain with Oracle SOA Suite, requires a soa_suite rcu repository
  • extension_bam, extend the domain with BAM of Oracle SOA Suite, requires a soa_suite rcu repository
  • extension_enterprise_scheduler, extend the 12c domain with Enterprise scheduler of Oracle SOA Suite, requires a soa_suite rcu repository
  • extension_webtier, extend the 12c domain for collocated OHS

Chef quickstart

In these examples I added all the recipes to the run list even the required recipes are automatically included but this is makes information technology easier to explicate these examples.

fmw is the namespace for all the FMW global attributes, like java_home_dir or middleware_home_dir.

We showtime by installing JDK 8 with WebLogic 12.1.three on a Windows host. To do then we need to add together the install recipe of the fmw_jdk and fmw_wls cookbook. Fix some global fmw parameters like java_home_dir and weblogic_home_dir after this nosotros need to define the source attributes of fmw_jdk and fmw_wls cookbooks.

{       "run_list": ["recipe[fmw_jdk::install]",                    "recipe[fmw_wls::install]"                   ],       "fmw": {         "java_home_dir":       "c:\\java\\jdk1.eight.0_74",         "middleware_home_dir": "c:\\oracle\\middleware_1213"       },       "fmw_jdk": {         "source_file":         "c:\\software\\jdk-8u74-windows-x64.exe"       },       "fmw_wls": {         "source_file":         "c:\\software\\fmw_12.i.three.0.0_wls.jar"       } }

We can practice the same on a Linux host just in this instance I desire to make sure that the jdk cookbook likewise configures the rngd service so I don't ran out of entropy and the wls cookbook creates the Linux Oracle user and it's grouping. In this example I will use JDK7 (on RedHat systems like OEL, CentOS yous can besides use the rpm as source_file) and install the WebLogic 12.i.3 Infrastructure edition.

    {       "run_list": ["recipe[fmw_jdk::install]",                    "recipe[fmw_jdk::rng_service]",                    "recipe[fmw_wls::setup]",                    "recipe[fmw_wls::install]",                   ],       "fmw": {         "java_home_dir":       "/usr/java/jdk1.seven.0_79",         "middleware_home_dir": "/opt/oracle/middleware_1213",         "weblogic_home_dir":   "/opt/oracle/middleware_1213/wlserver",         "version":             "12.i.3"       },       "fmw_jdk": {         "source_file":         "/software/jdk-7u79-linux-x64.tar.gz"       },       "fmw_wls": {         "source_file":         "/software/fmw_12.1.3.0.0_infrastructure.jar",         "install_type":        "infra"       }     }

In the cookbook nosotros defined the following attributes with its defaults. You lot tin e'er override these attributes or remove it from the attributes file when y'all are happy with the defaults.

    default['fmw']['version']                 = '12.one.3' # 10.three.6|12.1.i|12.1.2|12.1.3|12.2.1     default['fmw_wls']['install_type']        = 'wls' # infra or wls     if platform_family?('windows')       default['fmw']['middleware_home_dir']   = 'C:/oracle/middleware'       default['fmw']['ora_inventory_dir']     = 'C:\\Program Files\\Oracle\\Inventory'       default['fmw']['tmp_dir']               = 'C:/temp'     else       default['fmw']['middleware_home_dir']   = '/opt/oracle/middleware'       default['fmw']['os_user']               = 'oracle'       default['fmw']['os_group']              = 'oinstall'       default['fmw']['os_shell']              = '/bin/fustigate'     stop     example platform_family     when 'debian', 'rhel'       default['fmw']['orainst_dir']       = '/etc'       default['fmw']['user_home_dir']     = '/domicile'       default['fmw']['ora_inventory_dir'] = '/home/oracle/oraInventory'       default['fmw']['tmp_dir']           = '/tmp'     when 'solaris2'       default['fmw']['orainst_dir']       = '/var/opt/oracle'       default['fmw']['user_home_dir']     = '/export/dwelling house'       default['fmw']['ora_inventory_dir'] = '/consign/habitation/oracle/oraInventory'       default['fmw']['tmp_dir']           = '/var/tmp'     end

Next example is to create a simple WebLogic domain. In this example we demand to add the domain, nodemanager and adminserver recipes to the run list. This volition create the WebLogic domain and after this nosotros tin configure/beginning the node managing director service and startup the WebLogic admin server.

    {       "run_list": ["recipe[fmw_jdk::install]",                    "recipe[fmw_jdk::rng_service]",                    "recipe[fmw_wls::setup]",                    "recipe[fmw_wls::install]",                    "recipe[fmw_domain::domain]",                    "recipe[fmw_domain::nodemanager]",                    "recipe[fmw_domain::adminserver]"                   ],       "fmw": {         "java_home_dir":       "/usr/java/jdk1.8.0_74",         "middleware_home_dir": "/opt/oracle/middleware_1213",         "weblogic_home_dir":   "/opt/oracle/middleware_1213/wlserver",         "version":             "12.ane.3"       },       "fmw_jdk": {         "source_file":         "/software/jdk-8u74-linux-x64.tar.gz"       },       "fmw_wls": {         "source_file":         "/software/fmw_12.1.3.0.0_wls.jar"       },       "fmw_domain": {         "databag_key":                  "DEV_WLS1",         "domains_dir":                  "/opt/oracle/middleware_1213/user_projects/domains",         "apps_dir":                     "/opt/oracle/middleware_1213/user_projects/applications",         "nodemanager_listen_address":   "10.10.ten.81",         "nodemanager_port":             5556       }     }

Earlier you tin can run this we need to ascertain a fmw_domains databag entry similar this. It should be nether fmw_domains and named dev_wls1.json

    {         "id":                            "DEV_WLS1",         "domain_name":                   "base of operations",         "weblogic_user":                 "weblogic",         "weblogic_password":             "welcome1",         "adminserver_name":              "AdminServer",         "adminserver_listen_address":    "10.10.10.81",         "adminserver_listen_port":       "7001"     }

This domain databag entry tin can exist used for multi-node provisioning or to encrypt your passwords.

In the final part we can do the same for Solaris but this time we volition use WebLogic x.3.half dozen/11g and extend the domain with some machines, servers and clusters.

For Solaris the JDK7 installation is a bit different in this case we need to provide 2 JDK source files.

    {       "run_list": ["recipe[fmw_jdk::install]",                    "recipe[fmw_wls::setup]",                    "recipe[fmw_wls::install]",                    "recipe[fmw_domain::domain]",                    "recipe[fmw_domain::nodemanager]",                    "recipe[fmw_domain::adminserver]"                   ],       "fmw": {         "java_home_dir":       "/usr/jdk/instances/jdk1.7.0_79",         "middleware_home_dir": "/opt/oracle/middleware_11g",         "weblogic_home_dir":   "/opt/oracle/middleware_11g/wlserver_10.3",         "version":             "x.3.6"       },       "fmw_jdk": {         "source_file":      "/software/jdk-7u79-solaris-i586.tar.gz",         "source_x64_file":  "/software/jdk-7u79-solaris-x64.tar.gz"       },       "fmw_wls": {         "source_file":         "/software/wls1036_generic.jar"       },       "fmw_domain": {         "databag_key":                "DEV_WLS1",         "domains_dir":                "/opt/oracle/middleware_11g/user_projects/domains",         "apps_dir":                   "/opt/oracle/middleware_11g/user_projects/applications",         "nodemanager_listen_address": "10.10.10.81",         "nodemanagers": [           {             "id": "node1",             "listen_address": "10.10.ten.81"           },           {             "id": "node2",             "listen_address": "10.ten.x.81"           }         ],         "servers": [           {             "id": "server1",             "nodemanager": "node1",             "listen_address": "10.10.10.81",             "listen_port": 8001,             "arguments": "-Xx:PermSize=256m -XX:MaxPermSize=512m -Xms1024m -Xmx1024m"           },           {             "id": "server2",             "nodemanager": "node2",             "listen_address": "x.10.10.81",             "listen_port": 8002,             "arguments": "-20:PermSize=256m -XX:MaxPermSize=512m -Xms1024m -Xmx1024m"           },           {             "id": "server3",             "nodemanager": "node1",             "listen_address": "10.ten.10.81",             "listen_port": 9001,             "arguments": "-Xx:PermSize=256m -Twenty:MaxPermSize=512m -Xms1024m -Xmx1024m"           }         ],         "clusters": [           {             "id": "cluster1",             "members": ["server1",                         "server2"]           },           { "id": "cluster2",             "members": ["server3"]           }         ]       }     }

Boob quickstart

We kickoff past installing JDK viii with WebLogic 12.1.iii on a Windows host. To practice and then we need to add the execute the install manifests of the fmw_jdk and fmw_wls modules. As well we override the middleware_home_dir attribute of the fmw_wls module.

    node default {       $java_home_dir       = 'c:\\java\\jdk1.8.0_74'       $middleware_home_dir = 'c:\\oracle\\middleware_1213'       class { 'fmw_jdk::install':         java_home_dir => $java_home_dir,         source_file   => 'c:\\software\\jdk-8u74-windows-x64.exe'       }       course { 'fmw_wls':         middleware_home_dir => $middleware_home_dir       }       class { 'fmw_wls::install':         java_home_dir => $java_home_dir,         source_file   => 'c:\\software\\fmw_12.one.3.0.0_wls.jar'       }     }

We tin can do the same with hiera in combination with a simple puppet manifest:

    node default {       hiera_include('classes')     }     ---     # executed manifest classes     classes:       - fmw_jdk::install       - fmw_wls::install     # general variables     java_home_dir:             &java_home_dir       'c:\\java\\jdk1.8.0_74'     middleware_home_dir:       &middleware_home_dir 'c:\\oracle\\middleware_1213'     # class parameters     fmw_jdk::install::java_home_dir: *java_home_dir     fmw_jdk::install::source_file:   'c:\\software\\jdk-8u74-windows-x64.exe'     fmw_wls::middleware_home_dir:    *middleware_home_dir     fmw_wls::install::java_home_dir: *java_home_dir     fmw_wls::install::source_file:   'c:\\software\\fmw_12.one.3.0.0_wls.jar'

Nosotros can practice the same on a Linux host only in this instance I want to make sure that the jdk module besides configures the rngd service and then I don't ran out of entropy and the wls module creates the Linux Oracle user and it's grouping. In this example I will use JDK7 (on RedHat systems like OEL, CentOS you lot can besides utilise the rpm as source_file) and install the WebLogic 12.1.3 Infrastructure edition.

On class{ 'fmw_wls' } I can set up the wls module defaults which will be used by the fmw_wls::install manifest. Also with Class['fmw_wls::setup'] -> Class['fmw_wls::install'].  I will make sure that the setup manifest is executed before the wls install manifest.

    node default {       include fmw_jdk::rng_service       $java_home_dir       = '/usr/coffee/jdk1.7.0_79'       $version             = '12.i.3'       $middleware_home_dir = '/opt/oracle/middleware_1213'       Class['fmw_wls::setup'] ->         Course['fmw_wls::install']       class { 'fmw_jdk::install':         java_home_dir => $java_home_dir,         source_file   => '/software/jdk-7u79-linux-x64.tar.gz'       }       class { 'fmw_wls':         version             => $version,         middleware_home_dir => $middleware_home_dir       }       include fmw_wls::setup       grade { 'fmw_wls::install':         java_home_dir => $java_home_dir,         source_file   => '/software/fmw_12.1.3.0.0_infrastructure.jar',         install_type  => 'infra'       }     }

In the wls module we accept the following params manifest which contains the defaults values. You tin can always override these attributes on the fmw_wls class or remove it from the course when yous are happy with the defaults.

    #     # fmw_wls::params     #     # Copyright 2015 Oracle. All Rights Reserved     #     grade fmw_wls::params()     {       $version       = '12.1.3' # 10.three.vi|12.1.1|12.1.2|12.1.3|12.ii.1       $install_type  = 'wls' # infra or wls       $os_user       = 'oracle'       $os_user_uid   = '500'       $os_group      = 'oinstall'       $os_shell      = '/bin/bash'       $user_home_dir = $::kernel? {         'Linux'  => '/home',         'SunOS'  => '/export/home',         default  => '/dwelling',       }       $middleware_home_dir = $::kernel? {         'windows' => 'C:/oracle/middleware',         default   => '/opt/oracle/middleware',       }       $ora_inventory_dir = $::kernel? {         'windows' => 'C:\\Program Files\\Oracle\\Inventory',         'SunOS'   => '/export/habitation/oracle/oraInventory',         default   => '/domicile/oracle/oraInventory',       }       $tmp_dir = $::kernel? {         'windows' => 'C:/temp',         'SunOS'   => '/var/tmp',         default   => '/tmp',       }       $orainst_dir = $::kernel? {         'SunOS' => '/var/opt/oracle',         default => '/etc',       }     }

Next instance is to create a simple WebLogic domain. In this case we need to invoke the domain, nodemanager and adminserver manifests. This will create the WebLogic domain and later on this nosotros tin configure/get-go the node managing director service and startup the WebLogic admin server.

    node default {       include fmw_jdk::rng_service       $java_home_dir       = '/usr/java/jdk1.8.0_74'       $version             = '12.1.3'       $middleware_home_dir = '/opt/oracle/middleware_1213'       $weblogic_home_dir   = '/opt/oracle/middleware_1213/wlserver'       Form['fmw_wls::setup'] ->         Class['fmw_wls::install']       class { 'fmw_jdk::install':         java_home_dir => $java_home_dir,         source_file   => '/software/jdk-8u74-linux-x64.tar.gz'       }       form { 'fmw_wls':         version             => $version,         middleware_home_dir => $middleware_home_dir,       }       include fmw_wls::setup       form { 'fmw_wls::install':         java_home_dir => $java_home_dir,         source_file   => '/software/fmw_12.i.iii.0.0_wls.jar'       }       form { 'fmw_domain':         version                       => $version,         java_home_dir                 => $java_home_dir,         middleware_home_dir           => $middleware_home_dir,         weblogic_home_dir             => $weblogic_home_dir,         domains_dir                   => '/opt/oracle/middleware_1213/user_projects/domains',         apps_dir                      => '/opt/oracle/middleware_1213/user_projects/applications',         domain_name                   => 'base',         weblogic_password             => 'welcome1',         adminserver_listen_address    => 'ten.10.x.81',         adminserver_listen_port       => 7001,         nodemanager_listen_address    => '10.x.10.81',         nodemanager_port              => 5556       }       include fmw_domain::domain       include fmw_domain::nodemanager       include fmw_domain::adminserver     }        

In the last role we can exercise the aforementioned for Solaris but this time we will employ WebLogic 10.3.6/11g and extend the domain with some machines, servers and clusters.

For Solaris the JDK7 installation is a bit different in this example nosotros need to provide 2 JDK source files.      node default {       $java_home_dir       = '/usr/jdk/instances/jdk1.7.0_79'       $version             = 'x.3.6'       $middleware_home_dir = '/opt/oracle/middleware_11g'       $weblogic_home_dir   = '/opt/oracle/middleware_11g/wlserver_10.three'       Class['fmw_wls::setup'] ->         Class['fmw_wls::install']       course { 'fmw_jdk::install':         java_home_dir   => $java_home_dir,         source_file     => '/software/jdk-7u79-solaris-i586.tar.gz',         source_x64_file => '/software/jdk-7u79-solaris-x64.tar.gz'       }       grade { 'fmw_wls':         version             => $version,         middleware_home_dir => $middleware_home_dir       }       include fmw_wls::setup       class { 'fmw_wls::install':         java_home_dir => $java_home_dir,         source_file   => '/software/wls1036_generic.jar'       }       class { 'fmw_domain':         version                       => $version,         java_home_dir                 => $java_home_dir,         middleware_home_dir           => $middleware_home_dir,         weblogic_home_dir             => $weblogic_home_dir,         domains_dir                   => '/opt/oracle/middleware_11g/user_projects/domains',         apps_dir                      => '/opt/oracle/middleware_11g/user_projects/applications',         domain_name                   => 'base',         weblogic_password             => 'welcome1',         adminserver_listen_address    => '10.ten.x.81',         adminserver_listen_port       => 7001,         nodemanager_listen_address    => '10.10.10.81',         nodemanager_port              => 5556       }       class { 'fmw_domain::domain':         nodemanagers => [ { "id" => "node1",                             "listen_address" => "10.10.x.81"                           },                           { "id" => "node2",                             "listen_address" => "ten.x.x.81"                           }],         servers      =>  [           { "id"             => "server1",             "nodemanager"    => "node1",             "listen_address" => "10.10.10.81",             "listen_port"    => 8001,             "arguments"      => "-XX:PermSize=256m -Xx:MaxPermSize=512m -Xms1024m -Xmx1024m"           },           { "id"             => "server2",             "nodemanager"    => "node2",             "listen_address" => "ten.10.10.81",             "listen_port"    => 8002,             "arguments"      => "-Xx:PermSize=256m -Xx:MaxPermSize=512m -Xms1024m -Xmx1024m"           },           { "id"             => "server3",             "nodemanager"    => "node1",             "listen_address" => "ten.10.ten.81",             "listen_port"    => 9001,             "arguments"      => "-XX:PermSize=256m -XX:MaxPermSize=512m -Xms1024m -Xmx1024m"           }],         clusters      => [           { "id"      => "cluster1",             "members" => ["server1","server2"]           },           { "id"      => "cluster2",             "members" => ["server3"]           }]       }       include fmw_domain::nodemanager       include fmw_domain::adminserver     }

Source: https://redstack.wordpress.com/2016/03/21/oracle-publishes-official-chef-and-puppet-samples-on-github/

Posted by: kiferfrimply.blogspot.com

0 Response to "How To Update Chef Cookbook To Oracle 7.5"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel