Foreman, Puppet and Oracle DB Config management

> Morning all
>
> I've asked a similar question on the Puppet Users group, but thought it
> might be good to get a view on how Foreman could be used to achieve the
> following.
>
> We're looking to use Puppet to manage out Oracle DB server and relevant DB
> instance configuration.
> I've got an idea on how to handle the install of Oracle and the relevant
> req fulfilment.
>
> However what I'm not sure of is how to manage the instance specific
> configuration. This includes things like the /etc/oratab file,
> /etc/oranfstab (as we're using dNFS), various NFS mounts that make up a
> given database, and a few other bits and pieces…
> We're also likely to be needing to support multiple databases instances on
> a given host.
>
> My initial thoughts are to use Hiera or similar to manage the multiple
> configuration instances. However could Foreman go in Hiera's place?
>
> Yes, this is where Foreman Smart Variables (or puppet classes parameters)
become handy.

Ohad

··· On Thu, Oct 25, 2012 at 1:09 PM, Gavin Williams wrote:

Foreman would also be a bit easier for the DBA’s to get used to, versus
the flat files for hiera config.

Thoughts or suggestions welcome.
And thanks in advance for any responses.

Regards
Gavin


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/foreman-users/-/hEdeBus7AfwJ.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

>
>
>
>
>> Morning all
>>
>> I've asked a similar question on the Puppet Users group, but thought it
>> might be good to get a view on how Foreman could be used to achieve the
>> following.
>>
>> We're looking to use Puppet to manage out Oracle DB server and relevant
>> DB instance configuration.
>> I've got an idea on how to handle the install of Oracle and the relevant
>> req fulfilment.
>>
>> However what I'm not sure of is how to manage the instance specific
>> configuration. This includes things like the /etc/oratab file,
>> /etc/oranfstab (as we're using dNFS), various NFS mounts that make up a
>> given database, and a few other bits and pieces…
>> We're also likely to be needing to support multiple databases instances
>> on a given host.
>>
>> My initial thoughts are to use Hiera or similar to manage the multiple
>> configuration instances. However could Foreman go in Hiera's place?
>>
>> Yes, this is where Foreman Smart Variables (or puppet classes parameters)
> become handy.
>
> Ohad
>

The intention with whatever Classes I write are to fully parametrize
them… Then it's just a case of iterating through a list of DB instances
that should be on a given node. However what I'm not sure of is where to
store that list… :slight_smile:

Gavin

··· On Thursday, 25 October 2012 13:42:45 UTC+1, ohad wrote: > On Thu, Oct 25, 2012 at 1:09 PM, Gavin Williams <fatm...@gmail.com > > wrote:

Foreman would also be a bit easier for the DBA’s to get used to, versus

the flat files for hiera config.

Thoughts or suggestions welcome.
And thanks in advance for any responses.

Regards
Gavin


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/foreman-users/-/hEdeBus7AfwJ.
To post to this group, send email to forema...@googlegroups.com<javascript:>
.
To unsubscribe from this group, send email to
foreman-user...@googlegroups.com <javascript:>.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

Gavin,

I can't give you a complete manifest since much of my manifest is custom to the environment but there are two ways I solved this issue.

  1. use fpm to create a rpm of all the files associated with oracle install
    a. installs in 5 minutes

  2. use the oracle automated installer where a answer file is feed to oracle (much like a kickstart file)
    a. takes several hours to install
    b. should fit just about any envrionment

Depending on your environment and version of oracle you may need to create multiple answer files and rpm files for different operating systems and versions of oracle. My environment was fairly homogenous so it was pretty easy to deploy the same thing over and over.

The first thing I would do is start with oracle-validated rpm. This essentially sets up your OS environment so that one can install oracle. You will need to download the specific configuration for your environment.

Then add this rpm to your custom yumrepo server.

Once installed please modify your sysctl.conf file either by hand or puppet.

Also please read how oracle validated works since it runs a script on your OS to determine the best kernel parameter values to use.

http://www.oracle.com/technetwork/topics/linux/validated-configurations-085828.html

Example:

class oracle {
# ensure oracle-validated is installed
# ensure oracle user install installed
# ensure oracle directories are created
# install oracle if rpm is available
include oracle::users, oracle::ulimits, oracle::directories
include repos
$packagelist = ["oracle-validated"]

    package { $packagelist:
          ensure =&gt; installed,
          provider =&gt; yum,
    }	
    realize(
            Group[&quot;dba&quot;]
            )
    realize(
            User[&quot;oracle&quot;]
            )

}

Once your environment is setup for oracle install oracle via one of the two options defined above.

After oracle is installed you may need to run a few exec resources to run the scripts that the oracle installer needs to run.

If you need to figure out which oracle databases are on the system I created a custom fact to list out the sids.

http://pastebin.com/2dP2VERg

Here was my first attempt of automating the oracle installer via response file. Please note I had very little puppet experience at this time. There is a much better way of doing this using File and Exec resources with templates.

http://pastebin.com/B4mUqY0j

Thanks,

Corey Osman
corey@logicminds.biz

Green IT and Data Center Automation Specialist

··· On Oct 25, 2012, at 7:02 AM, Gavin Williams wrote:

On Thursday, 25 October 2012 13:42:45 UTC+1, ohad wrote:

On Thu, Oct 25, 2012 at 1:09 PM, Gavin Williams fatm...@gmail.com wrote:
Morning all

I’ve asked a similar question on the Puppet Users group, but thought it might be good to get a view on how Foreman could be used to achieve the following.

We’re looking to use Puppet to manage out Oracle DB server and relevant DB instance configuration.
I’ve got an idea on how to handle the install of Oracle and the relevant req fulfilment.

However what I’m not sure of is how to manage the instance specific configuration. This includes things like the /etc/oratab file, /etc/oranfstab (as we’re using dNFS), various NFS mounts that make up a given database, and a few other bits and pieces…
We’re also likely to be needing to support multiple databases instances on a given host.

My initial thoughts are to use Hiera or similar to manage the multiple configuration instances. However could Foreman go in Hiera’s place?

Yes, this is where Foreman Smart Variables (or puppet classes parameters) become handy.

Ohad

The intention with whatever Classes I write are to fully parametrize them… Then it’s just a case of iterating through a list of DB instances that should be on a given node. However what I’m not sure of is where to store that list… :slight_smile:

Gavin
Foreman would also be a bit easier for the DBA’s to get used to, versus the flat files for hiera config.

Thoughts or suggestions welcome.
And thanks in advance for any responses.

Regards
Gavin


You received this message because you are subscribed to the Google Groups “Foreman users” group.
To view this discussion on the web visit https://groups.google.com/d/msg/foreman-users/-/hEdeBus7AfwJ.
To post to this group, send email to forema...@googlegroups.com.
To unsubscribe from this group, send email to foreman-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/foreman-users?hl=en.


You received this message because you are subscribed to the Google Groups “Foreman users” group.
To view this discussion on the web visit https://groups.google.com/d/msg/foreman-users/-/KDw36MPwFgQJ.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/foreman-users?hl=en.

Corey

Cheers again for the below. Very helpful…

Quick question though - I'm trying to get opatch working, and I keep
hitting path and env issues…
How have you specified $ORACLE_HOME, etc? Are you using the default POSIX
provider, or another?

Cheers
Gavin

··· On Friday, 26 October 2012 20:01:14 UTC+1, Corey Osman wrote: > > Gavin, > > I can't give you a complete manifest since much of my manifest is custom > to the environment but there are two ways I solved this issue. > > 1. use fpm to create a rpm of all the files associated with oracle install > a. installs in 5 minutes > > 2. use the oracle automated installer where a answer file is feed to > oracle (much like a kickstart file) > a. takes several hours to install > b. should fit just about any envrionment > > Depending on your environment and version of oracle you may need to create > multiple answer files and rpm files for different operating systems and > versions of oracle. My environment was fairly homogenous so it was pretty > easy to deploy the same thing over and over. > > The first thing I would do is start with oracle-validated rpm. This > essentially sets up your OS environment so that one can install oracle. > You will need to download the specific configuration for your environment. > > Then add this rpm to your custom yumrepo server. > > Once installed please modify your sysctl.conf file either by hand or > puppet. > > Also please read how oracle validated works since it runs a script on your > OS to determine the best kernel parameter values to use. > > > http://www.oracle.com/technetwork/topics/linux/validated-configurations-085828.html > > Example: > > class oracle { > # ensure oracle-validated is installed > # ensure oracle user install installed > # ensure oracle directories are created > # install oracle if rpm is available > include oracle::users, oracle::ulimits, oracle::directories > include repos > $packagelist = ["oracle-validated"] > > package { $packagelist: > ensure => installed, > provider => yum, > } > realize( > Group["dba"] > ) > realize( > User["oracle"] > ) > } > > > Once your environment is setup for oracle install oracle via one of the > two options defined above. > > After oracle is installed you may need to run a few exec resources to run > the scripts that the oracle installer needs to run. > > If you need to figure out which oracle databases are on the system I > created a custom fact to list out the sids. > > http://pastebin.com/2dP2VERg > > > Here was my first attempt of automating the oracle installer via response > file. Please note I had very little puppet experience at this time. There > is a much better way of doing this using File and Exec resources with > templates. > > > http://pastebin.com/B4mUqY0j > > > Thanks, > > Corey Osman > co...@logicminds.biz > > Green IT and Data Center Automation Specialist > > > > > > > On Oct 25, 2012, at 7:02 AM, Gavin Williams <fatm...@gmail.com> > wrote: > > > > On Thursday, 25 October 2012 13:42:45 UTC+1, ohad wrote: >> >> >> >> On Thu, Oct 25, 2012 at 1:09 PM, Gavin Williams wrote: >> >>> Morning all >>> >>> I've asked a similar question on the Puppet Users group, but thought it >>> might be good to get a view on how Foreman could be used to achieve the >>> following. >>> >>> We're looking to use Puppet to manage out Oracle DB server and relevant >>> DB instance configuration. >>> I've got an idea on how to handle the install of Oracle and the relevant >>> req fulfilment. >>> >>> However what I'm not sure of is how to manage the instance specific >>> configuration. This includes things like the /etc/oratab file, >>> /etc/oranfstab (as we're using dNFS), various NFS mounts that make up a >>> given database, and a few other bits and pieces... >>> We're also likely to be needing to support multiple databases instances >>> on a given host. >>> >>> My initial thoughts are to use Hiera or similar to manage the multiple >>> configuration instances. However could Foreman go in Hiera's place? >>> >>> Yes, this is where Foreman Smart Variables (or puppet classes >> parameters) become handy. >> >> Ohad >> > > The intention with whatever Classes I write are to fully parametrize > them... Then it's just a case of iterating through a list of DB instances > that should be on a given node. However what I'm not sure of is where to > store that list... :) > > Gavin > >> Foreman would also be a bit easier for the DBA's to get used to, versus >>> the flat files for hiera config. >>> >>> Thoughts or suggestions welcome. >>> And thanks in advance for any responses. >>> >>> Regards >>> Gavin >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Foreman users" group. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msg/foreman-users/-/hEdeBus7AfwJ. >>> To post to this group, send email to forema...@googlegroups.com. >>> To unsubscribe from this group, send email to >>> foreman-user...@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/foreman-users?hl=en. >>> >> >> > -- > You received this message because you are subscribed to the Google Groups > "Foreman users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/foreman-users/-/KDw36MPwFgQJ. > To post to this group, send email to forema...@googlegroups.com > . > To unsubscribe from this group, send email to > foreman-user...@googlegroups.com . > For more options, visit this group at > http://groups.google.com/group/foreman-users?hl=en. > > >

