wls_windows.pp 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #
  2. # fmw_wls::internal::wls_windows
  3. #
  4. # Copyright 2015 Oracle. All Rights Reserved
  5. #
  6. class fmw_wls::internal::wls_windows(
  7. $java_home_dir = undef,
  8. $source_file = undef,
  9. $install_type = undef,
  10. )
  11. {
  12. registry::value { 'inst_loc':
  13. key => 'HKLM\SOFTWARE\Oracle',
  14. data => $fmw_wls::ora_inventory_dir,
  15. }
  16. if ( $fmw_wls::version in ['12.2.1', '12.2.1.1', '12.2.1.2', '12.1.3', '12.1.2'] ){
  17. $wls_template = 'wls_12c.rsp'
  18. } elsif ( $fmw_wls::version in ['10.3.6', '12.1.1'] ){
  19. $wls_template = 'wls_11g.rsp'
  20. }
  21. if ( $install_type == 'wls' ){
  22. $wls_install_type = 'WebLogic Server'
  23. } elsif ( $install_type == 'infra' ) {
  24. $wls_install_type = 'Fusion Middleware Infrastructure'
  25. } else {
  26. $wls_install_type = 'WebLogic Server'
  27. }
  28. # add the webLogic silent response
  29. file { "${fmw_wls::tmp_dir}/${wls_template}":
  30. ensure => present,
  31. content => template("fmw_wls/${wls_template}"),
  32. }
  33. if ( $fmw_wls::version in ['10.3.6', '12.1.1'] ) {
  34. exec{ 'Install WLS':
  35. command => "${java_home_dir}\\bin\\java.exe -Xmx1024m -Djava.io.tmpdir=${fmw_wls::tmp_dir} -Duser.country=US -Duser.language=en -jar ${source_file} -mode=silent -silent_xml=${fmw_wls::tmp_dir}/${wls_template} -log=${fmw_wls::tmp_dir}/wls.log -log_priority=info",
  36. environment => ['JAVA_VENDOR=Sun', "JAVA_HOME=${java_home_dir}"],
  37. creates => "${fmw_wls::middleware_home_dir}/modules",
  38. timeout => 0,
  39. require => [File["${fmw_wls::tmp_dir}/${wls_template}"],Registry::Value['inst_loc'],],
  40. }
  41. } elsif ( $fmw_wls::version in ['12.2.1', '12.2.1.1', '12.2.1.2', '12.1.3', '12.1.2'] ){
  42. exec{ 'Install WLS':
  43. command => "${java_home_dir}\\bin\\java.exe -Xmx1024m -Djava.io.tmpdir=${fmw_wls::tmp_dir} -jar ${source_file} -silent -responseFile ${fmw_wls::tmp_dir}/${wls_template}",
  44. creates => "${fmw_wls::middleware_home_dir}/oracle_common",
  45. timeout => 0,
  46. require => [File["${fmw_wls::tmp_dir}/${wls_template}"],Registry::Value['inst_loc'],],
  47. }
  48. }
  49. }