The tables features is disabled by default for repository services developers. The following outlines the steps need to enable this feature for development work.
Maven Settings
The first step to enabling the tables feature is to add the following to your maven settings file (<userhome>/.m2/settings.xml).
The property 'org.sagebionetworks.table.enabled' must be set to true (see line 20 bellow).
<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 /> <mirrors /> <proxies /> <profiles> <profile> <id>dev-environment</id> <activation> <activeByDefault>true</activeByDefault> </activation> <properties> .... <org.sagebionetworks.stack.instance>hill</org.sagebionetworks.stack.instance> <org.sagebionetworks.stack>dev</org.sagebionetworks.stack> <org.sagebionetworks.table.enabled>true</org.sagebionetworks.table.enabled> ... </properties> </profile> </profiles> <activeProfiles /> </settings>
Create RDS instance in AWS
When the table feature is enabled the ConnectionFactory will attempt to "discover" all RDS instances available to the cluster. This discovery process is done using a naming convention. When the table feature is enabled you must provide at least one RDS instances that follows the expected naming convention. You will need to pieces of information to correctly setup a database that can be auto-discovered: stack-name (org.sagebionetworks.stack.instance) and stack-intances-name (org.sagebionetworks.stack.instance). If you have setup your development environment according the developers boot strap then you should have both properties in your maven settings.xml file.
In the above setting.xml file, the example org.sagebionetworks.stack=dev and the org.sagebionetworks.stack.instance=hill.
- From the AWS RDS console, select "Launch DB Instance"
- For "Engine Selection" choose mysql (MySQL Community Edition)
- Select "NO" for Multi-AZ (there is no need to have a backup replica for the table feature).
- DB Instance Details:
- DB Instance Identifer = <org.sagebionetworks.stack>-<org.sagebionetworks.stack.instance>-table-0
- Master Username = <org.sagebionetworks.stack><org.sagebionetworks.stack.instance>
- Master Password = <same as local DB default>
- Additional Config:
- Database Name = <org.sagebionetworks.stack><org.sagebionetworks.stack.instance>
- DB Security Group = <org.sagebionetworks.stack>-<org.sagebionetworks.stack.instance>-db-security-group
- Management Options:
- Enable Automatic Backup = no
The following example used: org.sagebionetworks.stack=dev and the org.sagebionetworks.stack.instance=hill.
When the database is setup correctly, the connection factory should discover the RDS instance and start using for testing and building.