Forge Home

orawls

Oracle WebLogic puppet module v2 for Linux & Solaris with wls puppet types & providers

167,820 downloads

15,136 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 2.0.20 (latest)
  • 2.0.19
  • 2.0.18
  • 2.0.17
  • 2.0.16
  • 2.0.15
  • 2.0.14
  • 2.0.13
  • 2.0.12
  • 2.0.11
  • 2.0.10
  • 2.0.9
  • 2.0.8
  • 2.0.7
  • 2.0.6
  • 2.0.5
  • 2.0.4
  • 2.0.3
  • 2.0.2
  • 2.0.1
  • 2.0.0
  • 1.0.60
  • 1.0.59
  • 1.0.58
  • 1.0.57
  • 1.0.56
  • 1.0.55
  • 1.0.54
  • 1.0.53
  • 1.0.52
  • 1.0.51
  • 1.0.50
  • 1.0.49
  • 1.0.48
  • 1.0.47
  • 1.0.46
  • 1.0.45
  • 1.0.44
  • 1.0.43
  • 1.0.42
  • 1.0.41
  • 1.0.40
  • 1.0.39
  • 1.0.38
  • 1.0.37
  • 1.0.36
  • 1.0.35
  • 1.0.34
  • 1.0.33
  • 1.0.32
  • 1.0.31
  • 1.0.30
  • 1.0.29
  • 1.0.28
  • 1.0.27
  • 1.0.26
  • 1.0.25
  • 1.0.24
  • 1.0.23
  • 1.0.22
  • 1.0.21
  • 1.0.20
  • 1.0.19
  • 1.0.18
  • 1.0.17
  • 1.0.15
  • 1.0.14
  • 1.0.13
  • 1.0.12
  • 1.0.11
  • 1.0.10
  • 1.0.9
  • 1.0.8
  • 1.0.7
  • 1.0.6
  • 1.0.5
  • 1.0.4
  • 1.0.3
  • 1.0.2
  • 1.0.1
  • 1.0.0
  • 0.9.8
  • 0.9.7
  • 0.9.6
  • 0.9.5
  • 0.9.4
  • 0.9.3
  • 0.9.2
  • 0.9.1
  • 0.9.0
  • 0.3.7
  • 0.3.6
  • 0.3.3
  • 0.3.2
  • 0.3.1
  • 0.3.0
  • 0.2.9
  • 0.2.8
  • 0.2.7
  • 0.2.6
  • 0.2.5
  • 0.2.4
  • 0.2.3
  • 0.2.2
  • 0.2.1
  • 0.2.0
  • 0.1.9
  • 0.1.8
  • 0.1.7
  • 0.1.6
  • 0.1.5
  • 0.1.4
  • 0.1.3
  • 0.1.1
  • 0.1.0
released Apr 25th 2017
This version is compatible with:
  • Puppet Enterprise 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >=2.7.20
  • , , , , , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'biemond-orawls', '1.0.60'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add biemond-orawls
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install biemond-orawls --version 1.0.60

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

biemond/orawls — version 1.0.60 Apr 25th 2017

Oracle WebLogic / Fusion Middleware puppet module V2

Build Status Puppet Forge Version Puppet Forge Score Puppet Forge Downloads Code Climate Coverage Status

Install, configures and manages WebLogic version 10.3 - 12.2.1

This module should work for all Linux & Solaris versions like RedHat, CentOS, Ubuntu, Debian, Suse SLES, OracleLinux, Solaris 10,11 sparc / x86

For Puppet 3 & 4 and this module doesn't use the latest puppet 4 features

For the Puppet 4 version you have to use the latest 2.x version of this orawls module

Author

Edwin Biemond email biemond at gmail dot com

biemond.blogspot.com

Github homepage

Contributors

Special thanks to all the contributors

More: https://github.com/biemond/biemond-orawls/graphs/contributors

Support

If you need support, checkout the wls_install and wls_config modules from Enterprise Modules Enterprise Modules

Dependencies

  • hajee/easy_type >=0.10.0
  • adrien/filemapper >= 1.1.1
  • reidmv/yamlfile >=0.2.0
  • fiddyspence/sleep => 1.1.2
  • puppetlabs/stdlib => 4.9.0

Complete vagrant examples

Orawls WebLogic Features

Fusion Middleware Features 11g & 12c

  • installs FMW software(add-on) to a middleware home, like OSB,SOA Suite, Oracle Identity & Access Management, Oracle Unified Directory, WebCenter Portal + Content
  • WebTier Oracle HTTP server Standalone and Collocated
  • Configure Oracle HTTP Server
  • OSB, SOA Suite with BPM and BAM Cluster configuration support ( convert single osb/soa/bam servers to clusters and migrate 11g OPSS to the database )
  • ADF/JRF support, Assign JRF libraries to a Server or Cluster target
  • OIM IDM / OAM 11.1.2.3 configurations with Oracle OHS OAM WebGate, Also it has Cluster support for OIM OAM
  • OUD OUD Oracle Unified Directory install, WebLogic domain, instances creation & OUD control
  • Forms/Reports Oracle Forms & Reports 11.1.1.7, 11.1.2 or 12.2.1
  • WC, WCC, WCS Webcenter portal, content, sites 11g or 12.2.1
  • Change FMW log location of a managed server
  • Resource Adapter plan and entries for AQ, DB, MQ, FTP, File and JMS

Wls types and providers

This will use WLST to retrieve the current state and to the changes. With WebLogic 12.2.1 we can also use the rest management api's, it's already working in this module but we will slowly support this for all wls types

12.1.3 Coherence & Dynamic clusters

12.2.1.1 Multitenancy MT

Domain creation options (Dev or Prod mode)

all templates creates a WebLogic domain, logs the domain creation output

For all WebLogic or FMW versions

  • domain 'standard' -> a default WebLogic
  • domain 'adf' -> JRF + EM + Coherence (12.1.2, 12.1.3, 12.2.1) + OWSM (12.1.2, 12.1.3, 12.2.1) + JAX-WS Advanced + Soap over JMS (12.1.2, 12.1.3, 12.2.1)
  • domain 'osb' -> OSB + JRF + EM + OWSM + ESS ( optional with 12.1.3 )
  • domain 'osb_soa' -> OSB + SOA Suite + BAM + JRF + EM + OWSM + ESS ( optional with 12.1.3 )
  • domain 'osb_soa_bpm' -> OSB + SOA Suite + BAM + BPM + JRF + EM + OWSM + ESS ( optional with 12.1.3 )
  • domain 'soa' -> SOA Suite + BAM + JRF + EM + OWSM + ESS ( optional with 12.1.3 )
  • domain 'soa_bpm' -> SOA Suite + BAM + BPM + JRF + EM + OWSM + ESS ( optional with 12.1.3 )
  • domain 'bam' -> BAM ( only with soa suite installation)
  • domain 'ohs_standalone' -> Standalone webtier (HTTP Server) 12.1.2, 12.1.3 and 12.1.4

11g

  • domain 'wc_wcc_bpm' -> WC (webcenter) + WCC ( Content ) + BPM + JRF + EM + OWSM
  • domain 'wc' -> WC (webcenter) + JRF + EM + OWSM

11gR2

  • domain 'oim' -> IDM, OIM (Oracle Identity Manager) + OAM ( Oracle Access Manager)
  • domain 'oud' -> OUD (Oracle Unified Directory)

12.2.1.1

  • domain 'adf_restricted' -> only for 12.2.1 (no RCU/DB) JRF + EM + Coherence + JAX-WS Advanced + Soap over JMS

Puppet master with orawls module key points

it should work on every PE or opensource puppet master, customers and I successfully tested orawls on PE 3.0, 3.1, 3.2, 3.3. See also the puppet master vagrant box

For Running orawls module without root/elevated privileges, please use v3.7.0 or higher

But when it fails you can do the following actions.

  • Check the time difference/timezone between all the puppet master and agent machines.
  • Update orawls and its dependencies on the puppet master.
  • After adding or refreshing the easy_type or orawls modules you need to restart all the PE services on the puppet master (this will flush the PE cache) and always do a puppet agent run on the Puppet master
  • To solve this error "no such file to load -- easy_type" you need just to do a puppet run on the puppet master when it is still failing you can move the easy_type module to its primary module location ( /etc/puppetlabs/puppet/module )
  • Move orawls and easy_type to the primary module location pup-1515 when the Puppet master loads a Type, it searches the environment that the agent requested. When it loads providers for that type, it searches the default environment instead of the one the agent requested.

Orawls WebLogic Facter

Contains WebLogic Facter which displays the following

  • Middleware homes
  • Oracle Software
  • BSU & OPatch patches
  • Domain configuration ( everything of a WebLogic Domain like deployments, datasource, JMS, SAF)

Override the default Oracle operating system user

default this orawls module uses oracle as weblogic install user you can override this by setting the following fact 'override_weblogic_user', like override_weblogic_user=wls or set FACTER_override_weblogic_user=wls

Override the default file location where orawls saves domain & other settings (Applicable for running as non-root user)

default this orawls module saves the domain & connection related setting in /etc in yaml format you can override this by setting the following 2 facts:

for domain information: override_wls_domains_file=[custom_path]/wls_domains.yaml or set FACTER_override_wls_domains_file=[custom_path]/wls_domains.yaml

for settings infortmation: override_wls_setting_file=[custom_path]/wls_setting.yaml or set FACTER_override_wls_setting_file=[custom_path]/wls_setting.yaml

for ora inst location: override_orainst_dir=[custom_path] or set FACTER_override_orainst_dir=[custom_path]

Set $puppet_os_user on some of the manifests or set this hiera variable puppet_os_user

Override the default WebLogic domain folder

Set the following hiera parameters for weblogic.pp

wls_domains_dir:   '/opt/oracle/wlsdomains/domains'
wls_apps_dir:      '/opt/oracle/wlsdomains/applications'

Set the following wls_domains_dir & wls_apps_dir parameters in

  • weblogic.pp
  • domain.pp
  • control.pp
  • packdomain.pp
  • copydomain.pp
  • fmwcluster.pp
  • fmwclusterjrf.pp

or hiera parameters of weblogic.pp

orawls::weblogic::wls_domains_dir:      *wls_domains_dir
orawls::weblogic::wls_apps_dir:         *wls_apps_dir

Java Secure Socket Extension support

Requires the JDK 7 or 8 JCE extension

jdk7::install7{ 'jdk-8u72-linux-x64':
    version                     => "8u72" ,
    full_version                => "jdk1.8.0_72",
    alternatives_priority       => 18001,
    x64                         => true,
    download_dir                => "/var/tmp/install",
    urandom_java_fix            => true,
    rsa_key_size_fix            => true,
    cryptography_extension_file => "jce_policy-8.zip",
    source_path                 => "/software",
}


