Skip to content

Instantly share code, notes, and snippets.

@MitchPierias
Last active February 7, 2019 04:30
Show Gist options
  • Save MitchPierias/5589a25181f69860ef7282fc623f1f02 to your computer and use it in GitHub Desktop.
Save MitchPierias/5589a25181f69860ef7282fc623f1f02 to your computer and use it in GitHub Desktop.
Deploying a Neo4j Server on an Amazon EC2 Instance with Chef

Deploying a Neo4j Instance on Amazon EC2

Instance Setup

IAM Credentials

Ensure you have an IAM user created with correct EC2 or more access for the individual or machine you are wokring on and add your IAM User credentials into ~/.ssh/credentials

Instance Access credentials

Download .pem file and chmod 400 YOUR_CREDENTIALS.pem.

Prerequisites

SSH into instance

ssh YOUR_INSTANCE_CONFIG

Install Ruby Gem

sudo apt-get update
sudo apt-get install virtualbox
sudo apt-get install vagrant

Install the Ruby Version Manager

sudo apt-get install git-core curl
sudo \curl -L https://get.rvm.io | bash -s stable --ruby=1.9.3

Installing the Chef Gem

sudo apt install chef

And finally the Librarian Gem to manage cookbooks for Chef

sudo gem install librarian

Vagrant setup

Initialize a new Vagrant virtual machine

vagrant init

Open the Vagrantfile and change the config.vm.box = "base" to the following.

config.vm.box = "opscode-ubuntu-12.04"

Then add the box_url as well so Vagrant knows where to download the box.

config.vm.box_url = "https://opscode-vm.s3.amazonaws.com/vagrant/boxes/opscode-ubuntu-12.04.box" 

Save, exit and run

vagrant up

Now you have an ubuntu box up and running.

Installing Neo4j

Let's generate the Cheffle, it's basically a receipe, not sure why they didn't call it that?

chef-librarian init

Now we can configure our Cheffle by inserting

cookbook 'apt'
cookbook 'neo4j-server', :git => 'http://github.com/michaelklishin/neo4j-server-chef-cookbook'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment