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