openstack_dockers/glance/write_conf.sh
2018-09-25 10:54:42 +02:00

85 lines
1.8 KiB
Bash
Executable File

#!/bin/bash
#
# Generate config files from environments values.
# These are to be passed to the docker container using -e
cat << EOF > /etc/glance/glance-api.conf
[database]
connection = mysql+pymysql://$GLANCE_USER:$GLANCE_PASSWORD@$MYSQL_HOST/glance
[image_format]
[keystone_authtoken]
auth_uri = https://$KEYSTONE_HOST:5000
auth_url = https://$KEYSTONE_HOST:35357
memcached_servers = $MEMCACHED_HOST:11211
auth_type = password
project_domain_name = Default
user_domain_name = Default
project_name = service
username = glance
password = $GLANCE_PASSWORD
[oslo_messaging_notifications]
driver = messagingv2
[oslo_messaging_rabbit]
rabbit_host = $RABBIT_HOST
rabbit_userid = $RABBIT_USER
rabbit_password = $RABBIT_PASSWORD
[paste_deploy]
flavor = keystone
[glance_store]
stores = glance.store.rbd.Store
default_store = rbd
rbd_store_pool = images
rbd_store_user = images
rbd_store_ceph_conf = /etc/ceph/ceph.conf
EOF
cat << EOF > /etc/glance/glance-registry.conf
[DEFAULT]
workers = 4
rpc_backend = rabbit
[database]
connection = mysql+pymysql://$GLANCE_USER:$GLANCE_PASSWORD@$MYSQL_HOST/glance
[glance_store]
stores = glance.store.rbd.Store
default_store = rbd
rbd_store_pool = images
rbd_store_user = images
rbd_store_ceph_conf = /etc/ceph/ceph.conf
[keystone_authtoken]
auth_uri = https://$KEYSTONE_HOST:5000
auth_url = https://$KEYSTONE_HOST:35357
memcached_servers = $MEMCACHED_HOST:11211
auth_type = password
project_domain_name = Default
user_domain_name = Default
project_name = service
username = glance
password = $GLANCE_PASSWORD
[oslo_messaging_notifications]
driver = messagingv2
[oslo_messaging_rabbit]
rabbit_host = $RABBIT_HOST
rabbit_userid = $RABBIT_USER
rabbit_password = $RABBIT_PASSWORD
[paste_deploy]
flavor = keystone
EOF
echo "172.23.59.101 merlin.hpc.rug.nl" >> /etc/hosts