For this you need to setup a oracle user on this system which oracle will run under. The oracle user profile should contain all the necessary scripts and environment settings for oracle to run.

I actually just created a few File resources and copied copied the entire oracle user's home directory over to the new node. So whenever you login as oracle every environment variable is set.

Corey Osman
corey@logicminds.biz

Green IT and Data Center Automation Specialist

··· On Nov 1, 2012, at 2:42 AM, Gavin Williams wrote:

Corey

Cheers again for the below. Very helpful…

Quick question though - I’m trying to get opatch working, and I keep hitting path and env issues…
How have you specified $ORACLE_HOME, etc? Are you using the default POSIX provider, or another?

Cheers
Gavin

On Friday, 26 October 2012 20:01:14 UTC+1, Corey Osman wrote:
Gavin,

I can’t give you a complete manifest since much of my manifest is custom to the environment but there are two ways I solved this issue.

  1. use fpm to create a rpm of all the files associated with oracle install
    a. installs in 5 minutes

  2. use the oracle automated installer where a answer file is feed to oracle (much like a kickstart file)
    a. takes several hours to install
    b. should fit just about any envrionment

Depending on your environment and version of oracle you may need to create multiple answer files and rpm files for different operating systems and versions of oracle. My environment was fairly homogenous so it was pretty easy to deploy the same thing over and over.

