Setup your EC2 instance AND Neo4j using Puppet (source)
Neo4j CloudFormation Template
This template creates a complete Neo4j installation, including Amazon AWS server, fixed IP address and backup storage. It's intended to help application developers get up and running quickly with Neo4j, without in-depth experience of Linux servers, AWS, or installing databases like Neo4j.
If you use this tool, you'll be creating a "stack" of the following on Amazon AWS:
- One m1.large server
- One Elastic IP address
- 100 GB of EBS storage
- One security group
Amazon will charge the cost for all this to your credit card on an hourly basis, from when you start the stack, until you stop the stack. Please look up the pricing calculator if you're concerned about the hosting cost.
To use this tool you'll need:
- An AWS account, with credentials, and credit card on file
- An EC2 key pair, in the US-EAST zone (which is the default)
- A browser
- A username and password for your application to securely access Neo4j with
- Log onto the AWS CloudFormation console with your AWS account.
- Click Create New Stack
- Fill in the Stack Name field (whatever name you'd like)
- Click the Provide a template URL radio button
- Paste this link into the field next to the button
- Click the Continue button
- Fill in the 5 parameters.
- The SSHKeyName parameter is the name of your EC2 Key pair (we suggested NEO4J)
- The Oracle license is the license to use Java
- Leave the AWSAvailabilityZone to the default value if you're not sure which value to use
- Choose a username
- And a password - you'll use these to connect to your Neo4j instance.
- Click Continue button
- You can optionally add tags to help identify your stacks. Click Continue button.
- You may review your options here. Click Continue button.
- Your stack is now being created. Click the Close button.
- Click the Refresh button on the top right hand side of the CloudFormation view until your stack is complete. You should see the image below:
- After the stack is created it will take 5-10 minutes to deploy Java and Neo4j.
- The Output tab will show you the endpoint of the Neo4j server (see below). Click on it, and when prompted for password, enter the password that you chose in pre-requisites.
- Configure your application to talk to the endpoint.
If you're done using your Neo4j installation, you can delete the stack from the AWS CloudFormation console.
Why might this go wrong?
- Resources are sometimes not available at Amazon. That's just part of our brave new cloudy world. We'll add different availability zones in time.
- Getting the Oracle JVM onto Ubuntu is fiddly. We want you to get recent releases of the JDK, and we want to respect Oracle's licenses. So we use a tool called OAB to get the Oracle JDK onto the machine. Sometimes it may break, and you'll need to have a look at the Puppet log file to see what is going on. You can also elect to use the OpenJDK from Ubuntu (though we presently don't certify Neo4j on that JVM).
- Sometimes, something will happen that we cannot predict. We'd appreciate your help here; a GitHub issue or email to the Mailing List with some smart questions or observations.
How to see detail:
Using the EC2 SSH key that you kept earlier, you can SSH onto the machine:
ssh -i NEO4J.pem ubuntu@<the IP address from the output> cat /var/tmp/puppet.log
ssh -i NEO4J.pem ubuntu@<the IP address from the output> cat /var/tmp/oab-java.sh.log
The Puppet tool under the hood will log to /var/tmp/puppet.log