Enabling/Disabling Features of a Stack
Some of the components of the stack can be disabled. Each feature is controlled by a single stack configuration property. The build and production stacks will enable these features by default.
When a feature is disabled, all of the tests associated with the feature are also disabled using the org.junit.Assume.assumeTrue() feature in the before() method of the tests.
Controllable Features
Feature | stack config property name | default value |
|---|---|---|
CloudSearch | org.sagebionetworks.search.enabled | false |
Dynamo | org.sagebionetworks.dynamo.enabled | false |
Cassandra | org.sagebionetworks.cassandra.enabled | false |
In order to do development work on a feature that is disabled by default, a developer will need to override the default property by making an addition to their maven settings file (<user_home>/.m2/settings.xml):
In this example search is enabled for a developer (see line: 28):
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository/>
<interactiveMode/>
<usePluginRegistry/>
<offline/>
<pluginGroups/>
<servers/>
<mirrors/>
<proxies/>
<profiles>
<profile>
<id>dev-environment</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<local.python27.path>/usr/local/bin/python2.7</local.python27.path>
<local.r.path>/usr/bin/r</local.r.path>
<org.sagebionetworks.stackEncryptionKey>your key</org.sagebionetworks.stackEncryptionKey>
<org.sagebionetworks.developer>hill</org.sagebionetworks.developer>
<org.sagebionetworks.stack.instance>hill</org.sagebionetworks.stack.instance>
<org.sagebionetworks.stack.iam.id>some id</org.sagebionetworks.stack.iam.id>
<org.sagebionetworks.stack.iam.key>some key</org.sagebionetworks.stack.iam.key>
<org.sagebionetworks.stack>dev</org.sagebionetworks.stack>
<org.sagebionetworks.search.enabled>true</org.sagebionetworks.search.enabled>
</properties>
</profile>
</profiles>
<activeProfiles/>
</settings>