Ceph support
Example configuration: configs: ceph: fsid: "afca8524-2c47-4b81-a0b7-2300e62212f9" mon_host: "10.90.0.2,10.90.0.3,10.90.0.4" glance: ceph: enable: true key: "AQBShfJXzXyNBRAA5kqXzCKcFoPBn2r6VDYdag==" Change-Id: Ifcf3dd7b5a98aeab0ce4a958ffd04f3ed92c2981 Depends-On: Iefcebfe55544331b379f4ee1c4001ec33f539a28
This commit is contained in:
parent
f3e6ff98f9
commit
0407c1c15f
@ -1,9 +1,18 @@
|
||||
FROM {{ image_spec("glance-base") }}
|
||||
MAINTAINER {{ maintainer }}
|
||||
|
||||
#mysql-client only for provisioning need to be removed later
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
mysql-client \
|
||||
&& apt-get clean
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
mysql-client \
|
||||
ceph-common \
|
||||
python-ceph \
|
||||
python-rados \
|
||||
&& apt-get clean \
|
||||
&& mkdir -p /etc/ceph \
|
||||
&& chown -R glance: /etc/ceph \
|
||||
&& ln -s /usr/lib/python2.7/dist-packages/rados.so /var/lib/microservices/venv/local/lib/python2.7/site-packages/rados.so \
|
||||
&& ln -s /usr/lib/python2.7/dist-packages/rados-0.egg-info /var/lib/microservices/venv/local/lib/python2.7/site-packages/rados-0.egg-info \
|
||||
&& ln -s /usr/lib/python2.7/dist-packages/rbd-0.egg-info /var/lib/microservices/venv/local/lib/python2.7/site-packages/rbd-0.egg-info \
|
||||
&& ln -s /usr/lib/python2.7/dist-packages/rbd.so /var/lib/microservices/venv/local/lib/python2.7/site-packages/rbd.so
|
||||
|
||||
USER glance
|
||||
|
@ -1,10 +1,13 @@
|
||||
FROM {{ image_spec("openstack-base") }}
|
||||
MAINTAINER {{ maintainer }}
|
||||
|
||||
COPY sources.list.debian /etc/apt/sources.list.d/ceph.list
|
||||
|
||||
{{ copy_sources("openstack/glance", "/glance") }}
|
||||
|
||||
RUN useradd --user-group glance \
|
||||
&& apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 460F3994 \
|
||||
&& /var/lib/microservices/venv/bin/pip install --upgrade /glance \
|
||||
&& mkdir -p /var/lib/glance /etc/glance /etc/ceph \
|
||||
&& mkdir -p /var/lib/glance /etc/glance \
|
||||
&& cp -r /glance/etc/* /etc/glance \
|
||||
&& chown -R glance: /etc/glance /var/lib/glance /etc/ceph
|
||||
&& chown -R glance: /etc/glance /var/lib/glance
|
||||
|
1
docker/glance-base/sources.list.debian
Normal file
1
docker/glance-base/sources.list.debian
Normal file
@ -0,0 +1 @@
|
||||
deb http://download.ceph.com/debian-jewel jessie main
|
3
service/files/ceph.client.glance.keyring.j2
Normal file
3
service/files/ceph.client.glance.keyring.j2
Normal file
@ -0,0 +1,3 @@
|
||||
[client.glance]
|
||||
key = {{ glance.ceph.key }}
|
||||
|
7
service/files/ceph.conf.j2
Normal file
7
service/files/ceph.conf.j2
Normal file
@ -0,0 +1,7 @@
|
||||
[global]
|
||||
fsid = {{ ceph.fsid }}
|
||||
mon_host = {{ ceph.mon_host }}
|
||||
auth_cluster_required = cephx
|
||||
auth_service_required = cephx
|
||||
auth_client_required = cephx
|
||||
|
@ -13,6 +13,12 @@ configs:
|
||||
|
||||
debug: false
|
||||
|
||||
ceph:
|
||||
enable: false
|
||||
key: "Changeme"
|
||||
username: "glance"
|
||||
pool_name: "images"
|
||||
|
||||
sources:
|
||||
openstack/glance:
|
||||
git_url: https://github.com/openstack/glance.git
|
||||
|
@ -9,7 +9,9 @@ bind_host = {{ network_topology["private"]["address"] }}
|
||||
bind_port = {{ glance.api_port }}
|
||||
|
||||
registry_host = glance-registry
|
||||
|
||||
{% if glance.ceph.enable %}
|
||||
show_image_direct_url = True
|
||||
{% endif %}
|
||||
|
||||
cinder_catalog_info = volume:cinder:internalURL
|
||||
|
||||
@ -33,8 +35,22 @@ memcached_servers = {{ address('memcached') }}:{{ memcached.port }}
|
||||
flavor = keystone
|
||||
|
||||
[glance_store]
|
||||
{% if glance.ceph.enable %}
|
||||
stores = rbd
|
||||
default_store = rbd
|
||||
rbd_store_pool = {{ glance.ceph.pool_name }}
|
||||
rbd_store_user = {{ glance.ceph.username }}
|
||||
rbd_store_ceph_conf = /etc/ceph/ceph.conf
|
||||
{% else %}
|
||||
default_store = file
|
||||
filesystem_store_datadir = /var/lib/glance/images/
|
||||
{% endif %}
|
||||
|
||||
{% if glance.ceph.enable %}
|
||||
[image_format]
|
||||
container_formats = bare
|
||||
disk_formats = raw
|
||||
{% endif %}
|
||||
|
||||
[oslo_messaging_notifications]
|
||||
driver = noop
|
||||
|
@ -57,9 +57,19 @@ service:
|
||||
daemon:
|
||||
files:
|
||||
- glance-api
|
||||
# {% if glance.ceph.enable %}
|
||||
- ceph-conf
|
||||
- glance-ceph-key
|
||||
# {% endif %}
|
||||
command: glance-api
|
||||
|
||||
files:
|
||||
glance-api:
|
||||
path: /etc/glance/glance-api.conf
|
||||
content: glance-api.conf.j2
|
||||
ceph-conf:
|
||||
path: /etc/ceph/ceph.conf
|
||||
content: ceph.conf.j2
|
||||
glance-ceph-key:
|
||||
path: /etc/ceph/ceph.client.glance.keyring
|
||||
content: ceph.client.glance.keyring.j2
|
||||
|
Loading…
x
Reference in New Issue
Block a user