extension_bam.pp 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. #
  2. # fmw_domain::extension_bam
  3. #
  4. # Copyright 2015 Oracle. All Rights Reserved
  5. #
  6. class fmw_domain::extension_bam()
  7. {
  8. require fmw_domain::domain
  9. require fmw_inst::soa_suite
  10. if $fmw_domain::soa_suite_install_type != undef {
  11. unless $fmw_domain::soa_suite_install_type in ['BPM', 'SOA Suite'] {
  12. fail('unknown soa_suite_install_type please use BPM|SOA Suite')
  13. }
  14. if $fmw_domain::soa_suite_install_type == 'BPM' {
  15. $bpm_enabled = true
  16. } else {
  17. $bpm_enabled = false
  18. }
  19. } else {
  20. $bpm_enabled = false
  21. }
  22. if $fmw_domain::version in ['12.2.1', '12.2.1.1', '12.2.1.2', '12.1.3'] {
  23. $check = '<name>BamServer</name>'
  24. if $fmw_domain::version == '12.1.3' {
  25. $wls_em_template = "${fmw_domain::middleware_home_dir}/em/common/templates/wls/oracle.em_wls_template_12.1.3.jar"
  26. $wls_bam_template = "${fmw_domain::middleware_home_dir}/soa/common/templates/wls/oracle.bam.server_template_12.1.3.jar"
  27. }
  28. else {
  29. $wls_em_template = "${fmw_domain::middleware_home_dir}/em/common/templates/wls/oracle.em_wls_template.jar"
  30. $wls_bam_template = "${fmw_domain::middleware_home_dir}/soa/common/templates/wls/oracle.bam.server_template.jar"
  31. }
  32. }
  33. elsif $fmw_domain::version == '10.3.6' {
  34. $check = 'oracle-bam#11.1.1'
  35. $wls_em_template = "${fmw_domain::middleware_home_dir}/oracle_common/common/templates/applications/oracle.em_11_1_1_0_0_template.jar"
  36. $wls_bam_template = "${fmw_domain::middleware_home_dir}/Oracle_SOA1/common/templates/applications/oracle.bam_template_11.1.1.jar"
  37. }
  38. $domain_name = $fmw_domain::domain_name
  39. $adminserver_name = $fmw_domain::adminserver_name
  40. $adminserver_listen_address = $fmw_domain::adminserver_listen_address
  41. $version = $fmw_domain::version
  42. $bam_server_startup_arguments = $fmw_domain::bam_server_startup_arguments
  43. $bam_cluster = $fmw_domain::bam_cluster
  44. $osb_cluster = $fmw_domain::service_bus_cluster
  45. $ess_cluster = $fmw_domain::enterprise_scheduler_cluster
  46. $soa_cluster = $fmw_domain::soa_suite_cluster
  47. $repository_database_url = $fmw_domain::repository_database_url
  48. $repository_prefix = $fmw_domain::repository_prefix
  49. if $::kernel in ['Linux', 'SunOS'] {
  50. $domain_path = "${fmw_domain::domains_dir}/${fmw_domain::domain_name}"
  51. $weblogic_home_dir = $fmw_domain::weblogic_home_dir
  52. $java_home_dir = $fmw_domain::java_home_dir
  53. $domain_dir = $domain_path
  54. $app_dir = "${fmw_domain::apps_dir}/${fmw_domain::domain_name}"
  55. $tmp_dir = $fmw_domain::tmp_dir
  56. file { "${fmw_domain::tmp_dir}/bam.py":
  57. ensure => present,
  58. content => template('fmw_domain/domain/extensions/bam.py'),
  59. mode => '0755',
  60. owner => $fmw_domain::os_user,
  61. group => $fmw_domain::os_group,
  62. }
  63. if !defined(File[$fmw_domain::apps_dir]) {
  64. file { $fmw_domain::apps_dir:
  65. ensure => directory,
  66. mode => '0755',
  67. owner => $fmw_domain::os_user,
  68. group => $fmw_domain::os_group,
  69. }
  70. }
  71. # add SOA SUITE
  72. fmw_domain_wlst{'WLST add bam':
  73. ensure => 'present',
  74. version => $fmw_domain::version,
  75. extension_check => $check,
  76. script_file => "${fmw_domain::tmp_dir}/bam.py",
  77. middleware_home_dir => $fmw_domain::middleware_home_dir,
  78. weblogic_home_dir => $fmw_domain::weblogic_home_dir,
  79. java_home_dir => $fmw_domain::java_home_dir,
  80. tmp_dir => $fmw_domain::tmp_dir,
  81. domain_dir => $domain_dir,
  82. os_user => $fmw_domain::os_user,
  83. repository_password => $fmw_domain::repository_password,
  84. require => File["${fmw_domain::tmp_dir}/bam.py",$fmw_domain::apps_dir],
  85. }
  86. if ( $fmw_domain::bam_cluster != undef and $fmw_domain::version == '10.3.6' ) {
  87. # add bam JMS cluster configuration
  88. fmw_domain_wlst{'WLST add bam JMS cluster configuration':
  89. ensure => 'present',
  90. version => $fmw_domain::version,
  91. extension_check => '<name>BAMJMSModuleUDDs</name>',
  92. script_file => "${fmw_domain::middleware_home_dir}/Oracle_SOA1/bin/soa-createUDD.py --domain_home ${domain_path} --bamcluster ${bam_cluster} --create_jms true --extend=true",
  93. middleware_home_dir => $fmw_domain::middleware_home_dir,
  94. weblogic_home_dir => $fmw_domain::weblogic_home_dir,
  95. java_home_dir => $fmw_domain::java_home_dir,
  96. tmp_dir => $fmw_domain::tmp_dir,
  97. domain_dir => $domain_dir,
  98. os_user => $fmw_domain::os_user,
  99. require => [Fmw_domain_wlst['WLST add bam'],File["${fmw_domain::tmp_dir}/bam.py",$fmw_domain::apps_dir],],
  100. }
  101. }
  102. } elsif $::kernel in ['windows'] {
  103. $domain_path = fmw_domain_replace_slash("${fmw_domain::domains_dir}/${fmw_domain::domain_name}")
  104. $weblogic_home_dir = fmw_domain_replace_slash($fmw_domain::weblogic_home_dir)
  105. $java_home_dir = fmw_domain_replace_slash($fmw_domain::java_home_dir)
  106. $domain_dir = $domain_path
  107. $app_dir = fmw_domain_replace_slash("${fmw_domain::apps_dir}/${fmw_domain::domain_name}")
  108. $tmp_dir = fmw_domain_replace_slash($fmw_domain::tmp_dir)
  109. file { "${fmw_domain::tmp_dir}/bam.py":
  110. ensure => present,
  111. content => template('fmw_domain/domain/extensions/bam.py'),
  112. source_permissions => ignore,
  113. }
  114. if !defined(File[$fmw_domain::apps_dir]) {
  115. file { $fmw_domain::apps_dir:
  116. ensure => directory,
  117. }
  118. }
  119. # add service bus
  120. fmw_domain_wlst{'WLST add bam':
  121. ensure => 'present',
  122. version => $fmw_domain::version,
  123. extension_check => $check,
  124. script_file => "${fmw_domain::tmp_dir}/bam.py",
  125. middleware_home_dir => $fmw_domain::middleware_home_dir,
  126. weblogic_home_dir => $fmw_domain::weblogic_home_dir,
  127. java_home_dir => $fmw_domain::java_home_dir,
  128. tmp_dir => $fmw_domain::tmp_dir,
  129. domain_dir => $domain_dir,
  130. repository_password => $fmw_domain::repository_password,
  131. require => File["${fmw_domain::tmp_dir}/bam.py",$fmw_domain::apps_dir],
  132. }
  133. if ( $fmw_domain::bam_cluster != undef and $fmw_domain::version == '10.3.6' ) {
  134. # add bam JMS cluster configuration
  135. fmw_domain_wlst{'WLST add bam JMS cluster configuration':
  136. ensure => 'present',
  137. version => $fmw_domain::version,
  138. extension_check => '<name>BAMJMSModuleUDDs</name>',
  139. script_file => "${fmw_domain::middleware_home_dir}/Oracle_SOA1/bin/soa-createUDD.py --domain_home ${domain_path} --bamcluster ${bam_cluster} --create_jms true --extend=true",
  140. middleware_home_dir => $fmw_domain::middleware_home_dir,
  141. weblogic_home_dir => $fmw_domain::weblogic_home_dir,
  142. java_home_dir => $fmw_domain::java_home_dir,
  143. tmp_dir => $fmw_domain::tmp_dir,
  144. domain_dir => $domain_dir,
  145. require => [Fmw_domain_wlst['WLST add bam'],File["${fmw_domain::tmp_dir}/bam.py",$fmw_domain::apps_dir],],
  146. }
  147. }
  148. }
  149. }