Over a million developers have joined DZone.

Automation 2.0: NuoDB 2.0 Released

DZone 's Guide to

Automation 2.0: NuoDB 2.0 Released

· Database Zone ·
Free Resource

This week we released NuoDB 2.0, and if you've been following along you've seen a lot of discussion around automation. In our 1.2 release we provided a preview of where we're going, and with 2.0 we're building on those features to support starting and managing databases across multiple regions. We've also started collecting domain-wide statistics into a NuoDB database that you can use to monitor what's happening

With this week's release these new automation features are available, but not enabled by default. To turn them on we've provided a simple script. Install the new package on your OS of choice and then:

  • On Linux: sudo /opt/nuodb/bin/run-auto-console.sh
  • On Mac: /opt/nuodb/bin/run-auto-console.sh
  • On Windows: C:\Program Files\NuoDB\bin\run-auto-console.cmd (note: that this must be run with Windows ADMINISTRATOR privileges)

When you run this script several things happen:

  • Your local Broker's properties are set to automate database management
  • A stats database is started, initializing it necessary
  • A REST management service is started up on port 8888 with a new, stream-lined management GUI exposed

If you point your browser at "http://localhost:8888" you'll get something that looks like this:

If you haven't changed any config files, then you can login with the user "domain" and the password "bird" just like in previous releases. Once you've done that, if you click on "Launch DB Instance" you'll get a simple way of starting a database based on templates. In the 2.0 release we include four templates that support running on your local system, running a minimally redunant database, scaling-out across a region or running across multiple regions. If you're just testing this on a single system then choose the "Single Host" option and you'll be off and running.

Want to see what stats we're collecting? That same domain login was used as the initial DBA, so you can do this:

$ nuosql nuodb_system@localhost --user domain --password bird
SQL> use metrics;
SQL> show tables;

    Tables in schema METRICS


Database automation is driven from this collection of stats. We're also collecting these to help you build monitoring and automation. What we're exposing in this release is still an early version, so expect those tables to change a little, but we'd love to get feedback on whether you find this useful and what else you'd like to see!

Another thing we're starting to expose is the REST layer that's behind that new Web UI. It provides easy access to look at databases, processes, templates and hosts. It also is a simple integration point for automating your tasks. For instance, let's say you want to spin up a new scale-out database in the region named "myregion". Here's the one-line "curl" command to do it:

curl -u domain:bird -X POST -H "Accept: application/json" -H "Content-type: application/json" -d '{"name":"mydatabase", "template":"Multi Host", "username":"dba", "password":"dba", "variables":{"REGION":"myregion"}}' p21:8888/api/1/databases

As with the stats data, what's being exposed in this release is an early version, so the API is expected to evolved. In the next few weeks we'll get an API doc out there so you can play with what we have and give us feedback. We want this API to be useful to anyone thinking about provisioning and managing cloud resources!

Finally, note that in the above command, a region was explicitly named. One of the changes to templates between 1.2 and 2.0 is that we're building in an explicit notion of multi-region support for every database. Now when you run an agent, one of the properties is the name of the region. We'll be posting later this week about how you can use this to build low-latency deployments. We'll also be showing examples of load-balancing, and integrating in clouds like Amazon. Put together it's pretty cool how much power you get from relatively low administrative overhead.


Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}