jdk7::install7{ 'jdk1.7.0_51':
    version                     => "7u51" ,
    full_version                => "jdk1.7.0_51",
    alternatives_priority       => 18000,
    x64                         => true,
    download_dir                => "/var/tmp/install",
    urandom_java_fix            => true,
    rsa_key_size_fix            => true,                          <!--
    cryptography_extension_file => "UnlimitedJCEPolicyJDK7.zip",  <!---
    source_path                 => "/software",
}

To enable this in orawls you can set the jsse_enabled on the following manifests

  • nodemanager.pp
  • domain.pp
  • control.pp

or set the following hiera parameter

 wls_jsse_enabled:         true

Enterprise security with Custom Identity and Trust store

in combination with JDK7 JCE policy, ORAUTILS and WebLogic JSSE you can use your own certificates

just generates all the certificates and set the following hiera variables.

# custom trust
orautils::customTrust:             true
orautils::trustKeystoreFile:       '/vagrant/truststore.jks'
orautils::trustKeystorePassphrase: 'welcome'

# used by nodemanager, control and domain creation
wls_custom_trust:                  &wls_custom_trust              true
wls_trust_keystore_file:           &wls_trust_keystore_file       '/vagrant/truststore.jks'
wls_trust_keystore_passphrase:     &wls_trust_keystore_passphrase 'welcome'

wls_setting_instances:
  'default':
    user:                      oracle
    weblogic_home_dir:         '/opt/oracle/middleware11g/wlserver_10.3'
    connect_url:               't3s://10.10.10.10:7002'
    weblogic_user:             'weblogic'
    weblogic_password:         'Welcome01'
    custom_trust:              *wls_custom_trust
    trust_keystore_file:       *wls_trust_keystore_file
    trust_keystore_passphrase: *wls_trust_keystore_passphrase

# create a standard domain with custom identity for the adminserver
domain_instances:
  'Wls1036':
    domain_template:                       "standard"
    development_mode:                      false
    log_output:                            *logoutput
    custom_identity:                       true
    custom_identity_keystore_filename:     '/vagrant/identity_admin.jks'
    custom_identity_keystore_passphrase:   'welcome'
    custom_identity_alias:                 'admin'
    custom_identity_privatekey_passphrase: 'welcome'

nodemanager_instances:
  'nodemanager':
    log_output:                            *logoutput
    custom_identity:                       true
    custom_identity_keystore_filename:     '/vagrant/identity_admin.jks'
    custom_identity_keystore_passphrase:   'welcome'
    custom_identity_alias:                 'admin'
    custom_identity_privatekey_passphrase: 'welcome'
    nodemanager_address:                   *domain_adminserver_address

server_instances:
  'wlsServer1':
    ensure:                                'present'
    arguments:                             '-XX:PermSize=256m -XX:MaxPermSize=256m -Xms752m -Xmx752m -Dweblogic.Stdout=/var/log/weblogic/wlsServer1.out -Dweblogic.Stderr=/var/log/weblogic/wlsServer1_err.out'
    listenaddress:                         '10.10.10.100'
    listenport:                            '8001'
    logfilename:                           '/var/log/weblogic/wlsServer1.log'
    machine:                               'Node1'
    sslenabled:                            '1'
    ssllistenport:                         '8201'
    sslhostnameverificationignored:        '1'
    jsseenabled:                           '1'
    custom_identity:                       '1'
    custom_identity_keystore_filename:     '/vagrant/identity_node1.jks'
    custom_identity_keystore_passphrase:   'welcome'
    custom_identity_alias:                 'node1'
    custom_identity_privatekey_passphrase: 'welcome'
    trust_keystore_file:                   *wls_trust_keystore_file
    trust_keystore_passphrase:             *wls_trust_keystore_passphrase

Linux low on entropy or urandom fix

can cause certain operations to be very slow. Encryption operations need entropy to ensure randomness. Entropy is generated by the OS when you use the keyboard, the mouse or the disk.

If an encryption operation is missing entropy it will wait until enough is generated.

three options

  • use rngd service (include orawls::urandomfix class)
  • set java.security in JDK ( jre/lib/security in my jdk7 module )
  • set -Djava.security.egd=file:/dev/./urandom param

Oracle binaries files and alternate download location

Some manifests like orawls:weblogic bsu opatch fmw supports an alternative mountpoint for the big oracle setup/install files. When not provided it uses the files folder located in the orawls puppet module else you can use $source =>

  • "/mnt"
  • "/vagrant"
  • "puppet:///modules/orawls/" (default)
  • "puppet:///middleware/"

when the files are also accesiable locally then you can also set $remote_file => false this will not move the files to the download folder, just extract or install

WebLogic requirements

Operating System settings like User, Group, ULimits and kernel parameters requirements

install the following module to set the kernel parameters puppet module install fiddyspence-sysctl

install the following module to set the user limits parameters puppet module install erwbgy-limits

 sysctl { 'kernel.msgmnb':                 ensure => 'present', permanent => 'yes', value => '65536',}
 sysctl { 'kernel.msgmax':                 ensure => 'present', permanent => 'yes', value => '65536',}
 sysctl { 'kernel.shmmax':                 ensure => 'present', permanent => 'yes', value => '2147483648',}
 sysctl { 'kernel.shmall':                 ensure => 'present', permanent => 'yes', value => '2097152',}
 sysctl { 'fs.file-max':                   ensure => 'present', permanent => 'yes', value => '344030',}
 sysctl { 'net.ipv4.tcp_keepalive_time':   ensure => 'present', permanent => 'yes', value => '1800',}
 sysctl { 'net.ipv4.tcp_keepalive_intvl':  ensure => 'present', permanent => 'yes', value => '30',}
 sysctl { 'net.ipv4.tcp_keepalive_probes': ensure => 'present', permanent => 'yes', value => '5',}
 sysctl { 'net.ipv4.tcp_fin_timeout':      ensure => 'present', permanent => 'yes', value => '30',}

 class { 'limits':
   config => {'*'       => {  'nofile'  => { soft => '2048'   , hard => '8192',   },},
              'oracle'  => {  'nofile'  => { soft => '65535'  , hard => '65535',  },
                              'nproc'   => { soft => '2048'   , hard => '2048',   },
                              'memlock' => { soft => '1048576', hard => '1048576',},},},
   use_hiera => false,}

create a WebLogic user and group

group { 'dba' :
  ensure => present,
}

# http://raftaman.net/?p=1311 for generating password
user { 'oracle' :
  ensure     => present,
  groups     => 'dba',
  shell      => '/bin/bash',
  password   => '$1$DSJ51vh6$4XzzwyIOk6Bi/54kglGk3.',
  home       => "/home/oracle",
  comment    => 'Oracle user created by Puppet',
  managehome => true,
  require    => Group['dba'],
}

Necessary Hiera setup for global vars and Facter

if you don't want to provide the same parameters in all the defines and classes

hiera.yaml main configuration

 ---
 :backends: yaml
 :yaml:
   :datadir: /vagrant/puppet/hieradata
 :hierarchy:
   - "%{::fqdn}"
   - common

vagrantcentos64.example.com.yaml

 ---

common.yaml

---
# global WebLogic vars
wls_oracle_base_home_dir: &wls_oracle_base_home_dir "/opt/oracle"
wls_weblogic_user:        &wls_weblogic_user        "weblogic"

# 12.1.2 settings
#wls_weblogic_home_dir:    &wls_weblogic_home_dir    "/opt/oracle/middleware12c/wlserver"
#wls_middleware_home_dir:  &wls_middleware_home_dir  "/opt/oracle/middleware12c"
#wls_version:              &wls_version              1212

# 10.3.6 settings
wls_weblogic_home_dir:    &wls_weblogic_home_dir    "/opt/oracle/middleware11g/wlserver_10.3"
wls_middleware_home_dir:  &wls_middleware_home_dir  "/opt/oracle/middleware11g"
wls_version:              &wls_version              1036

# global OS vars
wls_os_user:              &wls_os_user              "oracle"
wls_os_group:             &wls_os_group             "dba"
wls_download_dir:         &wls_download_dir         "/data/install"
wls_source:               &wls_source               "/vagrant"
wls_jdk_home_dir:         &wls_jdk_home_dir         "/usr/java/jdk1.7.0_45"
wls_log_dir:              &wls_log_dir              "/data/logs"


#WebLogic installation variables
orawls::weblogic::version:              *wls_version
orawls::weblogic::filename:             "wls1036_generic.jar"

# weblogic 12.1.2
#orawls::weblogic::filename:             "wls_121200.jar"
# or with 12.1.2 FMW infra
#orawls::weblogic::filename:             "fmw_infra_121200.jar"
#orawls::weblogic::fmw_infra:            true

orawls::weblogic::middleware_home_dir:  *wls_middleware_home_dir
orawls::weblogic::log_output:           false

# hiera default anchors
orawls::weblogic::jdk_home_dir:         *wls_jdk_home_dir
orawls::weblogic::oracle_base_home_dir: *wls_oracle_base_home_dir
orawls::weblogic::os_user:              *wls_os_user
orawls::weblogic::os_group:             *wls_os_group
orawls::weblogic::download_dir:         *wls_download_dir
orawls::weblogic::source:               *wls_source

WebLogic Module Usage

weblogic

orawls::weblogic installs WebLogic 10.3.[0-6], 12.1.1, 12.1.2, 12.1.3, 12.2.1, 12.2.1.2

class{'orawls::weblogic':
  version              => 12211,                       # 1036|1211|1212|1213|1221|12212
  filename             => 'fmw_12.2.1.0.0_wls.jar',   # wls1036_generic.jar|wls1211_generic.jar|wls_121200.jar
  jdk_home_dir         => '/usr/java/jdk1.8.0_45',
  oracle_base_home_dir => "/opt/oracle",
  middleware_home_dir  => "/opt/oracle/middleware12c",
  weblogic_home_dir    => "/opt/oracle/middleware12c/wlserver",
  os_user              => "oracle",
  os_group             => "dba",
  download_dir         => "/data/install",
  source               => "/vagrant",                 # puppet:///modules/orawls/ | /mnt |
  log_output           => true,
}

class{'orawls::weblogic':
  version              => 1212,                       # 1036|1211|1212|1213
  filename             => 'wls_121200.jar',           # wls1036_generic.jar|wls1211_generic.jar|wls_121200.jar
  jdk_home_dir         => '/usr/java/jdk1.7.0_45',
  oracle_base_home_dir => "/opt/oracle",
  middleware_home_dir  => "/opt/oracle/middleware12c",
  weblogic_home_dir    => "/opt/oracle/middleware12c/wlserver",
  os_user              => "oracle",
  os_group             => "dba",
  download_dir         => "/data/install",
  source               => "/vagrant",                 # puppet:///modules/orawls/ | /mnt |
  log_output           => true,
}

