Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

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 instance that follows the expected naming convention.  You will need two pieces of information to correctly setup a database that can be auto-discovered: stack-name (org.sagebionetworks.stack.instance) and stack-instances-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.

  1. From the AWS RDS console, select "Launch DB Instance"
  2. For "Engine Selection" choose mysql (MySQL Community Edition)
  3. Select "NO" for Multi-AZ (there is no need to have a backup replica for the table feature).
  4. DB Instance Details:
    1. DB Instance Identifer = <org.sagebionetworks.stack>-<org.sagebionetworks.stack.instance>-table-0
    2. Master Username =  <org.sagebionetworks.stack><org.sagebionetworks.stack.instance>
    3. Master Password = <same as local DB default>
  5. Additional Config:
    1. Database Name = <org.sagebionetworks.stack><org.sagebionetworks.stack.instance>
    2. DB Security Group = <org.sagebionetworks.stack>-<org.sagebionetworks.stack.instance>-db-security-group
  6. Management Options:
    1. 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.

 

 

 

  • No labels