Use default devstack functions for create murano in devsstack environment
- Modify endpoints creation - Modify murano account creation Change-Id: Ie238c26f8b2493e74de21dded07cea2404328a5b Closes-Bug: #1492652
This commit is contained in:
parent
6259eb7d89
commit
d5c6bdf594
@ -74,39 +74,15 @@ function create_murano_accounts() {
|
||||
return
|
||||
fi
|
||||
|
||||
SERVICE_TENANT=$(openstack project list | awk "/ $SERVICE_TENANT_NAME / { print \$2 }")
|
||||
ADMIN_ROLE=$(openstack role list | awk "/ admin / { print \$2 }")
|
||||
|
||||
MURANO_USER=$(openstack user create \
|
||||
$MURANO_ADMIN_USER \
|
||||
--password "$SERVICE_PASSWORD" \
|
||||
--project $SERVICE_TENANT \
|
||||
--email murano@example.com \
|
||||
| grep " id " | get_field 2)
|
||||
|
||||
openstack role add \
|
||||
$ADMIN_ROLE \
|
||||
--project $SERVICE_TENANT \
|
||||
--user $MURANO_USER
|
||||
create_service_user "murano"
|
||||
|
||||
if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then
|
||||
MURANO_SERVICE=$(openstack service create \
|
||||
application_catalog \
|
||||
--name=murano \
|
||||
--description="Application Catalog" \
|
||||
| grep " id " | get_field 2)
|
||||
openstack endpoint create \
|
||||
$MURANO_SERVICE \
|
||||
public "$MURANO_SERVICE_PROTOCOL://$MURANO_SERVICE_HOST:$MURANO_SERVICE_PORT" \
|
||||
--region RegionOne
|
||||
openstack endpoint create \
|
||||
$MURANO_SERVICE \
|
||||
admin "$MURANO_SERVICE_PROTOCOL://$MURANO_SERVICE_HOST:$MURANO_SERVICE_PORT" \
|
||||
--region RegionOne
|
||||
openstack endpoint create \
|
||||
$MURANO_SERVICE \
|
||||
internal "$MURANO_SERVICE_PROTOCOL://$MURANO_SERVICE_HOST:$MURANO_SERVICE_PORT" \
|
||||
--region RegionOne
|
||||
get_or_create_service "murano" "application_catalog" "Application Catalog Service"
|
||||
get_or_create_endpoint "application_catalog" \
|
||||
"$REGION_NAME" \
|
||||
"$MURANO_SERVICE_PROTOCOL://$MURANO_SERVICE_HOST:$MURANO_SERVICE_PORT" \
|
||||
"$MURANO_SERVICE_PROTOCOL://$MURANO_SERVICE_HOST:$MURANO_SERVICE_PORT" \
|
||||
"$MURANO_SERVICE_PROTOCOL://$MURANO_SERVICE_HOST:$MURANO_SERVICE_PORT"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -70,39 +70,15 @@ function create_murano_accounts() {
|
||||
return
|
||||
fi
|
||||
|
||||
SERVICE_TENANT=$(openstack project list | awk "/ $SERVICE_TENANT_NAME / { print \$2 }")
|
||||
ADMIN_ROLE=$(openstack role list | awk "/ admin / { print \$2 }")
|
||||
|
||||
MURANO_USER=$(openstack user create \
|
||||
$MURANO_ADMIN_USER \
|
||||
--password "$SERVICE_PASSWORD" \
|
||||
--project $SERVICE_TENANT \
|
||||
--email murano@example.com \
|
||||
| grep " id " | get_field 2)
|
||||
|
||||
openstack role add \
|
||||
$ADMIN_ROLE \
|
||||
--project $SERVICE_TENANT \
|
||||
--user $MURANO_USER
|
||||
create_service_user "murano"
|
||||
|
||||
if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then
|
||||
MURANO_SERVICE=$(openstack service create \
|
||||
application_catalog \
|
||||
--name=murano \
|
||||
--description="Application Catalog" \
|
||||
| grep " id " | get_field 2)
|
||||
openstack endpoint create \
|
||||
$MURANO_SERVICE \
|
||||
public "$MURANO_SERVICE_PROTOCOL://$MURANO_SERVICE_HOST:$MURANO_SERVICE_PORT" \
|
||||
--region RegionOne
|
||||
openstack endpoint create \
|
||||
$MURANO_SERVICE \
|
||||
admin "$MURANO_SERVICE_PROTOCOL://$MURANO_SERVICE_HOST:$MURANO_SERVICE_PORT" \
|
||||
--region RegionOne
|
||||
openstack endpoint create \
|
||||
$MURANO_SERVICE \
|
||||
internal "$MURANO_SERVICE_PROTOCOL://$MURANO_SERVICE_HOST:$MURANO_SERVICE_PORT" \
|
||||
--region RegionOne
|
||||
get_or_create_service "murano" "application_catalog" "Application Catalog Service"
|
||||
get_or_create_endpoint "application_catalog" \
|
||||
"$REGION_NAME" \
|
||||
"$MURANO_SERVICE_PROTOCOL://$MURANO_SERVICE_HOST:$MURANO_SERVICE_PORT" \
|
||||
"$MURANO_SERVICE_PROTOCOL://$MURANO_SERVICE_HOST:$MURANO_SERVICE_PORT" \
|
||||
"$MURANO_SERVICE_PROTOCOL://$MURANO_SERVICE_HOST:$MURANO_SERVICE_PORT"
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user