Revise tools/setup-service to make it work with keystone v3
Change-Id: I2c9f5240f161c5581d78395b8378391d74d0cc66
This commit is contained in:
parent
c853a4e8cb
commit
08eb7daa3f
@ -22,6 +22,7 @@ PORT=8778
|
|||||||
HOST=$1 # Put your host IP here
|
HOST=$1 # Put your host IP here
|
||||||
SVC_PASSWD=$2
|
SVC_PASSWD=$2
|
||||||
OS_REGION_NAME=${OS_REGION_NAME:-RegionOne}
|
OS_REGION_NAME=${OS_REGION_NAME:-RegionOne}
|
||||||
|
OS_IDENTITY_API_VERSION=${OS_IDENTITY_API_VERSION:-3}
|
||||||
|
|
||||||
SERVICE_ID=$(openstack service show senlin -f value -cid 2>/dev/null)
|
SERVICE_ID=$(openstack service show senlin -f value -cid 2>/dev/null)
|
||||||
if [[ -z $SERVICE_ID ]]; then
|
if [[ -z $SERVICE_ID ]]; then
|
||||||
@ -36,12 +37,21 @@ if [[ -z $SERVICE_ID ]]; then
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
openstack endpoint create \
|
if [ "$OS_IDENTITY_API_VERSION" = "3" ]; then
|
||||||
--adminurl "http://$HOST:$PORT" \
|
openstack endpoint create senlin admin "http://$HOST:$PORT" \
|
||||||
--publicurl "http://$HOST:$PORT" \
|
--region $OS_REGION_NAME
|
||||||
--internalurl "http://$HOST:$PORT" \
|
openstack endpoint create senlin public "http://$HOST:$PORT" \
|
||||||
--region $OS_REGION_NAME \
|
--region $OS_REGION_NAME
|
||||||
senlin
|
openstack endpoint create senlin internal "http://$HOST:$PORT" \
|
||||||
|
--region $OS_REGION_NAME
|
||||||
|
else
|
||||||
|
openstack endpoint create \
|
||||||
|
--adminurl "http://$HOST:$PORT" \
|
||||||
|
--publicurl "http://$HOST:$PORT" \
|
||||||
|
--internalurl "http://$HOST:$PORT" \
|
||||||
|
--region $OS_REGION_NAME \
|
||||||
|
senlin
|
||||||
|
fi
|
||||||
|
|
||||||
openstack user create \
|
openstack user create \
|
||||||
--password "$SVC_PASSWD" \
|
--password "$SVC_PASSWD" \
|
||||||
|
Loading…
Reference in New Issue
Block a user