12.1.3 infra

class{'orawls::weblogic':
  version              => 1213,
  filename             => 'fmw_12.1.3.0.0_infrastructure.jar',
  fmw_infra            => true,
  jdk_home_dir         => '/usr/java/jdk1.7.0_55',
  oracle_base_home_dir => "/opt/oracle",
  middleware_home_dir  => "/opt/oracle/middleware12c",
  weblogic_home_dir    => "/opt/oracle/middleware12c/wlserver",
  os_user              => "oracle",
  os_group             => "dba",
  download_dir         => "/data/install",
  source               => "puppet:///middleware",
  log_output           => true,
}

or with a bin file located on a share

class{'orawls::weblogic':
    version              => 1036,
    filename             => "oepe-wls-indigo-installer-11.1.1.8.0.201110211138-10.3.6-linux32.bin",
    oracle_base_home_dir => "/opt/weblogic",
    middleware_home_dir  => "/opt/weblogic/Middleware",
    weblogic_home_dir    => "/opt/weblogic/Middleware/wlserver_10.3",
    fmw_infra            => false,
    jdk_home_dir         => "/usr/java/latest",
    os_user              => "weblogic",
    os_group             => "bea",
    download_dir         => "/data/tmp",
    source               => "/misc/tact/products/oracle/11g/fmw/wls/11.1.1.8",
    remote_file          => false,
    log_output           => true,
    temp_directory       => "/data/tmp",
 }

Same configuration but then with Hiera ( need to have puppet > 3.0 )

include orawls::weblogic

or this

class{'orawls::weblogic':
  log_output => true,
}

vagrantcentos64.example.com.yaml

 ---
 orawls::weblogic::log_output:   true

weblogic_type

orawls::weblogic_type same as weblogic manifest/class but now as define which supports multiple middleware home on same VM

orawls::weblogic{'1221':
  version              => 12211,                       # 1036|1211|1212|1213|1221|12212
  filename             => 'fmw_12.2.1.0.0_wls.jar',   # wls1036_generic.jar|wls1211_generic.jar|wls_121200.jar
  jdk_home_dir         => '/usr/java/jdk1.8.0_45',
  oracle_base_home_dir => "/opt/oracle",
  middleware_home_dir  => "/opt/oracle/middleware12c",
  weblogic_home_dir    => "/opt/oracle/middleware12c/wlserver",
  os_user              => "oracle",
  os_group             => "dba",
  download_dir         => "/data/install",
  source               => "/vagrant",                 # puppet:///modules/orawls/ | /mnt |
  log_output           => true,
}

opatch

orawls::opatch apply an OPatch on a Middleware home or a Oracle product home

orawls::opatch {'16175470':
  ensure                  => "present",
  oracle_product_home_dir => "/opt/oracle/middleware12c",
  jdk_home_dir            => "/usr/java/jdk1.7.0_45",
  patch_id                => "16175470",
  patch_file              => "p16175470_121200_Generic.zip",
  os_user                 => "oracle",
  os_group                => "dba",
  download_dir            => "/data/install",
  source                  => "/vagrant",
  log_output              => false,
}

or when you set the defaults hiera variables

orawls::opatch {'16175470':
  ensure                  => "present",
  oracle_product_home_dir => "/opt/oracle/middleware12c",
  patch_id                => "16175470",
  patch_file              => "p16175470_121200_Generic.zip",
}

Same configuration but then with Hiera ( need to have puppet > 3.0 )

$default_params = {}
$opatch_instances = hiera('opatch_instances', {})
create_resources('orawls::opatch',$opatch_instances, $default_params)

common.yaml

---
opatch_instances:
  '16175470':
     ensure:                   "present"
     oracle_product_home_dir:  "/opt/oracle/middleware12c"
     patch_id:                 "16175470"
     patch_file:               "p16175470_121200_Generic.zip"
     jdk_home_dir              "/usr/java/jdk1.7.0_45"
     os_user:                  "oracle"
     os_group:                 "dba"
     download_dir:             "/data/install"
     source:                   "/vagrant"
     log_output:               true

or when you set the defaults hiera variables

---
opatch_instances:
  '16175470':
     ensure:                   "present"
     oracle_product_home_dir:  "/opt/oracle/middleware12c"
     patch_id:                 "16175470"
     patch_file:               "p16175470_121200_Generic.zip"

bsu

orawls::bsu apply or remove a WebLogic BSU Patch ( ensure = present or absent )

orawls::bsu {'BYJ1':
  ensure                  => "present",
  middleware_home_dir     => "/opt/oracle/middleware11gR1",
  weblogic_home_dir       => "/opt/oracle/middleware11gR1/wlserver",
  jdk_home_dir            => "/usr/java/jdk1.7.0_45",
  patch_id                => "BYJ1",
  patch_file              => "p17071663_1036_Generic.zip",
  os_user                 => "oracle",
  os_group                => "dba",
  download_dir            => "/data/install",
  source                  => "/vagrant",
  log_output              => false,
}

or when you set the defaults hiera variables

orawls::bsu {'BYJ1':
  ensure                  => "present",
  patch_id                => "BYJ1",
  patch_file              => "p17071663_1036_Generic.zip",
  log_output              => false,
}

Same configuration but then with Hiera ( need to have puppet > 3.0 )

$default_params = {}
$bsu_instances = hiera('bsu_instances', {})
create_resources('orawls::bsu',$bsu_instances, $default_params)

common.yaml

---
bsu_instances:
  'BYJ1':
     ensure                   "present"
     middleware_home_dir:     "/opt/oracle/middleware11gR1"
     weblogic_home_dir:       "/opt/oracle/middleware11gR1/wlserver"
     jdk_home_dir:            "/usr/java/jdk1.7.0_45"
     patch_id:                "BYJ1"
     patch_file:              "p17071663_1036_Generic.zip"
     os_user:                 "oracle"
     os_group:                "dba"
     download_dir:            "/data/install"
     source:                  "/vagrant"
     log_output:              false

or when you set the defaults hiera variables

---
bsu_instances:
  'BYJ1':
     ensure                   "present"
     patch_id:                "BYJ1"
     patch_file:              "p17071663_1036_Generic.zip"
     log_output:              false

fmw

orawls::fmw installs FMW software (add-on) to a middleware home like OSB,SOA Suite, WebTier (HTTP Server), Oracle Identity Management, Web Center + Content

# fmw_product = adf|soa|osb|wcc|wc|oim|web|webgate|b2b|mft
orawls::fmw{"osbPS6":
  middleware_home_dir     => "/opt/oracle/middleware11gR1",
  weblogic_home_dir       => "/opt/oracle/middleware11gR1/wlserver",
  jdk_home_dir            => "/usr/java/jdk1.7.0_45",
  oracle_base_home_dir    => "/opt/oracle",
  fmw_product             => "osb",  # adf|soa|osb|oim|wc|wcc|web
  fmw_file1               => "ofm_osb_generic_11.1.1.7.0_disk1_1of1.zip",
  os_user                 => "oracle",
  os_group                => "dba",
  download_dir            => "/data/install",
  source                  => "/vagrant",
  log_output              => false,
}

or when you set the defaults hiera variables

orawls::fmw{"osbPS6":
  fmw_product             => "osb"  # adf|soa|osb|oim|wc|wcc|web|webgate
  fmw_file1               => "ofm_osb_generic_11.1.1.7.0_disk1_1of1.zip",
  log_output              => false,
}

orawls::fmw{"osb12.1.3":
  version                 => 1213
  fmw_product             => "osb"
  fmw_file1               => "fmw_12.1.3.0.0_osb_Disk1_1of1.zip",
  log_output              => false,
}

Same configuration but then with Hiera ( need to have puppet > 3.0 )

$default_params = {}
$fmw_installations = hiera('fmw_installations', {})
create_resources('orawls::fmw',$fmw_installations, $default_params)

common.yaml

when you set the defaults hiera variables

# FMW installation on top of WebLogic 12.2.1
fmw_installations:
  'soa1221':
    version:                 1221
    fmw_product:             "soa"
    fmw_file1:               "fmw_12.2.1.0.0_soa_Disk1_1of1.zip"
    bpm:                     true
    log_output:              true
    remote_file:             false
  'osb1221':
    version:                 1221
    fmw_product:             "osb"
    fmw_file1:               "fmw_12.2.1.0.0_osb_Disk1_1of1.zip"
    log_output:              true
    remote_file:             false
  'webtier1221':
    version:                 1221
    fmw_product:             "web"
    fmw_file1:               "fmw_12.2.1.0.0_ohs_linux64_Disk1_1of1.zip"
    log_output:              true
    remote_file:             false
  'forms1221':
    version:                 1221
    fmw_product:             "forms"
    fmw_file1:               "fmw_12.2.1.0.0_fr_linux64_Disk1_1of1.zip"
    log_output:              true
    remote_file:             false
  'wcc1221':
    version:                 1221
    fmw_product:             "wcc"
    fmw_file1:               "fmw_12.2.1.0.0_wccontent_Disk1_1of1.zip"
    log_output:              true
    remote_file:             false
  'wc1221':
    version:                 1221
    fmw_product:             "wc"
    fmw_file1:               "fmw_12.2.1.0.0_wcportal_Disk1_1of1.zip"
    log_output:              true
    remote_file:             false



if ( defined(Orawls::Fmw["b2b1213"])) {
  Orawls::Fmw["soa1213"] -> Orawls::Fmw["b2b1213"]
}


fmw_installations:
  'soa1213':
    version:                 *wls_version
    fmw_product:             "soa"
    fmw_file1:               "fmw_12.1.3.0.0_soa_Disk1_1of1.zip"
    bpm:                     true
    log_output:              true
    remote_file:             false
  'webtier1213':
    version:                 *wls_version
    fmw_product:             "web"
    fmw_file1:               "fmw_12.1.3.0.0_ohs_linux64_Disk1_1of1.zip"
    log_output:              true
    remote_file:             false
  'osb1213':
    version:                 *wls_version
    fmw_product:             "osb"
    fmw_file1:               "fmw_12.1.3.0.0_osb_Disk1_1of1.zip"
    log_output:              true
    remote_file:             false
  'mft1213':
    version:                 *wls_version
    fmw_product:             "mft"
    fmw_file1:               "fmw_12.1.3.0.0_mft_Disk1_1of1.zip"
    log_output:              true
    remote_file:             false
  'b2b1213':
    version:                 *wls_version
    fmw_product:             "b2b"
    healthcare:              true
    fmw_file1:               "fmw_12.1.3.0.0_b2b_Disk1_1of1.zip"
    log_output:              true
    remote_file:             false

