update for boto install and registration
Change-Id: Ie6fb774f952041111ea0e705977d62dfd148c728
This commit is contained in:
parent
2b2ecce938
commit
018655de95
@ -121,6 +121,12 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
wget -O /tmp/aws_credentials "http://www.stack360.io/aws_credentials"
|
||||||
|
filename='/tmp/aws_credentials'
|
||||||
|
id=$(sed -n '1p' < $filename)
|
||||||
|
key=$(sed -n '2p' < $filename)
|
||||||
|
sudo sed -i "s~ACCESS_ID~$id~g" /etc/compass/celeryconfig
|
||||||
|
sudo sed -i "s~ACCESS_KEY~$key~g" /etc/compass/celeryconfig
|
||||||
sudo systemctl enable compass-progress-updated.service
|
sudo systemctl enable compass-progress-updated.service
|
||||||
sudo systemctl enable compass-celeryd.service
|
sudo systemctl enable compass-celeryd.service
|
||||||
|
|
||||||
|
@ -241,6 +241,7 @@ if [[ "$?" != "0" ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
pip install -U -r test-requirements.txt
|
pip install -U -r test-requirements.txt
|
||||||
|
pip install -U boto
|
||||||
if [[ "$?" != "0" ]]; then
|
if [[ "$?" != "0" ]]; then
|
||||||
echo "failed to install compass test requiremnts"
|
echo "failed to install compass test requiremnts"
|
||||||
deactivate
|
deactivate
|
||||||
|
@ -2,18 +2,12 @@
|
|||||||
#
|
#
|
||||||
#set -x
|
#set -x
|
||||||
### Register current user to compass
|
### Register current user to compass
|
||||||
USER_EMAIL="aaa@huawei.com"
|
source install.conf
|
||||||
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||||
echo "The email address you use to register is ${USER_EMAIL}"
|
echo "The email address you use to register is ${USER_EMAIL}"
|
||||||
password=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c6`
|
password=`< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c6`
|
||||||
data=`echo "{\"email\":\"${USER_EMAIL}\",\"password\":\"${password}\"}"`
|
data=`echo "{\"email\":\"${USER_EMAIL}\",\"password\":\"${password}\"}"`
|
||||||
wget -O /tmp/user_info --post-data=$data --header=Content-Type:application/json "http://www.stack360.io/api/users/register"
|
wget -O /tmp/user_info --post-data=$data --header=Content-Type:application/json "http://www.stack360.io/api/users/register"
|
||||||
wget -O /tmp/aws_credentials "http://www.stack360.io/aws_credentials"
|
|
||||||
filename='/tmp/aws_credentials'
|
|
||||||
id=$(sed -n '1p' < $filename)
|
|
||||||
key=$(sed -n '2p' < $filename)
|
|
||||||
sudo sed -i "s~ACCESS_ID~$id~g" /etc/compass/celeryconfig
|
|
||||||
sudo sed -i "s~ACCESS_KEY~$key~g" /etc/compass/celeryconfig
|
|
||||||
|
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Register failed"
|
echo "Register failed"
|
||||||
@ -24,3 +18,5 @@ echo "Register suceeded, your password is $password, please remember your passwo
|
|||||||
sudo sed -i 's/^CELERY_DEFAULT_QUEUE.*/CELERY_DEFAULT_QUEUE = \"'"${USER_EMAIL}"'\"/g' /etc/compass/celeryconfig
|
sudo sed -i 's/^CELERY_DEFAULT_QUEUE.*/CELERY_DEFAULT_QUEUE = \"'"${USER_EMAIL}"'\"/g' /etc/compass/celeryconfig
|
||||||
sudo sed -i 's/^CELERY_DEFAULT_EXCHANGE.*/CELERY_DEFAULT_EXCHANGE = \"'"${USER_EMAIL}"'\"/g' /etc/compass/celeryconfig
|
sudo sed -i 's/^CELERY_DEFAULT_EXCHANGE.*/CELERY_DEFAULT_EXCHANGE = \"'"${USER_EMAIL}"'\"/g' /etc/compass/celeryconfig
|
||||||
sudo sed -i 's/^CELERY_DEFAULT_ROUTING_KEY.*/CELERY_DEFAULT_ROUTING_KEY = \"'"${USER_EMAIL}"'\"/g' /etc/compass/celeryconfig
|
sudo sed -i 's/^CELERY_DEFAULT_ROUTING_KEY.*/CELERY_DEFAULT_ROUTING_KEY = \"'"${USER_EMAIL}"'\"/g' /etc/compass/celeryconfig
|
||||||
|
|
||||||
|
systemctl restart compass-celeryd.service
|
||||||
|
Loading…
x
Reference in New Issue
Block a user