diff --git a/.gitignore b/.gitignore index 2cfa27e..3db5934 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ ord.egg-info/ ranger_agent.egg-info .settings/ .tox/ +localrc diff --git a/tools/ranger-agent-db.sh b/tools/ranger-agent-db.sh index 5b188d7..dab82d7 100755 --- a/tools/ranger-agent-db.sh +++ b/tools/ranger-agent-db.sh @@ -1,2 +1,7 @@ -source ~/devstack/local.conf &> /dev/null -mysql -uroot -p$MYSQL_PASSWORD < ranger-agent-db.sql &> /dev/null +#!/bin/bash +source localrc + +echo Creating database: ord +mysql -uroot -p$MYSQL_PASSWORD < ./ranger-agent-db.sql + +echo Done ! diff --git a/tools/ranger-agent-db.sql b/tools/ranger-agent-db.sql old mode 100644 new mode 100755 index 78f06a0..3c14eb2 --- a/tools/ranger-agent-db.sql +++ b/tools/ranger-agent-db.sql @@ -1,2 +1,2 @@ -DROP DATABASE IF EXIST ord; -CREATE DATABASE IF NOT EXIST ord; +DROP DATABASE IF EXISTS ord; +CREATE DATABASE ord; diff --git a/tools/run_ranger_agent.sh b/tools/run_ranger_agent.sh index ccf7f18..2dd2f1f 100755 --- a/tools/run_ranger_agent.sh +++ b/tools/run_ranger_agent.sh @@ -1,13 +1,14 @@ #! /usr/bin/env bash +source localrc cd .. -sudo -H pip install -r requirements.txt +sudo -H pip install -r requirements.txt --proxy $HTTP_PROXY sudo python setup.py install echo "" echo "Running ord-dbsync" -nohup ord-dbsync > /dev/null 2>&1 & +sudo nohup ord-dbsync > /dev/null 2>&1 & echo "" echo "Running ord-api" -nohup ord-api > /dev/null 2>&1 & +sudo nohup ord-api > /dev/null 2>&1 & echo "" echo "Running ord-engine" -nohup ord-engine > /dev/null 2>&1 & +sudo nohup ord-engine > /dev/null 2>&1 & diff --git a/tools/sample-localrc b/tools/sample-localrc new file mode 100755 index 0000000..52dac28 --- /dev/null +++ b/tools/sample-localrc @@ -0,0 +1,2 @@ +MYSQL_PASSWORD= +HTTP_PROXY=