Skip to content

Commit d7505de

Browse files
Update plugins.adoc in Kubernetes (#1240)
Removed the section where we installed apoc with the env ["apoc"]. This is not needed if we are just pointing to the file in labs. --------- Co-authored-by: Reneta Popova <[email protected]>
1 parent 982c1ba commit d7505de

File tree

1 file changed

+78
-88
lines changed

1 file changed

+78
-88
lines changed

modules/ROOT/pages/kubernetes/plugins.adoc

Lines changed: 78 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,5 @@
11
= Plugins
22

3-
[[operations-using-apoc-core]]
4-
== Configure and install APOC core only
5-
6-
APOC core is shipped with Neo4j, but it is not installed in the Neo4j _plugins_ directory.
7-
If APOC core is the _only_ plugin that you want to add to Neo4j, it is not necessary to perform plugin installation as described in xref:kubernetes/configuration.adoc#operations-installing-plugins[Install Plugins].
8-
Instead, you can configure the helm deployment to use APOC core by upgrading the deployment with these additional settings in the _values.yaml_ file:
9-
10-
. Configure APOC core by loading and unresticting the functions and procedures you need (for more details see link:{neo4j-docs-base-uri}/apoc/{page-version}/installation/#restricted[APOC installation guide]).
11-
For example:
12-
+
13-
[source, yaml]
14-
----
15-
config:
16-
server.directories.plugins: "/var/lib/neo4j/labs"
17-
dbms.security.procedures.unrestricted: "apoc.cypher.doIt"
18-
server.config.strict_validation.enabled: "false"
19-
dbms.security.procedures.allowlist: "apoc.math.maxInteger,apoc.cypher.doIt"
20-
----
21-
+
22-
. Under `apoc_config`, configure the APOC settings that you want, for example:
23-
+
24-
[source, yaml]
25-
----
26-
apoc_config:
27-
apoc.trigger.enabled: "true"
28-
apoc.jdbc.neo4j.url: "jdbc:foo:bar"
29-
apoc.import.file.enabled: "true"
30-
----
31-
32-
. Under `env`, set the `NEO4J_PLUGINS` variable to `'["apoc"]'`, for example:
33-
+
34-
[source, yaml]
35-
----
36-
env:
37-
NEO4J_PLUGINS: '["apoc"]'
38-
----
39-
40-
. Run `helm upgrade` to apply the changes:
41-
+
42-
[source, shell]
43-
----
44-
helm upgrade <release-name> neo4j/neo4j -f values.yaml
45-
----
46-
47-
. After the Helm upgrade rollout is complete, verify that APOC core has been configured by running the following Cypher query using `cypher-shell` or Neo4j Browser:
48-
+
49-
[source, cypher]
50-
----
51-
RETURN apoc.version()
52-
----
53-
54-
== Configure credentials for plugin's aliases using APOC-extended
55-
56-
From 5.11, the Neo4j Helm chart supports configuring credentials for the plugin's aliases using a Kubernetes secret mounted on the provided path.
57-
This feature is available `apoc.jdbc.<aliasname>.url` and `apoc.es.<aliasname>.url` via
58-
APOC-extended.
59-
60-
[NOTE]
61-
====
62-
The secret must be created beforehand and must contain the key-named `URL`, otherwise, the Helm chart throws an error. For example:
63-
`kubectl create secret generic jdbcsecret --from-literal=URL="jdbc:mysql://30.0.0.0:3306/Northwind?user=root&password=password"`
64-
====
65-
66-
Under `apoc_credentials`, configure `aliasName`, `secretName`, and `secretMountPath`.
67-
For example:
68-
69-
[source, yaml]
70-
----
71-
apoc_credentials: {}
72-
# jdbc:
73-
# aliasName: "jdbc"
74-
# secretName: "jdbcsecret"
75-
# secretMountPath: "/secret/jdbcCred"
76-
#
77-
# elasticsearch:
78-
# aliasName: "es"
79-
# secretName: "essecret"
80-
# secretMountPath: "/secret/esCred"
81-
----
82-
83-
[[operations-installing-plugins]]
84-
== Install Plugins
85-
863
There are three recommended methods for adding Neo4j plugins to Neo4j Helm chart deployments.
874
You can use:
885

@@ -91,12 +8,12 @@ You can use:
918
* <<plugins-volume, a `plugins` volume>>.
929
9310
[[automatic-plugin-download]]
94-
=== Add plugins using an automatic plugin download
11+
== Add plugins using an automatic plugin download
9512

9613
You can configure the Neo4j deployment to automatically download and install plugins.
9714
If licenses are required for the plugins, you must provide the licenses in a secret.
9815

99-
==== Install GDS Community Edition (CE)
16+
=== Install GDS Community Edition (CE)
10017

10118
GDS Community Edition does not require a license.
10219
To add the GDS CE, configure the Neo4j _values.yaml_ and set the `env` to download the plugins:
@@ -116,7 +33,7 @@ config:
11633
dbms.security.procedures.unrestricted: "gds.*"
11734
----
11835

119-
==== Install GDS Enterprise Edition (EE) and Bloom plugins
36+
=== Install GDS Enterprise Edition (EE) and Bloom plugins
12037

12138
To install GDS EE and Bloom, you must provide a license for each plugin.
12239
You provide the licenses in a Kubernetes secret.
@@ -160,7 +77,7 @@ config:
16077
----
16178

16279
[[custom-container]]
163-
=== Add plugins using a custom container image
80+
== Add plugins using a custom container image
16481

16582
The best method for adding plugins to Neo4j running in Kubernetes is to create a new Docker container image that contains both Neo4j and the Neo4j plugins.
16683
This way, you can ensure when building the container that the correct plugin version for the Neo4j version of the container is used and that the resulting image encapsulates all Neo4j runtime dependencies.
@@ -211,7 +128,7 @@ Strict config validation can be disabled by setting `server.config.strict_valida
211128
====
212129

213130
[[plugins-volume]]
214-
=== Add plugins using a plugins volume
131+
== Add plugins using a plugins volume
215132

216133
An alternative method for adding Neo4j plugins to a Neo4j Helm deployment uses a `plugins` volume mount.
217134
With this method, the plugin jar files are stored on a Persistent Volume that is mounted to the `/plugins` directory of the Neo4j container.
@@ -264,3 +181,76 @@ kubectl rollout restart statefulset/<neo4j-statefulset-name>
264181
# Verify plugins are still present after restart
265182
kubectl exec <neo4j-pod-name> -- ls /plugins
266183
----
184+
185+
[[operations-using-apoc-core]]
186+
== Configure and install APOC core only
187+
188+
APOC core library is shipped with Neo4j and is located in the _labs_ folder.
189+
190+
If APOC core is the _only_ plugin that you want to add to Neo4j, it is not necessary to perform plugin installation as described above.
191+
Instead, you can configure the helm deployment to use APOC core by upgrading the deployment with these additional settings in the _values.yaml_ file:
192+
193+
. Configure APOC core by directly pointing to the location of the APOC core library in the _labs_ folder and by loading and unrestricting the functions and procedures you need (for more details see link:{neo4j-docs-base-uri}/apoc/{page-version}/installation/#restricted[APOC installation guide]).
194+
For example:
195+
+
196+
[source, yaml]
197+
----
198+
config:
199+
server.directories.plugins: "/var/lib/neo4j/labs"
200+
dbms.security.procedures.unrestricted: "apoc.*"
201+
server.config.strict_validation.enabled: "false"
202+
dbms.security.procedures.allowlist: "apoc.math.*,apoc.cypher.*"
203+
----
204+
+
205+
. Under `apoc_config`, configure the APOC settings that you want, for example:
206+
+
207+
[source, yaml]
208+
----
209+
apoc_config:
210+
apoc.trigger.enabled: "true"
211+
apoc.jdbc.neo4j.url: "jdbc:foo:bar"
212+
apoc.import.file.enabled: "true"
213+
----
214+
215+
. Run `helm upgrade` to apply the changes:
216+
+
217+
[source, shell]
218+
----
219+
helm upgrade <release-name> neo4j/neo4j -f values.yaml
220+
----
221+
222+
. After the Helm upgrade rollout is complete, verify that APOC core has been configured by running the following Cypher query using `cypher-shell` or Neo4j Browser:
223+
+
224+
[source, cypher]
225+
----
226+
RETURN apoc.version()
227+
----
228+
229+
== Configure credentials for the plugin's aliases using APOC-extended
230+
231+
From 5.11, the Neo4j Helm chart supports configuring credentials for the plugin's aliases using a Kubernetes secret mounted on the provided path.
232+
This feature is available `apoc.jdbc.<aliasname>.url` and `apoc.es.<aliasname>.url` via
233+
APOC-extended.
234+
235+
[NOTE]
236+
====
237+
The secret must be created beforehand and must contain the key-named `URL`, otherwise, the Helm chart throws an error. For example:
238+
`kubectl create secret generic jdbcsecret --from-literal=URL="jdbc:mysql://30.0.0.0:3306/Northwind?user=root&password=password"`
239+
====
240+
241+
Under `apoc_credentials`, configure `aliasName`, `secretName`, and `secretMountPath`.
242+
For example:
243+
244+
[source, yaml]
245+
----
246+
apoc_credentials: {}
247+
# jdbc:
248+
# aliasName: "jdbc"
249+
# secretName: "jdbcsecret"
250+
# secretMountPath: "/secret/jdbcCred"
251+
#
252+
# elasticsearch:
253+
# aliasName: "es"
254+
# secretName: "essecret"
255+
# secretMountPath: "/secret/esCred"
256+
----

0 commit comments

Comments
 (0)