diff --git a/backend-service/README.md b/backend-service/README.md index 275d85cea1..9ce6c9be8a 100644 --- a/backend-service/README.md +++ b/backend-service/README.md @@ -100,32 +100,20 @@ Ensure these JAR files are present lib/jython-standalone-2.7.0.jar lib/mysql-connector-java-5.1.36.jar ``` + ### Run To run the backend service: -Set these variables to configure the application (or edit conf/database.conf) -``` -export WHZ_DB_URL=jdbc:mysql://:3306/wherehows -export WHZ_DB_USERNAME=wherehows -export WHZ_DB_PASSWORD=wherehows -export WHZ_DB_HOST= -``` -Run backend service application on port 9001 (from the backend-service folder run: -``` -JAVA_OPTS='-Dhttp.port=9001' ./bin/playBinary -``` -In separate window, monitor -```tail -f $APP_HOME/logs/console.log``` -Open browser to ```http://:9001/``` +Set the variables in application.env to configure the application. + +To Run backend service application on port 19001 (from the backend-service folder): +``` +./runBackend +``` + +Open browser to ```http://:19001/``` This will show ‘TEST’. This is the RESTful api endpoint -Run the web ui -``` -cd -cd web -# -./bin/playBinary -``` ## Next steps Once the Hive ETL is fully flushed out, look at the HDFS metadata ETL diff --git a/backend-service/application.env b/backend-service/application.env new file mode 100644 index 0000000000..f29d8ce829 --- /dev/null +++ b/backend-service/application.env @@ -0,0 +1,22 @@ +# Directory containing kerberos config files +WHZ_KRB5_DIR="/dir/to/krb5conf" + +# Secret Key +WHZ_SECRET="change_me" + +# Master Key to encrypt data in DB +WHZ_MASTER_KEY="change_me_master" + +# Database Connection +WHZ_DB_DRIVER="com.mysql.jdbc.Driver" +WHZ_DB_USERNAME="wherehows" +WHZ_DB_PASSWORD="wherehows" +# Fully qualified jdbc url +WHZ_DB_URL="jdbc:mysql://localhost/wherehows" + +# A comma-separated list of JOB IDs to run +WHZ_ETL_JOB_IDS=1,2,5,10 +WHZ_KAFKA_JOB_IDS=20,21 + +# Temp directory for ETL job +WHZ_ETL_TEMP_DIR="/var/tmp/wherehows" diff --git a/backend-service/application.env.template b/backend-service/application.env.template deleted file mode 100644 index 48d5e2df31..0000000000 --- a/backend-service/application.env.template +++ /dev/null @@ -1,22 +0,0 @@ -# Directory containing kerberos config files -WHZ_KRB5_DIR= - -# Secret Key -WHZ_SECRET= - -# Master Key to encrypt data in DB -WHZ_MASTER_KEY= - -# Database Connection -WHZ_DB_DRIVER= -WHZ_DB_USERNAME= -WHZ_DB_PASSWORD= -# Fully qualified jdbc url -WHZ_DB_URL= - -# A comma-separated list of JOB IDs to run -WHZ_ETL_JOB_IDS= -WHZ_KAFKA_JOB_IDS= - -# Temp directory for ETL job -WHZ_ETL_TEMP_DIR= diff --git a/backend-service/runBackend b/backend-service/runBackend index 5081fc718d..08065a9c05 100755 --- a/backend-service/runBackend +++ b/backend-service/runBackend @@ -1,2 +1,7 @@ -export JAVA_OPTS="-Xms1024m -Xmx2048m -Dhttp.port=19001" +set -a +source application.env +set +a + +export JAVA_OPTS="-Xms512m -Xmx2048m -Dhttp.port=19001" + build/stage/wherehows-backend/bin/playBinary