Saturday, June 14, 2014

Deploying Postgres-XL in 2-minutes with Chef/serverspec

As you may know, Postgres-XL, a MPP implementation of PostgreSQL, was released  last month.
Most of recent topics in the PostgreSQL development are related to implementing data warehouse. And Postgres-XL is getting attention.

However, such enhancement which consists of several PostgreSQL servers is a bit difficult to try for newbies because of the complicated deployment procedures.

So, I'd like to introduce a deployment toolkit I have created to deploy and test a "minimal" Postgres-XL cluster. It consists of chef cookbook and serverspec script.

There are a few assumptions to install Postgres-XL with this toolkit.
  • It needs RHEL6/CentOS6 distro.
  • It depends on the Internet connection -- because it uses yum and gem.
  • It requires Chef solo and serverspec to be available.
  • It would have 1 GTM, 1 Coordinator, and 1 Data node within one box.
Postgres-XL consists of following three processes:
  • "GTM", a process for global transaction management
  • "Coordinator", a process for accepting user connectoins
  • "Data node", a process for processing disk I/O
In this video, these three processes are installed and configured on a single box. And those are deployed by Chef solo, tested by serverspec, and connected with using the psql command. (All of them are examined on CentOS 6.4 and vagrant)

Ok, it's show time! (It's strongly recommended to watch the hi-res edition on

Deploying Postgres-XL in 2 minutes from uptimejp on Vimeo.

The Chef cookbook and the serverspec test scripts are available on Github:
As you saw in the video, you can deploy a minimal Postgres-XL in a few minutes with this toolkit. (You can find exact the same code on the master branch with "r20140610" tag.)

This toolkit can handle only the minimal deployment so far. But I'm supposed to hack it to deploy a larger cluster which supports several separated servers.

At least, you can install a minimal Postgres-XL deployment. Please try it if you're interested in Postgres-XL and MPP technology.

And of course, any feedback (or any pull-requests) are welcome. :)

No comments: