extension_jrf.pp 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. #
  2. # fmw_domain::extension_jrf
  3. #
  4. # Copyright 2015 Oracle. All Rights Reserved
  5. #
  6. class fmw_domain::extension_jrf()
  7. {
  8. require fmw_domain::domain
  9. $check = 'em.ear'
  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.3.jar"
  14. $wls_jrf_template = "${fmw_domain::middleware_home_dir}/oracle_common/common/templates/wls/oracle.jrf_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_jrf_template = "${fmw_domain::middleware_home_dir}/oracle_common/common/templates/wls/oracle.jrf_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_jrf_template = "${fmw_domain::middleware_home_dir}/oracle_common/common/templates/wls/oracle.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_jrf_template = "${fmw_domain::middleware_home_dir}/oracle_common/common/templates/wls/oracle.jrf_template.jar"
  31. }
  32. }
  33. }
  34. elsif $fmw_domain::version == '10.3.6' {
  35. $restricted = false
  36. $wls_em_template = "${fmw_domain::middleware_home_dir}/oracle_common/common/templates/applications/oracle.em_11_1_1_0_0_template.jar"
  37. $wls_jrf_template = "${fmw_domain::middleware_home_dir}/oracle_common/common/templates/applications/jrf_template_11.1.1.jar"
  38. }
  39. $domain_name = $fmw_domain::domain_name
  40. $adminserver_name = $fmw_domain::adminserver_name
  41. $adminserver_listen_address = $fmw_domain::adminserver_listen_address
  42. $version = $fmw_domain::version
  43. $repository_database_url = $fmw_domain::repository_database_url
  44. $repository_prefix = $fmw_domain::repository_prefix
  45. if $::kernel in ['Linux', 'SunOS'] {
  46. $domain_path = "${fmw_domain::domains_dir}/${fmw_domain::domain_name}"
  47. $weblogic_home_dir = $fmw_domain::weblogic_home_dir
  48. $java_home_dir = $fmw_domain::java_home_dir
  49. $domain_dir = $domain_path
  50. $app_dir = "${fmw_domain::apps_dir}/${fmw_domain::domain_name}"
  51. $tmp_dir = $fmw_domain::tmp_dir
  52. file { "${fmw_domain::tmp_dir}/jrf.py":
  53. ensure => present,
  54. content => template('fmw_domain/domain/extensions/jrf.py'),
  55. mode => '0755',
  56. owner => $fmw_domain::os_user,
  57. group => $fmw_domain::os_group,
  58. }
  59. if !defined(File[$fmw_domain::apps_dir]) {
  60. file { $fmw_domain::apps_dir:
  61. ensure => directory,
  62. mode => '0755',
  63. owner => $fmw_domain::os_user,
  64. group => $fmw_domain::os_group,
  65. }
  66. }
  67. # add JRF
  68. fmw_domain_wlst{'WLST add jrf':
  69. ensure => 'present',
  70. version => $fmw_domain::version,
  71. extension_check => $check,
  72. script_file => "${fmw_domain::tmp_dir}/jrf.py",
  73. middleware_home_dir => $fmw_domain::middleware_home_dir,
  74. weblogic_home_dir => $fmw_domain::weblogic_home_dir,
  75. java_home_dir => $fmw_domain::java_home_dir,
  76. tmp_dir => $fmw_domain::tmp_dir,
  77. domain_dir => $domain_dir,
  78. repository_password => $fmw_domain::repository_password,
  79. os_user => $fmw_domain::os_user,
  80. require => File["${fmw_domain::tmp_dir}/jrf.py",$fmw_domain::apps_dir],
  81. }
  82. } elsif $::kernel in ['windows'] {
  83. $domain_path = fmw_domain_replace_slash("${fmw_domain::domains_dir}/${fmw_domain::domain_name}")
  84. $weblogic_home_dir = fmw_domain_replace_slash($fmw_domain::weblogic_home_dir)
  85. $java_home_dir = fmw_domain_replace_slash($fmw_domain::java_home_dir)
  86. $domain_dir = $domain_path
  87. $app_dir = fmw_domain_replace_slash("${fmw_domain::apps_dir}/${fmw_domain::domain_name}")
  88. $tmp_dir = fmw_domain_replace_slash($fmw_domain::tmp_dir)
  89. file { "${fmw_domain::tmp_dir}/jrf.py":
  90. ensure => present,
  91. content => template('fmw_domain/domain/extensions/jrf.py'),
  92. source_permissions => ignore,
  93. }
  94. if !defined(File[$fmw_domain::apps_dir]) {
  95. file { $fmw_domain::apps_dir:
  96. ensure => directory,
  97. }
  98. }
  99. # add jrf
  100. fmw_domain_wlst{'WLST add jrf':
  101. ensure => 'present',
  102. version => $fmw_domain::version,
  103. extension_check => $check,
  104. script_file => "${fmw_domain::tmp_dir}/jrf.py",
  105. middleware_home_dir => $fmw_domain::middleware_home_dir,
  106. weblogic_home_dir => $fmw_domain::weblogic_home_dir,
  107. java_home_dir => $fmw_domain::java_home_dir,
  108. tmp_dir => $fmw_domain::tmp_dir,
  109. domain_dir => $domain_dir,
  110. repository_password => $fmw_domain::repository_password,
  111. require => File["${fmw_domain::tmp_dir}/jrf.py",$fmw_domain::apps_dir],
  112. }
  113. }
  114. }