You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Neo4j can be easily deployed on Virtual Machines in Google Cloud Platform (GCP) by using the link:https://console.cloud.google.com/marketplace/product/neo4j-mp-public/neo4j-enterprise-edition[official listing] on the GCP Marketplace.
7
-
8
-
The GCP Marketplace listing uses HashiCorp Terraform IaC tool to deploy Neo4j Enterprise Edition on GCP.
9
-
You can find the repository for the Terraform configuration files on link:https://github.com/neo4j-partners/gcp-tf-neo4j[GitHub].
10
-
11
-
== Supported Neo4j versions
12
-
13
-
The Neo4j link:https://console.cloud.google.com/marketplace/product/neo4j/neo4j-enterprise-edition[GCP marketplace listing] can be configured to deploy only Neo4j Enterprise Edition 2025.x, both standalone and cluster (1, 3, 4, 5, 6, or 7 servers).
7
+
It can be configured to deploy only Neo4j Enterprise Edition 2025.x, both standalone and cluster (1, 3, 4, 5, 6, or 7 servers).
14
8
Previous versions of Neo4j, such as 4.4 and 5.26 LTS are no longer supported.
15
9
16
10
== Neo4j Terraform deployment module
17
11
12
+
The GCP Marketplace listing uses HashiCorp Terraform IaC tool to deploy Neo4j Enterprise Edition on GCP.
18
13
HashiCorp Terraform is an infrastructure deployment module, which automates the creation and management of Google Cloud resources.
19
14
It takes several parameters as inputs, deploys a set of cloud resources, and provides outputs that can be used to connect to a Neo4j DBMS.
20
15
21
-
== Prerequisites
16
+
You can find the repository for the Terraform configuration files on link:https://github.com/neo4j-partners/gcp-tf-neo4j[GitHub].
├── versions.tf # Provider and version constraints
37
+
└── terraform.tfvars.example # Example variables file
38
+
```
39
+
40
+
== Important considerations
41
+
//TO CHECK with Bledi if these points are still valid or need updating
42
+
* The deployment of cloud resources incurs costs.
43
+
Refer to the link:https://cloud.google.com/products/calculator[GCP pricing calculator]for more information.
44
+
45
+
* The Neo4j Terraform module deploys a new VPC, containing a single subnet based in the requested region.
46
+
Unlike Azure and AWS where subnets are aligned to specific zones, GCP subnets are regional (and VPCs are global).
47
+
48
+
* The Neo4j Terraform module uses an Instance Group to deploy VM instances.
49
+
To stop a VM managed by a group, you must first remove it from that group.
50
+
51
+
* Instances can be connected via SSH, using SSH-in-browser (via the GCP console).
52
+
Click the *SSH* button in the GCP console.
53
+
54
+
== Deployment steps
22
55
23
56
Before deploying Neo4j using the Terraform module, ensure you have the following prerequisites in place:
24
57
@@ -29,95 +62,152 @@ See the link:https://developer.hashicorp.com/terraform/install[official Terrafor
29
62
* Appropriate permissions to create resources in GCP
30
63
* Default project configured in `gcloud` CLI (`gcloud config set project YOUR_PROJECT_ID`)
31
64
32
-
=== Important considerations
33
65
34
-
* The deployment of cloud resources incurs costs.
35
-
Refer to the link:https://cloud.google.com/products/calculator[GCP pricing calculator]for more information.
66
+
=== Option 1: Deploy from GCP Marketplace
36
67
37
-
* The Neo4j Terraform module deploys a new VPC, containing a single subnet based in the requested region.
38
-
Unlike Azure and AWS where subnets are aligned to specific zones, GCP subnets are regional (and VPCs are global).
68
+
. Visit the link:https://console.cloud.google.com/marketplace/product/neo4j-mp-public/neo4j-enterprise-edition[Neo4j Enterprise listing on GCP Marketplace].
69
+
. Click *Launch*.
70
+
. Configure the deployment parameters.
71
+
See <<input-parameters>> for details on each parameter.
72
+
. Review and click *Launch*.
39
73
40
-
* The Neo4j Terraform module uses an Instance Group to deploy VM instances.
41
-
To stop a VM managed by a group, you must first remove it from that group.
74
+
=== Option 2: Use the module directly
42
75
43
-
* Instances can be connected via SSH, using SSH-in-browser (via the GCP console).
44
-
Click the *SSH* button in the GCP console.
76
+
. Ensure your default GCP project is set in gcloud CLI:
77
+
+
78
+
[source, bash]
79
+
----
80
+
gcloud config set project YOUR_PROJECT_ID
81
+
----
45
82
83
+
. Copy `terraform.tfvars.example` to `terraform.tfvars` and update the values.
84
+
See <<input-parameters>> for details on each parameter.
85
+
. Initialize Terraform in the directory containing the Terraform configuration files:
86
+
+
87
+
[source,bash]
88
+
----
89
+
terraform init
90
+
----
91
+
92
+
. Plan the deployment:
93
+
+
94
+
[source,bash]
95
+
----
96
+
terraform plan
97
+
----
98
+
99
+
. Apply the configuration:
100
+
+
101
+
[source,bash]
102
+
----
103
+
terraform apply
104
+
----
105
+
106
+
[[input-parameters]]
46
107
=== Input parameters
47
108
48
-
[cols="2,4a,2m",frame="topbot",options="header"]
49
-
|===
109
+
The following variables can be configured in your `terraform.tfvars` file.
110
+
The complete list of inputs can be found in the _./variables.tf_ file.
50
111
112
+
[NOTE]
113
+
====
114
+
* When deploying through GCP Marketplace, the `source_image` variable will be automatically set to the Marketplace-owned version of the VM image.
115
+
* For production deployments, it is recommended to restrict the `firewall_source_range` to specific IP ranges.
116
+
* The default machine type (c3-standard-4) is suitable for most workloads, but can be adjusted based on your requirements.
117
+
* For large datasets, consider increasing the `disk_size` parameter.
118
+
* The startup script includes robust error handling and non-interactive installation to ensure reliable deployment.
| Whether to create a new network or use an existing one
89
171
| true
90
172
173
+
| subnetwork_cidr
91
174
| Subnetwork CIDR
92
175
| CIDR range for the subnetwork.
93
176
| 10.10.10.0/24
94
177
95
-
| Number of nodes
96
-
| Number of Neo4j nodes to deploy. Node count must be 1 (standalone) or 3/5/7 (cluster)
178
+
| node_count
179
+
| Number of servers
180
+
| Number of Neo4j servers to deploy. Node count must be 1 (standalone) or 3/5/7 (cluster)
97
181
| 3
98
182
183
+
| machine_type
99
184
| Machine type
100
-
| GCP machine type for Neo4j nodes.
185
+
| GCP machine type for the Neo4j servers.
101
186
| c3-standard-4
102
187
188
+
| disk_size
103
189
| Disk size in GB
104
190
| Size of the data disk in GB.
105
191
| 100
106
192
193
+
| admin_password
107
194
| Admin password
108
195
| Password for the Neo4j admin user. The password must be at least 8 characters long.
109
-
| Neo4j1234
196
+
| (Required)
110
197
198
+
| install_bloom
111
199
| Install Neo4j Bloom
112
200
| Whether to install Neo4j Bloom.
113
201
| false
114
202
203
+
| bloom_license_key
115
204
| Bloom License Key
116
205
| License key for Neo4j Bloom (if installing).
117
206
| ""
118
207
119
-
| Source IP ranges for firewall rules
120
-
| Source IP ranges for external access. Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges.
208
+
| firewall_source_range
209
+
| Firewall source ranges
210
+
| Source IP ranges for external access (comma-separated). Traffic is only allowed from sources within these IP address ranges. Use CIDR notation when entering ranges.
121
211
| 0.0.0.0/0
122
212
123
213
|===
@@ -126,9 +216,10 @@ Click the *SSH* button in the GCP console.
126
216
127
217
The environment created by the Terraform module consists of the following GCP resources:
128
218
129
-
* 1 subnet with a CIDR range (address space) of `10.128.0.0/20`. Internal and external firewall rulesets.
130
-
* An Instance Group (and Instance Group template) which creates 1, or between 3 and 10 VM instances, depending on whether a single instance or an autonomous cluster is selected.
131
-
* 1 TCP (Layer 4) Load Balancer.
219
+
. A VPC network and subnetwork (optional).
220
+
. Firewall rules for internal and external access.
221
+
. Neo4j VMs with attached persistent disks.
222
+
. Configures Neo4j for standalone or clustered operation.
132
223
133
224
=== Template outputs
134
225
@@ -164,6 +255,28 @@ After the installation finishes successfully, the Terraform module provides the
164
255
The Neo4j Browser can be easily launched in a new window by clicking the button entitled *Log into the Neo4j Browser*.
165
256
====
166
257
258
+
=== Providers used
259
+
260
+
This module only uses the following approved GCP Marketplace providers:
261
+
262
+
* google
263
+
* google-beta
264
+
265
+
=== Testing the module
266
+
267
+
The module includes test configurations in the _test/_ directory, which can be used to validate the deployment.
268
+
The following test scripts are provided:
269
+
270
+
* `verify_module.sh`: Basic verification for GCP Marketplace
271
+
* `test_deployment.sh`: Comprehensive deployment testing using marketplace_test.tfvars
272
+
273
+
The test script performs thorough checks to verify:
274
+
275
+
* All instances are properly deployed.
276
+
* Neo4j services are running and accessible.
277
+
* Neo4j Browser and Bolt interfaces are operational.
278
+
* Cluster configuration is properly set up.
279
+
167
280
== Licensing
168
281
169
282
Installing and starting Neo4j from the GCP marketplace constitutes an acceptance of the Neo4j license agreement.
@@ -184,4 +297,4 @@ terraform destroy
184
297
185
298
This command will prompt you to confirm the destruction of all resources defined in your Terraform configuration.
186
299
Review the proposed changes carefully before confirming.
187
-
For detailed information on the `terraform destroy` command, refer to the link:https://developer.hashicorp.com/terraform/cli/commands/destroy[official Terraform documentation].
300
+
For detailed information on the `terraform destroy` command, refer to the link:https://developer.hashicorp.com/terraform/cli/commands/destroy[official Terraform documentation].
0 commit comments