diff --git a/elements/undercloud-stack-config/config.json.template b/elements/undercloud-stack-config/config.json.template index 588928c93..d4e7be7cf 100644 --- a/elements/undercloud-stack-config/config.json.template +++ b/elements/undercloud-stack-config/config.json.template @@ -39,10 +39,20 @@ } ] }, - "tuskar": { - "service-password": "{{UNDERCLOUD_TUSKAR_PASSWORD}}" - }, "ironic": { "service-password": "{{UNDERCLOUD_IRONIC_PASSWORD}}" + }, + "tuskar": { + "service-password": "{{UNDERCLOUD_TUSKAR_PASSWORD}}", + "db": "mysql://tuskar:{{UNDERCLOUD_TUSKAR_PASSWORD}}@localhost/tuskar?charset=utf8", + "heat_keystone": { + "username": "admin", + "password": "unset", + "tenant_name": "admin" + } + }, + "bootstrap_host": { + "bootstrap_nodeid": "undercloud", + "nodeid": "undercloud" } } diff --git a/elements/undercloud-stack-config/os-refresh-config/configure.d/80-tuskar-db-create b/elements/undercloud-stack-config/os-refresh-config/configure.d/80-tuskar-db-create new file mode 100755 index 000000000..3e22657c4 --- /dev/null +++ b/elements/undercloud-stack-config/os-refresh-config/configure.d/80-tuskar-db-create @@ -0,0 +1,10 @@ +#!/bin/bash + +set -eux +set -o pipefail + +# This should run before configure.d/90-tuskar-db-sync + +UNDERCLOUD_TUSKAR_PASSWORD=$(os-apply-config --key tuskar.service-password) + +os-db-create tuskar tuskar $UNDERCLOUD_TUSKAR_PASSWORD