# FMW installation on top of WebLogic 10.3.6
fmw_installations:
  'osbPS6':
    fmw_product:             "osb"
    fmw_file1:               "ofm_osb_generic_11.1.1.7.0_disk1_1of1.zip"
    log_output:              true
  'soaPS6':
    fmw_product:             "soa"
    fmw_file1:               "ofm_soa_generic_11.1.1.7.0_disk1_1of2.zip"
    fmw_file2:               "ofm_soa_generic_11.1.1.7.0_disk1_2of2.zip"
    log_output:              true


# FMW installation on top of WebLogic 12.1.2
fmw_installations:
  'webtier1212':
    version:                 1212
    fmw_product:             "web"
    fmw_file1:               "ofm_ohs_linux_12.1.2.0.0_64_disk1_1of1.zip"
    log_output:              true
    remote_file:             false

fmw_installations:
  'webTierPS6':
    fmw_product:             "web"
    fmw_file1:               "ofm_webtier_linux_11.1.1.7.0_64_disk1_1of1.zip"
    log_output:              true
    remote_file:             false

fmw_installations:
  'wcPS7':
    fmw_product:             "wc"
    fmw_file1:               "ofm_wc_generic_11.1.1.8.0_disk1_1of1.zip"
    log_output:              true
    remote_file:             false
  'soaPS6':
    fmw_product:             "soa"
    fmw_file1:               "ofm_soa_generic_11.1.1.7.0_disk1_1of2.zip"
    fmw_file2:               "ofm_soa_generic_11.1.1.7.0_disk1_2of2.zip"
    log_output:              true
    remote_file:             false
  'wccPS7':
    fmw_product:             "wcc"
    fmw_file1:               "ofm_wcc_generic_11.1.1.8.0_disk1_1of2.zip"
    fmw_file2:               "ofm_wcc_generic_11.1.1.8.0_disk1_2of2.zip"
    log_output:              true
    remote_file:             false
  'webGate11.1.2.2':
    version:                 1112
    fmw_product:             "webgate"
    fmw_file1:               "ofm_webgates_generic_11.1.2.2.0_disk1_1of1.zip"
    log_output:              true
    remote_file:             false
  'oud11.1.2.2':
    version:                 1112
    fmw_product:             "oud"
    fmw_file1:               "ofm_oud_generic_11.1.2.2.0_disk1_1of1.zip"
    log_output:              true
    remote_file:             false


# OHS standalone
fmw_installations:
  'webtier1212':
    fmw_product:             "web"
    ohs_mode:                "standalone"
    fmw_file1:               "fmw_12.2.1.0.0_ohs_linux64_Disk1_1of1.zip"
    log_output:              true
    remote_file:             false

domain

orawls::domain creates WebLogic domain like a standard | OSB or SOA Suite | ADF | WebCenter | OIM or OAM or OUD

optional override the default server arguments in the domain.py template with java_arguments parameter

orawls::domain { 'wlsDomain12c':
  version                     => 1212,  # 1036|1111|1211|1212|1213
  weblogic_home_dir           => "/opt/oracle/middleware12c/wlserver",
  middleware_home_dir         => "/opt/oracle/middleware12c",
  jdk_home_dir                => "/usr/java/jdk1.7.0_45",
  domain_template             => "standard",  #standard|adf|osb|osb_soa|osb_soa_bpm|soa|soa_bpm
  domain_name                 => "Wls12c",
  development_mode            => false,
  adminserver_name            => "AdminServer",
  adminserver_address         => "localhost",
  adminserver_port            => 7001,
  nodemanager_secure_listener => true,
  nodemanager_port            => 5556,
  java_arguments              => { "ADM" => "...", "OSB" => "...", "SOA" => "...", "BAM" => "..."},
  weblogic_user               => "weblogic",
  weblogic_password           => "weblogic1",
  os_user                     => "oracle",
  os_group                    => "dba",
  log_dir                     => "/data/logs",
  download_dir                => "/data/install",
  log_output                  => true,
}

or when you set the defaults hiera variables

orawls::domain { 'wlsDomain12c':
  domain_template            => "standard",
  domain_name                => "Wls12c",
  development_mode           => false,
  adminserver_name           => "AdminServer",
  adminserver_address        => "localhost",
  adminserver_port           => 7001,
  nodemanager_port           => 5556,
  weblogic_password          => "weblogic1",
  log_output                 => true,
}

Same configuration but then with Hiera ( need to have puppet > 3.0 )

$default = {}
$domain_instances = hiera('domain_instances', {})
create_resources('orawls::domain',$domain_instances, $default)

vagrantcentos64.example.com.yaml

---
domain_instances:
  'wlsDomain12c':
     version:                     1212
     weblogic_home_dir:           "/opt/oracle/middleware12c/wlserver"
     middleware_home_dir:         "/opt/oracle/middleware12c"
     jdk_home_dir:                "/usr/java/jdk1.7.0_45"
     domain_template:             "standard"
     domain_name:                 "Wls12c"
     development_mode:            false
     adminserver_name:            "AdminServer"
     adminserver_address:         "localhost"
     adminserver_port:            7001
     nodemanager_secure_listener: true
     nodemanager_port:            5556
     weblogic_user:               "weblogic"
     weblogic_password:           "weblogic1"
     os_user:                     "oracle"
     os_group:                    "dba"
     log_dir:                     "/data/logs"
     download_dir:                "/data/install"
     java_arguments:
        ADM:  "-XX:PermSize=256m -XX:MaxPermSize=512m -Xms1024m -Xmx1024m"
        OSB:  "-XX:PermSize=256m -XX:MaxPermSize=512m -Xms1024m -Xmx1024m"
     log_output:                  true

or when you set the defaults hiera variables

---
domain_instances:
  'wlsDomain12c':
     domain_template:      "standard"
     domain_name:          "Wls12c"
     development_mode:     false
     adminserver_name:     "AdminServer"
     adminserver_address:  "localhost"
     adminserver_port:     7001
     nodemanager_port:     5556
     weblogic_password:    "weblogic1"
     java_arguments:
        ADM:  "-XX:PermSize=256m -XX:MaxPermSize=512m -Xms1024m -Xmx1024m"
     log_output:           true

when you just have one WebLogic domain on a server

---
# when you have just one domain on a server
domain_name:                "Wls1036"
domain_adminserver:         "AdminServer"
domain_adminserver_address: "localhost"
domain_adminserver_port:    7001
domain_nodemanager_port:    5556
domain_wls_password:        "weblogic1"


# create a standard domain
domain_instances:
  'wlsDomain':
     domain_template:      "standard"
     development_mode:     false
     log_output:           *logoutput

or with custom identity and custom truststore

# used by nodemanager, control and domain creation
wls_custom_trust:                  &wls_custom_trust              true
wls_trust_keystore_file:           &wls_trust_keystore_file       '/vagrant/truststore.jks'
wls_trust_keystore_passphrase:     &wls_trust_keystore_passphrase 'welcome'

# create a standard domain with custom identity for the adminserver
domain_instances:
  'Wls1036':
    domain_template:                       "standard"
    development_mode:                      false
    log_output:                            *logoutput
    custom_identity:                       true
    custom_identity_keystore_filename:     '/vagrant/identity_admin.jks'
    custom_identity_keystore_passphrase:   'welcome'
    custom_identity_alias:                 'admin'
    custom_identity_privatekey_passphrase: 'welcome'

FMW 11g, 12.1.2 , 12.1.3 ADF domain with webtier

# create a standard domain
domain_instances:
  'adf_domain':
     domain_template:          "adf"
     development_mode:         true
     log_output:               *logoutput
     nodemanager_address:      "10.10.10.21"
     repository_database_url:  "jdbc:oracle:thin:@wlsdb.example.com:1521/wlsrepos.example.com"
     repository_prefix:        "DEV"
     repository_password:      "Welcome01"
     repository_sys_user:      "sys"
     repository_sys_password:  "Welcome01"
     rcu_database_url:         "wlsdb.example.com:1521:wlsrepos.example.com"
     webtier_enabled:          true
     create_rcu:               true

FMW 11g WebLogic SOA Suite domain

# create a standard domain
domain_instances:
  'wlsDomain':
     domain_template:          "osb_soa_bpm"
     development_mode:         false
     log_output:               *logoutput
     repository_database_url:  "jdbc:oracle:thin:@10.10.10.5:1521/test.oracle.com"
     repository_prefix:        "DEV"
     repository_password:      "Welcome01"

FMW 11g WebLogic OIM / OAM domain

domain_instances:
  'oimDomain':
    version:                  1112
    domain_template:          "oim"
    development_mode:         true
    log_output:               *logoutput
    repository_database_url:  "jdbc:oracle:thin:@oimdb.example.com:1521/oimrepos.example.com"
    repository_prefix:        "DEV"
    repository_password:      "Welcome01"
    repository_sys_user:      "sys"
    repository_sys_password:  "Welcome01"
    rcu_database_url:         "oimdb.example.com:1521/oimrepos.example.com"

FMW 12.1.3 WebLogic SOA Suite domain

# create a soa domain
domain_instances:
  'soa_domain':
    version:                  1213
    domain_template:          "osb_soa_bpm"
    bam_enabled:              true
    b2b_enabled:              true
    ess_enabled:              true
    development_mode:         true
    log_output:               *logoutput
    nodemanager_address:      "10.10.10.21"
    repository_database_url:  "jdbc:oracle:thin:@soadb.example.com:1521/soarepos.example.com"
    repository_prefix:        "DEV"
    repository_password:      "Welcome01"
    repository_sys_user:      "sys"
    repository_sys_password:  "Welcome01"
    rcu_database_url:         "soadb.example.com:1521:soarepos.example.com"

FMW 12.1.3 WebLogic OSB domain

domain_instances:
  'osb_domain':
     version:                  *wls_version
     domain_template:          "osb"
     development_mode:         true
     log_output:               *logoutput
     nodemanager_address:      *domain_adminserver_address
     repository_database_url:  "jdbc:oracle:thin:@osbdb.example.com:1521/osbrepos.example.com"
     repository_prefix:        "DEV"
     repository_password:      "Welcome01"
     repository_sys_user:      "sys"
     repository_sys_password:  "Welcome01"
     rcu_database_url:         "osbdb.example.com:1521:osbrepos.example.com"

Standalone Webtier

domain_instances:
  'Wls1221':
    domain_template:                       "ohs_standalone"
    development_mode:                      false
    ohs_standalone_listen_address:         *domain_adminserver_address
    ohs_standalone_listen_port:            8180
    ohs_standalone_ssl_listen_port:        8181
    nodemanager_password:                  *domain_wls_password
    nodemanager_username:                  *wls_weblogic_user
    log_output:                            *logoutput

nodemanager_instances:
  'nodemanager':
    ohs_standalone:                        true
    log_output:                            *logoutput
    log_file:                              'nodemanager_wls1221.log'
    nodemanager_address:                   *domain_adminserver_address
    sleep:                                 21

