Ask Your Question
0

Oracle client Installation

asked 2017-11-02 15:05:04 -0600

Mahender gravatar image

Hi Team,

Could you please help me out writing the oracle client installation using puppet manifest for both Linux and Solaris.

Both version should include in single manifest(for both Linux and Solaris) .

Let me know if you have any questions.

Thanks, Mahender

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-11-03 04:16:58 -0600

stivesso gravatar image

updated 2017-11-03 04:18:26 -0600

Hi Mahender,

I have been using biemond/oradb for a while now, and it supports both Linux and Solaris. Find below a sample of Oracle Client Profiles (using profiles/roles pattern) that I am using on RedHat/Oracle Linux. I have also added a sample of Hiera Data used with that profiles. I hope that will help.

The key section (and the one you can easily adapt for Solaris) is the following:

Key Section:

  oradb::client{ "${version}_${::kernel}-${::architecture}":
    version                   => $version,
    file                      => $file,
    oracle_base               => $oracle_base,
    oracle_home               => $oracle_home,
    user                      => $user,
    group                     => $group,
    group_install             => $group_install,
    download_dir              => $download_dir,
    bash_profile              => $bash_profile,
    remote_file               => $remote_file,
    puppet_download_mnt_point => $puppet_download_mnt_point,
    logoutput                 => $logoutput,
    require                   => Package["oracle-rdbms-server-11gR2-preinstall","unzip"],
  }

Full Profiles: (For RedHat/Oracle Linux)

class profiles::oracle_client (
 $version,
 $file,
 $oracle_base,
 $oracle_home,
 $user,
 $group,
 $group_install,
 $download_dir,
 $bash_profile,
 $remote_file,
 $puppet_download_mnt_point,
 $logoutput,
 $tns_name_server,
)
{

  # Add Oracle/RedHat Linux Repository for dependencies
  if $facts['os']['name'] != 'OracleLinux' {

    file { "/etc/yum.repos.d/public-yum-ol${facts['os']['release']['major']}.repo":
      ensure => file,
      owner  => root,
      group  => root,
      mode   => '0644',
      source => "puppet:///modules/profiles/public-yum-ol${facts['os']['release']['major']}.repo",
    }

    file { "RPM-GPG-KEY-oracle-ol${facts['os']['release']['major']}":
      ensure  => present,
      path    => "/etc/pki/rpm-gpg/RPM-GPG-KEY-oracle",
      source  => "puppet:///modules/profiles/RPM-GPG-KEY-oracle-ol${facts['os']['release']['major']}",
    }

    gpg_key { "RPM-GPG-KEY-oracle-ol${facts['os']['release']['major']}":
      path  => "/etc/pki/rpm-gpg/RPM-GPG-KEY-oracle",
      require => File["RPM-GPG-KEY-oracle-ol${facts['os']['release']['major']}"],
    }

    package { "oracle-rdbms-server-11gR2-preinstall":
      ensure  => 'present',
      require => [ File["/etc/yum.repos.d/public-yum-ol${facts['os']['release']['major']}.repo"], Gpg_key["RPM-GPG-KEY-oracle-ol${facts['os']['release']['major']}"] ]
    }

  } 
  else {
    package { "oracle-rdbms-server-11gR2-preinstall":
      ensure  => 'present',
    }
  }

  package { "unzip":
    ensure  => 'present',
  }

  oradb::client{ "${version}_${::kernel}-${::architecture}":
    version                   => $version,
    file                      => $file,
    oracle_base               => $oracle_base,
    oracle_home               => $oracle_home,
    user                      => $user,
    group                     => $group,
    group_install             => $group_install,
    download_dir              => $download_dir,
    bash_profile              => $bash_profile,
    remote_file               => $remote_file,
    puppet_download_mnt_point => $puppet_download_mnt_point,
    logoutput                 => $logoutput,
    require                   => Package["oracle-rdbms-server-11gR2-preinstall","unzip"],
  }


}

A sample of Hiera Data:

---  
profiles::oracle_client::version:                   '11.2.0.1'
profiles::oracle_client::file:                      'linux.x64_11gR2_client.zip'
profiles::oracle_client::oracle_base:               '/u01/oracle'
profiles::oracle_client::oracle_home:               '/u01/oracle/product/11.2/client'
profiles::oracle_client::user:                      'oracle'
profiles::oracle_client::group:                     'oinstall'
profiles::oracle_client::group_install:             'oinstall'
profiles::oracle_client::download_dir:              '/install'
profiles::oracle_client::bash_profile:              false
profiles::oracle_client::remote_file:               false
profiles::oracle_client::puppet_download_mnt_point: "/net/my_shared_binary_install/dba_softs/zip"
profiles::oracle_client::logoutput:                 true
profiles::oracle_client::tns_name_server:
  cbs:      'mydb-scan.stivesso.home'
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-11-02 15:05:04 -0600

Seen: 344 times

Last updated: Nov 03