The first thing I would do is start with oracle-validated rpm. This essentially sets up your OS environment so that one can install oracle. You will need to download the specific configuration for your environment.

Then add this rpm to your custom yumrepo server.

Once installed please modify your sysctl.conf file either by hand or puppet.

Also please read how oracle validated works since it runs a script on your OS to determine the best kernel parameter values to use.

http://www.oracle.com/technetwork/topics/linux/validated-configurations-085828.html

Example:

class oracle {

ensure oracle-validated is installed

ensure oracle user install installed

ensure oracle directories are created

install oracle if rpm is available

include oracle::users, oracle::ulimits, oracle::directories
include repos
$packagelist = [“oracle-validated”]

    package { $packagelist:
          ensure => installed,
          provider => yum,
    }	
    realize(
            Group["dba"]
            )
    realize(
            User["oracle"]
            )

}

Once your environment is setup for oracle install oracle via one of the two options defined above.

After oracle is installed you may need to run a few exec resources to run the scripts that the oracle installer needs to run.

If you need to figure out which oracle databases are on the system I created a custom fact to list out the sids.

http://pastebin.com/2dP2VERg

Here was my first attempt of automating the oracle installer via response file. Please note I had very little puppet experience at this time. There is a much better way of doing this using File and Exec resources with templates.

