Hi, 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 [1] http://oss.oracle.com/el5/oracle-validated/ -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.