charm-heat/actions/domain-setup

22 lines
547 B
Bash
Executable File

#!/bin/bash
set -e
. /root/admin-openrc-v3
dpkg -l | grep python-openstackclient || apt-get install -y python-openstackclient
openstack domain show heat || {
openstack domain create --description "Stack projects and users" heat
}
openstack user show heat_domain_admin || {
openstack user create --domain heat --password `leader-get heat-domain-admin-passwd` heat_domain_admin
}
openstack role add --domain heat --user heat_domain_admin admin || :
openstack role show heat_stack_user || {
openstack role create heat_stack_user
}