oim.pp 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. #
  2. # fmw_inst::oim
  3. #
  4. # Copyright 2015 Oracle. All Rights Reserved
  5. #
  6. class fmw_inst::oim(
  7. $install_type = 'Typical',
  8. $source_file = undef,
  9. $source_2_file = undef,
  10. $source_3_file = undef,
  11. $oim_version = undef
  12. )
  13. {
  14. require fmw_inst
  15. if ( $source_file == undef or is_string($source_file) == false ) {
  16. fail('source_file parameter cannot be empty')
  17. }
  18. if ( $source_2_file == undef or is_string($source_2_file) == false ) {
  19. fail('source_2_file parameter cannot be empty')
  20. }
  21. if ( $source_3_file == undef or is_string($source_3_file) == false ) {
  22. fail('source_3_file parameter cannot be empty')
  23. }
  24. if ( $oim_version == undef or is_string($oim_version)==false) {
  25. fail('oim_version cannot be empty')
  26. }
  27. require fmw_wls::install
  28. if $fmw_inst::oim_version in ['11.1.2'] {
  29. $fmw_template = 'fmw_11g.rsp'
  30. $fmw_oracle_home = "${fmw_inst::middleware_home_dir}/oim/bin"
  31. $option_array = ['APPSERVER_TYPE=WLS',
  32. "APPSERVER_LOCATION=${fmw_inst::middleware_home_dir}"]
  33. if $install_type != undef {
  34. unless $install_type in ['Typical'] {
  35. fail('unknown oim__install_type please use Typical')
  36. }
  37. $fmw_install_type = $install_type
  38. } else {
  39. $fmw_install_type = 'Typical'
  40. }
  41. if $::kernel == 'windows'{
  42. $fmw_installer_file = "${fmw_inst::tmp_dir}/oim/Disk1/setup.exe"
  43. } else {
  44. $fmw_installer_file = "${fmw_inst::tmp_dir}/oim/Disk1/runInstaller"
  45. }
  46. $create_file1 = "${fmw_inst::tmp_dir}/oim/Disk1"
  47. $create_file2 = "${fmw_inst::tmp_dir}/oim/Disk2"
  48. $create_file3 = "${fmw_inst::tmp_dir}/oim/Disk3"
  49. if $::kernel in ['Linux', 'SunOS'] {
  50. file { "${fmw_wls::tmp_dir}/oim_${fmw_template}":
  51. ensure => present,
  52. content => template("fmw_inst/${fmw_template}"),
  53. mode => '0755',
  54. owner => $fmw_inst::os_user,
  55. group => $fmw_inst::os_group,
  56. backup => false,
  57. }
  58. fmw_inst::internal::fmw_extract{'oim':
  59. source_file => $source_file,
  60. source_2_file => $source_2_file,
  61. source_3_file => $source_3_file,
  62. create_file_check => $create_file1,
  63. create_2_file_check => $create_file2,
  64. create_3_file_check => $create_file3,
  65. os_user => $fmw_inst::os_user,
  66. os_group => $fmw_inst::os_group,
  67. tmp_dir => $fmw_inst::tmp_dir,
  68. before => Fmw_inst::Internal::Fmw_install_linux['oim'],
  69. }
  70. fmw_inst::internal::fmw_install_linux{'oim':
  71. java_home_dir => $fmw_inst::java_home_dir,
  72. installer_file => $fmw_installer_file,
  73. rsp_file => "${fmw_inst::tmp_dir}/oim_${fmw_template}",
  74. version => $fmw_inst::version,
  75. oracle_home_dir => $fmw_oracle_home,
  76. orainst_dir => $fmw_inst::orainst_dir,
  77. os_user => $fmw_inst::os_user,
  78. os_group => $fmw_inst::os_group,
  79. tmp_dir => $fmw_inst::tmp_dir,
  80. require => File["${fmw_wls::tmp_dir}/oim_${fmw_template}"],
  81. }
  82. } elsif $::kernel in ['windows'] {
  83. file { "${fmw_wls::tmp_dir}/oim_${fmw_template}":
  84. ensure => present,
  85. content => template("fmw_inst/${fmw_template}"),
  86. backup => false,
  87. }
  88. fmw_inst::internal::fmw_extract_windows{'oim':
  89. version => $fmw_inst::version,
  90. middleware_home_dir => $fmw_inst::middleware_home_dir,
  91. source_file => $source_file,
  92. source_2_file => $source_2_file,
  93. source_3_file => $source_3_file,
  94. create_file_check => $create_file1,
  95. create_2_file_check => $create_file2,
  96. tmp_dir => $fmw_inst::tmp_dir,
  97. before => Fmw_inst::Internal::Fmw_install_windows['oim'],
  98. }
  99. fmw_inst::internal::fmw_install_windows{'oim':
  100. java_home_dir => $fmw_inst::java_home_dir,
  101. installer_file => $fmw_installer_file,
  102. rsp_file => "${fmw_inst::tmp_dir}/oim_${fmw_template}",
  103. version => $fmw_inst::version,
  104. oracle_home_dir => $fmw_oracle_home,
  105. tmp_dir => $fmw_inst::tmp_dir,
  106. require => File["${fmw_wls::tmp_dir}/oim_${fmw_template}"],
  107. }
  108. }
  109. }
  110. }