# startup adminserver for extra configuration
control_instances:
  'startOHS1server':
     domain_name:                 *domain_name
     server_type:                 'ohs_standalone'
     target:                      'Server'
     server:                      'ohs1'
     action:                      'start'
     log_output:                  *logoutput

packdomain

orawls::packdomain pack a WebLogic Domain and add this to the download folder

orawls::packdomain{"Wls12c":
  weblogic_home_dir      => "/opt/oracle/middleware12c/wlserver",
  middleware_home_dir    => "/opt/oracle/middleware12c",
  jdk_home_dir           => "/usr/java/jdk1.7.0_45",
  wls_domains_dir        => "/opt/oracle/domains",
  domain_name            => "Wls12c",
  os_user                => "oracle",
  os_group               => "dba",
  download_dir           => "/data/install",
}

or with hiera

$default_params = {}
$pack_domain_instances = hiera('pack_domain_instances', {})
create_resources('orawls::packdomain',$pack_domain_instances, $default_params)

# pack domains
pack_domain_instances:
  'wlsDomain':
     log_output:               *logoutput

copydomain

orawls::copydomain copies a WebLogic domain with SSH or from a share, unpack and enroll to a nodemanager

When using ssh (use_ssh = true) you need to setup ssh so you won't need to provide a password

orawls::copydomain{"Wls12c":
  version                => 1212,
  weblogic_home_dir      => "/opt/oracle/middleware12c/wlserver",
  middleware_home_dir    => "/opt/oracle/middleware12c",
  jdk_home_dir           => "/usr/java/jdk1.7.0_45",
  wls_domains_dir        => "/opt/oracle/domains",
  wls_apps_dir           => "/opt/oracle/applications",
  domain_name            => "Wls12c",
  os_user                => "oracle",
  os_group               => "dba",
  download_dir           => "/data/install",
  log_dir                => "/var/log/weblogic",
  log_output             => true,
  use_ssh                => false,
  domain_pack_dir        => /mnt/fmw_share,
  adminserver_address    => "10.10.10.10",
  adminserver_port       => 7001,
  weblogic_user          => "weblogic",
  weblogic_password      => "weblogic1",
  server_start_mode      => 'dev',
}

Configuration with Hiera ( need to have puppet > 3.0 )

$default_params = {}
$copy_instances = hiera('copy_instances', {})
create_resources('orawls::copydomain',$copy_instances, $default_params)

when you just have one WebLogic domain on a server

---
# when you have just one domain on a server
domain_name:                "Wls1036"
domain_adminserver:         "AdminServer"
domain_adminserver_address: "localhost"
domain_adminserver_port:    7001
domain_nodemanager_port:    5556
domain_wls_password:        "weblogic1"

# copy domains to other nodes
copy_instances:
  'wlsDomain':
     use_ssh:                 false
     domain_pack_dir:         /mnt/fmw_share
     log_output:              *logoutput
  'wlsDomain2':
     log_output:              *logoutput

for t3s you can use this

copy_instances:
  'wlsDomain':
     log_output:               true
     use_t3s:                  true
     jsse_enabled              true
     custom_trust              true
     trust_keystore_file       '/vagrant/truststore.jks'
     trust_keystore_passphrase 'welcome'

nodemanager

orawls::nodemanager start the nodemanager of a WebLogic Domain or Middleware Home

orawls::nodemanager{'nodemanager12c':
  version                     => 1212, # 1036|1111|1211|1212
  weblogic_home_dir           => "/opt/oracle/middleware12c/wlserver",
  jdk_home_dir                => "/usr/java/jdk1.7.0_45",
  nodemanager_port            => 5556,
  nodemanager_secure_listener => true,
  domain_name                 => "Wls12c",
  os_user                     => "oracle",
  os_group                    => "dba",
  log_dir                     => "/data/logs",
  download_dir                => "/data/install",
  log_output                  => true,
  sleep                       => 20,
  properties                  => {},
}

or when you set the defaults hiera variables

orawls::nodemanager{'nodemanager12c':
  nodemanager_port           => 5556,
  domain_name                => "Wls12c",
  log_output                 => true,
}

Same configuration but then with Hiera ( need to have puppet > 3.0 )

$default = {}
$nodemanager_instances = hiera('nodemanager_instances', [])
create_resources('orawls::nodemanager',$nodemanager_instances, $default)

vagrantcentos64.example.com.yaml

---
nodemanager_instances:
  'nodemanager12c':
     version:                     1212
     weblogic_home_dir:           "/opt/oracle/middleware12c/wlserver"
     jdk_home_dir:                "/usr/java/jdk1.7.0_45"
     nodemanager_port:            5556
     nodemanager_secure_listener: true
     domain_name:                 "Wls12c"
     os_user:                     "oracle"
     os_group:                    "dba"
     log_dir:                     "/data/logs"
     download_dir:                "/data/install"
     log_output:                  true

or when you set the defaults hiera variables

---
nodemanager_instances:
  'nodemanager12c':
     nodemanager_port:     5556
     domain_name:          "Wls12c"
     log_output:           true

when you just have one WebLogic domain on a server

#when you just have one domain on a server
domain_name:                "Wls1036"
domain_nodemanager_port:    5556

---
nodemanager_instances:
  'nodemanager12c':
     log_output:           true

or with custom identity and custom truststore

# used by nodemanager, control and domain creation
wls_custom_trust:                  &wls_custom_trust              true
wls_trust_keystore_file:           &wls_trust_keystore_file       '/vagrant/truststore.jks'
wls_trust_keystore_passphrase:     &wls_trust_keystore_passphrase 'welcome'

nodemanager_instances:
  'nodemanager':
    log_output:                            *logoutput
    custom_identity:                       true
    custom_identity_keystore_filename:     '/vagrant/identity_admin.jks'
    custom_identity_keystore_passphrase:   'welcome'
    custom_identity_alias:                 'admin'
    custom_identity_privatekey_passphrase: 'welcome'
    nodemanager_address:                   *domain_adminserver_address

you can also set some extra nodemanager properties by using the properties parameter like this

nodemanager_instances:
  'nodemanager12c':
     version:                     1212
     weblogic_home_dir:           "/opt/oracle/middleware12c/wlserver"
     jdk_home_dir:                "/usr/java/jdk1.7.0_45"
     nodemanager_port:            5556
     nodemanager_secure_listener: true
     domain_name:                 "Wls12c"
     os_user:                     "oracle"
     os_group:                    "dba"
     log_dir:                     "/data/logs"
     download_dir:                "/data/install"
     log_output:                  true
     properties:
      'log_level':                'INFO'
      'log_count':                '2'
      'log_append':               true
      'log_formatter':            'weblogic.nodemanager.server.LogFormatter'
      'listen_backlog':           60

here is an overview of all the parameters you can set with its defaults

'log_limit'                          => 0,
'domains_dir_remote_sharing_enabled' => false,
'authentication_enabled'             => true,
'log_level'                          => 'INFO',
'domains_file_enabled'               => true,
'start_script_name'                  => 'startWebLogic.sh',
'native_version_enabled'             => true,
'log_to_stderr'                      => true,
'log_count'                          => '1',
'domain_registration_enabled'        => false,
'stop_script_enabled'                => true,
'quit_enabled'                       => false,
'log_append'                         => true,
'state_check_interval'               => 500,
'crash_recovery_enabled'             => true,
'start_script_enabled'               => true,
'log_formatter'                      => 'weblogic.nodemanager.server.LogFormatter',
'listen_backlog'                     => 50,

control

orawls::control start or stops the AdminServer,Managed Server, OHS Standalone Server or a Cluster of a WebLogic Domain, this will call the wls_managedserver, wls_adminserver and wls_ohsserver types

orawls::control{'startWLSAdminServer12c':
  domain_name                 => "Wls12c",
  server_type                 => 'admin',  # admin|managed
  target                      => 'Server', # Server|Cluster
  server                      => 'AdminServer',
  action                      => 'start',
  weblogic_home_dir           => "/opt/oracle/middleware12c/wlserver",
  jdk_home_dir                => "/usr/java/jdk1.7.0_45",
  weblogic_user               => "weblogic",
  weblogic_password           => "weblogic1",
  adminserver_address         => 'localhost',
  adminserver_port            => 7001,
  nodemanager_port            => 5556,
  nodemanager_secure_listener => true,
  os_user                     => "oracle",
  os_group                    => "dba",
  download_dir                => "/data/install",
  log_output                  => true,
}

or when you set the defaults hiera variables

orawls::control{'startWLSAdminServer12c':
  domain_name                => "Wls12c",
  server_type                => 'admin',  # admin|managed
  target                     => 'Server', # Server|Cluster
  server                     => 'AdminServer',
  action                     => 'start',
  weblogic_password          => "weblogic1",
  adminserver_address        => 'localhost',
  adminserver_port           => 7001,
  nodemanager_port           => 5556,
  log_output                 => true,
 }

Same configuration but then with Hiera ( need to have puppet > 3.0 )

$default = {}
$control_instances = hiera('control_instances', {})
create_resources('orawls::control',$control_instances, $default)

vagrantcentos64.example.com.yaml

---
control_instances:
  'startWLSAdminServer12c':
     domain_name:                  "Wls12c"
     domain_dir:                   "/opt/oracle/middleware12c/user_projects/domains/Wls12c"
     server_type:                  'admin'
     target:                       'Server'
     server:                       'AdminServer'
     action:                       'start'
     weblogic_home_dir:            "/opt/oracle/middleware12c/wlserver"
     jdk_home_dir:                 "/usr/java/jdk1.7.0_45"
     weblogic_user:                "weblogic"
     weblogic_password:            "weblogic1"
     adminserver_address:          'localhost'
     adminserver_port:             7001
     nodemanager_port:             5556
     nodemanager_secure_listener:  true
     os_user:                      "oracle"
     os_group:                     "dba"
     download_dir:                 "/data/install"
     log_output:                   true

or when you set the defaults hiera variables

---
control_instances:
  'startWLSAdminServer12c':
     domain_name:          "Wls12c"
     domain_dir:           "/opt/oracle/middleware12c/user_projects/domains/Wls12c"
     server_type:          'admin'
     target:               'Server'
     server:               'AdminServer'
     action:               'start'
     weblogic_password:    "weblogic1"
     adminserver_address:  'localhost'
     adminserver_port:     7001
     nodemanager_port:     5556
     log_output:           true

when you just have one WebLogic domain on a server

---
#when you just have one domain on a server
domain_name:                "Wls1036"
domain_adminserver_address: "localhost"
domain_adminserver_port:    7001
domain_nodemanager_port:    5556
domain_wls_password:        "weblogic1"



