The tables features is disabled enabled by default for repository services developers. The following outlines the steps need to enable this feature for development workThe default endpoint is 'localhost' and the default schema is: 'dev<developername>tables' (ie 'devhilltables'). If this schema does not exist it will need to be created to run a build.
This feature cannot be disabled because entity hierarchy worker depends on it.
Maven Settings
The first step to enabling the tables feature is to set To override the endpoint, schema, and instance count 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).file:
Code Block | ||
---|---|---|
| ||
<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.table.cluster.stackdatabase.instance>hill<count>1</org.sagebionetworks.stack.instance>table.cluster.database.count> <org.sagebionetworks.stack>dev<.table.cluster.endpoint.0>newendpoint</org.sagebionetworks.stack>.table.cluster.endpoint.0> <org.sagebionetworks.table.enabled>true<cluster.schema.0>newschema</org.sagebionetworks.table.enabled>cluster.schema.0> ... </properties> </profile> </profiles> <activeProfiles /> </settings> |
Create RDS instance in AWS
When the table features 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.Each instance must have an endpoint and schema property:
Code Block |
---|
<org.sagebionetworks.table.cluster.endpoint.<index>> where index = 0 - n-1
<org.sagebionetworks.table.cluster.schema.<index>> where index = 0 - n-1
|