I am somewhat new to puppet and I wanted to show a demo that automated the install of oracle to my DBA in hopes to entice him to start automating his procedures.
I have linked my manifest code below for review. In the code I have attempted to automate a complete oracle install by following the instructions provided by my DBA. Its very rough code as I am not an expert yet.
The code assumes that the oracle pre-install checklist has been completed via another class called oraclebase. I am using oracle generated response files to automate the actual oracle install. However since oracle doesn't come inside an rpm I don't know of a good way to check if oracle is installed. Using du is probably the worst way since after an install it will take too long to determine if the size is bigger than 5 (line 16).
I thought about using NFS to install which would change my cwd to /net/nfsserver/oracle_install/database which would save bandwidth but there may be times when NFS is unavailable or slow WAN links.
How can I tell if oracle is install or any program when its install without rpm?
How can I tell when the untar command is finished?
What happens when it takes a while to transfer 1.8GB file?
Does the "user => oracle" give me the environment of the user like su - oracle would?
Is there a provider for patching oracle? Is there a patch type?
Is it bad to have lots of exec statements?
Let me know if you have any insight or possibly interested in this code. I would eventually like to turn this into a module.
thanks,
Corey
> What happens when it takes a while to transfer 1.8GB file?
Just a quick warning before I leave, don't even think of copying this using puppet if you have version 0.25.x or below. Those version load the whole file into RAM before copying. This might be fixed in 2.6.x.
am no expert, but it might help you...: http://pastebin.com/QLk14h6s
Mohamed.
> --
> You received this message because you are subscribed to the Google Groups "Puppet Users" group.
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
>
>
--
يوم نلقاك يوم فرحي و هنايا
Umn, is this really better than putting it in a repository? A repository will take care of 1, 2, and 4a for you.
Corey Osman wrote:
> I am somewhat new to puppet and I wanted to show a demo that automated the install of oracle to my DBA in hopes to entice him to start automating his procedures.
An automated Oracle install is pretty complicated. I've been a Linux
Sysadmin for about 10 years and I've worked for Oracle for about 3 years
and even my automated Puppet-based installation isn't perfect. Sadly,
it's also currently not shareable as I do a few bad things. :)
You've also not specified which version of Oracle you're installing:
10g? 11gR1? 11gR2? I've automated 11gR2 Enterprise Edition with Grid
Infrastructure and Real Application Clusters, which is one of the more
complex deployments, and also one of the most expensive. :)
> The code assumes that the oracle pre-install checklist has been completed via another class called oraclebase.
You should take a look at the oracle-validated RPM [1] provided by
Oracle to automate the pre-requisites. This configures users, groups,
sysctl parameters, ulimits, etc. Pretty much everything you need to run
the Oracle Universal Installer.
> How can I tell if oracle is install or any program when its install without rpm?
There are a few utilities you can use. tnsping will tell you if the
listener has come online. sqlplus can be used to see if the database
instance has started. However, you didn't pastie the contents of the
response file, so I don't know if either of those things would actually
occur at the end of your install.
> Does the "user => oracle" give me the environment of the user like su - oracle would?
No, it doesn't. Thus, I would recommend not using the execs -- you
should rather create an installation script and deliver that with a File
resource and then use the Exec to run that script. You can then do much
better logging of the installation process, including things like
wget/rsync'ing the installation files, etc. This is how we do the
installation of most Oracle products including Database and the
Enterprise Manager agent.
> Is there a provider for patching oracle? Is there a patch type?
Not for Puppet. You should be looking at using Oracle Enterprise Manager
11g Grid Control for provisioning and patching Oracle databases. I know
this is the puppet list and I know that I've automated the installation
of Oracle with Puppet, but it would be unfair of me not to say that
provisioning database with Grid Control is much, much easier and
simpler. However, it's much, much more expensive. :)
> Is it bad to have lots of exec statements?
In my experience, yes. The way I do my non-RPM based installations,
primarily of Oracle products, is via File[] delivered scripts and then
just a single Exec to run that script. Or, in some cases I get Puppet to
add a cron entry to run the script and I don't run it with Puppet at all.
Hope that gives you a few ideas. I'm sorry I can't share my Puppet code,
but it really would only be useful for someone installing Oracle
Database 11gR2 Enterprise Edition with Grid Infrastructure and Real
Application Clusters. And really, once you're at that level, you've
probably got Grid Control anyway.
Cheers,
Avi