Goals This guide explains how to deploy a single instance of Neo4j Enterprise on Google Cloud Platform. Prerequisites You should know how to run and operate Neo4j locally. Knowledge of remote drivers to access Neo4j from your application helps you… Read more →
This guide explains how to deploy a single instance of Neo4j Enterprise on Google Cloud Platform.
You should know how to run and operate Neo4j locally. Knowledge of remote drivers to access Neo4j from your application helps you connect to your cloud-hosted database.
Before continuing with the guide make sure you’ve installed the GCloud Command Line Interface.
Let’s get started!
Create Firewall Rules
By default, Google won’t let traffic in and out of instances unless we allow it. So we begin by setting a simple firewall rule which will enable us to access the instance once it is launched:
This allows traffic into your node on port 7473 (HTTPS for Neo4j Browser) and 7687, which is
the Bolt protocol for clients to work with the database. The source IP range provided allows
the entire internet to contact your new instance, which you may narrow. The target tags
specifies that this rule applies only to instances tagged
neo4j. When we launch our
instance, we’ll take care to apply that tag to it. In Google’s Cloud Console, here’s what
your rule should look like:
We don’t have to open port 22 for SSH, that will already be done.
Create a Google Compute Instance from the Neo4j Public Image
Launching the instance is a single command:
The first line simply sets your project configuration to ensure you know where you are launching
your instance. The second line launches an image found in a public project that we have provided.
The image name
neo4j-enterprise-1-3-3-4 corresponds to an Ubuntu-based image that contains
Note that the
gcloud tool comes with many command line options that aren’t covered here.
consult the documentation
for a large number of options dealing with machine type, memory, available storage, and so on.
--tags argument is important, because it allows us to configure the correct network
permissions in the next step. By default, Google will block all external access to the network
services unless you open them.
You’ll know that the launch succeeded when you see output like this:
Access Your New Instance
https://[External_IP]:7473 and login with the user name
neo4j and password
You will be prompted to change the password immediately.
Because you don’t have a hostname configured or a valid SSL certificate by default, your browser will warn you that the certificate isn’t trusted. This is expected, you can configure a certificate later if you choose.
How do I SSH into the instance?
You can run the following command to SSH into the instance:
Inside of the VM, you can check the status of the neo4j service like this:
How your new virtual machine works
Please consult Neo4j Cloud VMs for details on internals of Google VMs, including how to stop and start system services, configure Neo4j inside of the VM, and more.
Deleting the instance
Once we’ve finished using the instance we can run the following command to delete it: