Monday, July 22, 2013

CHEF: echa-oracle updated to v1.0.4, Patch 16619892 - 11.2.0.3.7 Patch Set Update

Updated the cookbook to use the latest Oracle patch which was released on 7/16/2013, Patch 16619892 - 11.2.0.3.7 Patch Set Update. Downloaded the new patch from https://support.oracle.com and placed it to the HTTPS media site (check the cookbook README.md for more details). At the same go decided to update the opatch version from 11.2.0.3.3 to 11.2.0.3.4.

Procedure itself was straight forward. Depends of course if you are overriding the default attributes from the ora_quickstart role or just using the default attributes.

1. Changed the attributes/default.rb.
default[:oracle][:rdbms][:latest_patch][:url] = 'https://secure.server.localdomain/path/to/p16619892_112030_Linux-x86-64.zip' 
default[:oracle][:rdbms][:latest_patch][:dirname] = '16619892'
2. Changed the ora_quickstart.rb role.
name "ora_quickstart"description "Role applied to Oracle quickstart test machines."run_list 'recipe[echa-oracle]', 'recipe[echa-oracle::logrotate_alert_log]', 'recipe[echa-oracle::logrotate_listener]', 'recipe[echa-oracle::createdb]'override_attributes :oracle => {:rdbms => {:latest_patch => {:url => 'https://secure.server.localdomain/path/to/p16619892_112030_Linux-x86-64.zip'}, :opatch_update_url => 'https://secure.server.localdomain/path/to/p6880880_112000_Linux-x86-64.zip', :install_files => ['https://secure.server.localdomain/path/to/p10404530_112030_Linux-x86-64_1of7.zip', 'https://secure.server.localdomain/path/to/p10404530_112030_Linux-x86-64_2of7.zip']}}
3. Uploaded the role to Hosted Chef.
knife role from file roles/ora_quickstart.rb
4. After changing metadata.rb, CHANGELOG.md and README.md, committed & pushed to GitHub.

5. Uploaded the new cookbook v1.0.4 to Hosted Chef.
knife cookbook upload echa-oracle --freeze
6. Ran a test on EC2, which proved to be successful. (Old post, but still using the same procedure for testing - CHEF: echa-oracle v1.0.0 cookbook tests on EC2)

For further details about the cookbook check from Opscode community site at http://community.opscode.com/cookbooks/oracle.

Tuesday, June 25, 2013

CHEF: echa-oracle v1.0.0 cookbook tests on DigitalOcean

Update on 4/4/2014: The cookbook has been re-launched at https://github.com/aririikonen/oracle, also available from Chef community site at http://community.opscode.com/cookbooks/oracle.

Further smoke testing for echa-oracle v1.0.0 cookbook. This time on DigitalOcean CentOS 6.4 x64 VM. (check out https://www.digitalocean.com, low cost VM's)

Pre-reqs (mainly the same as for EC2, post below):
More straight forward steps:
  • Whipped out a 2G MEM VM (CentOS 6.4 x64)
  • Modified /etc/hosts to add a valid FQDN
  • Bootstrapped with:
knife bootstrap FQDN -r 'role[ora_quickstart]' -j '{"oracle" :{"rdbms" :{"dbs" :{"FOO" :false}}}}'

Result:

Success.

Notes (also check below for EC2 notes):
  • Deployment will take some time, especially installing the Oracle binaries, latest patch and db creation, so don't be alarmed if it seems to be stuck, it isn't. Just check 'top' on the VM to verify this.
  • Swap missing again, so you'll need to add it later on.
  • Check that /dev/shm is big enough.
Sample output:

CHEF: echa-oracle v1.0.0 cookbook tests on EC2

Update on 4/4/2014: The cookbook has been re-lauched at https://github.com/aririikonen/oracle (v1.1.x), also available from Chef community site at http://community.opscode.com/cookbooks/oracle.

Been a while since I've posted something. This time it is about Chef and the new echa-oracle cookbook. At the time writing this post, echa-oracle cookbook has not been released yet, but I'll link the GitHub repo here once it is available.

Wanted to make sure, that before releasing the echa-oracle cookbook, I'll run a few smoke tests against some instances on EC2 and post the results here.

Pre-reqs:
Steps:

Made sure the knife ec2 commands were working fine with

knife ec2 server list

Bootstrapped a new flavor m1.small instance with ora_quickstart role. ora_quickstart role is described in detail on the echa-oracle cookbook README.md.

knife ec2 server create -I ami-9bf6e0ef -S pem_name -i ~/.ssh/pem_file_name.pem -x ec2-user -G sec_group -f m1.small --ebs-size 20 -r "role[ora_quickstart]" -j '{"oracle" : {"rdbms": {"dbs": {"FOO" : false}}}}'

Result:

Success.

Notes:
  • Deployment will take some time, especially installing the Oracle binaries, latest patch and db creation, so don't be alarmed if it seems to be stuck, it isn't. Just check 'top' on the instance to verify this.
  • Used a Red Hat Enterprise Linux 6.4 AMI (ami-9bf6e0ef)
  • By default, an EC2 instance doesn't come with swap. Depending on the flavor, you need to add 2x memory size swap on the VM. It is a normal Oracle recommendation, but you can get further details by checking the 11.2. documentation.
  • I had to use --ebs-size 20 parameter to get a bigger 20GB disk for the deployment. m1.small comes with 7GB as a default configuration.
  • Already mentioned in the echa-oracle cookbook README.md, but resize the /dev/shm as well. You might face some issues with a running Oracle database, if it is not big enough.
  • If you don't want to create a database(s) at the same deployment, you can leave the -j '{"oracle" : {"rdbms": {"dbs": {"FOO" : false}}}}' option out. Although you are able to create the database(s) later on by adding the node attributes directly with knife node edit.
Sample output of the test deployment:

https://gist.github.com/aririikonen/5936747