Update runBackend to source application.env for conf values (#458)

This commit is contained in:
Yi (Alan) Wang 2017-04-26 16:34:50 -07:00 committed by Mars Lan
parent 9e4b758a70
commit 93242768ff
4 changed files with 37 additions and 44 deletions

View File

@ -100,32 +100,20 @@ Ensure these JAR files are present
lib/jython-standalone-2.7.0.jar lib/jython-standalone-2.7.0.jar
lib/mysql-connector-java-5.1.36.jar lib/mysql-connector-java-5.1.36.jar
``` ```
### Run ### Run
To run the backend service: To run the backend service:
Set these variables to configure the application (or edit conf/database.conf)
```
export WHZ_DB_URL=jdbc:mysql://<mysql host>:3306/wherehows
export WHZ_DB_USERNAME=wherehows
export WHZ_DB_PASSWORD=wherehows
export WHZ_DB_HOST=<mysql 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://<edge node>: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://<edge node>:19001/```
This will show TEST. This is the RESTful api endpoint This will show TEST. This is the RESTful api endpoint
Run the web ui
```
cd <web ui deployment dir>
cd web
# <ensure the conf/*.conf files are configured>
./bin/playBinary
```
## Next steps ## Next steps
Once the Hive ETL is fully flushed out, look at the HDFS metadata ETL Once the Hive ETL is fully flushed out, look at the HDFS metadata ETL

View File

@ -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"

View File

@ -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=

View File

@ -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 build/stage/wherehows-backend/bin/playBinary