wlsdomain.pp 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559
  1. # == Define: wls::wlsdomain
  2. #
  3. # install a new weblogic domain
  4. # support a normal WebLogic Domain , OSB , OSB plus SOA, OSB plus SOA & BPM , ADF , Webcenter, Webcenter + Content + BPM
  5. # use parameter wlsTemplate to control this
  6. #
  7. # in weblogic 12.1.2 the domain creation will also create a nodemanager inside the domain folder
  8. # other version need to manually create a nodemanager.
  9. #
  10. # === Examples
  11. #
  12. # $jdkWls11gJDK = 'jdk1.7.0_09'
  13. #
  14. # $wlsDomainName = "osbDomain"
  15. # $osTemplate = "osb"
  16. # $osTemplate = "standard"
  17. # $adminListenPort = "7001"
  18. # $nodemanagerPort = "5556"
  19. # $address = "localhost"
  20. # $wlsUser = "weblogic"
  21. # $password = "weblogic1"
  22. #
  23. #
  24. # case $operatingsystem {
  25. # centos, redhat, OracleLinux, Ubuntu, debian: {
  26. # $osMdwHome = "/opt/oracle/wls/wls11g"
  27. # $osWlHome = "/opt/oracle/wls/wls11g/wlserver_10.3"
  28. # $user = "oracle"
  29. # $group = "dba"
  30. # }
  31. # windows: {
  32. # $osMdwHome = "c:/oracle/wls/wls11g"
  33. # $osWlHome = "c:/oracle/wls/wls11g/wlserver_10.3"
  34. # $user = "Administrator"
  35. # $group = "Administrators"
  36. # $serviceName = "C_oracle_wls_wls11g_wlserver_10.3"
  37. # }
  38. # }
  39. #
  40. # # set the defaults
  41. #
  42. # Wls::Wlsdomain {
  43. # wlHome => $osWlHome,
  44. # mdwHome => $osMdwHome,
  45. # fullJDKName => $jdkWls11gJDK,
  46. # user => $user,
  47. # group => $group,
  48. # }
  49. #
  50. # # install OSB domain
  51. # wls::wlsdomain{
  52. #
  53. # 'osbDomain':
  54. # wlsTemplate => $osTemplate,
  55. # domain => $wlsDomainName,
  56. # domainPath => $osDomainPath,
  57. # adminListenPort => $adminListenPort,
  58. # nodemanagerPort => $nodemanagerPort,
  59. # }
  60. ##
  61. #
  62. define wls::wlsdomain ($version = '1111',
  63. $wlHome = undef,
  64. $mdwHome = undef,
  65. $fullJDKName = undef,
  66. $wlsTemplate = "standard",
  67. $domain = undef,
  68. $developmentMode = true,
  69. $adminServerName = "AdminServer",
  70. $adminListenAdr = "localhost",
  71. $adminListenPort = '7001',
  72. $nodemanagerPort = '5556',
  73. $wlsUser = undef,
  74. $password = undef,
  75. $user = 'oracle',
  76. $group = 'dba',
  77. $logDir = undef,
  78. $downloadDir = '/install',
  79. $reposDbUrl = undef,
  80. $reposPrefix = undef,
  81. $reposPassword = undef,
  82. $dbUrl = undef,
  83. $sysPassword = undef,
  84. ) {
  85. $domainPath = "${mdwHome}/user_projects/domains"
  86. $appPath = "${mdwHome}/user_projects/applications"
  87. # check if the domain already exists
  88. $found = domain_exists("${domainPath}/${domain}",$version)
  89. if $found == undef {
  90. $continue = true
  91. } else {
  92. if ( $found ) {
  93. $continue = false
  94. } else {
  95. notify {"wls::wlsdomain ${title} ${domainPath}/${domain} ${version} does not exists":}
  96. $continue = true
  97. }
  98. }
  99. if ( $continue ) {
  100. if $version == "1111" {
  101. $template = "${wlHome}/common/templates/domains/wls.jar"
  102. $templateWS = "${wlHome}/common/templates/applications/wls_webservice.jar"
  103. $templateJaxWS = "${mdwHome}/oracle_common/common/templates/applications/wls_webservice_jaxws.jar"
  104. $templateEM = "${mdwHome}/oracle_common/common/templates/applications/oracle.em_11_1_1_0_0_template.jar"
  105. $templateJRF = "${mdwHome}/oracle_common/common/templates/applications/jrf_template_11.1.1.jar"
  106. $templateApplCore = "${mdwHome}/oracle_common/common/templates/applications/oracle.applcore.model.stub.11.1.1_template.jar"
  107. $templateWSMPM = "${mdwHome}/oracle_common/common/templates/applications/oracle.wsmpm_template_11.1.1.jar"
  108. } elsif $version == "1121" {
  109. $template = "${wlHome}/common/templates/domains/wls.jar"
  110. $templateWS = "${wlHome}/common/templates/applications/wls_webservice.jar"
  111. $templateJaxWS = "${mdwHome}/oracle_common/common/templates/applications/wls_webservice_jaxws.jar"
  112. $templateEM = "${mdwHome}/oracle_common/common/templates/applications/oracle.em_11_1_1_0_0_template.jar"
  113. $templateJRF = "${mdwHome}/oracle_common/common/templates/applications/jrf_template_11.1.1.jar"
  114. $templateApplCore = "${mdwHome}/oracle_common/common/templates/applications/oracle.applcore.model.stub.11.1.1_template.jar"
  115. $templateWSMPM = "${mdwHome}/oracle_common/common/templates/applications/oracle.wsmpm_template_11.1.1.jar"
  116. $templateOIM = "${mdwHome}/Oracle_IDM1/common/templates/applications/oracle.oim_11.1.2.0.0_template.jar"
  117. $templateOAM = "${mdwHome}/Oracle_IDM1/common/templates/applications/oracle.oam_ds_11.1.2.0.0_template.jar"
  118. } elsif $version == "1212" {
  119. $template = "${wlHome}/common/templates/wls/wls.jar"
  120. $templateWS = "${wlHome}/common/templates/wls/wls_webservice.jar"
  121. $templateJaxWS = "${wlHome}/common/templates/wls/wls_webservice_jaxws.jar"
  122. $templateSoapJms = "${wlHome}/common/templates/wls/wls_webservice_soapjms.jar"
  123. $templateCoherence = "${wlHome}/common/templates/wls/wls_coherence.jar"
  124. $templateEM = "${mdwHome}/em/common/templates/wls/oracle.em_wls_template_12.1.2.jar"
  125. $templateJRF = "${mdwHome}/oracle_common/common/templates/wls/oracle.jrf_template_12.1.2.jar"
  126. $templateApplCore = "${mdwHome}/oracle_common/common/templates/applications/oracle.applcore.model.stub.12.1.3_template.jar"
  127. $templateWSMPM = "${mdwHome}/oracle_common/common/templates/wls/oracle.wsmpm_template_12.1.2.jar"
  128. } else {
  129. $template = "${wlHome}/common/templates/domains/wls.jar"
  130. $templateWS = "${wlHome}/common/templates/applications/wls_webservice.jar"
  131. $templateEM = "${mdwHome}/oracle_common/common/templates/applications/oracle.em_11_1_1_0_0_template.jar"
  132. $templateJRF = "${mdwHome}/oracle_common/common/templates/applications/jrf_template_11.1.1.jar"
  133. $templateJaxWS = "${mdwHome}/oracle_common/common/templates/applications/wls_webservice_jaxws.jar"
  134. $templateApplCore = "${mdwHome}/oracle_common/common/templates/applications/oracle.applcore.model.stub.11.1.1_template.jar"
  135. $templateWSMPM = "${mdwHome}/oracle_common/common/templates/applications/oracle.wsmpm_template_11.1.1.jar"
  136. }
  137. $templateOSB = "${mdwHome}/Oracle_OSB1/common/templates/applications/wlsb.jar"
  138. $templateSOAAdapters = "${mdwHome}/Oracle_OSB1/common/templates/applications/oracle.soa.common.adapters_template_11.1.1.jar"
  139. $templateSOA = "${mdwHome}/Oracle_SOA1/common/templates/applications/oracle.soa_template_11.1.1.jar"
  140. $templateBPM = "${mdwHome}/Oracle_SOA1/common/templates/applications/oracle.bpm_template_11.1.1.jar"
  141. $templateBAM = "${mdwHome}/Oracle_SOA1/common/templates/applications/oracle.bam_template_11.1.1.jar"
  142. $templateSpaces = "${mdwHome}/Oracle_WC1/common/templates/applications/oracle.wc_spaces_template_11.1.1.jar"
  143. $templateBPMSpaces = "${mdwHome}/Oracle_WC1/common/templates/applications/oracle.bpm.spaces_template_11.1.1.jar"
  144. $templatePortlets = "${mdwHome}/Oracle_WC1/common/templates/applications/oracle.producer_apps_template_11.1.1.jar"
  145. $templatePagelet = "${mdwHome}/Oracle_WC1/common/templates/applications/oracle.pagelet-producer_template_11.1.1.jar"
  146. $templateDiscussion = "${mdwHome}/Oracle_WC1/common/templates/applications/oracle.owc_discussions_template_11.1.1.jar"
  147. $templateUCM = "${mdwHome}/Oracle_WCC1/common/templates/applications/oracle.ucm.cs_template_11.1.1.jar"
  148. if $wlsTemplate == 'standard' {
  149. $templateFile = "wls/domains/domain.xml.erb"
  150. $wlstPath = "${wlHome}/common/bin"
  151. } elsif $wlsTemplate == 'oim' {
  152. $templateFile = "wls/domains/domain_oim.xml.erb"
  153. $wlstPath = "${mdwHome}/Oracle_IDM1/common/bin"
  154. $oracleHome = "${mdwHome}/Oracle_IDM1"
  155. } elsif $wlsTemplate == 'osb' {
  156. $templateFile = "wls/domains/domain_osb.xml.erb"
  157. $wlstPath = "${mdwHome}/Oracle_OSB1/common/bin"
  158. $oracleHome = "${mdwHome}/Oracle_OSB1"
  159. } elsif $wlsTemplate == 'osb_soa' {
  160. $templateFile = "wls/domains/domain_osb_soa.xml.erb"
  161. $wlstPath = "${mdwHome}/Oracle_SOA1/common/bin"
  162. $oracleHome = "${mdwHome}/Oracle_SOA1"
  163. } elsif $wlsTemplate == 'adf' {
  164. $templateFile = "wls/domains/domain_adf.xml.erb"
  165. $wlstPath = "${mdwHome}/oracle_common/common/bin"
  166. $oracleHome = "${mdwHome}/oracle_common"
  167. } elsif $wlsTemplate == 'osb_soa_bpm' {
  168. $templateFile = "wls/domains/domain_osb_soa_bpm.xml.erb"
  169. $wlstPath = "${mdwHome}/Oracle_SOA1/common/bin"
  170. $oracleHome = "${mdwHome}/Oracle_SOA1"
  171. } elsif $wlsTemplate == 'wc' {
  172. $templateFile = "wls/domains/domain_wc.xml.erb"
  173. $wlstPath = "${mdwHome}/Oracle_WC1/common/bin"
  174. $oracleHome = "${mdwHome}/Oracle_WC1"
  175. } elsif $wlsTemplate == 'wc_wcc_bpm' {
  176. $templateFile = "wls/domains/domain_wc_wcc_bpm.xml.erb"
  177. $wlstPath = "${mdwHome}/Oracle_WCC1/common/bin"
  178. $oracleHome = "${mdwHome}/Oracle_WCC1"
  179. } else {
  180. $templateFile = "wls/domains/domain.xml.erb"
  181. $wlstPath = "${wlHome}/common/bin"
  182. }
  183. case $operatingsystem {
  184. CentOS, RedHat, OracleLinux, Ubuntu, Debian, SLES: {
  185. $execPath = "/usr/java/${fullJDKName}/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin"
  186. $path = $downloadDir
  187. $JAVA_HOME = "/usr/java/${fullJDKName}"
  188. $nodeMgrMachine = "UnixMachine"
  189. Exec { path => $execPath,
  190. user => $user,
  191. group => $group,
  192. logoutput => true,
  193. }
  194. File {
  195. ensure => present,
  196. replace => 'yes',
  197. mode => 0775,
  198. owner => $user,
  199. group => $group,
  200. }
  201. }
  202. Solaris: {
  203. $execPath = "/usr/jdk/${fullJDKName}/bin/amd64:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin"
  204. $path = $downloadDir
  205. $JAVA_HOME = "/usr/jdk/${fullJDKName}"
  206. $nodeMgrMachine = "UnixMachine"
  207. Exec { path => $execPath,
  208. user => $user,
  209. group => $group,
  210. logoutput => true,
  211. }
  212. File {
  213. ensure => present,
  214. replace => 'yes',
  215. mode => 0775,
  216. owner => $user,
  217. group => $group,
  218. }
  219. }
  220. windows: {
  221. $execPath = "C:\\oracle\\${fullJDKName}\\bin;C:\\unxutils\\bin;C:\\unxutils\\usr\\local\\wbin;C:\\Windows\\system32;C:\\Windows"
  222. $path = $downloadDir
  223. $JAVA_HOME = "c:\\oracle\\${fullJDKName}"
  224. $nodeMgrMachine = "Machine"
  225. $checkCommand = "C:\\Windows\\System32\\cmd.exe /c"
  226. Exec { path => $execPath,
  227. logoutput => true,
  228. }
  229. File { ensure => present,
  230. replace => 'yes',
  231. mode => 0777,
  232. }
  233. }
  234. }
  235. if $logDir == undef {
  236. $adminNodeMgrLogDir = "${domainPath}/${domain}/servers/${adminServerName}/logs"
  237. $osbNodeMgrLogDir = "${domainPath}/${domain}/servers/osb_server1/logs"
  238. $soaNodeMgrLogDir = "${domainPath}/${domain}/servers/soa_server1/logs"
  239. $bamNodeMgrLogDir = "${domainPath}/${domain}/servers/bam_server1/logs"
  240. $oimNodeMgrLogDir = "${domainPath}/${domain}/servers/oim_server1/logs"
  241. $oamNodeMgrLogDir = "${domainPath}/${domain}/servers/oam_server1/logs"
  242. $wcCollaborationNodeMgrLogDir = "${domainPath}/${domain}/servers/WC_Collaboration/logs"
  243. $wcPortletNodeMgrLogDir = "${domainPath}/${domain}/servers/WC_Portlet/logs"
  244. $wcSpacesNodeMgrLogDir = "${domainPath}/${domain}/servers/WC_Spaces/logs"
  245. $umcNodeMgrLogDir = "${domainPath}/${domain}/servers/UCM_server1/logs"
  246. $nodeMgrLogDir = "${domainPath}/${domain}/nodemanager/nodemanager.log"
  247. } else {
  248. $adminNodeMgrLogDir = "${logDir}"
  249. $osbNodeMgrLogDir = "${logDir}"
  250. $soaNodeMgrLogDir = "${logDir}"
  251. $bamNodeMgrLogDir = "${logDir}"
  252. $oimNodeMgrLogDir = "${logDir}"
  253. $oamNodeMgrLogDir = "${logDir}"
  254. $wcCollaborationNodeMgrLogDir = "${logDir}"
  255. $wcPortletNodeMgrLogDir = "${logDir}"
  256. $wcSpacesNodeMgrLogDir = "${logDir}"
  257. $umcNodeMgrLogDir = "${logDir}"
  258. $nodeMgrLogDir = "${logDir}/nodemanager_${domain}.log"
  259. # create all log folders
  260. case $operatingsystem {
  261. CentOS, RedHat, OracleLinux, Ubuntu, Debian, SLES, Solaris: {
  262. if ! defined(Exec["create ${logDir} directory"]) {
  263. exec { "create ${logDir} directory":
  264. command => "mkdir -p ${logDir}",
  265. unless => "test -d ${logDir}",
  266. user => 'root',
  267. }
  268. }
  269. }
  270. windows: {
  271. $logDirWin = slash_replace( $logDir )
  272. if ! defined(Exec["create ${logDir} directory"]) {
  273. exec { "create ${logDir} directory":
  274. command => "${checkCommand} mkdir ${logDirWin}",
  275. unless => "${checkCommand} dir ${logDirWin}",
  276. }
  277. }
  278. }
  279. default: {
  280. fail("Unrecognized operating system")
  281. }
  282. }
  283. if ! defined(File["${logDir}"]) {
  284. file { "${logDir}" :
  285. ensure => directory,
  286. recurse => false,
  287. replace => false,
  288. require => Exec["create ${logDir} directory"],
  289. }
  290. }
  291. }
  292. if ( $version == "1212" and $wlsTemplate == 'adf' ) {
  293. # only works for a 12c middleware home
  294. # creates RCU for ADF
  295. if ( $dbUrl == undefined or
  296. $sysPassword == undefined or
  297. $reposPassword == undefined or
  298. $reposPrefix == undefined
  299. ) {
  300. fail("Not all RCU parameters are provided")
  301. }
  302. wls::utils::rcu{ "RCU_12c ${title}":
  303. product => 'adf',
  304. oracleHome => $oracleHome,
  305. fullJDKName => $fullJDKName,
  306. user => $user,
  307. group => $group,
  308. downloadDir => $downloadDir,
  309. action => 'create',
  310. dbUrl => $dbUrl,
  311. sysPassword => $sysPassword,
  312. schemaPrefix => $reposPrefix,
  313. reposPassword => $reposPassword,
  314. notify => File["domain.py ${domain} ${title}"]
  315. }
  316. }
  317. # the domain.py used by the wlst
  318. file { "domain.py ${domain} ${title}":
  319. path => "${path}/domain_${domain}.py",
  320. content => template($templateFile),
  321. }
  322. # make the default domain folders
  323. if ! defined(File["${mdwHome}/user_projects"]) {
  324. # check oracle install folder
  325. file { "${mdwHome}/user_projects" :
  326. ensure => directory,
  327. recurse => false,
  328. replace => false,
  329. }
  330. }
  331. if ! defined(File["${mdwHome}/user_projects/domains"]) {
  332. # check oracle install folder
  333. file { "${mdwHome}/user_projects/domains" :
  334. ensure => directory,
  335. recurse => false,
  336. replace => false,
  337. require => File["${mdwHome}/user_projects"],
  338. }
  339. }
  340. if ! defined(File["${mdwHome}/user_projects/applications"]) {
  341. # check oracle install folder
  342. file { "${mdwHome}/user_projects/applications" :
  343. ensure => directory,
  344. recurse => false,
  345. replace => false,
  346. require => File["${mdwHome}/user_projects"],
  347. }
  348. }
  349. $packCommand = "-domain=${domainPath}/${domain} -template=${path}/domain_${domain}.jar -template_name=domain_${domain} -log=${path}/domain_${domain}.log -log_priority=INFO"
  350. case $operatingsystem {
  351. CentOS, RedHat, OracleLinux, Ubuntu, Debian, SLES, Solaris: {
  352. exec { "execwlst ${domain} ${title}":
  353. command => "${wlstPath}/wlst.sh ${path}/domain_${domain}.py",
  354. environment => ["JAVA_HOME=${JAVA_HOME}"],
  355. unless => "/usr/bin/test -e ${domainPath}/${domain}",
  356. creates => "${domainPath}/${domain}",
  357. require => [File["domain.py ${domain} ${title}"],File["${mdwHome}/user_projects/domains"],File["${mdwHome}/user_projects/applications"]],
  358. timeout => 0,
  359. }
  360. if ($wlsTemplate == 'oim') {
  361. exec { "execwlst create OPSS store ${domain} ${title}":
  362. command => "${wlstPath}/wlst.sh ${mdwHome}/Oracle_IDM1/common/tools/configureSecurityStore.py -d ${domainPath}/${domain} -m create -c IAM -p ${reposPassword}",
  363. environment => ["JAVA_HOME=${JAVA_HOME}"],
  364. require => Exec["execwlst ${domain} ${title}"],
  365. timeout => 0,
  366. }
  367. exec { "execwlst validate OPSS store ${domain} ${title}":
  368. command => "${wlstPath}/wlst.sh ${mdwHome}/Oracle_IDM1/common/tools/configureSecurityStore.py -d ${domainPath}/${domain} -m validate",
  369. environment => ["JAVA_HOME=${JAVA_HOME}"],
  370. require => [Exec["execwlst ${domain} ${title}"],Exec["execwlst create OPSS store ${domain} ${title}"]],
  371. timeout => 0,
  372. }
  373. }
  374. case $operatingsystem {
  375. CentOS, RedHat, OracleLinux, Ubuntu, Debian, SLES: {
  376. exec { "setDebugFlagOnFalse ${domain} ${title}":
  377. command => "sed -i -e's/debugFlag=\"true\"/debugFlag=\"false\"/g' ${domainPath}/${domain}/bin/setDomainEnv.sh",
  378. onlyif => "/bin/grep debugFlag=\"true\" ${domainPath}/${domain}/bin/setDomainEnv.sh | /usr/bin/wc -l",
  379. require => Exec["execwlst ${domain} ${title}"],
  380. }
  381. exec { "domain.py ${domain} ${title}":
  382. command => "rm -I ${path}/domain_${domain}.py",
  383. require => Exec["execwlst ${domain} ${title}"],
  384. }
  385. }
  386. Solaris: {
  387. exec { "setDebugFlagOnFalse ${domain} ${title}":
  388. command => "sed -e's/debugFlag=\"true\"/debugFlag=\"false\"/g' ${domainPath}/${domain}/bin/setDomainEnv.sh > /tmp/test.tmp && mv /tmp/test.tmp ${domainPath}/${domain}/bin/setDomainEnv.sh",
  389. onlyif => "/bin/grep debugFlag=\"true\" ${domainPath}/${domain}/bin/setDomainEnv.sh | /usr/bin/wc -l",
  390. require => Exec["execwlst ${domain} ${title}"],
  391. }
  392. exec { "domain.py ${domain} ${title}":
  393. command => "rm ${path}/domain_${domain}.py",
  394. require => Exec["execwlst ${domain} ${title}"],
  395. }
  396. }
  397. }
  398. exec { "pack domain ${domain} ${title}":
  399. command => "${wlHome}/common/bin/pack.sh ${packCommand}",
  400. require => Exec["setDebugFlagOnFalse ${domain} ${title}"],
  401. creates => "${path}/domain_${domain}.jar",
  402. }
  403. }
  404. windows: {
  405. notify{"${domainPath}/${domain} ${title}":}
  406. exec { "execwlst ${domain} ${title}":
  407. command => "C:\\Windows\\System32\\cmd.exe /c ${wlstPath}/wlst.cmd ${path}/domain_${domain}.py",
  408. environment => ["CLASSPATH=${wlHome}\\server\\lib\\weblogic.jar",
  409. "JAVA_HOME=${JAVA_HOME}"],
  410. creates => "${domainPath}/${domain}",
  411. require => [File["domain.py ${domain} ${title}"],File["${mdwHome}/user_projects/domains"],File["${mdwHome}/user_projects/applications"]],
  412. timeout => 0,
  413. }
  414. exec {"icacls domain ${title}":
  415. command => "C:\\Windows\\System32\\cmd.exe /c icacls ${domainPath}/${domain} /T /C /grant Administrator:F Administrators:F",
  416. logoutput => false,
  417. require => Exec["execwlst ${domain} ${title}"],
  418. }
  419. exec { "domain.py ${domain} ${title}":
  420. command => "C:\\Windows\\System32\\cmd.exe /c rm ${path}/domain_${domain}.py",
  421. require => Exec["icacls domain ${title}"],
  422. }
  423. exec { "pack domain ${domain} ${title}":
  424. command => "C:\\Windows\\System32\\cmd.exe /c ${wlHome}/common/bin/pack.cmd ${packCommand}",
  425. require => Exec["icacls domain ${title}"],
  426. creates => "${path}/domain_${domain}.jar",
  427. }
  428. }
  429. }
  430. $nodeMgrHome = "${domainPath}/${domain}/nodemanager"
  431. $listenPort = $nodemanagerPort
  432. # set our 12.1.2 nodemanager properties
  433. if ( $version == "1212" ){
  434. case $operatingsystem {
  435. CentOS, RedHat, OracleLinux, Ubuntu, Debian, SLES, Solaris: {
  436. file { "nodemanager.properties ux 1212 ${title}":
  437. path => "${nodeMgrHome}/nodemanager.properties",
  438. ensure => present,
  439. replace => 'yes',
  440. content => template("wls/nodemgr/nodemanager.properties_1212.erb"),
  441. require => Exec["execwlst ${domain} ${title}"],
  442. }
  443. }
  444. windows: {
  445. file { "nodemanager.properties ux 1212 ${title}":
  446. path => "${nodeMgrHome}/nodemanager.properties",
  447. ensure => present,
  448. replace => 'yes',
  449. content => template("wls/nodemgr/nodemanager.properties_1212.erb"),
  450. require => Exec["execwlst ${domain} ${title}"],
  451. }
  452. exec {"icacls win nodemanager bin ${title}":
  453. command => "${checkCommand} icacls ${wlHome}\\server\\bin\\* /T /C /grant Administrator:F Administrators:F",
  454. logoutput => false,
  455. }
  456. exec {"icacls win nodemanager native ${title}":
  457. command => "${checkCommand} icacls ${wlHome}\\server\\native\\* /T /C /grant Administrator:F Administrators:F",
  458. logoutput => false,
  459. }
  460. exec { "execwlst win nodemanager ${title}":
  461. command => "${domainPath}/${domain}/bin/installNodeMgrSvc.cmd",
  462. environment => ["CLASSPATH=${wlHome}\\server\\lib\\weblogic.jar",
  463. "JAVA_HOME=${JAVA_HOME}"],
  464. cwd => "${domainPath}/${domain}/bin",
  465. require => [Exec ["icacls win nodemanager bin ${title}"],
  466. Exec ["icacls win nodemanager native ${title}"],
  467. File["nodemanager.properties ux 1212 ${title}"]],
  468. logoutput => true,
  469. }
  470. }
  471. }
  472. }
  473. }
  474. }