Migrate database and rpc
Change-Id: Id522a7b38a707385b4a6aaff23c1a37e0a30a696
This commit is contained in:
parent
f5356873d8
commit
519e0e38ef
|
@ -57,10 +57,15 @@ function configure_senlin {
|
|||
fi
|
||||
|
||||
# rpc
|
||||
iniset_rpc_backend senlin $SENLIN_CONF
|
||||
SENLIN_RABBITMQ_PASSWORD=$(get_data_from_secret senlin-rabbitmq openstack password)
|
||||
SENLIN_RABBITMQ_USERNAME=$(get_data_from_secret senlin-rabbitmq openstack username)
|
||||
iniset $SENLIN_CONF DEFAULT transport_url "rabbit://$SENLIN_RABBITMQ_USERNAME:$SENLIN_RABBITMQ_PASSWORD@rabbitmq-senlin:5672/"
|
||||
|
||||
# Database connection
|
||||
iniset $SENLIN_CONF database connection `database_connection_url senlin`
|
||||
SENLIN_DATABASE_USER=$(get_data_from_secret senlin-mysql openstack USER)
|
||||
SENLIN_DATABASE_PASSWORD=$(get_data_from_secret senlin-mysql openstack PASSWORD)
|
||||
SENLIN_DATABASE_NAME=$(get_data_from_secret senlin-mysql openstack DATABASE)
|
||||
iniset $SENLIN_CONF database connection "mysql+pymysql://$SENLIN_DATABASE_USER:$SENLIN_DATABASE_PASSWORD@senlin-mysql/$SENLIN_DATABASE_NAME?charset=utf8"
|
||||
|
||||
# Keystone authtoken middleware
|
||||
#configure_auth_token_middleware $SENLIN_CONF senlin $SENLIN_AUTH_CACHE_DIR
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
# limitations under the License.
|
||||
|
||||
FROM vexxhost/python-builder as builder
|
||||
|
||||
FROM vexxhost/python-base AS senlin-base
|
||||
|
||||
FROM senlin-base AS senlin-api
|
||||
|
|
|
@ -29,9 +29,12 @@ def create_or_resume(name, spec, **_):
|
|||
start the service up for the first time.
|
||||
"""
|
||||
|
||||
# deploy mysql for placement
|
||||
# deploy mysql for senlin
|
||||
utils.ensure_mysql_cluster("senlin", spec["mysql"])
|
||||
|
||||
# deploy rabbitmq
|
||||
utils.deploy_rabbitmq("senlin")
|
||||
|
||||
# senlin api
|
||||
utils.create_or_update('senlin/api/daemonset.yml.j2',
|
||||
name=name, spec=spec)
|
||||
|
|
Loading…
Reference in New Issue