From fc42d29b4a4520b552b45e9b26be4313b79d6602 Mon Sep 17 00:00:00 2001 From: Ben Butler-Cole Date: Wed, 17 Feb 2016 08:29:10 +0000 Subject: [PATCH] Only allow databases within the data directory to be mounted We no longer support mounting databases on arbitrary paths. Individual databases are now specified by name rather than path and the directory structure within the data directory is an implementation detail. --- .../neo4j/kernel/configuration/Settings.java | 51 ++++++++++++++----- .../AbstractInProcessServerBuilder.java | 10 ++-- .../neo4j/harness/InProcessBuilderTest.java | 23 +++++---- .../neo4j/src/docs/ops/upgrades.asciidoc | 18 ++----- community/server/README.asciidoc | 3 -- .../docs/ops/server-configuration.asciidoc | 10 +++- .../src/docs/ops/server-installation.asciidoc | 6 +-- .../org/neo4j/server/CommunityNeoServer.java | 2 +- .../neo4j/server/ServerCommandLineArgs.java | 2 +- .../server/configuration/ServerSettings.java | 12 ++++- .../database/LifecycleManagingDatabase.java | 2 +- .../neo4j/server/AcceptorConfigurationIT.java | 2 +- .../neo4j/server/BaseBootstrapperTest.java | 17 ++++--- .../server/BatchOperationHeaderDocIT.java | 2 +- .../test/java/org/neo4j/server/BoltIT.java | 4 +- .../java/org/neo4j/server/HttpsAccessIT.java | 2 +- .../java/org/neo4j/server/LegacyIndexIT.java | 2 +- .../org/neo4j/server/NeoServerJAXRSDocIT.java | 2 +- .../server/NeoServerPortConflictDocIT.java | 2 +- .../org/neo4j/server/ServerConfigDocIT.java | 18 +++---- .../org/neo4j/server/ServerTestUtils.java | 2 +- .../configuration/ConfigFileBuilder.java | 2 +- .../configuration/ServerSettingsTest.java | 9 +++- .../TestLifecycleManagedDatabase.java | 16 +++--- .../helpers/CommunityServerBuilder.java | 16 +++--- .../neo4j/server/helpers/ServerHelper.java | 3 +- .../server/integration/StartupLoggingIT.java | 2 +- ...faultConfigurationThroughRESTAPIDocIT.java | 2 +- .../rest/paging/PagedTraverserDocIT.java | 2 +- .../rest/security/SecurityRulesDocIT.java | 14 ++--- .../server/web/logging/HTTPLoggingDocIT.java | 8 +-- ...ommunityVersionAndEditionServiceDocIT.java | 4 +- ...nfigureEnabledManagementConsolesDocIT.java | 4 +- .../ha/src/docs/dev/upgrade-guide.asciidoc | 3 +- .../enterprise/EnterpriseNeoServer.java | 8 +-- .../functional/EnterpriseServerIT.java | 6 +-- .../helpers/EnterpriseServerBuilder.java | 4 +- .../enterprise/jmx/ServerManagementTest.java | 19 ++++--- .../EnterpriseVersionAndEditionServiceIT.java | 4 +- .../server/ha/EnterpriseServerHelper.java | 2 +- .../StoreUpgradeIntegrationTest.java | 31 +++++++---- .../installer-linux/installer-rpm/pom.xml | 7 --- .../installer-rpm/process-resources.build.xml | 4 +- .../src/main/resources/neo4j/neo4jd | 1 - .../desktop/runtime/DesktopConfigurator.java | 4 +- .../runtime/DesktopConfiguratorTest.java | 2 +- packaging/standalone/pom.xml | 1 - .../text/community/conf/neo4j.conf | 9 ++-- .../text/enterprise/conf/neo4j.conf | 9 ++-- 49 files changed, 219 insertions(+), 169 deletions(-) diff --git a/community/kernel/src/main/java/org/neo4j/kernel/configuration/Settings.java b/community/kernel/src/main/java/org/neo4j/kernel/configuration/Settings.java index 6e19f9850faef..d9874b87d84b1 100644 --- a/community/kernel/src/main/java/org/neo4j/kernel/configuration/Settings.java +++ b/community/kernel/src/main/java/org/neo4j/kernel/configuration/Settings.java @@ -30,9 +30,9 @@ import java.util.function.Function; import java.util.regex.Pattern; +import org.neo4j.function.Functions; import org.neo4j.graphdb.config.InvalidSettingException; import org.neo4j.graphdb.config.Setting; -import org.neo4j.function.Functions; import org.neo4j.helpers.HostnamePort; import org.neo4j.helpers.TimeUtil; import org.neo4j.helpers.collection.Iterables; @@ -149,27 +149,52 @@ public static Setting setting( final String name, final Function( name, parser, valueLookup, defaultLookup, valueConverters ); + return new DefaultSetting<>( name, parser, valueLookup, defaultLookup, valueConverters ); } - private static Function, String> inheritedValue( final Function, String> lookup, final Setting inheritedSetting ) + public static Setting derivedSetting( String name, + Setting in1, Setting in2, + BiFunction derivation ) { - return new Function, String>() + return new Setting() { @Override - public String apply( Function settings ) + public String name() { - String value = lookup.apply( settings ); - if ( value == null ) + return name; + } + + @Override + public String getDefaultValue() + { + return NO_DEFAULT; + } + + @Override + public OUT apply( Function config ) + { + if ( config.apply( name ) != null ) { - value = ((SettingHelper) inheritedSetting).lookup( settings ); + throw new IllegalArgumentException( "You may not set a value for derived setting " + name ); } - return value; + return derivation.apply( in1.apply( config ), in2.apply( config ) ); } }; } + private static Function, String> inheritedValue( final Function, String> lookup, final Setting inheritedSetting ) + { + return settings -> { + String value = lookup.apply( settings ); + if ( value == null ) + { + value = ((SettingHelper) inheritedSetting).lookup( settings ); + } + return value; + }; + } + private static Function, String> inheritedDefault( final Function, String> lookup, final Setting inheritedSetting ) { @@ -318,7 +343,7 @@ public String toString() public List apply( String value ) { String[] list = value.split( SEPARATOR ); - List result = new ArrayList(); + List result = new ArrayList<>(); for( String item : list) { item = item.trim(); @@ -500,7 +525,7 @@ public static Function options( final Class enumC public static Function options( T... optionValues ) { - return Settings.options( Iterables.iterable( optionValues ) ); + return Settings.options( Iterables.iterable( optionValues ) ); } public static Function options( final Iterable optionValues ) @@ -544,7 +569,7 @@ public static Function> list( final String separator, final @Override public List apply( String value ) { - List list = new ArrayList(); + List list = new ArrayList<>(); if ( value.length() > 0 ) { String[] parts = value.split( separator ); diff --git a/community/neo4j-harness/src/main/java/org/neo4j/harness/internal/AbstractInProcessServerBuilder.java b/community/neo4j-harness/src/main/java/org/neo4j/harness/internal/AbstractInProcessServerBuilder.java index 53d1c22ecf897..d341b06cc9c3e 100644 --- a/community/neo4j-harness/src/main/java/org/neo4j/harness/internal/AbstractInProcessServerBuilder.java +++ b/community/neo4j-harness/src/main/java/org/neo4j/harness/internal/AbstractInProcessServerBuilder.java @@ -19,8 +19,6 @@ */ package org.neo4j.harness.internal; -import org.apache.commons.io.FileUtils; - import java.io.File; import java.io.IOException; import java.io.OutputStream; @@ -30,6 +28,8 @@ import java.util.Random; import java.util.function.Function; +import org.apache.commons.io.FileUtils; + import org.neo4j.graphdb.GraphDatabaseService; import org.neo4j.graphdb.config.Setting; import org.neo4j.graphdb.factory.GraphDatabaseSettings; @@ -67,8 +67,8 @@ public abstract class AbstractInProcessServerBuilder implements TestServerBuilde public AbstractInProcessServerBuilder( File workingDir ) { - File storeDir = new File( workingDir, randomFolderName() ).getAbsoluteFile(); - init( storeDir ); + File dataDir = new File( workingDir, randomFolderName() ).getAbsoluteFile(); + init( dataDir ); } private void init( File workingDir ) @@ -195,7 +195,7 @@ public TestServerBuilder withProcedure( Class procedureClass ) private TestServerBuilder setDirectory( File dir ) { this.serverFolder = dir; - config.put( ServerSettings.legacy_db_location.name(), serverFolder.getAbsolutePath() ); + config.put( ServerSettings.data_directory.name(), serverFolder.getAbsolutePath() ); return this; } diff --git a/community/neo4j-harness/src/test/java/org/neo4j/harness/InProcessBuilderTest.java b/community/neo4j-harness/src/test/java/org/neo4j/harness/InProcessBuilderTest.java index 1f50c5e13214a..7d5433f867ea3 100644 --- a/community/neo4j-harness/src/test/java/org/neo4j/harness/InProcessBuilderTest.java +++ b/community/neo4j-harness/src/test/java/org/neo4j/harness/InProcessBuilderTest.java @@ -19,11 +19,6 @@ */ package org.neo4j.harness; -import org.apache.commons.io.FileUtils; -import org.codehaus.jackson.JsonNode; -import org.junit.Rule; -import org.junit.Test; - import java.io.File; import java.io.IOException; import java.net.URI; @@ -41,6 +36,11 @@ import javax.net.ssl.TrustManager; import javax.net.ssl.X509TrustManager; +import org.apache.commons.io.FileUtils; +import org.codehaus.jackson.JsonNode; +import org.junit.Rule; +import org.junit.Test; + import org.neo4j.bolt.v1.transport.socket.client.SocketConnection; import org.neo4j.graphdb.GraphDatabaseService; import org.neo4j.graphdb.Node; @@ -51,6 +51,7 @@ import org.neo4j.helpers.HostnamePort; import org.neo4j.helpers.collection.Iterables; import org.neo4j.helpers.collection.IteratorUtil; +import org.neo4j.kernel.configuration.Config; import org.neo4j.server.ServerTestUtils; import org.neo4j.server.configuration.ServerSettings; import org.neo4j.server.rest.domain.JsonParseException; @@ -66,7 +67,9 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; + import static org.neo4j.harness.TestServerBuilders.newInProcessBuilder; +import static org.neo4j.helpers.collection.MapUtil.stringMap; public class InProcessBuilderTest { @@ -172,12 +175,12 @@ public void shouldRunBuilderOnExistingStoreDir() throws Exception { // When // create graph db with one node upfront - Path dir = Files.createTempDirectory( getClass().getSimpleName() + - "_shouldRunBuilderOnExistingStorageDir" ); + Path dir = Files.createTempDirectory( getClass().getSimpleName() + "_shouldRunBuilderOnExistingStorageDir" ); + File storeDir = new Config( stringMap( ServerSettings.data_directory.name(), dir.toString() ) ) + .get( ServerSettings.database_path ); try { - - GraphDatabaseService db = new TestGraphDatabaseFactory().newEmbeddedDatabase( dir.toString() ); + GraphDatabaseService db = new TestGraphDatabaseFactory().newEmbeddedDatabase( storeDir ); try { db.execute( "create ()" ); @@ -204,7 +207,7 @@ public void shouldRunBuilderOnExistingStoreDir() throws Exception } // Then: we still only have one node since the server is supposed to work on a copy - db = new TestGraphDatabaseFactory().newEmbeddedDatabase( dir.toString() ); + db = new TestGraphDatabaseFactory().newEmbeddedDatabase( storeDir ); try { try ( Transaction tx = db.beginTx() ) diff --git a/community/neo4j/src/docs/ops/upgrades.asciidoc b/community/neo4j/src/docs/ops/upgrades.asciidoc index 1f691be57594d..c9aa6a70024d2 100644 --- a/community/neo4j/src/docs/ops/upgrades.asciidoc +++ b/community/neo4j/src/docs/ops/upgrades.asciidoc @@ -43,20 +43,9 @@ This typically means only within patch releases of the same Neo4j version. To perform an automatic store upgrade: . Cleanly shut down the older version of Neo4j, if it is running. - -. Install Neo4j {neo4j-version}, and set it up to use the same database store directory (typically _data/databases/graph.db_). - -. Make a copy of the database. -+ -[IMPORTANT] -It is strongly advised to make a copy of the database store directory at this time, to use as a backup in case rollback/downgrade is required. -This is not necessary if a backup has been made using the -ifndef::upgradetext[<>, ] -ifdef::upgradetext[online backup tool (see http://neo4j.com/docs/{neo4j-version}/operations-backup.html), ] -available with Neo4j Enterprise. - +. Install Neo4j {neo4j-version}. +. Copy the database from the old installation (typically _data/graph.db_) into the new one (_data/databases/graph.db_). . Start up Neo4j. - . Any database store upgrade required will occur during startup. [[explicit-upgrade]] @@ -64,8 +53,9 @@ available with Neo4j Enterprise. To perform an explicit store upgrade: -. Install Neo4j {neo4j-version}, and set it up to use the same database store directory (typically _data/databases/graph.db_). . Cleanly shut down the older version of Neo4j, if it is running. +. Install Neo4j {neo4j-version}. +. Copy the database from the old installation (typically _data/graph.db_) into the new one (_data/databases/graph.db_). . Set the Neo4j configuration parameter `allow_store_upgrade=true` in _neo4j.conf_. Neo4j will fail to start without this configuration set. . Start up Neo4j. diff --git a/community/server/README.asciidoc b/community/server/README.asciidoc index 1c18d6be7fba8..885cf7278307b 100644 --- a/community/server/README.asciidoc +++ b/community/server/README.asciidoc @@ -16,9 +16,6 @@ Run the server using: mvn exec:java -If this fails, ensure you are not missing _neo4j.conf_ with a line containing `org.neo4j.server.database.location=`. -This may happen if you delete neo4j-home during development to reset the database. - == Webadmin development == The web administration interface, webadmin, can be found in two places of the source tree: diff --git a/community/server/src/docs/ops/server-configuration.asciidoc b/community/server/src/docs/ops/server-configuration.asciidoc index bd9acae76d061..16c909b1c1f56 100644 --- a/community/server/src/docs/ops/server-configuration.asciidoc +++ b/community/server/src/docs/ops/server-configuration.asciidoc @@ -14,10 +14,16 @@ The main configuration file for Neo4j is <>. This file contains several important settings, and although the defaults are sensible administrators might choose to make changes (especially to the port settings). -Set the location on disk of the database directory like this: +Chose the database to mount like this: [source,properties] ---- -org.neo4j.server.database.location=data/databases/graph.db +dbms.active_database=graph.db +---- + +The location of the Neo4j's data directory can be customized: +[source,properties] +---- +dbms.directories.data=data ---- NOTE: On Windows systems, absolute locations including drive letters need to read '"c:/data/db"'. diff --git a/community/server/src/docs/ops/server-installation.asciidoc b/community/server/src/docs/ops/server-installation.asciidoc index 98299c61ec080..cf71987399b27 100644 --- a/community/server/src/docs/ops/server-installation.asciidoc +++ b/community/server/src/docs/ops/server-installation.asciidoc @@ -24,13 +24,13 @@ We recommend that you install http://openjdk.java.net/[OpenJDK 8] or http://www. == Setting Proper File Permissions == When installing Neo4j Server, keep in mind that the _bin/neo4j_ executable will need to be run by some OS system user, and that user will need write permissions to some files/directories. -This goes specifically for the _data/databases/graph.db_ directory. -That user will also need execute permissions on other files, such as those in _bin/_. +This goes specifically for the _data_ directory. +That user will also need execute permissions on other files, such as those in the _bin_ directory. It is recommended to either choose or create a user who will own and manage the Neo4j Server. This user should own the entire Neo4j directory, so make sure to untar/unzip it as this user and not with `sudo` (UNIX/Linux/OSx) etc. -If _data/databases/graph.db_ is not writable by the user Neo4j won't be able to write anything either to the store or its log files. +If the _data_ directory is not writable by the user Neo4j won't be able to write anything either to the store. As a result any logs would be appended to _console.log_. The following error message would indicate a possible permissions issue: `Write transactions to database disabled`. diff --git a/community/server/src/main/java/org/neo4j/server/CommunityNeoServer.java b/community/server/src/main/java/org/neo4j/server/CommunityNeoServer.java index d6c9393ac8dc2..f792db793636b 100644 --- a/community/server/src/main/java/org/neo4j/server/CommunityNeoServer.java +++ b/community/server/src/main/java/org/neo4j/server/CommunityNeoServer.java @@ -56,7 +56,7 @@ public class CommunityNeoServer extends AbstractNeoServer { public static final GraphFactory COMMUNITY_FACTORY = ( config, dependencies ) -> { - File storeDir = config.get( ServerSettings.legacy_db_location ); + File storeDir = config.get( ServerSettings.database_path ); return new CommunityFacadeFactory().newFacade( storeDir, config.getParams(), dependencies ); }; diff --git a/community/server/src/main/java/org/neo4j/server/ServerCommandLineArgs.java b/community/server/src/main/java/org/neo4j/server/ServerCommandLineArgs.java index 6d0ff4c8afa37..161085e679d2f 100644 --- a/community/server/src/main/java/org/neo4j/server/ServerCommandLineArgs.java +++ b/community/server/src/main/java/org/neo4j/server/ServerCommandLineArgs.java @@ -34,7 +34,7 @@ *
  • Configuration file can be specified by --config=path/to/config.properties or * -C=path/to/config.properties
  • *
  • Specific overridden configuration options, directly specified as arguments can be specified with - * -c key=value, for example -c org.neo4j.server.database.location=my/own/path + * -c key=value, for example -c dbms.active_database=foo.db * or enabled boolean properties with -c key, f.ex -c org.neo4j.server.webserver.port * */ diff --git a/community/server/src/main/java/org/neo4j/server/configuration/ServerSettings.java b/community/server/src/main/java/org/neo4j/server/configuration/ServerSettings.java index 8dd0ec06f39b2..09267d246822c 100644 --- a/community/server/src/main/java/org/neo4j/server/configuration/ServerSettings.java +++ b/community/server/src/main/java/org/neo4j/server/configuration/ServerSettings.java @@ -42,8 +42,10 @@ import static org.neo4j.kernel.configuration.Settings.NORMALIZED_RELATIVE_URI; import static org.neo4j.kernel.configuration.Settings.NO_DEFAULT; import static org.neo4j.kernel.configuration.Settings.PATH; +import static org.neo4j.kernel.configuration.Settings.STRING; import static org.neo4j.kernel.configuration.Settings.STRING_LIST; import static org.neo4j.kernel.configuration.Settings.TRUE; +import static org.neo4j.kernel.configuration.Settings.derivedSetting; import static org.neo4j.kernel.configuration.Settings.min; import static org.neo4j.kernel.configuration.Settings.port; import static org.neo4j.kernel.configuration.Settings.setting; @@ -61,6 +63,12 @@ public interface ServerSettings */ String SERVER_CONFIG_FILE = "config/neo4j.conf"; + @Description("Name of the database to load") + Setting active_database = setting( "dbms.active_database", STRING, "graph.db" ); + + @Description("Path of the data directory") + Setting data_directory = setting( "dbms.directories.data", PATH, "data" ); + @Description("Maximum request header size") Setting maximum_request_header_size = setting( "org.neo4j.server.webserver.max.request.header", INTEGER, "20480" ); @@ -198,7 +206,9 @@ private ThirdPartyJaxRsPackage createThirdPartyJaxRsPackage( String packageAndMo FALSE ); @Internal - Setting legacy_db_location = setting( "org.neo4j.server.database.location", PATH, "data/graph.db" ); + Setting database_path = derivedSetting( "dbms.internal.derived.directories.database", + data_directory, active_database, + ( data, current ) -> new File( new File( data, "databases" ), current ) ); @Internal Setting webadmin_enabled = setting( "dbms.webadmin.enabled", BOOLEAN, TRUE ); diff --git a/community/server/src/main/java/org/neo4j/server/database/LifecycleManagingDatabase.java b/community/server/src/main/java/org/neo4j/server/database/LifecycleManagingDatabase.java index ca603c44be8bf..12a80e50b5f25 100644 --- a/community/server/src/main/java/org/neo4j/server/database/LifecycleManagingDatabase.java +++ b/community/server/src/main/java/org/neo4j/server/database/LifecycleManagingDatabase.java @@ -74,7 +74,7 @@ public LifecycleManagingDatabase( Config config, GraphFactory dbFactory, @Override public String getLocation() { - File file = config.get( ServerSettings.legacy_db_location ); + File file = config.get( ServerSettings.database_path ); return file.getAbsolutePath(); } diff --git a/community/server/src/test/java/org/neo4j/server/AcceptorConfigurationIT.java b/community/server/src/test/java/org/neo4j/server/AcceptorConfigurationIT.java index a6c4e4ea533fa..113fc5f648d2b 100644 --- a/community/server/src/test/java/org/neo4j/server/AcceptorConfigurationIT.java +++ b/community/server/src/test/java/org/neo4j/server/AcceptorConfigurationIT.java @@ -43,7 +43,7 @@ public void stopTheServer() public void serverShouldNotHangWithThreadPoolSizeSmallerThanCpuCount() throws Exception { server = server().withMaxJettyThreads( 3 ) - .usingDatabaseDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) + .usingDataDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) .build(); server.start(); diff --git a/community/server/src/test/java/org/neo4j/server/BaseBootstrapperTest.java b/community/server/src/test/java/org/neo4j/server/BaseBootstrapperTest.java index 95301a0996fa1..b006c14ab7696 100644 --- a/community/server/src/test/java/org/neo4j/server/BaseBootstrapperTest.java +++ b/community/server/src/test/java/org/neo4j/server/BaseBootstrapperTest.java @@ -19,12 +19,6 @@ */ package org.neo4j.server; -import org.junit.After; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; - import java.io.File; import java.io.IOException; import java.util.ArrayList; @@ -32,6 +26,12 @@ import java.util.List; import java.util.Map; +import org.junit.After; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.TemporaryFolder; + import org.neo4j.graphdb.factory.GraphDatabaseSettings; import org.neo4j.server.configuration.ServerSettings; import org.neo4j.test.server.ExclusiveServerTestBase; @@ -40,6 +40,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertThat; + import static org.neo4j.graphdb.factory.GraphDatabaseSettings.forced_kernel_id; import static org.neo4j.helpers.collection.MapUtil.store; import static org.neo4j.helpers.collection.MapUtil.stringMap; @@ -82,8 +83,8 @@ public void after() public void shouldStartStopNeoServerWithoutAnyConfigFiles() throws IOException { // When - int resultCode = start( bootstrapper, commandLineConfig( - "-c", configOption( ServerSettings.legacy_db_location.name(), tempDir.getRoot().getAbsolutePath()), + int resultCode = start( bootstrapper, commandLineConfig( + "-c", configOption( ServerSettings.data_directory.name(), tempDir.getRoot().getAbsolutePath() ), "-c", configOption( GraphDatabaseSettings.auth_store.name(), tempDir.newFile().getAbsolutePath()), "-c", configOption( ServerSettings.tls_certificate_file.name(), new File(tempDir.getRoot(), "cert.cert").getAbsolutePath()), "-c", configOption( ServerSettings.tls_key_file.name(), new File(tempDir.getRoot(), "key.key").getAbsolutePath()) diff --git a/community/server/src/test/java/org/neo4j/server/BatchOperationHeaderDocIT.java b/community/server/src/test/java/org/neo4j/server/BatchOperationHeaderDocIT.java index 836fddf2d8b1f..de9346d832d35 100644 --- a/community/server/src/test/java/org/neo4j/server/BatchOperationHeaderDocIT.java +++ b/community/server/src/test/java/org/neo4j/server/BatchOperationHeaderDocIT.java @@ -51,7 +51,7 @@ public class BatchOperationHeaderDocIT extends ExclusiveServerTestBase public void cleanTheDatabase() throws IOException { server = server().withThirdPartyJaxRsPackage( "org.dummy.web.service", - DUMMY_WEB_SERVICE_MOUNT_POINT ).usingDatabaseDir( folder.getRoot().getAbsolutePath() ).build(); + DUMMY_WEB_SERVICE_MOUNT_POINT ).usingDataDir( folder.getRoot().getAbsolutePath() ).build(); server.start(); } diff --git a/community/server/src/test/java/org/neo4j/server/BoltIT.java b/community/server/src/test/java/org/neo4j/server/BoltIT.java index 0eb9e495da6d6..d06c428ea725e 100644 --- a/community/server/src/test/java/org/neo4j/server/BoltIT.java +++ b/community/server/src/test/java/org/neo4j/server/BoltIT.java @@ -54,7 +54,7 @@ public void shouldLaunchBolt() throws Throwable server = server() .withProperty( connector( 0, ServerSettings.bolt_enabled ).name(), "true" ) .withProperty( connector( 0, ServerSettings.bolt_tls_level ).name(), "REQUIRED" ) - .usingDatabaseDir( tmpDir.getRoot().getAbsolutePath() ) + .usingDataDir( tmpDir.getRoot().getAbsolutePath() ) .build(); server.start(); @@ -70,7 +70,7 @@ public void shouldBeAbleToSpecifyHostAndPort() throws Throwable .withProperty( connector( 0, ServerSettings.bolt_enabled ).name(), "true" ) .withProperty( connector( 0, ServerSettings.bolt_tls_level ).name(), "REQUIRED" ) .withProperty( connector( 0, ServerSettings.bolt_socket_address ).name(), "localhost:8776" ) - .usingDatabaseDir( tmpDir.getRoot().getAbsolutePath() ) + .usingDataDir( tmpDir.getRoot().getAbsolutePath() ) .build(); server.start(); diff --git a/community/server/src/test/java/org/neo4j/server/HttpsAccessIT.java b/community/server/src/test/java/org/neo4j/server/HttpsAccessIT.java index ac4a90c1fee46..8eee20b881b87 100644 --- a/community/server/src/test/java/org/neo4j/server/HttpsAccessIT.java +++ b/community/server/src/test/java/org/neo4j/server/HttpsAccessIT.java @@ -60,7 +60,7 @@ public void stopTheServer() public void startServer() throws NoSuchAlgorithmException, KeyManagementException, IOException { server = server().withHttpsEnabled() - .usingDatabaseDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) + .usingDataDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) .build(); httpsUri = server.httpsUri().toASCIIString(); diff --git a/community/server/src/test/java/org/neo4j/server/LegacyIndexIT.java b/community/server/src/test/java/org/neo4j/server/LegacyIndexIT.java index 21c975792c3f5..37a86e35e8b69 100644 --- a/community/server/src/test/java/org/neo4j/server/LegacyIndexIT.java +++ b/community/server/src/test/java/org/neo4j/server/LegacyIndexIT.java @@ -62,7 +62,7 @@ public void startServer() throws NoSuchAlgorithmException, KeyManagementExceptio .withProperty( "remote_shell_enabled", "false" ) .withProperty( "dbms.security.auth_enabled", "false" ) .withProperty( ServerSettings.maximum_response_header_size.name(), "5000" ) - .usingDatabaseDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) + .usingDataDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) .build(); } diff --git a/community/server/src/test/java/org/neo4j/server/NeoServerJAXRSDocIT.java b/community/server/src/test/java/org/neo4j/server/NeoServerJAXRSDocIT.java index b3cfa5d50b63d..5c3cf7065a63d 100644 --- a/community/server/src/test/java/org/neo4j/server/NeoServerJAXRSDocIT.java +++ b/community/server/src/test/java/org/neo4j/server/NeoServerJAXRSDocIT.java @@ -78,7 +78,7 @@ public void shouldLoadThirdPartyJaxRsClasses() throws Exception server = CommunityServerBuilder.server() .withThirdPartyJaxRsPackage( "org.dummy.web.service", DummyThirdPartyWebService.DUMMY_WEB_SERVICE_MOUNT_POINT ) - .usingDatabaseDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) + .usingDataDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) .build(); server.start(); diff --git a/community/server/src/test/java/org/neo4j/server/NeoServerPortConflictDocIT.java b/community/server/src/test/java/org/neo4j/server/NeoServerPortConflictDocIT.java index 1b1a71a90872f..e7249da84064c 100644 --- a/community/server/src/test/java/org/neo4j/server/NeoServerPortConflictDocIT.java +++ b/community/server/src/test/java/org/neo4j/server/NeoServerPortConflictDocIT.java @@ -46,7 +46,7 @@ public void shouldComplainIfServerPortIsAlreadyTaken() throws IOException AssertableLogProvider logProvider = new AssertableLogProvider(); CommunityNeoServer server = CommunityServerBuilder.server( logProvider ) .onPort( contestedPort ) - .usingDatabaseDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) + .usingDataDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) .onHost( Jetty9WebServer.DEFAULT_ADDRESS ) .build(); try diff --git a/community/server/src/test/java/org/neo4j/server/ServerConfigDocIT.java b/community/server/src/test/java/org/neo4j/server/ServerConfigDocIT.java index 6d602fd257811..8f197fc0a3d1d 100644 --- a/community/server/src/test/java/org/neo4j/server/ServerConfigDocIT.java +++ b/community/server/src/test/java/org/neo4j/server/ServerConfigDocIT.java @@ -54,7 +54,7 @@ public void shouldPickUpPortFromConfig() throws Exception final int NON_DEFAULT_PORT = 4321; server = server().onPort( NON_DEFAULT_PORT ) - .usingDatabaseDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) + .usingDataDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) .build(); server.start(); @@ -73,7 +73,7 @@ public void shouldPickupRelativeUrisForWebAdminAndWebAdminRest() throws IOExcept String webAdminManagementUri = "/a/different/webadmin/management/uri/"; server = server().withRelativeWebDataAdminUriPath( webAdminDataUri ) - .usingDatabaseDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) + .usingDataDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) .withRelativeWebAdminUriPath( webAdminManagementUri ) .build(); server.start(); @@ -91,7 +91,7 @@ public void shouldPickupRelativeUrisForWebAdminAndWebAdminRest() throws IOExcept public void shouldGenerateWADLWhenExplicitlyEnabledInConfig() throws IOException { server = server().withProperty( ServerSettings.wadl_enabled.name(), "true" ) - .usingDatabaseDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) + .usingDataDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) .build(); server.start(); JaxRsResponse response = new RestRequest().get( "http://localhost:7474/application.wadl", @@ -107,7 +107,7 @@ public void shouldGenerateWADLWhenExplicitlyEnabledInConfig() throws IOException public void shouldNotGenerateWADLWhenNotExplicitlyEnabledInConfig() throws IOException { server = server() - .usingDatabaseDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) + .usingDataDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) .build(); server.start(); JaxRsResponse response = new RestRequest().get( "http://localhost:7474/application.wadl", @@ -120,7 +120,7 @@ public void shouldNotGenerateWADLWhenNotExplicitlyEnabledInConfig() throws IOExc public void shouldNotGenerateWADLWhenExplicitlyDisabledInConfig() throws IOException { server = server().withProperty( ServerSettings.wadl_enabled.name(), "false" ) - .usingDatabaseDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) + .usingDataDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) .build(); server.start(); JaxRsResponse response = new RestRequest().get( "http://localhost:7474/application.wadl", @@ -133,7 +133,7 @@ public void shouldNotGenerateWADLWhenExplicitlyDisabledInConfig() throws IOExcep public void shouldEnableWebadminByDefault() throws IOException { // Given - server = server().usingDatabaseDir( folder.directory( name.getMethodName() ).getAbsolutePath() ).build(); + server = server().usingDataDir( folder.directory( name.getMethodName() ).getAbsolutePath() ).build(); server.start(); // When & then @@ -146,7 +146,7 @@ public void shouldDisableWebadminWhenAskedTo() throws IOException { // Given server = server().withProperty( ServerSettings.webadmin_enabled.name(), "false" ) - .usingDatabaseDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) + .usingDataDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) .build(); server.start(); @@ -160,7 +160,7 @@ public void shouldHaveSandboxingEnabledByDefault() throws Exception { // Given server = server() - .usingDatabaseDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) + .usingDataDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) .build(); server.start(); String node = POST( server.baseUri().toASCIIString() + "db/data/node" ).location(); @@ -206,7 +206,7 @@ public void shouldBeAbleToDisableSandboxing() throws Exception GlobalJavascriptInitializer.initialize( GlobalJavascriptInitializer.Mode.SANDBOXED ); server = server().withProperty( ServerSettings.script_sandboxing_enabled.name(), "false" ) - .usingDatabaseDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) + .usingDataDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) .build(); // When diff --git a/community/server/src/test/java/org/neo4j/server/ServerTestUtils.java b/community/server/src/test/java/org/neo4j/server/ServerTestUtils.java index ef54f55037359..719d3dfdd4c19 100644 --- a/community/server/src/test/java/org/neo4j/server/ServerTestUtils.java +++ b/community/server/src/test/java/org/neo4j/server/ServerTestUtils.java @@ -85,7 +85,7 @@ public static Map getDefaultRelativeProperties() throws IOExcepti public static void addDefaultRelativeProperties( Map properties, File temporaryFolder ) { - addRelativeProperty( temporaryFolder, properties, ServerSettings.legacy_db_location ); + addRelativeProperty( temporaryFolder, properties, ServerSettings.data_directory ); addRelativeProperty( temporaryFolder, properties, GraphDatabaseSettings.auth_store ); addRelativeProperty( temporaryFolder, properties, ServerSettings.tls_certificate_file ); addRelativeProperty( temporaryFolder, properties, ServerSettings.tls_key_file ); diff --git a/community/server/src/test/java/org/neo4j/server/configuration/ConfigFileBuilder.java b/community/server/src/test/java/org/neo4j/server/configuration/ConfigFileBuilder.java index 64e7746882e7c..108d932582440 100644 --- a/community/server/src/test/java/org/neo4j/server/configuration/ConfigFileBuilder.java +++ b/community/server/src/test/java/org/neo4j/server/configuration/ConfigFileBuilder.java @@ -58,7 +58,7 @@ public File build() throws IOException { File file = new File( directory, "config" ); Map config = MapUtil.stringMap( - ServerSettings.legacy_db_location.name(), directory.getAbsolutePath(), + ServerSettings.data_directory.name(), directory.getAbsolutePath()+"/data", ServerSettings.management_api_path.name(), "http://localhost:7474/db/manage/", ServerSettings.rest_api_path.name(), "http://localhost:7474/db/data/" ); config.put( ServerSettings.webserver_port.name(), "7474" ); diff --git a/community/server/src/test/java/org/neo4j/server/configuration/ServerSettingsTest.java b/community/server/src/test/java/org/neo4j/server/configuration/ServerSettingsTest.java index 9807e560ebac8..7f940d660ef46 100644 --- a/community/server/src/test/java/org/neo4j/server/configuration/ServerSettingsTest.java +++ b/community/server/src/test/java/org/neo4j/server/configuration/ServerSettingsTest.java @@ -79,10 +79,17 @@ public void shouldFailToValidateHttpLogFileWithInvalidLogFileName() throws Throw exception.expect( InvalidSettingException.class ); // When - Config config = new Config( stringMap( + new Config( stringMap( http_logging_enabled.name(), TRUE, http_log_config_file.name(), configFile.getAbsolutePath() ), ServerSettings.class ); + } + @Test + public void shouldPutDatabaseDirectoriesIntoDataDatabases() + { + Config config = new Config( stringMap( ServerSettings.data_directory.name(), "the-data-directory" ) ); + assertThat( config.get( ServerSettings.database_path ).toString(), + equalTo( "the-data-directory/databases/graph.db" ) ); } private File createHttpLogConfig( File logFile ) throws IOException diff --git a/community/server/src/test/java/org/neo4j/server/database/TestLifecycleManagedDatabase.java b/community/server/src/test/java/org/neo4j/server/database/TestLifecycleManagedDatabase.java index dcf568642fc1e..72c714d9247ac 100644 --- a/community/server/src/test/java/org/neo4j/server/database/TestLifecycleManagedDatabase.java +++ b/community/server/src/test/java/org/neo4j/server/database/TestLifecycleManagedDatabase.java @@ -29,9 +29,9 @@ import org.junit.Test; import org.neo4j.kernel.GraphDatabaseDependencies; -import org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory; import org.neo4j.kernel.StoreLockException; import org.neo4j.kernel.configuration.Config; +import org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory; import org.neo4j.logging.AssertableLogProvider; import org.neo4j.server.configuration.ServerSettings; import org.neo4j.test.ImpermanentDatabaseRule; @@ -59,26 +59,28 @@ public class TestLifecycleManagedDatabase @Rule public ImpermanentDatabaseRule dbRule = new ImpermanentDatabaseRule( logProvider ); - private File databaseDirectory; + private File dataDirectory; private Database theDatabase; private boolean deletionFailureOk; private LifecycleManagingDatabase.GraphFactory dbFactory; + private Config dbConfig; @Before public void setup() throws Exception { - databaseDirectory = createTempDir(); + dataDirectory = createTempDir(); dbFactory = mock( LifecycleManagingDatabase.GraphFactory.class ); when(dbFactory.newGraphDatabase( any( Config.class ), any( GraphDatabaseFacadeFactory.Dependencies.class ) )) .thenReturn( dbRule.getGraphDatabaseAPI() ); + dbConfig = new Config(stringMap( ServerSettings.data_directory.name(), dataDirectory.getAbsolutePath() ) ); theDatabase = newDatabase(); } private LifecycleManagingDatabase newDatabase() { - Config dbConfig = new Config(stringMap( ServerSettings.legacy_db_location.name(), databaseDirectory.getAbsolutePath() )); - return new LifecycleManagingDatabase( dbConfig, dbFactory, GraphDatabaseDependencies.newDependencies().userLogProvider( logProvider ) ); + return new LifecycleManagingDatabase( dbConfig, dbFactory, + GraphDatabaseDependencies.newDependencies().userLogProvider( logProvider ) ); } @After @@ -88,7 +90,7 @@ public void shutdownDatabase() throws Throwable try { - FileUtils.forceDelete( databaseDirectory ); + FileUtils.forceDelete( dataDirectory ); } catch ( IOException e ) { @@ -146,6 +148,6 @@ public void shouldComplainIfDatabaseLocationIsAlreadyInUse() throws Throwable public void shouldBeAbleToGetLocation() throws Throwable { theDatabase.start(); - assertThat( theDatabase.getLocation(), is( databaseDirectory.getAbsolutePath() ) ); + assertThat( theDatabase.getLocation(), is( dbConfig.get( ServerSettings.database_path ).getAbsolutePath() ) ); } } diff --git a/community/server/src/test/java/org/neo4j/server/helpers/CommunityServerBuilder.java b/community/server/src/test/java/org/neo4j/server/helpers/CommunityServerBuilder.java index fb56729dc305e..47ba3e0c07e5b 100644 --- a/community/server/src/test/java/org/neo4j/server/helpers/CommunityServerBuilder.java +++ b/community/server/src/test/java/org/neo4j/server/helpers/CommunityServerBuilder.java @@ -61,15 +61,15 @@ public class CommunityServerBuilder protected final LogProvider logProvider; private String portNo = "7474"; private String maxThreads = null; - protected String dbDir = null; + protected String dataDir = null; private String webAdminUri = "/db/manage/"; private String webAdminDataUri = "/db/data/"; protected PreFlightTasks preflightTasks; private final HashMap thirdPartyPackages = new HashMap<>(); private final Properties arbitraryProperties = new Properties(); - public static LifecycleManagingDatabase.GraphFactory IN_MEMORY_DB = ( config, dependencies ) -> { - File storeDir = config.get( ServerSettings.legacy_db_location ); + public static LifecycleManagingDatabase.GraphFactory IN_MEMORY_DB = ( config, dependencies ) -> { + File storeDir = config.get( ServerSettings.database_path ); Map params = config.getParams(); params.put( CommunityFacadeFactory.Configuration.ephemeral.name(), "true" ); return new ImpermanentGraphDatabase( storeDir, params, GraphDatabaseDependencies.newDependencies(dependencies) ); @@ -95,7 +95,7 @@ public static CommunityServerBuilder server() public CommunityNeoServer build() throws IOException { - if ( dbDir == null && persistent ) + if ( dataDir == null && persistent ) { throw new IllegalStateException( "Must specify path" ); } @@ -138,9 +138,9 @@ private Map createConfiguration( File temporaryFolder ) ServerTestUtils.addDefaultRelativeProperties( properties, temporaryFolder ); - if ( dbDir != null ) + if ( dataDir != null ) { - properties.put( ServerSettings.legacy_db_location.name(), dbDir ); + properties.put( ServerSettings.data_directory.name(), dataDir ); } if ( portNo != null ) @@ -230,9 +230,9 @@ public CommunityServerBuilder withMaxJettyThreads( int maxThreads ) return this; } - public CommunityServerBuilder usingDatabaseDir( String dbDir ) + public CommunityServerBuilder usingDataDir( String dataDir ) { - this.dbDir = dbDir; + this.dataDir = dataDir; return this; } diff --git a/community/server/src/test/java/org/neo4j/server/helpers/ServerHelper.java b/community/server/src/test/java/org/neo4j/server/helpers/ServerHelper.java index 2865e15cb256b..f6d53ce813203 100644 --- a/community/server/src/test/java/org/neo4j/server/helpers/ServerHelper.java +++ b/community/server/src/test/java/org/neo4j/server/helpers/ServerHelper.java @@ -36,7 +36,6 @@ import org.neo4j.kernel.GraphDatabaseAPI; import org.neo4j.logging.LogProvider; import org.neo4j.server.NeoServer; -import org.neo4j.tooling.GlobalGraphOperations; public class ServerHelper { @@ -114,7 +113,7 @@ private static NeoServer createServer( CommunityServerBuilder builder, boolean p builder = builder.persistent(); } NeoServer server = builder - .usingDatabaseDir( path != null ? path.getAbsolutePath() : null ) + .usingDataDir( path != null ? path.getAbsolutePath() : null ) .build(); checkServerCanStart( server.baseUri().getHost(), server.baseUri().getPort() ); diff --git a/community/server/src/test/java/org/neo4j/server/integration/StartupLoggingIT.java b/community/server/src/test/java/org/neo4j/server/integration/StartupLoggingIT.java index fe9a21d41b8ce..a0d7ae1b7b20f 100644 --- a/community/server/src/test/java/org/neo4j/server/integration/StartupLoggingIT.java +++ b/community/server/src/test/java/org/neo4j/server/integration/StartupLoggingIT.java @@ -53,7 +53,7 @@ public class StartupLoggingIT extends ExclusiveServerTestBase @Before public void setUp() throws IOException { - FileUtils.deleteRecursively( ServerTestUtils.getRelativeFile( ServerSettings.legacy_db_location ) ); + FileUtils.deleteRecursively( ServerTestUtils.getRelativeFile( ServerSettings.data_directory ) ); } @Test diff --git a/community/server/src/test/java/org/neo4j/server/rest/AutoIndexWithNonDefaultConfigurationThroughRESTAPIDocIT.java b/community/server/src/test/java/org/neo4j/server/rest/AutoIndexWithNonDefaultConfigurationThroughRESTAPIDocIT.java index 7f2cb4b7c3f86..89238ed35d04d 100644 --- a/community/server/src/test/java/org/neo4j/server/rest/AutoIndexWithNonDefaultConfigurationThroughRESTAPIDocIT.java +++ b/community/server/src/test/java/org/neo4j/server/rest/AutoIndexWithNonDefaultConfigurationThroughRESTAPIDocIT.java @@ -61,7 +61,7 @@ public void setUp() public static void allocateServer() throws IOException { server = CommunityServerBuilder.server() - .usingDatabaseDir( staticFolder.getRoot().getAbsolutePath() ) + .usingDataDir( staticFolder.getRoot().getAbsolutePath() ) .withAutoIndexingEnabledForNodes( "foo", "bar" ) .build(); server.start(); diff --git a/community/server/src/test/java/org/neo4j/server/rest/paging/PagedTraverserDocIT.java b/community/server/src/test/java/org/neo4j/server/rest/paging/PagedTraverserDocIT.java index 8001fba3bdc0e..b3e83a702694d 100644 --- a/community/server/src/test/java/org/neo4j/server/rest/paging/PagedTraverserDocIT.java +++ b/community/server/src/test/java/org/neo4j/server/rest/paging/PagedTraverserDocIT.java @@ -88,7 +88,7 @@ public static void setupServer() throws Exception { clock = new FakeClock(); server = CommunityServerBuilder.server() - .usingDatabaseDir( staticFolder.getRoot().getAbsolutePath() ) + .usingDataDir( staticFolder.getRoot().getAbsolutePath() ) .withClock( clock ) .build(); diff --git a/community/server/src/test/java/org/neo4j/server/rest/security/SecurityRulesDocIT.java b/community/server/src/test/java/org/neo4j/server/rest/security/SecurityRulesDocIT.java index ce1488dc58faa..351166d3a576c 100644 --- a/community/server/src/test/java/org/neo4j/server/rest/security/SecurityRulesDocIT.java +++ b/community/server/src/test/java/org/neo4j/server/rest/security/SecurityRulesDocIT.java @@ -82,7 +82,7 @@ public void should401WithBasicChallengeWhenASecurityRuleFails() { server = CommunityServerBuilder.server().withDefaultDatabaseTuning().withSecurityRules( PermanentlyFailingSecurityRule.class.getCanonicalName() ) - .usingDatabaseDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) + .usingDataDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) .build(); server.start(); gen.get().addSnippet( @@ -108,7 +108,7 @@ public void should401WithBasicChallengeIfAnyOneOfTheRulesFails() server = CommunityServerBuilder.server().withDefaultDatabaseTuning().withSecurityRules( PermanentlyFailingSecurityRule.class.getCanonicalName(), PermanentlyPassingSecurityRule.class.getCanonicalName() ) - .usingDatabaseDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) + .usingDataDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) .build(); server.start(); functionalTestHelper = new FunctionalTestHelper( server ); @@ -128,7 +128,7 @@ public void shouldInvokeAllSecurityRules() throws Exception server = CommunityServerBuilder.server().withDefaultDatabaseTuning().withSecurityRules( NoAccessToDatabaseSecurityRule.class.getCanonicalName(), NoAccessToWebAdminSecurityRule.class.getCanonicalName() ) - .usingDatabaseDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) + .usingDataDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) .build(); server.start(); functionalTestHelper = new FunctionalTestHelper( server ); @@ -149,7 +149,7 @@ public void shouldRespondWith201IfAllTheRulesPassWhenCreatingANode() { server = CommunityServerBuilder.server().withDefaultDatabaseTuning().withSecurityRules( PermanentlyPassingSecurityRule.class.getCanonicalName() ) - .usingDatabaseDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) + .usingDataDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) .build(); server.start(); functionalTestHelper = new FunctionalTestHelper( server ); @@ -189,7 +189,7 @@ public void aSimpleWildcardUriPathShould401OnAccessToProtectedSubPath() mountPoint ) .withSecurityRules( PermanentlyFailingSecurityRuleWithWildcardPath.class.getCanonicalName() ) - .usingDatabaseDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) + .usingDataDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) .build(); server.start(); @@ -238,7 +238,7 @@ public void aComplexWildcardUriPathShould401OnAccessToProtectedSubPath() mountPoint ) .withSecurityRules( PermanentlyFailingSecurityRuleWithComplexWildcardPath.class.getCanonicalName() ) - .usingDatabaseDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) + .usingDataDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) .build(); server.start(); gen.get().addSnippet( @@ -270,7 +270,7 @@ public void should403WhenAuthenticatedButForbidden() server = CommunityServerBuilder.server().withDefaultDatabaseTuning().withSecurityRules( PermanentlyForbiddenSecurityRule.class.getCanonicalName(), PermanentlyPassingSecurityRule.class.getCanonicalName() ) - .usingDatabaseDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) + .usingDataDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) .build(); server.start(); functionalTestHelper = new FunctionalTestHelper( server ); diff --git a/community/server/src/test/java/org/neo4j/server/web/logging/HTTPLoggingDocIT.java b/community/server/src/test/java/org/neo4j/server/web/logging/HTTPLoggingDocIT.java index ada4fc97945f2..011c1a49e8a3e 100644 --- a/community/server/src/test/java/org/neo4j/server/web/logging/HTTPLoggingDocIT.java +++ b/community/server/src/test/java/org/neo4j/server/web/logging/HTTPLoggingDocIT.java @@ -77,7 +77,7 @@ public void givenExplicitlyDisabledServerLoggingConfigurationShouldNotLogAccesse NeoServer server = CommunityServerBuilder.server().withDefaultDatabaseTuning() .withProperty( ServerSettings.http_logging_enabled.name(), "false" ) .withProperty( ServerSettings.http_log_config_file.name(), configFile.getPath() ) - .usingDatabaseDir( testDirectory.directory( + .usingDataDir( testDirectory.directory( "givenExplicitlyDisabledServerLoggingConfigurationShouldNotLogAccesses-dbdir" ).getAbsolutePath() ) .build(); @@ -121,7 +121,7 @@ public void givenExplicitlyEnabledServerLoggingConfigurationShouldLogAccess() th NeoServer server = CommunityServerBuilder.server().withDefaultDatabaseTuning() .withProperty( ServerSettings.http_logging_enabled.name(), "true" ) .withProperty( ServerSettings.http_log_config_file.name(), configFile.getPath() ) - .usingDatabaseDir( testDirectory.directory( + .usingDataDir( testDirectory.directory( "givenExplicitlyEnabledServerLoggingConfigurationShouldLogAccess-dbdir" ).getAbsolutePath() ) .build(); @@ -162,7 +162,7 @@ public void givenDebugContentLoggingEnabledShouldLogContent() throws Exception .withProperty( ServerSettings.http_logging_enabled.name(), "true" ) .withProperty( ServerSettings.http_content_logging_enabled.name(), "true" ) .withProperty( ServerSettings.http_log_config_file.name(), configFile.getPath() ) - .usingDatabaseDir( testDirectory.directory( "givenDebugContentLoggingEnabledShouldLogContent-dbdir" ) + .usingDataDir( testDirectory.directory( "givenDebugContentLoggingEnabledShouldLogContent-datadir" ) .getAbsolutePath() ) .build(); @@ -207,7 +207,7 @@ public void givenConfigurationWithUnwritableLogDirectoryShouldFailToStartServer( .withPreflightTasks( new EnsurePreparedForHttpLogging( config ) ) .withProperty( ServerSettings.http_logging_enabled.name(), "true" ) .withProperty( ServerSettings.http_log_config_file.name(), configFile.getPath() ) - .usingDatabaseDir( confDir.getAbsolutePath() ) + .usingDataDir( confDir.getAbsolutePath() ) .build(); } diff --git a/community/server/src/test/java/org/neo4j/server/webadmin/rest/CommunityVersionAndEditionServiceDocIT.java b/community/server/src/test/java/org/neo4j/server/webadmin/rest/CommunityVersionAndEditionServiceDocIT.java index 4ee5b57741bf1..9474ca7ff99ba 100644 --- a/community/server/src/test/java/org/neo4j/server/webadmin/rest/CommunityVersionAndEditionServiceDocIT.java +++ b/community/server/src/test/java/org/neo4j/server/webadmin/rest/CommunityVersionAndEditionServiceDocIT.java @@ -74,7 +74,7 @@ public static void setupServer() throws Exception { clock = new FakeClock(); server = CommunityServerBuilder.server() - .usingDatabaseDir( staticFolder.getRoot().getAbsolutePath() ) + .usingDataDir( staticFolder.getRoot().getAbsolutePath() ) .withClock( clock ) .build(); @@ -126,4 +126,4 @@ public void shouldReportCommunityEdition() throws Exception assertThat( res.get( "edition" ).asText(), equalTo( "community" ) ); assertThat( res.get( "version" ).asText(), equalTo( releaseVersion ) ); } -} \ No newline at end of file +} diff --git a/community/server/src/test/java/org/neo4j/server/webadmin/rest/ConfigureEnabledManagementConsolesDocIT.java b/community/server/src/test/java/org/neo4j/server/webadmin/rest/ConfigureEnabledManagementConsolesDocIT.java index 4797c7752792b..a323c481a85e3 100644 --- a/community/server/src/test/java/org/neo4j/server/webadmin/rest/ConfigureEnabledManagementConsolesDocIT.java +++ b/community/server/src/test/java/org/neo4j/server/webadmin/rest/ConfigureEnabledManagementConsolesDocIT.java @@ -46,7 +46,7 @@ public void stopTheServer() public void shouldBeAbleToExplicitlySetConsolesToEnabled() throws Exception { server = server().withProperty( ServerSettings.management_console_engines.name(), "" ) - .usingDatabaseDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) + .usingDataDir( folder.directory( name.getMethodName() ).getAbsolutePath() ) .build(); server.start(); @@ -56,7 +56,7 @@ public void shouldBeAbleToExplicitlySetConsolesToEnabled() throws Exception @Test public void shellConsoleShouldBeEnabledByDefault() throws Exception { - server = server().usingDatabaseDir( folder.directory( name.getMethodName() ).getAbsolutePath() ).build(); + server = server().usingDataDir( folder.directory( name.getMethodName() ).getAbsolutePath() ).build(); server.start(); assertThat( exec( "ls", "shell" ).getStatus(), is( 200 ) ); diff --git a/enterprise/ha/src/docs/dev/upgrade-guide.asciidoc b/enterprise/ha/src/docs/dev/upgrade-guide.asciidoc index 84a7e576149cf..4c548d21f9b17 100644 --- a/enterprise/ha/src/docs/dev/upgrade-guide.asciidoc +++ b/enterprise/ha/src/docs/dev/upgrade-guide.asciidoc @@ -46,8 +46,7 @@ The following process is recommended: the master of the cluster last. .Upgrade the database store on the previous master - . Install Neo4j {neo4j-version} on the previous master, keeping the database - store (typically _data/databases/graph.db_) from the previous version. + . Install Neo4j {neo4j-version} on the previous master, keeping the database store (typically _data/graph.db_) from the previous version. . Disable HA in the configuration, by setting `org.neo4j.server.database.mode=SINGLE`. . <> (this may involve configuring with `allow_store_upgrade=true`, as described in <>). . Once upgraded, shut down Neo4j again. diff --git a/enterprise/server-enterprise/src/main/java/org/neo4j/server/enterprise/EnterpriseNeoServer.java b/enterprise/server-enterprise/src/main/java/org/neo4j/server/enterprise/EnterpriseNeoServer.java index a9674a3cf2bde..2573daf4240e0 100644 --- a/enterprise/server-enterprise/src/main/java/org/neo4j/server/enterprise/EnterpriseNeoServer.java +++ b/enterprise/server-enterprise/src/main/java/org/neo4j/server/enterprise/EnterpriseNeoServer.java @@ -73,22 +73,22 @@ public static Mode fromString( String value ) } private static final GraphFactory HA_FACTORY = ( config, dependencies ) -> { - File storeDir = config.get( ServerSettings.legacy_db_location ); + File storeDir = config.get( ServerSettings.database_path ); return new HighlyAvailableGraphDatabase( storeDir, config.getParams(), dependencies ); }; private static final GraphFactory ENTERPRISE_FACTORY = ( config, dependencies ) -> { - File storeDir = config.get( ServerSettings.legacy_db_location ); + File storeDir = config.get( ServerSettings.database_path ); return new EnterpriseGraphDatabase( storeDir, config.getParams(), dependencies ); }; private static final GraphFactory CORE_FACTORY = ( config, dependencies ) -> { - File storeDir = config.get( ServerSettings.legacy_db_location ); + File storeDir = config.get( ServerSettings.database_path ); return new CoreGraphDatabase( storeDir, config.getParams(), dependencies ); }; private static final GraphFactory EDGE_FACTORY = ( config, dependencies ) -> { - File storeDir = config.get( ServerSettings.legacy_db_location ); + File storeDir = config.get( ServerSettings.database_path ); return new EdgeGraphDatabase( storeDir, config.getParams(), dependencies ); }; diff --git a/enterprise/server-enterprise/src/test/java/org/neo4j/server/enterprise/functional/EnterpriseServerIT.java b/enterprise/server-enterprise/src/test/java/org/neo4j/server/enterprise/functional/EnterpriseServerIT.java index 3e360c8128a06..f4f4f3f09b049 100644 --- a/enterprise/server-enterprise/src/test/java/org/neo4j/server/enterprise/functional/EnterpriseServerIT.java +++ b/enterprise/server-enterprise/src/test/java/org/neo4j/server/enterprise/functional/EnterpriseServerIT.java @@ -57,7 +57,7 @@ public void shouldBeAbleToStartInHAMode() throws Throwable { // Given NeoServer server = EnterpriseServerBuilder.server() - .usingDatabaseDir( folder.getRoot().getAbsolutePath() ) + .usingDataDir( folder.getRoot().getAbsolutePath() ) .withProperty( mode.name(), "HA" ) .withProperty( server_id.name(), "1" ) .withProperty( initial_hosts.name(), ":5001" ) @@ -89,7 +89,7 @@ public void shouldRequireAuthorizationForHAStatusEndpoints() throws Exception // Given NeoServer server = EnterpriseServerBuilder.server() .withProperty( GraphDatabaseSettings.auth_enabled.name(), "true" ) - .usingDatabaseDir( folder.getRoot().getAbsolutePath() ) + .usingDataDir( folder.getRoot().getAbsolutePath() ) .withProperty( mode.name(), "HA" ) .withProperty( server_id.name(), "1" ) .withProperty( initial_hosts.name(), ":5001" ) @@ -121,7 +121,7 @@ public void shouldAllowDisablingAuthorizationOnHAStatusEndpoints() throws Except NeoServer server = EnterpriseServerBuilder.server() .withProperty( GraphDatabaseSettings.auth_enabled.name(), "true" ) .withProperty( HaSettings.ha_status_auth_enabled.name(), "false" ) - .usingDatabaseDir( folder.getRoot().getAbsolutePath() ) + .usingDataDir( folder.getRoot().getAbsolutePath() ) .withProperty( mode.name(), "HA" ) .withProperty( server_id.name(), "1" ) .withProperty( initial_hosts.name(), ":5001" ) diff --git a/enterprise/server-enterprise/src/test/java/org/neo4j/server/enterprise/helpers/EnterpriseServerBuilder.java b/enterprise/server-enterprise/src/test/java/org/neo4j/server/enterprise/helpers/EnterpriseServerBuilder.java index ed725ae54ad04..fbba5bde691c6 100644 --- a/enterprise/server-enterprise/src/test/java/org/neo4j/server/enterprise/helpers/EnterpriseServerBuilder.java +++ b/enterprise/server-enterprise/src/test/java/org/neo4j/server/enterprise/helpers/EnterpriseServerBuilder.java @@ -55,9 +55,9 @@ public EnterpriseNeoServer build() throws IOException } @Override - public EnterpriseServerBuilder usingDatabaseDir( String dbDir ) + public EnterpriseServerBuilder usingDataDir( String dataDir ) { - super.usingDatabaseDir( dbDir ); + super.usingDataDir( dataDir ); return this; } diff --git a/enterprise/server-enterprise/src/test/java/org/neo4j/server/enterprise/jmx/ServerManagementTest.java b/enterprise/server-enterprise/src/test/java/org/neo4j/server/enterprise/jmx/ServerManagementTest.java index d7b23354ec2cc..529b5222fdb7c 100644 --- a/enterprise/server-enterprise/src/test/java/org/neo4j/server/enterprise/jmx/ServerManagementTest.java +++ b/enterprise/server-enterprise/src/test/java/org/neo4j/server/enterprise/jmx/ServerManagementTest.java @@ -28,15 +28,16 @@ import org.neo4j.logging.NullLog; import org.neo4j.logging.NullLogProvider; import org.neo4j.server.NeoServer; +import org.neo4j.server.configuration.BaseServerConfigLoader; +import org.neo4j.server.configuration.ServerSettings; import org.neo4j.server.enterprise.EnterpriseNeoServer; import org.neo4j.server.enterprise.helpers.EnterpriseServerBuilder; -import org.neo4j.server.configuration.ServerSettings; -import org.neo4j.server.configuration.BaseServerConfigLoader; import org.neo4j.test.CleanupRule; import org.neo4j.test.TargetDirectory; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; + import static org.neo4j.helpers.collection.MapUtil.stringMap; public class ServerManagementTest @@ -53,14 +54,14 @@ public class ServerManagementTest public void shouldBeAbleToRestartServer() throws Exception { // Given - String dbDirectory1 = baseDir.directory( "db1" ).getAbsolutePath(); - String dbDirectory2 = baseDir.directory( "db2" ).getAbsolutePath(); + String dataDirectory1 = baseDir.directory( "data1" ).getAbsolutePath(); + String dataDirectory2 = baseDir.directory( "data2" ).getAbsolutePath(); Config config = new BaseServerConfigLoader().loadConfig( null, EnterpriseServerBuilder .server() .withDefaultDatabaseTuning() - .usingDatabaseDir( dbDirectory1 ) + .usingDataDir( dataDirectory1 ) .createConfigFiles(), NullLog.getInstance() ); // When @@ -69,16 +70,18 @@ public void shouldBeAbleToRestartServer() throws Exception server.start(); assertNotNull( server.getDatabase().getGraph() ); - assertEquals( dbDirectory1, server.getDatabase().getLocation() ); + assertEquals( config.get( ServerSettings.database_path ).getAbsolutePath(), + server.getDatabase().getLocation() ); // Change the database location - config.augment( stringMap( ServerSettings.legacy_db_location.name(), dbDirectory2 ) ); + config.augment( stringMap( ServerSettings.data_directory.name(), dataDirectory2 ) ); ServerManagement bean = new ServerManagement( server ); bean.restartServer(); // Then assertNotNull( server.getDatabase().getGraph() ); - assertEquals( dbDirectory2, server.getDatabase().getLocation() ); + assertEquals( config.get( ServerSettings.database_path ).getAbsolutePath(), + server.getDatabase().getLocation() ); } private static GraphDatabaseDependencies graphDbDependencies() diff --git a/enterprise/server-enterprise/src/test/java/org/neo4j/server/webadmin/rest/EnterpriseVersionAndEditionServiceIT.java b/enterprise/server-enterprise/src/test/java/org/neo4j/server/webadmin/rest/EnterpriseVersionAndEditionServiceIT.java index 750c0106f1f9a..a705a86ee54a4 100644 --- a/enterprise/server-enterprise/src/test/java/org/neo4j/server/webadmin/rest/EnterpriseVersionAndEditionServiceIT.java +++ b/enterprise/server-enterprise/src/test/java/org/neo4j/server/webadmin/rest/EnterpriseVersionAndEditionServiceIT.java @@ -62,7 +62,7 @@ public static void setupServer() throws Exception { clock = new FakeClock(); server = EnterpriseServerBuilder.server() - .usingDatabaseDir( staticFolder.getRoot().getAbsolutePath() ) + .usingDataDir( staticFolder.getRoot().getAbsolutePath() ) .withClock( clock ) .build(); @@ -114,4 +114,4 @@ public void shouldReportEnterpriseEdition() throws Exception assertThat( res.get( "edition" ).asText(), equalTo( "enterprise" ) ); assertThat( res.get( "version" ).asText(), equalTo( releaseVersion ) ); } -} \ No newline at end of file +} diff --git a/enterprise/server-enterprise/src/test/java/org/neo4j/test/server/ha/EnterpriseServerHelper.java b/enterprise/server-enterprise/src/test/java/org/neo4j/test/server/ha/EnterpriseServerHelper.java index 949e6dcd77b47..713763be573db 100644 --- a/enterprise/server-enterprise/src/test/java/org/neo4j/test/server/ha/EnterpriseServerHelper.java +++ b/enterprise/server-enterprise/src/test/java/org/neo4j/test/server/ha/EnterpriseServerHelper.java @@ -141,7 +141,7 @@ public static EnterpriseNeoServer createNonPersistentServer( File databaseDir ) private static EnterpriseNeoServer createServer( File databaseDir, boolean persistent ) throws IOException { - EnterpriseServerBuilder builder = EnterpriseServerBuilder.server().usingDatabaseDir( databaseDir.getAbsolutePath() ); + EnterpriseServerBuilder builder = EnterpriseServerBuilder.server().usingDataDir( databaseDir.getAbsolutePath() ); configureHostname( builder ); if ( persistent ) builder = (EnterpriseServerBuilder) builder.persistent(); builder.withDefaultDatabaseTuning(); diff --git a/integrationtests/src/test/java/org/neo4j/storeupgrade/StoreUpgradeIntegrationTest.java b/integrationtests/src/test/java/org/neo4j/storeupgrade/StoreUpgradeIntegrationTest.java index 9f93d00ba58f1..dd87ceddaebeb 100644 --- a/integrationtests/src/test/java/org/neo4j/storeupgrade/StoreUpgradeIntegrationTest.java +++ b/integrationtests/src/test/java/org/neo4j/storeupgrade/StoreUpgradeIntegrationTest.java @@ -19,12 +19,6 @@ */ package org.neo4j.storeupgrade; -import org.junit.Rule; -import org.junit.Test; -import org.junit.experimental.runners.Enclosed; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; - import java.io.File; import java.io.FileWriter; import java.io.FilenameFilter; @@ -37,6 +31,12 @@ import java.util.Map; import java.util.Properties; +import org.junit.Rule; +import org.junit.Test; +import org.junit.experimental.runners.Enclosed; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; + import org.neo4j.graphdb.GraphDatabaseService; import org.neo4j.graphdb.Label; import org.neo4j.graphdb.Node; @@ -55,6 +55,7 @@ import org.neo4j.kernel.api.Statement; import org.neo4j.kernel.api.exceptions.KernelException; import org.neo4j.kernel.api.index.IndexDescriptor; +import org.neo4j.kernel.configuration.Config; import org.neo4j.kernel.ha.HighlyAvailableGraphDatabase; import org.neo4j.kernel.impl.core.ThreadToStatementContextBridge; import org.neo4j.kernel.impl.ha.ClusterManager; @@ -81,9 +82,11 @@ import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; + import static org.neo4j.consistency.store.StoreAssertions.assertConsistentStore; import static org.neo4j.helpers.collection.Iterables.concat; import static org.neo4j.helpers.collection.Iterables.count; +import static org.neo4j.helpers.collection.MapUtil.stringMap; import static org.neo4j.kernel.impl.ha.ClusterManager.allSeesAllAsAvailable; import static org.neo4j.kernel.impl.ha.ClusterManager.clusterOfSize; @@ -188,12 +191,16 @@ public void embeddedDatabaseShouldStartOnOlderStoreWhenUpgradeIsEnabled() throws @Test public void serverDatabaseShouldStartOnOlderStoreWhenUpgradeIsEnabled() throws Throwable { - File dir = store.prepareDirectory( testDir.graphDbDir() ); + File rootDir = testDir.directory(); + File storeDir = new Config( stringMap( ServerSettings.data_directory.name(), rootDir.toString() ) ) + .get( ServerSettings.database_path ); - File configFile = new File( dir, "neo4j.conf" ); + store.prepareDirectory( storeDir ); + + File configFile = new File( rootDir, "neo4j.conf" ); Properties props = new Properties(); props.putAll( ServerTestUtils.getDefaultRelativeProperties() ); - props.setProperty( ServerSettings.legacy_db_location.name(), dir.getAbsolutePath() ); + props.setProperty( ServerSettings.data_directory.name(), rootDir.getAbsolutePath() ); props.setProperty( GraphDatabaseSettings.allow_store_upgrade.name(), "true" ); props.setProperty( GraphDatabaseSettings.pagecache_memory.name(), "8m" ); props.store( new FileWriter( configFile ), "" ); @@ -219,7 +226,7 @@ public void serverDatabaseShouldStartOnOlderStoreWhenUpgradeIsEnabled() throws T System.clearProperty( ServerSettings.SERVER_CONFIG_FILE_KEY ); } - assertConsistentStore( dir ); + assertConsistentStore( storeDir ); } @Test @@ -390,6 +397,10 @@ private Store( String resourceName, long expectedNodeCount, long lastTxId, public File prepareDirectory( File targetDir ) throws IOException { + if ( !targetDir.exists() && !targetDir.mkdirs() ) + { + throw new IOException( "Could not create directory " + targetDir ); + } Unzip.unzip( getClass(), resourceName, targetDir ); new File( targetDir, "messages.log" ).delete(); // clear the log return targetDir; diff --git a/packaging/installer-linux/installer-rpm/pom.xml b/packaging/installer-linux/installer-rpm/pom.xml index 7a24cee5754fa..804b8dc4a0893 100644 --- a/packaging/installer-linux/installer-rpm/pom.xml +++ b/packaging/installer-linux/installer-rpm/pom.xml @@ -173,13 +173,6 @@ - - /usr/share/neo4j/data - 0755 - neo4j - neo4j - - /etc/sysconfig diff --git a/packaging/installer-linux/installer-rpm/process-resources.build.xml b/packaging/installer-linux/installer-rpm/process-resources.build.xml index 628620ca20adc..d5c8018c7aafe 100644 --- a/packaging/installer-linux/installer-rpm/process-resources.build.xml +++ b/packaging/installer-linux/installer-rpm/process-resources.build.xml @@ -5,8 +5,8 @@ windows-service-wrapper-${windows-wrapper.version}.jar - data/databases/graph.db true 7474 diff --git a/packaging/standalone/standalone-community/src/main/distribution/text/community/conf/neo4j.conf b/packaging/standalone/standalone-community/src/main/distribution/text/community/conf/neo4j.conf index a99cfec2cb5fd..45482e4aedb24 100644 --- a/packaging/standalone/standalone-community/src/main/distribution/text/community/conf/neo4j.conf +++ b/packaging/standalone/standalone-community/src/main/distribution/text/community/conf/neo4j.conf @@ -2,13 +2,16 @@ # #{product.fullname} configuration ################################################################ +# Path of the data directory +#dbms.directories.data=data + +# The name of the database to mount +#dbms.active_database=graph.db + #*************************************************************** # Server configuration #*************************************************************** -# location of the database directory -org.neo4j.server.database.location=#{org.neo4j.database.location} - # Let the webserver only listen on the specified IP. Default is localhost (only # accept local connections). Uncomment to allow any connection. Please see the # security section in the neo4j manual before modifying this. diff --git a/packaging/standalone/standalone-enterprise/src/main/distribution/text/enterprise/conf/neo4j.conf b/packaging/standalone/standalone-enterprise/src/main/distribution/text/enterprise/conf/neo4j.conf index 4e7f93fd74036..02866d5c55005 100644 --- a/packaging/standalone/standalone-enterprise/src/main/distribution/text/enterprise/conf/neo4j.conf +++ b/packaging/standalone/standalone-enterprise/src/main/distribution/text/enterprise/conf/neo4j.conf @@ -2,13 +2,16 @@ # #{product.fullname} configuration ################################################################ +# Path of the data directory +#dbms.directories.data=data + +# The name of the database to mount +#dbms.active_database=graph.db + #*************************************************************** # Server configuration #*************************************************************** -# location of the database directory -org.neo4j.server.database.location=#{org.neo4j.database.location} - # Database mode # Allowed values: # HA - High Availability