# startup adminserver for extra configuration
control_instances:
  'startWLSAdminServer':
     domain_dir:           "/opt/oracle/middleware11g/user_projects/domains/Wls1036"
     server_type:          'admin'
     target:               'Server'
     server:               'AdminServer'
     action:               'start'
     log_output:           *logoutput

urandomfix

orawls::urandomfix Linux low on entropy or urandom fix can cause certain operations to be very slow. Encryption operations need entropy to ensure randomness. Entropy is generated by the OS when you use the keyboard, the mouse or the disk.

If an encryption operation is missing entropy it will wait until enough is generated.

three options

  • use rngd service (use this wls::urandomfix class)
  • set java.security in JDK ( jre/lib/security in my jdk7 module )
  • set -Djava.security.egd=file:/dev/./urandom param

storeuserconfig

orawls::storeuserconfig Creates WLST user config for WLST , this way you don't need to know the weblogic password. when you set the defaults hiera variables

orawls::storeuserconfig{'Wls12c':
  domain_name                => "Wls12c",
  adminserver_address        => "localhost",
  adminserver_port           => 7001,
  weblogic_password          => "weblogic1",
  user_config_dir            => '/home/oracle',
  log_output                 => false,
}

Same configuration but then with Hiera ( need to have puppet > 3.0 )

notify { 'class userconfig':}
$default_params = {}
$userconfig_instances = hiera('userconfig_instances', {})
create_resources('orawls::storeuserconfig',$userconfig_instances, $default_params)

vagrantcentos64.example.com.yaml or when you set the defaults hiera variables

---
userconfig_instances:
  'Wls12c':
     domain_name:          "Wls12c"
     adminserver_address:  "localhost"
     adminserver_port:     7001
     weblogic_password:    "weblogic1"
     log_output:           true
     user_config_dir:      '/home/oracle'

when you just have one WebLogic domain on a server

#when you just have one domain on a server
domain_name:                "Wls1036"
domain_adminserver_address: "localhost"
domain_adminserver_port:    7001
domain_wls_password:        "weblogic1"

---
userconfig_instances:
  'Wls12c':
     log_output:           true
     user_config_dir:      '/home/oracle'

Dynamictargetting

Sometimes you do not know how many managed services you will have, due to application scaling or other use cases. Since you do specify resources like clusters and datasources in a more 'static' way, there should be a way to qualify a managed server as a target for such resources.

We use the notes field in WebLogic Server to accomplish this. Currently implemented for the following resource types:

  • wls_cluster
  • wls_datasource
  • wls_mail_session

The way you use this, is by entering the resource name in the server_parameter field on the wls_server type, and put the servers field to 'inherited' on the resource to be targeted.

Example:

wls_server { 'wlsServer1':
  ensure                            => 'present',
  arguments                         => '-XX:PermSize=256m -XX:MaxPermSize=256m -Xms752m -Xmx752m -Dweblogic.Stdout=/var/log/weblogic/wlsServer1.out -Dweblogic.Stderr=/var/log/weblogic/wlsServer1_err.out',
  jsseenabled                       => '0',
  listenaddress                     => '10.10.10.100',
  listenport                        => '8001',
  listenportenabled                 => '1',
  machine                           => 'Node1',
  sslenabled                        => '0',
  tunnelingenabled                  => '0',
  max_message_size                  => '10000000',
  server_parameter                  => 'WebCluster, hrDs',
}

wls_cluster { 'WebCluster':
  ensure           => 'present',
  messagingmode    => 'unicast',
  migrationbasis   => 'consensus',
  servers          => ['inherited'],
  multicastaddress => '239.192.0.0',
  multicastport    => '7001',
}

wls_datasource { 'hrDS':
  ensure                           => 'present',
  connectioncreationretryfrequency => '0',
  drivername                       => 'oracle.jdbc.xa.client.OracleXADataSource',
  extraproperties                  => ['SendStreamAsBlob=true', 'oracle.net.CONNECT_TIMEOUT=10001'],
  fanenabled                       => '0',
  globaltransactionsprotocol       => 'TwoPhaseCommit',
  initialcapacity                  => '2',
  initsql                          => 'None',
  jndinames                        => ['jdbc/hrDS', 'jdbc/hrDS2'],
  maxcapacity                      => '15',
  mincapacity                      => '1',
  rowprefetchenabled               => '0',
  rowprefetchsize                  => '48',
  secondstotrustidlepoolconnection => '10',
  statementcachesize               => '10',
  target                           => ['inherited'],
  targettype                       => ['inherited'],
  testconnectionsonreserve         => '0',
  testfrequency                    => '120',
  testtablename                    => 'SQL SELECT 1 FROM DUAL',
  url                              => 'jdbc:oracle:thin:@dbagent2.alfa.local:1521/test.oracle.com',
  user                             => 'hr',
  usexa                            => '0',
}

In the case of the wls_datasource type, the jdbc connection will be targetted on the cluster if the managed server is in a cluster.

Configure Oracle HTTP Server

You can configure OHS locations using orawls::ohs::forwarder resource:

orawls::ohs::forwarder { '/console':
  servers     => ['192.168.1.1:7000'],
  owner       => 'oracle',
  group       => 'oracle',
  domain_path => '/opt/test/wls/domains/domain1',
  require     => Orawls::Control["start ohs ${domain_name}"],
  notify      => Wls_ohsserver["reload ohs ${domain_name}"],
}

Notify option is needed to OHS restart and load changes. Require is needed because, without it, notify option may attempt to reload server before it's running.

OHS will include all .conf files at ${domain_path}/config/fmwconfig/components/OHS/${server_name}/mod_wl_ohs.d folder.

This resource has been tested only with OHS 12.1.2 Standalone.

fmwlogdir

orawls::fmwlogdir Change a log folder location of a FMW server when you set the defaults hiera variables

orawls::fmwlogdir{'AdminServer':
  middleware_home_dir    => "/opt/oracle/middleware11gR1",
  weblogic_user          => "weblogic",
  weblogic_password      => "weblogic1",
  os_user                => "oracle",
  os_group               => "dba",
  download_dir           => "/data/install"
  log_dir                => "/var/log/weblogic"
  adminserver_address    => "localhost",
  adminserver_port       => 7001,
  server                 => "AdminServer",
  log_output             => false,
}

Same configuration but then with Hiera ( need to have puppet > 3.0 )

$default_params = {}
$fmwlogdir_instances = hiera('fmwlogdir_instances', {})
create_resources('orawls::fmwlogdir',$fmwlogdir_instances, $default_params)

vagrantcentos64.example.com.yaml or when you set the defaults hiera variables

---
fmwlogdir_instances:
  'AdminServer':
     log_output:      true
     server:          'AdminServer'

resourceadapter

orawls::resourceadapter Add a Resource adapter plan for File, FTP, AQ, MQ, DB or JMS with some entries when you set the defaults hiera variables

$default_params = {}
$resource_adapter_instances = hiera('resource_adapter_instances', {})
create_resources('orawls::resourceadapter',$resource_adapter_instances, $default_params)

vagrantcentos64.example.com.yaml or when you set the defaults hiera variables

resource_adapter_instances:
  'JmsAdapter_hr':
    adapter_name:              'JmsAdapter'
    adapter_path:              "/opt/oracle/middleware11g/Oracle_SOA1/soa/connectors/JmsAdapter.rar"
    adapter_plan_dir:          "/opt/oracle/wlsdomains"
    adapter_plan:              'Plan_JMS.xml'
    adapter_entry:             'eis/JMS/cf'
    adapter_entry_property:    'ConnectionFactoryLocation'
    adapter_entry_value:       'jms/cf'
  'AqAdapter_hr':
    adapter_name:              'AqAdapter'
    adapter_path:              "/opt/oracle/middleware11g/Oracle_SOA1/soa/connectors/AqAdapter.rar"
    adapter_plan_dir:          "/opt/oracle/wlsdomains"
    adapter_plan:              'Plan_AQ.xml'
    adapter_entry:             'eis/AQ/hr'
    adapter_entry_property:    'xADataSourceName'
    adapter_entry_value:       'jdbc/hrDS'
  'DbAdapter_hr':
    adapter_name:              'DbAdapter'
    adapter_path:              "/opt/oracle/middleware11g/Oracle_SOA1/soa/connectors/DbAdapter.rar"
    adapter_plan_dir:          "/opt/oracle/wlsdomains"
    adapter_plan:              'Plan_DB.xml'
    adapter_entry:             'eis/DB/hr'
    adapter_entry_property:    'xADataSourceName'
    adapter_entry_value:       'jdbc/hrDS'
  'FTPAdapter_hr':
    adapter_name:              'FtpAdapter'
    adapter_path:              "/opt/oracle/middleware11g/Oracle_SOA1/soa/connectors/FtpAdapter.rar"
    adapter_plan_dir:          "/opt/oracle/wlsdomains"
    adapter_plan:              'Plan_FTP.xml'
    adapter_entry:             'eis/FTP/xx'
    adapter_entry_property:    'FtpAbsolutePathBegin;FtpPathSeparator;Host;ListParserKey;Password;ServerType;UseFtps;Username;UseSftp'
    adapter_entry_value:       '/BDDC;/;l2-ibrfongen02.nl.rsg;UNIX;;unix;false;kim;false'
  'FileAdapter_hr':
    adapter_name:              'FileAdapter'
    adapter_path:              "/opt/oracle/middleware11g/Oracle_SOA1/soa/connectors/FileAdapter.rar"
    adapter_plan_dir:          "/opt/oracle/wlsdomains"
    adapter_plan:              'Plan_FILE.xml'
    adapter_entry:             'eis/FileAdapterXX'
    adapter_entry_property:    'ControlDir;IsTransacted'
    adapter_entry_value:       '/tmp/aaa;false'

or for 12.1.3 ( 12c )

