NoSQL Zone is brought to you in partnership with:

I'm currently working as a Bioinformatics consultant/developer/researcher at http://www.ohnosequences.com Amateur musician, traveller, painter, sporadic writer and always eager to learn more about languages, plants... Too many things to do and too little time for it! Pablo is a DZone MVB and is not an employee of DZone and has posted 8 posts at DZone. You can read more from them at their website. View Full User Profile

Bio4j + AWS CloudFormation = your own fresh baked DB in less than a minute!

12.08.2011
| 4662 views |
  • submit to reddit
Hi!

So this week it was time to finally start using CloudFormation together with Bio4j. For those not familiar with this AWS service, quoting from their site:

AWS CloudFormation gives developers and systems administrators an easy way to create and manage a collection of related AWS resources, provisioning and updating them in an orderly and predictable fashion.


This is really useful because thanks to CloudFormation templates, you don’t have to worry about manually launching an instance, create a volume, attach it, do some stuff, and then free the resources … You can encapsulate all this tasks in a template reducing all the tasks to just two:

  1. create the stack
  2. delete the satck whenever you are done with it

This template is available in the following address:
https://s3-eu-west-1.amazonaws.com/bio4j-public/Bio4jBasicInstanceTemplate.txt

So, let’s see how easy it actually is to create your stack:
First you should go to the ‘CloudFormation’ tab in the amazon console and click the button: ‘Create New Stack’

You will see this new window now where you should choose the option Provide a template URL’ and paste there the URL I just provided before. You should also give your stack a name filling the field ‘Stack name’. Then click ‘Continue’.

Ok, now you should be seeing this:

Provide then your key-pair name, left unchanged the snapshot-id field if you want to use the last version and finally enter the type of instance you want to launch.
Once you clicked continue you’ll see a review of all the parameters you entered so far like:

Check everything is as you wish and click continue.
You should be seeing then something like this:

Now you just have to wait for about 30 seconds until after refreshing the stack state changes to green color and says “CREATE_COMPLETE”.
Click on the output tab and you will see the IP address you need to connect with SSH to your new instance.

So now you just have to connect to your instance and you should have your fresh backed Bio4j DB under the folder /mnt/bio4j_volume/bio4jdb ;)

Whenever you are done, just select delete stack in the amazon console and don’t worry about terminating your instance, deleting your volume and all that, they will do it for you!

(Right now the use of this template is restricted to the region eu-west-1a but I plan to extend it to other regions as soon as possible)


@pablopareja

Source: http://blog.bio4j.com/2011/12/bio4j-aws-cloudformation-your-own-fresh-baked-db-in-less-than-a-minute/



Published at DZone with permission of Pablo Pareja Tobes, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)