Skip to content

Commit 40b7a52

Browse files
committed
update the gcp page
1 parent d338885 commit 40b7a52

File tree

1 file changed

+145
-32
lines changed

1 file changed

+145
-32
lines changed

modules/ROOT/pages/cloud-deployments/neo4j-gcp.adoc

Lines changed: 145 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,54 @@
44
= Neo4j on GCP
55

66
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).
148
Previous versions of Neo4j, such as 4.4 and 5.26 LTS are no longer supported.
159

1610
== Neo4j Terraform deployment module
1711

12+
The GCP Marketplace listing uses HashiCorp Terraform IaC tool to deploy Neo4j Enterprise Edition on GCP.
1813
HashiCorp Terraform is an infrastructure deployment module, which automates the creation and management of Google Cloud resources.
1914
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.
2015

21-
== Prerequisites
16+
You can find the repository for the Terraform configuration files on link:https://github.com/neo4j-partners/gcp-tf-neo4j[GitHub].
17+
The repository structure is as follows:
18+
19+
```
20+
neo4j-terraform-gcp/
21+
├── modules/ # Terraform modules
22+
│ └── neo4j/ # Main Neo4j module
23+
│ ├── scripts/ # Startup scripts for Neo4j
24+
│ ├── main.tf # Main module configuration
25+
│ ├── network.tf # Network configuration
26+
│ ├── variables.tf # Module variables
27+
│ ├── outputs.tf # Module outputs
28+
│ └── versions.tf # Module provider requirements
29+
├── test/ # Test configurations
30+
├── metadata.yaml # GCP Marketplace metadata
31+
├── metadata.display.yaml # GCP Marketplace display metadata
32+
├── logo.png # Logo for GCP Marketplace
33+
├── main.tf # Root module configuration
34+
├── variables.tf # Root module variables
35+
├── outputs.tf # Root module outputs
36+
├── 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
2255

2356
Before deploying Neo4j using the Terraform module, ensure you have the following prerequisites in place:
2457

@@ -29,95 +62,152 @@ See the link:https://developer.hashicorp.com/terraform/install[official Terrafor
2962
* Appropriate permissions to create resources in GCP
3063
* Default project configured in `gcloud` CLI (`gcloud config set project YOUR_PROJECT_ID`)
3164

32-
=== Important considerations
3365

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
3667

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*.
3973

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
4275

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+
----
4582

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]]
46107
=== Input parameters
47108

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.
50111

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.
119+
====
120+
121+
[cols="3m,2,4a,2m",frame="topbot",options="header"]
122+
|===
123+
| Variable
51124
| Parameter Name
52125
| Description
53126
| Default Value
54127

128+
| project_id
55129
| Project ID
56-
| The ID of the project in which to provision resources.
57-
|
130+
| GCP Project ID of the project in which to provision resources.
131+
| (Required)
58132

133+
| license_type
59134
| License type
60135
| Neo4j license type (enterprise-byol or evaluation).
61136
| enterprise-byol
62137

138+
| region
63139
| Region
64140
| The GCP region where resources will be created.
65141
| us-central1
66142

143+
| zone
67144
| Zone
68145
| The zone for the solution to be deployed.
69146
| us-central1-a
70147

148+
| goog_cm_deployment_name
71149
| Deployment Name
72150
| The name of the deployment and VM instances.
73151
| neo4j
74152

153+
| source_image
75154
| Image version
76-
| The image name for the disk for the VM instance.
155+
| The VM image to use for Neo4j instances.
77156
| projects/neo4j-mp-public/global/images/neo4j-enterprise-edition
78157

158+
| network_name
79159
| Network name
80160
| The name of the VPC network to use or create.
81161
| neo4j-network
82162

163+
| subnetwork_name
83164
| Subnetwork name
84165
| The name of the subnetwork to use or create.
85166
| neo4j-subnet
86167

168+
| create_new_network
87169
| Create a new network
88170
| Whether to create a new network or use an existing one
89171
| true
90172

173+
| subnetwork_cidr
91174
| Subnetwork CIDR
92175
| CIDR range for the subnetwork.
93176
| 10.10.10.0/24
94177

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)
97181
| 3
98182

183+
| machine_type
99184
| Machine type
100-
| GCP machine type for Neo4j nodes.
185+
| GCP machine type for the Neo4j servers.
101186
| c3-standard-4
102187

188+
| disk_size
103189
| Disk size in GB
104190
| Size of the data disk in GB.
105191
| 100
106192

193+
| admin_password
107194
| Admin password
108195
| Password for the Neo4j admin user. The password must be at least 8 characters long.
109-
| Neo4j1234
196+
| (Required)
110197

198+
| install_bloom
111199
| Install Neo4j Bloom
112200
| Whether to install Neo4j Bloom.
113201
| false
114202

203+
| bloom_license_key
115204
| Bloom License Key
116205
| License key for Neo4j Bloom (if installing).
117206
| ""
118207

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.
121211
| 0.0.0.0/0
122212

123213
|===
@@ -126,9 +216,10 @@ Click the *SSH* button in the GCP console.
126216

127217
The environment created by the Terraform module consists of the following GCP resources:
128218

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.
132223

133224
=== Template outputs
134225

@@ -164,6 +255,28 @@ After the installation finishes successfully, the Terraform module provides the
164255
The Neo4j Browser can be easily launched in a new window by clicking the button entitled *Log into the Neo4j Browser*.
165256
====
166257

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+
167280
== Licensing
168281

169282
Installing and starting Neo4j from the GCP marketplace constitutes an acceptance of the Neo4j license agreement.
@@ -184,4 +297,4 @@ terraform destroy
184297

185298
This command will prompt you to confirm the destruction of all resources defined in your Terraform configuration.
186299
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

Comments
 (0)