| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- # == Define: wls::packdomain
- #
- # packs a weblogic domain to the download folder
- ##
- define wls::packdomain (
- $wlHome = undef,
- $mdwHome = undef,
- $fullJDKName = undef,
- $domain = undef,
- $user = 'oracle',
- $group = 'dba',
- $downloadDir = '/install',
- ) {
- if $::override_weblogic_domain_folder == undef {
- $domainPath = "${mdwHome}/user_projects/domains"
- } else {
- $domainPath = "${::override_weblogic_domain_folder}/domains"
- }
- case $operatingsystem {
- CentOS, RedHat, OracleLinux, Ubuntu, Debian, SLES : {
- $execPath = "/usr/java/${fullJDKName}/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin"
- }
- Solaris : {
- $execPath = "/usr/jdk/${fullJDKName}/bin/amd64:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin"
- }
- windows : {
- $execPath = "C:\\oracle\\${fullJDKName}\\bin;C:\\unxutils\\bin;C:\\unxutils\\usr\\local\\wbin;C:\\Windows\\system32;C:\\Windows"
- $checkCommand = "C:\\Windows\\System32\\cmd.exe /c"
- }
- }
- $packCommand = "-domain=${domainPath}/${domain} -template=${downloadDir}/domain_${domain}.jar -template_name=domain_${domain} -log=${downloadDir}/domain_${domain}.log -log_priority=INFO"
- case $operatingsystem {
- CentOS, RedHat, OracleLinux, Ubuntu, Debian, SLES, Solaris : {
- exec { "pack domain ${domain} ${title}":
- command => "${wlHome}/common/bin/pack.sh ${packCommand}",
- creates => "${downloadDir}/domain_${domain}.jar",
- logoutput => true,
- user => $user,
- group => $group,
- }
- }
- windows : {
- exec { "pack domain ${domain} ${title}":
- command => "${checkCommand} ${wlHome}/common/bin/pack.cmd ${packCommand}",
- creates => "${downloadDir}/domain_${domain}.jar",
- logoutput => true,
- user => $user,
- group => $group,
- }
- }
- }
- }
|