resource_adapter_instances:
  'JmsAdapter_hr':
    adapter_name:              'JmsAdapter'
    adapter_path:              "/oracle/product/12.1/middleware/soa/soa/connectors/JmsAdapter.rar"
    adapter_plan_dir:          "/oracle/product/12.1/middleware"
    adapter_plan:              'Plan_JMS.xml'
    adapter_entry:             'eis/JMS/cf'
    adapter_entry_property:    'ConnectionFactoryLocation'
    adapter_entry_value:       'jms/cf'
  'AqAdapter_hr':
    adapter_name:              'AqAdapter'
    adapter_path:              "/oracle/product/12.1/middleware/soa/soa/connectors/AqAdapter.rar"
    adapter_plan_dir:          "/oracle/product/12.1/middleware"
    adapter_plan:              'Plan_AQ.xml'
    adapter_entry:             'eis/AQ/hr'
    adapter_entry_property:    'XADataSourceName'
    adapter_entry_value:       'jdbc/hrDS'
  'DbAdapter_hr':
    adapter_name:              'DbAdapter'
    adapter_path:              "/oracle/product/12.1/middleware/soa/soa/connectors/DbAdapter.rar"
    adapter_plan_dir:          "/oracle/product/12.1/middleware"
    adapter_plan:              'Plan_DB.xml'
    adapter_entry:             'eis/DB/hr'
    adapter_entry_property:    'XADataSourceName'
    adapter_entry_value:       'jdbc/hrDS'
  'FTPAdapter_hr':
    adapter_name:              'FtpAdapter'
    adapter_path:              "/oracle/product/12.1/middleware/soa/soa/connectors/FtpAdapter.rar"
    adapter_plan_dir:          "/oracle/product/12.1/middleware"
    adapter_plan:              'Plan_FTP.xml'
    adapter_entry:             'eis/FTP/xx'
    adapter_entry_property:    'FtpAbsolutePathBegin;FtpPathSeparator;Host;ListParserKey;Password;ServerType;UseFtps;Username;UseSftp'
    adapter_entry_value:       '/BDDC;/;l2-ibrfongen02.nl.rsg;UNIX;;unix;false;kim;false'
  'FileAdapter_hr':
    adapter_name:              'FileAdapter'
    adapter_path:              "/oracle/product/12.1/middleware/soa/soa/connectors/FileAdapter.rar"
    adapter_plan_dir:          "/oracle/product/12.1/middleware"
    adapter_plan:              'Plan_FILE.xml'
    adapter_entry:             'eis/FileAdapterXX'
    adapter_entry_property:    'ControlDir;IsTransacted'
    adapter_entry_value:       '/tmp/aaa;false'

fmwcluster

orawls::utils::fmwcluster convert existing cluster to a OSB or SOA suite cluster (BPM is optional) and also convert BAM to a BAM cluster. This will also work for OIM / OAM cluster. The security store is migrated to a database store during this conversion. To maintain a file based store set a standalone hiera param "retain_security_file_store" to true.

You first need to create some OSB, SOA or BAM clusters and add some managed servers to these clusters for OSB 11g or SOA Suite 11g managed servers make sure to also set the coherence arguments parameters

$default_params = {}
$fmw_cluster_instances = hiera('fmw_cluster_instances', $default_params)
create_resources('orawls::utils::fmwcluster',$fmw_cluster_instances, $default_params)

hiera configuration

# FMW 11g cluster
fmw_cluster_instances:
  'soaCluster':
     domain_name:          "soa_domain"
     soa_cluster_name:     "SoaCluster"
     bam_cluster_name:     "BamCluster"
     osb_cluster_name:     "OsbCluster"
     log_output:           *logoutput
     bpm_enabled:          true
     bam_enabled:          true
     soa_enabled:          true
     osb_enabled:          true
     repository_prefix:    "DEV"

# FMW 12.1.3 cluster
fmw_cluster_instances:
  'soaCluster':
    domain_name:          "soa_domain"
    soa_cluster_name:     "SoaCluster"
    bam_cluster_name:     "BamCluster"
    osb_cluster_name:     "OsbCluster"
    ess_cluster_name:     "EssCluster" # optional else ESS will be added to the soa cluster
    log_output:           *logoutput
    bpm_enabled:          true
    bam_enabled:          true
    soa_enabled:          true
    osb_enabled:          true
    b2b_enabled:          true
    ess_enabled:          true
    repository_prefix:    "DEV"

# OIM 11.1.2.3 cluster
fmw_cluster_instances:
  'oimCluster':
    domain_name:          *domain_name
    soa_cluster_name:     "SoaCluster"
    oim_cluster_name:     "OimCluster"
    oam_cluster_name:     "OamCluster"
    bi_cluster_name:      "BiCluster"
    log_output:           *logoutput
    soa_enabled:          true
    oim_enabled:          true
    oam_enabled:          true
    bi_enabled:           true
    repository_prefix:    *rcu_prefix

fmwclusterjrf

orawls::utils::fmwclusterjrf convert existing cluster to a ADF/JRF cluster you need to create a wls cluster with some managed servers first

$default_params = {}
$fmw_jrf_cluster_instances = hiera('fmw_jrf_cluster_instances', $default_params)
create_resources('orawls::utils::fmwclusterjrf',$fmw_jrf_cluster_instances, $default_params)

hiera configuration

fmw_jrf_cluster_instances:
  'WebCluster':
     domain_name:          "adf_domain"
     jrf_target_name:      "WebCluster"
     opss_datasource_name: "opss-data-source" #optional
     log_output:           *logoutput

webtier

orawls::utils::webtier add an OHS instance to a WebLogic Domain and in the Enterprise Manager, optional with OHS OAM Webgate

$default_params = {}
$webtier_instances = hiera('webtier_instances', {})
create_resources('orawls::utils::webtier',$webtier_instances, $default_params)

hiera configuration

# 11g
webtier_instances:
  'ohs1':
    action_name:           'create'
    instance_name:         'ohs1'
    webgate_configure:     true
    log_output:            *logoutput

# 12.1.2
  webtier_instances:
    'ohs1':
      action_name:           'create'
      instance_name:         'ohs1'
      machine_name:          'Node1'

Webtier for OAM

webtier_instances:
  'ohs1':
    action_name:            'create'
    instance_name:          'ohs1'
    webgate_configure:      true
    webgate_agentname:      'ohs1'
    webgate_hostidentifier: 'host1'
    oamadminserverhostname: 'oim1admin.example.com'
    oamadminserverport:     '7001'
    log_output:             *logoutput

oimconfig

orawls::utils::oimconfig Configure OIM , oim server, design or remote configuration

$default_params = {}
$oimconfig_instances = hiera('oimconfig_instances', $default_params)
create_resources('orawls::utils::oimconfig',$oimconfig_instances, $default_params)

oimconfig_instances:
  'oimDomain':
    version:                    1112
    oim_home:                   '/opt/oracle/middleware11g/Oracle_IDM1'
    server_config:              true
    oim_password:               'Welcome01'
    bi_cluster_name:            'BiCluster'
    bi_enabled:                 true
    remote_config:              false
    keystore_password:          'Welcome01'
    design_config:              false
    oimserver_hostname:         'oim1admin.example.com'
    oimserver_port:             '14000'
    soaserver_name:             'SoaServer1'
    oimserver_name:             'OimServer1'
    repository_database_url:    "oimdb.example.com:1521:oimrepos.example.com"
    repository_prefix:          *rcu_prefix
    repository_password:        "Welcome01"

instance

orawls::oud::instance Configure OUD (Oracle Unified Directory) ldap instance

$default_params = {}
$oudconfig_instances = hiera('oudconfig_instances', $default_params)
create_resources('orawls::oud::instance',$oudconfig_instances, $default_params)

oudconfig_instances:
  'instance1':
    version:                    1112
    oud_home:                   '/opt/oracle/middleware11g/Oracle_OUD1'
    oud_instance_name:          'instance1'
    oud_root_user_password:     'Welcome01'
    oud_baseDN:                 'dc=example,dc=com'
    oud_ldapPort:               1389
    oud_adminConnectorPort:     4444
    oud_ldapsPort:              1636
    log_output:                 *logoutput
  'instance2':
    version:                    1112
    oud_home:                   '/opt/oracle/middleware11g/Oracle_OUD1'
    oud_instance_name:          'instance2'
    oud_root_user_password:     'Welcome01'
    oud_baseDN:                 'dc=example,dc=com'
    oud_ldapPort:               2389
    oud_adminConnectorPort:     5555
    oud_ldapsPort:              2636
    log_output:                 *logoutput

oud_control

orawls::oud::control Stop or start an OUD (Oracle Unified Directory) ldap instance

$default_params = {}
$oud_control_instances = hiera('oud_control_instances', $default_params)
create_resources('orawls::oud::control',$oud_control_instances, $default_params)

oud_control_instances:
  'instance1':
    oud_instances_home_dir:     '/opt/oracle/oud_instances'
    oud_instance_name:          'instance1'
    action:                     'start'
    log_output:                 *logoutput

Types and providers

All wls types needs a wls_setting definition, this is a pointer to an WebLogic AdminServer and you need to create one for every WebLogic domain. When you don't provide a wls_setting identifier in the title of the weblogic type then it will use default as identifier.

Global timeout parameter for WebLogic resource types. use timeout and value in seconds, default = 120 seconds or 2 minutes

###wls_setting

required for all the weblogic type/providers, this is a pointer to an WebLogic AdminServer.

wls_setting { 'default':
  user                         => 'oracle',
  weblogic_home_dir            => '/opt/oracle/middleware11g/wlserver_10.3',
  connect_url                  => "t3://localhost:7001",
  weblogic_user                => 'weblogic',
  weblogic_password            => 'weblogic1',
  use_default_value_when_empty => true
}

wls_setting { 'domain2':
  user                         => 'oracle',
  weblogic_home_dir            => '/opt/oracle/middleware11g/wlserver_10.3',
  connect_url                  => "t3://localhost:7011",
  weblogic_user                => 'weblogic',
  weblogic_password            => 'weblogic1',
  post_classpath               => '/opt/oracle/wlsdomains/domains/Wls1036/lib/aa.jar',
  use_default_value_when_empty => false
}

use_default_value_when_empty = true when you want to make sure the wls type properties will set its default mbean values when it is not provided by your puppet configuration. So when you set a wls type properties and remove it again it will set it back to its original value ( off course only when it has one)

saving the WLST scripts of all the wls types to a temporary folder

archive_path has /tmp/orawls-archive as default folder

wls_setting { 'default':
  debug_module              => 'true',
  archive_path              => '/var/tmp/install/default_domain',
  connect_url               => 't3s://10.10.10.10:7002',
  custom_trust              => 'true',
  trust_keystore_file       => '/vagrant/truststore.jks',
  trust_keystore_passphrase => 'welcome',
  user                      => 'oracle',
  weblogic_home_dir         => '/opt/oracle/middleware12c/wlserver',
  weblogic_password         => 'weblogic1',
  weblogic_user             => 'weblogic',
}
wls_setting { 'plain':
  debug_module      => 'false',
  archive_path      => '/tmp/orawls-archive',
  connect_url       => 't3://10.10.10.10:7101',
  custom_trust      => 'false',
  user              => 'oracle',
  weblogic_home_dir => '/opt/oracle/middleware12c/wlserver',
  weblogic_password => 'weblogic1',
  weblogic_user     => 'weblogic',
}

or in hiera

# and for with weblogic infra 12.2.1, use this post_classpath
wls_setting_instances:
  'default':
    user:               'oracle'
    weblogic_home_dir:  '/opt/oracle/middleware12c/wlserver'
    connect_url:        "t3://10.10.10.21:7001"
    weblogic_user:      'weblogic'
    weblogic_password:  'weblogic1'
    post_classpath:     '/opt/oracle/middleware12c/oracle_common/modules/internal/features/jrf_wlsFmw_oracle.jrf.wlst.jar'
    extra_arguments:    '-Daa=1 -Dbb=2'


