Commit 99d67a33 authored by Leonard Marschke's avatar Leonard Marschke

install glance

parent 405b4968
......@@ -142,34 +142,20 @@ def installGlance():
sudo("openstack endpoint create --region RegionOne image admin http://controller:9292")
sudo("apt-get install -y glance")
sudo("sed -i -e 's|^connection.*$|connection = mysql+pymysql://glance:lmm123@controller/glance|' /etc/glance/glance-api.conf")
sudo("sed -i -e 's|^#auth_uri.*$|auth_uri = http://controller:5000|' /etc/glance/glance-api.conf")
sudo("sed -i -e 's|^#auth_url.*$|auth_url = http://controller:35357|' /etc/glance/glance-api.conf")
sudo("sed -i -e 's|^#memcached_servers.*$|memcached_servers = controller:11211|' /etc/glance/glance-api.conf")
sudo("sed -i -e 's|^#auth_type.*$|auth_type = password|' /etc/glance/glance-api.conf")
sudo("sed -i -e 's|^project_domain_name.*$|project_domain_name = Default|' /etc/glance/glance-api.conf")
sudo("sed -i -e 's|^user_domain_name.*$|user_domain_name = Default|' /etc/glance/glance-api.conf")
sudo("sed -i -e 's|^project_name.*$|project_name = service|' /etc/glance/glance-api.conf")
sudo("sed -i -e 's|^username.*$|username = glance|' /etc/glance/glance-api.conf")
sudo("sed -i -e 's|^password.*$|password = lmm123|' /etc/glance/glance-api.conf")
sudo("sed -i -e 's|^flavor.*$|flavor = keystone|' /etc/glance/glance-api.conf")
sudo("sed -i -e 's|^stores.*$|stores = file,http|' /etc/glance/glance-api.conf")
sudo("sed -i -e 's|^default_store.*$|default_store = file|' /etc/glance/glance-api.conf")
sudo("sed -i -e 's|^filesystem_store_datadir.*$|filesystem_store_datadir = /var/lib/glance/images|' /etc/glance/glance-api.conf")
sudo("sed -i -e 's|^connection.*$|connection = mysql+pymysql://glance:lmm123@controller/glance|' /etc/glance/glance-registry.conf")
sudo("sed -i -e 's|^connection.*$|connection = mysql+pymysql://glance:lmm123@controller/glance|' /etc/glance/glance-registry.conf")
sudo("sed -i -e 's|^#auth_uri.*$|auth_uri = http://controller:5000|' /etc/glance/glance-registry.conf")
sudo("sed -i -e 's|^auth_url.*$|auth_url = http://controller:35357|' /etc/glance/glance-registry.conf")
sudo("sed -i -e 's|^memcached_servers.*$|memcached_servers = controller:11211|' /etc/glance/glance-registry.conf")
sudo("sed -i -e 's|^auth_type.*$|auth_type = password|' /etc/glance/glance-registry.conf")
sudo("sed -i -e 's|^project_domain_name.*$|project_domain_name = Default|' /etc/glance/glance-registry.conf")
sudo("sed -i -e 's|^user_domain_name.*$|user_domain_name = Default|' /etc/glance/glance-registry.conf")
sudo("sed -i -e 's|^project_name.*$|project_name = service|' /etc/glance/glance-registry.conf")
sudo("sed -i -e 's|^username.*$|username = glance|' /etc/glance/glance-registry.conf")
sudo("sed -i -e 's|^password.*$|password = lmm123|' /etc/glance/glance-registry.conf")
sudo("sed -i -e 's|^flavor.*$|flavor = keystone|' /etc/glance/glance-registry.conf")
put("glanceConfigBlock", "/tmp/glanceConfigBlock")
sudo("sed -i -e 's|^#connection.*$|connection = mysql+pymysql://glance:GLANCE_DBPASS@controller/glance|' /etc/glance/glance-api.conf")
sudo("sed -i -e \"s/^\\[keystone_authtoken\\]/$(sed 's:/:\\\\\\\\/:g' /tmp/glanceConfigBlock | awk '$1=$1' ORS='\\\\\\\\n')/\" /etc/glance/glance-api.conf")
sudo("sed -i -e 's|^#flavor.*$|flavor = keystone|' /etc/glance/glance-api.conf")
sudo("sed -i -e 's|^#stores.*$|stores = file,http|' /etc/glance/glance-api.conf")
sudo("sed -i -e 's|^#default_store.*$|default_store = file|' /etc/glance/glance-api.conf")
sudo("sed -i -e 's|^#filesystem_store_datadir.*$|filesystem_store_datadir = /var/lib/glance/images|' /etc/glance/glance-api.conf")
sudo("sed -i -e 's|^#connection.*$|connection = mysql+pymysql://glance:GLANCE_DBPASS@controller/glance|' /etc/glance/glance-registry.conf")
sudo("sed -i -e \"s/^\\[keystone_authtoken\\]/$(sed 's:/:\\\\\\\\/:g' /tmp/glanceConfigBlock | awk '$1=$1' ORS='\\\\\\\\n')/\" /etc/glance/glance-registry.conf")
sudo("sed -i -e 's|^#flavor.*$|flavor = keystone|' /etc/glance/glance-registry.conf")
sudo("glance-manage db_sync", user="glance")
......
[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:11211
auth_type = password
project_domain_name = Default
user_domain_name = Default
project_name = service
username = glance
password = lmm123
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment