extension_webtier.pp 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. #
  2. # fmw_domain::extension_webtier
  3. #
  4. # Copyright 2015 Oracle. All Rights Reserved
  5. #
  6. class fmw_domain::extension_webtier()
  7. {
  8. require fmw_domain::domain
  9. $check = 'webtier.em'
  10. if $fmw_domain::version in ['12.2.1', '12.2.1.1', '12.2.1.2', '12.1.3', '12.1.2'] {
  11. if $fmw_domain::version == '12.1.2' {
  12. $restricted = false
  13. $wls_em_template = "${fmw_domain::middleware_home_dir}/em/common/templates/wls/oracle.em_wls_template_12.1.2.jar"
  14. $wls_webtier_template = "${fmw_domain::middleware_home_dir}/ohs/common/templates/wls/ohs_managed_template_12.1.2.jar"
  15. }
  16. elsif $fmw_domain::version == '12.1.3' {
  17. $restricted = false
  18. $wls_em_template = "${fmw_domain::middleware_home_dir}/em/common/templates/wls/oracle.em_wls_template_12.1.3.jar"
  19. $wls_webtier_template = "${fmw_domain::middleware_home_dir}/ohs/common/templates/wls/ohs_managed_template_12.1.3.jar"
  20. }
  21. else {
  22. if $fmw_domain::restricted == true {
  23. $restricted = true
  24. $wls_em_template = "${fmw_domain::middleware_home_dir}/em/common/templates/wls/oracle.em_wls_restricted_template.jar"
  25. $wls_webtier_template = "${fmw_domain::middleware_home_dir}/ohs/common/templates/wls/ohs_jrf_restricted_template.jar"
  26. }
  27. else {
  28. $restricted = false
  29. $wls_em_template = "${fmw_domain::middleware_home_dir}/em/common/templates/wls/oracle.em_wls_template.jar"
  30. $wls_webtier_template = "${fmw_domain::middleware_home_dir}/ohs/common/templates/wls/ohs_managed_template.jar"
  31. }
  32. }
  33. }
  34. elsif $fmw_domain::version == '10.3.6' {
  35. fail('enterprise scheduler is not available on FMW 11g')
  36. }
  37. $domain_name = $fmw_domain::domain_name
  38. $adminserver_name = $fmw_domain::adminserver_name
  39. $adminserver_listen_address = $fmw_domain::adminserver_listen_address
  40. $version = $fmw_domain::version
  41. $repository_database_url = $fmw_domain::repository_database_url
  42. $repository_prefix = $fmw_domain::repository_prefix
  43. if $::kernel in ['Linux', 'SunOS'] {
  44. $domain_path = "${fmw_domain::domains_dir}/${fmw_domain::domain_name}"
  45. $weblogic_home_dir = $fmw_domain::weblogic_home_dir
  46. $java_home_dir = $fmw_domain::java_home_dir
  47. $domain_dir = $domain_path
  48. $app_dir = "${fmw_domain::apps_dir}/${fmw_domain::domain_name}"
  49. $tmp_dir = $fmw_domain::tmp_dir
  50. file { "${fmw_domain::tmp_dir}/webtier.py":
  51. ensure => present,
  52. content => template('fmw_domain/domain/extensions/webtier.py'),
  53. mode => '0755',
  54. owner => $fmw_domain::os_user,
  55. group => $fmw_domain::os_group,
  56. }
  57. if !defined(File[$fmw_domain::apps_dir]) {
  58. file { $fmw_domain::apps_dir:
  59. ensure => directory,
  60. mode => '0755',
  61. owner => $fmw_domain::os_user,
  62. group => $fmw_domain::os_group,
  63. }
  64. }
  65. # add webtier
  66. fmw_domain_wlst{'WLST add webtier':
  67. ensure => 'present',
  68. version => $fmw_domain::version,
  69. extension_check => $check,
  70. script_file => "${fmw_domain::tmp_dir}/webtier.py",
  71. middleware_home_dir => $fmw_domain::middleware_home_dir,
  72. weblogic_home_dir => $fmw_domain::weblogic_home_dir,
  73. java_home_dir => $fmw_domain::java_home_dir,
  74. tmp_dir => $fmw_domain::tmp_dir,
  75. domain_dir => $domain_dir,
  76. repository_password => $fmw_domain::repository_password,
  77. os_user => $fmw_domain::os_user,
  78. require => File["${fmw_domain::tmp_dir}/webtier.py",$fmw_domain::apps_dir],
  79. }
  80. } elsif $::kernel in ['windows'] {
  81. $domain_path = fmw_domain_replace_slash("${fmw_domain::domains_dir}/${fmw_domain::domain_name}")
  82. $weblogic_home_dir = fmw_domain_replace_slash($fmw_domain::weblogic_home_dir)
  83. $java_home_dir = fmw_domain_replace_slash($fmw_domain::java_home_dir)
  84. $domain_dir = $domain_path
  85. $app_dir = fmw_domain_replace_slash("${fmw_domain::apps_dir}/${fmw_domain::domain_name}")
  86. $tmp_dir = fmw_domain_replace_slash($fmw_domain::tmp_dir)
  87. file { "${fmw_domain::tmp_dir}/webtier.py":
  88. ensure => present,
  89. content => template('fmw_domain/domain/extensions/webtier.py'),
  90. source_permissions => ignore,
  91. }
  92. if !defined(File[$fmw_domain::apps_dir]) {
  93. file { $fmw_domain::apps_dir:
  94. ensure => directory,
  95. }
  96. }
  97. # add webtier
  98. fmw_domain_wlst{'WLST add webtier':
  99. ensure => 'present',
  100. version => $fmw_domain::version,
  101. extension_check => $check,
  102. script_file => "${fmw_domain::tmp_dir}/webtier.py",
  103. middleware_home_dir => $fmw_domain::middleware_home_dir,
  104. weblogic_home_dir => $fmw_domain::weblogic_home_dir,
  105. java_home_dir => $fmw_domain::java_home_dir,
  106. tmp_dir => $fmw_domain::tmp_dir,
  107. domain_dir => $domain_dir,
  108. repository_password => $fmw_domain::repository_password,
  109. require => File["${fmw_domain::tmp_dir}/webtier.py",$fmw_domain::apps_dir],
  110. }
  111. }
  112. }