Merge "Use default devstack functional for Mistral user/service/endpoint creation"
This commit is contained in:
commit
7a8c29a2f1
@ -57,43 +57,15 @@ function create_mistral_accounts {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
SERVICE_TENANT=$(openstack project list | awk "/ $SERVICE_TENANT_NAME / { print \$2 }")
|
create_service_user "mistral" "admin"
|
||||||
ADMIN_ROLE=$(openstack role list | awk "/ admin / { print \$2 }")
|
|
||||||
|
|
||||||
MISTRAL_USER=$(openstack user create \
|
|
||||||
$MISTRAL_ADMIN_USER \
|
|
||||||
--password "$SERVICE_PASSWORD" \
|
|
||||||
--project $SERVICE_TENANT \
|
|
||||||
--email mistral@example.com \
|
|
||||||
| grep " id " | get_field 2)
|
|
||||||
|
|
||||||
openstack role add \
|
|
||||||
$ADMIN_ROLE \
|
|
||||||
--project $SERVICE_TENANT \
|
|
||||||
--user $MISTRAL_USER
|
|
||||||
|
|
||||||
if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then
|
if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then
|
||||||
MISTRAL_SERVICE_V2=$(openstack service create \
|
get_or_create_service "mistral" "workflowv2" "Workflow Service v2"
|
||||||
workflowv2 \
|
get_or_create_endpoint "workflowv2" \
|
||||||
--name=mistral \
|
"$REGION_NAME" \
|
||||||
--description="Workflow Service v2" \
|
"$MISTRAL_SERVICE_PROTOCOL://$MISTRAL_SERVICE_HOST:$MISTRAL_SERVICE_PORT/v2" \
|
||||||
| grep " id " | get_field 2)
|
"$MISTRAL_SERVICE_PROTOCOL://$MISTRAL_SERVICE_HOST:$MISTRAL_SERVICE_PORT/v2" \
|
||||||
|
"$MISTRAL_SERVICE_PROTOCOL://$MISTRAL_SERVICE_HOST:$MISTRAL_SERVICE_PORT/v2"
|
||||||
openstack endpoint create \
|
|
||||||
workflowv2 \
|
|
||||||
public "$MISTRAL_SERVICE_PROTOCOL://$MISTRAL_SERVICE_HOST:$MISTRAL_SERVICE_PORT/v2" \
|
|
||||||
--region RegionOne
|
|
||||||
|
|
||||||
openstack endpoint create \
|
|
||||||
workflowv2 \
|
|
||||||
admin "$MISTRAL_SERVICE_PROTOCOL://$MISTRAL_SERVICE_HOST:$MISTRAL_SERVICE_PORT/v2" \
|
|
||||||
--region RegionOne
|
|
||||||
|
|
||||||
openstack endpoint create \
|
|
||||||
workflowv2 \
|
|
||||||
internal "$MISTRAL_SERVICE_PROTOCOL://$MISTRAL_SERVICE_HOST:$MISTRAL_SERVICE_PORT/v2" \
|
|
||||||
--region RegionOne
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user