http://pastebin.com/B4mUqY0j

Thanks,

Corey Osman
co...@logicminds.biz

Green IT and Data Center Automation Specialist

On Oct 25, 2012, at 7:02 AM, Gavin Williams fatm...@gmail.com wrote:

On Thursday, 25 October 2012 13:42:45 UTC+1, ohad wrote:

On Thu, Oct 25, 2012 at 1:09 PM, Gavin Williams fatm...@gmail.com wrote:
Morning all

I’ve asked a similar question on the Puppet Users group, but thought it might be good to get a view on how Foreman could be used to achieve the following.

We’re looking to use Puppet to manage out Oracle DB server and relevant DB instance configuration.
I’ve got an idea on how to handle the install of Oracle and the relevant req fulfilment.

However what I’m not sure of is how to manage the instance specific configuration. This includes things like the /etc/oratab file, /etc/oranfstab (as we’re using dNFS), various NFS mounts that make up a given database, and a few other bits and pieces…
We’re also likely to be needing to support multiple databases instances on a given host.

My initial thoughts are to use Hiera or similar to manage the multiple configuration instances. However could Foreman go in Hiera’s place?

Yes, this is where Foreman Smart Variables (or puppet classes parameters) become handy.

Ohad

The intention with whatever Classes I write are to fully parametrize them… Then it’s just a case of iterating through a list of DB instances that should be on a given node. However what I’m not sure of is where to store that list… :slight_smile:

Gavin
Foreman would also be a bit easier for the DBA’s to get used to, versus the flat files for hiera config.

Thoughts or suggestions welcome.
And thanks in advance for any responses.

Regards
Gavin


You received this message because you are subscribed to the Google Groups “Foreman users” group.
To view this discussion on the web visit https://groups.google.com/d/msg/foreman-users/-/hEdeBus7AfwJ.
To post to this group, send email to forema...@googlegroups.com.
To unsubscribe from this group, send email to foreman-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/foreman-users?hl=en.


You received this message because you are subscribed to the Google Groups “Foreman users” group.
To view this discussion on the web visit https://groups.google.com/d/msg/foreman-users/-/KDw36MPwFgQJ.
To post to this group, send email to forema...@googlegroups.com.
To unsubscribe from this group, send email to foreman-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/foreman-users?hl=en.


You received this message because you are subscribed to the Google Groups “Foreman users” group.
To view this discussion on the web visit https://groups.google.com/d/msg/foreman-users/-/PaZPgtWgJHoJ.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/foreman-users?hl=en.