Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.

Configure environment variables on OS X

Marcos Martinez edited this page Aug 17, 2016 · 48 revisions

###Configure environment variables

Edit

~/.bash_profile

Add the following lines:

#CEDAR home
export CEDAR_HOME=~/Development/git_repos/CEDAR/
#Keycloak home
export KEYCLOAK_HOME=$CEDAR_HOME/keycloak/
#NginX home
export NGINX_HOME=/usr/local/etc/nginx/

#CEDAR Maven/gulp profile
export CEDAR_PROFILE=local
#CEDAR hostname
export CEDAR_HOST=metadatacenter.orgx
#CEDAR BioPortal API Key
export CEDAR_BIOPORTAL_API_KEY="<CEDAR_BIOPORTAL_API_KEY>"
#CEDAR Google Analytics Key
export CEDAR_ANALYTICS_KEY="<CEDAR_ANALYTICS_KEY>"
#CEDAR Neo4J Transaction REST API URL
export CEDAR_NEO4J_TRANSACTION_URL="<CEDAR_NEO4J_TRANSACTION_URL>"
#CEDAR Auth String for Neo4J
export CEDAR_NEO4J_AUTH_STRING="<CEDAR_NEO4J_AUTH_STRING>"
#CEDAR Admin user UUID
export CEDAR_ADMIN_USER_UUID="<CEDAR_ADMIN_USER_UUID>"
#CEDAR Admin user Password
export CEDAR_ADMIN_USER_PASSWORD="<CEDAR_ADMIN_USER_PASSWORD>"
#CEDAR Protractor test user name
export CEDAR_TEST_USER="<CEDAR_TEST_USER>"
#CEDAR Protractor test user password
export CEDAR_TEST_PASSWORD="<CEDAR_TEST_PASSWORD>"
#CEDAR Selenium server jar
export CEDAR_SELENIUM_SERVER_JAR="2.50.1-server.jar"
#CEDAR Chrome driver
export CEDAR_CHROME_DRIVER="2.21-x64-chromedriver"


#Include CEDAR aliases
source $CEDAR_HOME/cedar-util/bin/profile_include.sh

After completion you can get these variables in the current session as follows:

source ~/.bash_profile

The CEDAR base directory can be any of your choice. The directory /srv/cedar/ is the current default and should be used unless you have a good reason not to.

The other variables can be set as follows:

CEDAR_BIOPORTAL_API_KEY - BioPortal API key for CEDAR system

CEDAR_ANALYTICS_KEY - if you want to disable the inclusion of the tracking code, set this value to the false literal

CEDAR_ADMIN_USER_UUID - it is the Keycloak internal id (UUID) of the CEDAR realm admin user. This is not the same as the global Keycloak admin user. You should create this user after you set up the CEDAR Keycloak realm. Please leave the placeholder in the script file, you will replace that after Keycloak is set up.

CEDAR_ADMIN_USER_PASSWORD - it is the plain text password of the CEDAR realm admin user. This is not the same as the global Keycloak admin user. You should create this user after you set up the CEDAR Keycloak realm. Please leave the placeholder in the script file, you will replace that after Keycloak is set up.

CEDAR_NEO4J_TRANSACTION_URL - this probably has the following form: http://localhost:7474/db/data/transaction/commit .

CEDAR_NEO4J_AUTH_STRING - this value can be found on the neo4j browser interface. It has the following form: "Basic bbaassee6644" where bbaassee6644 is the base64 encoded version of the username:password string .

Follow these steps to find this authorization string:

  • Open neo4j browser application. It should run on: http://localhost:7474/browser/
  • On the top of the page you will see a command prompt, with a blinking cursor. Type a there, and press the "Play" sign on the right of that row
  • An error will be presented, click on the <code> vertical tab on the left
  • Under Request you will see the Authorization string. Use this one in your environment
  • Under Response you will see the Location string. Use this as the transaction API URL, but replace the last number (the transaction id) with the string commit
Clone this wiki locally