devstack install fails at monasca-api
Because the user name and password is a fixed value, it did not work when you modify the local.conf. It obtains the token using the user and password that has been set in local.conf to create a monasca-service. Change-Id: I1fd96e1b996537716da41e4985844fd8e739357d Closes-bug: #1528100
This commit is contained in:
1
devstack/Vagrantfile
vendored
1
devstack/Vagrantfile
vendored
@@ -85,7 +85,6 @@ DATABASE_PASSWORD=secretdatabase
|
||||
RABBIT_PASSWORD=secretrabbit
|
||||
ADMIN_PASSWORD=secretadmin
|
||||
SERVICE_PASSWORD=secretservice
|
||||
SERVICE_TOKEN=111222333444
|
||||
|
||||
LOGFILE=$DEST/logs/stack.sh.log
|
||||
LOGDIR=$DEST/logs
|
||||
|
||||
@@ -133,16 +133,17 @@ def main(argv):
|
||||
{'username': 'monasca-agent', 'project': 'mini-mon', 'password': 'password', 'role': 'monasca-agent'},
|
||||
{'username': 'demo', 'project': 'demo', 'password': 'secretadmin', 'role': 'monasca-user'}]
|
||||
|
||||
url = 'http://127.0.0.1:35357/v2.0'
|
||||
service_host = argv[0]
|
||||
url = 'http://' + service_host + ':35357/v2.0'
|
||||
|
||||
token = None
|
||||
|
||||
cacert = None
|
||||
|
||||
if not token:
|
||||
username = 'admin'
|
||||
password = 'secretadmin'
|
||||
tenant_name = 'admin'
|
||||
username = argv[1]
|
||||
password = argv[2]
|
||||
tenant_name = argv[3]
|
||||
token = get_token(url, cacert, username, password, tenant_name)
|
||||
|
||||
key = client.Client(token=token, endpoint=url, cacert=cacert)
|
||||
@@ -161,7 +162,6 @@ def main(argv):
|
||||
if not add_user_roles(key, users):
|
||||
return 1
|
||||
|
||||
service_host = argv[0]
|
||||
monasca_url = 'http://' + service_host + ':8070/v2.0'
|
||||
|
||||
if not add_service_endpoint(key, 'monasca', 'Monasca monitoring service', 'monitoring', monasca_url, 'RegionOne'):
|
||||
|
||||
@@ -1294,11 +1294,11 @@ function install_monasca_keystone_client {
|
||||
|
||||
if [[ ${SERVICE_HOST} ]]; then
|
||||
|
||||
sudo /opt/monasca/bin/python /usr/local/bin/create_monasca_service.py ${SERVICE_HOST}
|
||||
sudo /opt/monasca/bin/python /usr/local/bin/create_monasca_service.py ${SERVICE_HOST} ${OS_USERNAME} ${OS_PASSWORD} ${OS_PROJECT_NAME}
|
||||
|
||||
else
|
||||
|
||||
sudo /opt/monasca/bin/python /usr/local/bin/create_monasca_service.py "127.0.0.1"
|
||||
sudo /opt/monasca/bin/python /usr/local/bin/create_monasca_service.py "127.0.0.1" ${OS_USERNAME} ${OS_PASSWORD} ${OS_PROJECT_NAME}
|
||||
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user