# and for with weblogic infra 12.1.3, use this post_classpath
wls_setting_instances:
  'default':
    user:               'oracle'
    weblogic_home_dir:  '/opt/oracle/middleware12c/wlserver'
    connect_url:        "t3://10.10.10.21:7001"
    weblogic_user:      'weblogic'
    weblogic_password:  'weblogic1'
    post_classpath:     '/opt/oracle/middleware12c/oracle_common/modules/internal/features/jrf_wlsFmw_oracle.jrf.wlst_12.1.3.jar'
    extra_arguments:    '-Daa=1 -Dbb=2'

wls_setting_instances:
  'default':
    user:                      *wls_os_user
    weblogic_home_dir:         *wls_weblogic_home_dir
    connect_url:               "t3s://%{hiera('domain_adminserver_address')}:7002"
    weblogic_user:             *wls_weblogic_user
    weblogic_password:         *domain_wls_password
    custom_trust:              *wls_custom_trust
    trust_keystore_file:       *wls_trust_keystore_file
    trust_keystore_passphrase: *wls_trust_keystore_passphrase
    require:                   Orawls::Domain[Wls1213]
    debug_module:              true
    archive_path:              '/var/tmp/install/default_domain'
  'plain':
    user:                      *wls_os_user
    weblogic_home_dir:         *wls_weblogic_home_dir
    connect_url:               "t3://%{hiera('domain_adminserver_address')}:7101"
    weblogic_user:             *wls_weblogic_user
    weblogic_password:         *domain_wls_password
    require:                   Orawls::Domain[plain_Wls]
    debug_module:              false

With t3s and custom trust

wls_setting_instances:
  'default':
    user:                      oracle'
    weblogic_home_dir:         '/opt/oracle/middleware12c/wlserver'
    connect_url:               "t3s://10.10.10.21:7002"
    weblogic_user:             'weblogic'
    weblogic_password:         'weblogic1'
    custom_trust:              true
    trust_keystore_file:       '/vagrant/truststore.jks'
    trust_keystore_passphrase: 'welcome'
  'plain':
    user:                      oracle'
    weblogic_home_dir:         '/opt/oracle/middleware12c/wlserver'
    connect_url:               "t3://10.10.10.21:7101"
    weblogic_user:             'weblogic'
    weblogic_password:         'weblogic1'

wls_domain

it needs wls_setting and when identifier is not provided it will use the 'default'. Probably after changing the domain you need to restart the AdminServer or subscribe for a restart to this change with the wls_adminserver type

or use puppet resource wls_domain

# In this case it will use default as wls_setting identifier
wls_domain { 'Wls1036':
  ensure                                            => 'present',
  jmx_platform_mbean_server_enabled                 => '1',
  jmx_platform_mbean_server_used                    => '1',
  jpa_default_provider                              => 'org.eclipse.persistence.jpa.PersistenceProvider',
  jta_max_transactions                              => '20000',
  jta_transaction_timeout                           => '35',
  log_file_min_size                                 => '5000',
  log_filecount                                     => '10',
  log_filename                                      => '/var/log/weblogic/Wls1036.log',
  log_number_of_files_limited                       => '1',
  log_rotate_logon_startup                          => '1',
  log_rotationtype                                  => 'bySize',
  security_crossdomain                              => '0',
  web_app_container_show_archived_real_path_enabled => '1',
}

wls_domain { 'Wls11gSetting/Wls11g':
  ensure                                            => 'present',
  jmx_platform_mbean_server_enabled                 => '0',
  jmx_platform_mbean_server_used                    => '1',
  jpa_default_provider                              => 'org.apache.openjpa.persistence.PersistenceProviderImpl',
  jta_max_transactions                              => '10000',
  jta_transaction_timeout                           => '30',
  log_file_min_size                                 => '5000',
  log_filecount                                     => '5',
  log_filename                                      => '/var/log/weblogic/Wls11g.log',
  log_number_of_files_limited                       => '0',
  log_rotate_logon_startup                          => '0',
  log_rotationtype                                  => 'byTime',
  security_crossdomain                              => '1',
  web_app_container_show_archived_real_path_enabled => '0',
}

in hiera

require userconfig
$default_params = {}
$wls_domain_instances = hiera('wls_domain_instances', {})
create_resources('wls_domain',$wls_domain_instances, $default_params)

# 'Wls1036' will use default as wls_setting identifier
# 'Wls11g' will use domain2 as wls_setting identifier
wls_domain_instances:
  'Wls1036':
    ensure:                      'present'
    jpa_default_provider:        'org.eclipse.persistence.jpa.PersistenceProvider'
    jta_max_transactions:        '20000'
    jta_transaction_timeout:     '35'
    log_file_min_size:           '5000'
    log_filecount:               '5'
    log_filename:                '/var/log/weblogic/Wls1036.log'
    log_number_of_files_limited: '1'
    log_rotate_logon_startup:    '1'
    log_rotationtype:            'bySize'
    security_crossdomain:        '0'
  'domain2/Wls11g':
    ensure:                      'present'
    jpa_default_provider:        'org.apache.openjpa.persistence.PersistenceProviderImpl'
    jta_max_transactions:        '10000'
    jta_transaction_timeout:     '30'
    log_file_min_size:           '5000'
    log_filecount:               '10'
    log_filename:                '/var/log/weblogic/Wls11g.log'
    log_number_of_files_limited: '0'
    log_rotate_logon_startup:    '0'
    log_rotationtype:            'byTime'
    security_crossdomain:        '1'

wls_adminserver

type for adminserver control like start, running, abort and stop. also supports subscribe with refreshonly

# for this type you won't need a wls_setting identifier
wls_adminserver{'AdminServer_Wls1036:':
  ensure                    => 'running',   #running|start|abort|stop
  server_name               => hiera('domain_adminserver'),
  domain_name               => hiera('domain_name'),
  domain_path               => "/opt/oracle/wlsdomains/domains/Wls1036",
  os_user                   => hiera('wls_os_user'),
  weblogic_home_dir         => hiera('wls_weblogic_home_dir'),
  weblogic_user             => hiera('wls_weblogic_user'),
  weblogic_password         => hiera('domain_wls_password'),
  jdk_home_dir              => hiera('wls_jdk_home_dir'),
  nodemanager_address       => hiera('domain_adminserver_address'),
  nodemanager_port          => hiera('domain_nodemanager_port'),
  jsse_enabled              => false,
  custom_trust              => false,
}

with JSSE and custom trust

# for this type you won't need a wls_setting identifier
wls_adminserver{'AdminServer_Wls1036:':
  ensure                    => 'running',   #running|start|abort|stop
  server_name               => hiera('domain_adminserver'),
  domain_name               => hiera('domain_name'),
  domain_path               => "/opt/oracle/wlsdomains/domains/Wls1036",
  os_user                   => hiera('wls_os_user'),
  weblogic_home_dir         => hiera('wls_weblogic_home_dir'),
  weblogic_user             => hiera('wls_weblogic_user'),
  weblogic_password         => hiera('domain_wls_password'),
  jdk_home_dir              => hiera('wls_jdk_home_dir'),
  nodemanager_address       => hiera('domain_adminserver_address'),
  nodemanager_port          => hiera('domain_nodemanager_port'),
  jsse_enabled              => hiera('wls_jsse_enabled'),
  custom_trust              => hiera('wls_custom_trust'),
  trust_keystore_file       => hiera('wls_trust_keystore_file'),
  trust_keystore_passphrase => hiera('wls_trust_keystore_passphrase'),
}

subscribe to a wls_domain, wls_authenticaton_provider or wls_identity_asserter event

# for this type you won't need a wls_setting identifier
wls_adminserver{'AdminServer_Wls1036:':
  ensure                    => 'running',   #running|start|abort|stop
  server_name               => hiera('domain_adminserver'),
  domain_name               => hiera('domain_name'),
  domain_path               => "/opt/oracle/wlsdomains/domains/Wls1036",
  os_user                   => hiera('wls_os_user'),
  weblogic_home_dir         => hiera('wls_weblogic_home_dir'),
  weblogic_user             => hiera('wls_weblogic_user'),
  weblogic_password         => hiera('domain_wls_password'),
  jdk_home_dir              => hiera('wls_jdk_home_dir'),
  nodemanager_address       => hiera('domain_adminserver_address'),
  nodemanager_port          => hiera('domain_nodemanager_port'),
  jsse_enabled              => hiera('wls_jsse_enabled'),
  custom_trust              => hiera('wls_custom_trust'),
  trust_keystore_file       => hiera('wls_trust_keystore_file'),
  trust_keystore_passphrase => hiera('wls_trust_keystore_passphrase'),
  refreshonly               => true,
  subscribe                 => Wls_domain['Wls1036'],
}

wls_managedserver

type for managed server control like start, running, abort and stop a managed server or a cluster. also supports subscribe with refreshonly

# for this type you won't need a wls_setting identifier
wls_managedserver{'JMSServer1_Wls1036:':
  ensure                    => 'running',   #running|start|abort|stop
  target                    => 'Server', #Server|Cluster
  server_name               => 'JMSServer1',
  domain_name               => hiera('domain_name'),
  os_user                   => hiera('wls_os_user'),
  weblogic_home_dir         => hiera('wls_weblogic_home_dir'),
  weblogic_user             => hiera('wls_weblogic_user'),
  weblogic_password         => hiera('domain_wls_password'),
  jdk_home_dir              => hiera('wls_jdk_home_dir'),
  adminserver_address       => hiera('domain_adminserver_address'),
  adminserver_port          => hiera('domain_adminserver_port'),
}

subscribe to a wls_domain, wls_identity_asserter or wls_authenticaton_provider event

# for this type you won't need a wls_setting identifier
wls_managedserver{'JMSServer1_Wls1036':
  ensure                    => 'running',   #running|start|abort|stop
  target                    => 'Server',    #Server|Cluster
  server_name               => 'JMSServer1',
  domain_name               => hiera('domain_name'),
  os_user                   => hiera('wls_os_user'),
  weblogic_home_dir         => hiera('wls_weblogic_home_dir'),
  weblogic_user             => hiera('wls_weblogic_user'),
  weblogic_password         => hiera('domain_wls_password'),
  jdk_home_dir              => hiera('wls_jdk_home_dir'),
  adminserver_address       => hiera('domain_adminserver_address'),
  adminserver_port          => hiera('domain_adminserver_port'),
  refreshonly               => true,
  subscribe                 => Wls_domain['Wls1036'],
}

wls_ohsserver

type for ohs server control like start, running, abort and stop. also supports subscribe with refreshonly