Writing a Neo4j Puppet module for fun and profit

I haven’t had a chance to do any code in public recently.  Skewer and XFD have had to take a back seat to the day job, where I’ve been working on our Heroku Add-on.  We recognised that a PaaS won’t work for everyone, so I was asked to take a look at deploying Neo4j on EC2.

The original plan was to make an AMI that people evaluating Neo4j could instantiate on EC2.  I didn’t want to create a machine by hand and then build an image from that machine: it seems more repeatable to have a process where you bootstrap the OS using VeeWee and then use Puppet or Chef to finish the job.  In the end I decided to start with Puppet and Ubuntu and see how far I got.

I started by fixing our Neo Technology Debian repository so we could get signed packages.  That had benefits on its own – our release process is simpler now.  Then I wrote a Puppet module to install the packages on Ubuntu and apply some configuration changes on top to make it usable (for example, Neo4j doesn’t listen on all interfaces by default).  The README suggests that you download and run a wrapper script that will fetch the module, the dependencies, and then run them.  It’s looking decent.

We strongly suggest that people use the Oracle JDK, so I had to come up with a way to get that installed, without distributing the JDK myself.  Also, I felt it was important that the user signal their acceptance of the terms and conditions of the Java end user license, so I found a way to do that.  Also, doing anything on the cloud without authentication is foolish, so made it possible for the user to pass a username and password to use at runtime.  It’s looking useful.

Then I put myself in the position of someone who wants to install Neo4j, but isn’t familiar with the territory of EC2 and Ubuntu servers.  It wasn’t enough.  So I wrapped the entire thing in CloudFormation to create the AWS resources that the user needs, bootstrap the Puppet module, and pass down the parameters.  Now we’re getting somewhere.

The finished product is at https://github.com/neo4j-contrib/neo4j-puppet.  Feedback welcome.  I’m not sure I need to bother with an AMI.

I’m thinking about:

  • Making it compliant with Puppet Forge
  • Supporting other Linux distributions
  • Making it easier to get SSL going (though there’s no getting around the fact that the end user will need a cert, I guess)
  • Supporting multiple regions on AWS

 

One thought on “Writing a Neo4j Puppet module for fun and profit

  1. […] Writing a Neo4j Puppet module for fun and profit is I think how a lot of trial stuff is going to be distributed. And Puppet is fun. […]

Comments are closed.

Follow

Get every new post delivered to your Inbox.

Join 3,380 other followers

%d bloggers like this: