Skip to content

Commit 9f9e0c9

Browse files
authored
Add CloudSeedProvider (#1906)
2 parents 300e304 + 218d273 commit 9f9e0c9

File tree

1 file changed

+89
-33
lines changed

1 file changed

+89
-33
lines changed

modules/ROOT/pages/clustering/databases.adoc

Lines changed: 89 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -438,27 +438,13 @@ The seed can be either a backup or a dump from an existing database.
438438
The sources of seeds are called _seed providers_.
439439

440440
The mechanism is pluggable, allowing new sources of seeds to be supported (see link:https://www.neo4j.com/docs/java-reference/current/extending-neo4j/project-setup/#extending-neo4j-plugin-seed-provider[Java Reference -> Implement custom seed providers] for more information).
441-
The product has built-in support for seed from a mounted file system (file), FTP server, HTTP/HTTPS server and Amazon S3.
441+
The product has built-in support for seed from a mounted file system (file), FTP server, HTTP/HTTPS server, Amazon S3, Google Cloud Storage (from Neo4j 5.25), and Azure Cloud Storage (from Neo4j 5.25).
442442

443443
[NOTE]
444444
====
445-
S3 is supported by default, but the other providers require configuration of xref:configuration/configuration-settings.adoc#config_dbms.databases.seed_from_uri_providers[`dbms.databases.seed_from_uri_providers`].
446-
Neo4j 5 comes bundled with necessary libraries for AWS S3 connectivity and thus, `aws cli` is not required.
445+
Amazon S3, Google Cloud Storage, and Azure Cloud Storage are supported by default, but the other providers require configuration of xref:configuration/configuration-settings.adoc#config_dbms.databases.seed_from_uri_providers[`dbms.databases.seed_from_uri_providers`].
447446
====
448447

449-
The `URLConnectionSeedProvider` supports the following:
450-
451-
** file:
452-
** ftp:
453-
** http:
454-
** https:
455-
** URIs
456-
457-
Accordingly, the `S3SeedProviders` supports:
458-
459-
** S3:
460-
** URIs
461-
462448
The URI of the seed is specified when the `CREATE DATABASE` command is issued:
463449

464450
[source, cypher, role="noplay"]
@@ -481,7 +467,26 @@ neo4j@neo4j> SHOW DATABASES;
481467

482468
To determine the cause of the problem, it is recommended to look at the `debug.log`.
483469

484-
Certain seed providers, such as S3, may require additional configuration.
470+
==== Seed providers
471+
472+
The `URLConnectionSeedProvider` supports the following:
473+
474+
** `file:`
475+
** `ftp:`
476+
** `http:`
477+
** `https:`
478+
479+
The `S3SeedProvider` supports:
480+
481+
** `s3:`
482+
483+
[NOTE]
484+
====
485+
Neo4j 5 comes bundled with necessary libraries for AWS S3 connectivity.
486+
Therefore, if you use `S3SeedProvider`,`aws cli` is not required but can be used with the `CloudSeedProvider`.
487+
====
488+
489+
The `S3SeedProvider` requires additional configuration.
485490
This is specified with the `seedConfig` option.
486491
This option expects a comma-separated list of configurations.
487492
Each configuration value is specified as a name followed by `=` and the value, as such:
@@ -491,25 +496,68 @@ Each configuration value is specified as a name followed by `=` and the value, a
491496
CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 's3:/myBucket/myBackup.backup', seedConfig: 'region=eu-west-1' }
492497
----
493498

494-
The available configuration options are:
495-
496-
* `file:`
497-
* `ftp:`
498-
* `http:`
499-
* `https:`
500-
* `s3:` - use this to specify the path to your S3 bucket.
501-
For example, `seedURI: 's3:/myBucket/myBackup.backup'`
502-
* `region:` - use this together with `s3:` to set the AWS region that hosts the S3 bucket.
503-
For example, `seedConfig: 'region=eu-west-1'`.
504-
505-
Some seed providers may also want to pass credentials into the provider.
499+
`S3SeedProvider` also requires passing in credentials.
506500
These are specified with the `seedCredentials` option.
507501
Seed credentials are securely passed from the Cypher command to each server hosting the database.
508502
For this to work, Neo4j on each server in the cluster must be configured with identical keystores.
509503
This is identical to the configuration required by remote aliases, see xref:database-administration/aliases/remote-database-alias-configuration.adoc#remote-alias-config-DBMS_admin-A[Configuration of DBMS with remote database alias].
510-
If this configuration is not performed, the `seedCredential` option fails.
504+
If this configuration is not performed, the `seedCredentials` option fails.
505+
506+
[source, cypher, role="noplay"]
507+
----
508+
CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 's3:/myBucket/myBackup.backup', seedConfig: 'region=eu-west-1', seedCredentials: [accessKey];[secretKey] }
509+
----
510+
Where `accessKey` and `secretKey` are provided by AWS.
511+
512+
The `CloudSeedProvider` supports:
513+
514+
** `s3:`
515+
** `gs:`
516+
** `azb:`
517+
518+
[.tabbed-example]
519+
=====
520+
[role=include-with-AWS-S3 label--new-5.25]
521+
======
522+
523+
include::partial$/aws-s3-overrides.adoc[]
524+
525+
include::partial$/aws-s3-credentials.adoc[]
526+
527+
. Create database from `myBackup.backup`.
528+
+
529+
[source,shell, role="nocopy"]
530+
----
531+
CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 's3:/myBucket/myBackup.backup' }
532+
----
533+
534+
======
535+
[role=include-with-Google-cloud-storage label--new-5.25]
536+
======
537+
538+
include::partial$/gcs-credentials.adoc[]
539+
540+
. Create database from `myBackup.backup`.
541+
+
542+
[source,shell]
543+
----
544+
CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 'gs:/myBucket/myBackup.backup' }
545+
----
546+
======
547+
[role=include-with-Azure-cloud-storage label--new-5.25]
548+
======
549+
550+
include::partial$/azb-credentials.adoc[]
551+
552+
. Create database from `myBackup.backup`.
553+
+
554+
[source,shell]
555+
----
556+
CREATE DATABASE foo OPTIONS { existingData: 'use', seedURI: 'azb://myStorageAccount/myContainer/myBackup.backup' }
557+
----
558+
======
559+
=====
511560

512-
For example, in the case of `S3SeedProvider`(the default provider), `seedCredentials: [accessKey];[secretKey]` where `accessKey` and `secretKey` are provided by AWS.
513561

514562
==== Seed provider reference
515563

@@ -535,9 +583,17 @@ For example, in the case of `S3SeedProvider`(the default provider), `seedCredent
535583
| `URLConnectionSeedProvider`
536584
| `\https://myhttp.com/backups/backup1.backup`
537585

538-
| `S3:`
539-
| `S3SeedProvider`
586+
| `s3:`
587+
| `S3SeedProvider`, `CloudSeedProvider`
540588
| `s3://mybucket/backups/backup1.backup`
589+
590+
| `gs:`
591+
| `CloudSeedProvider`
592+
| `gs://mybucket/backups/backup1.backup`
593+
594+
| `azb:`
595+
| `CloudSeedProvider`
596+
| `azb://mystorageaccount.blob/backupscontainer/backup1.backup`
541597
|===
542598

543599
[[cluster-allow-deny-db]]

0 commit comments

Comments
 (0)