Skip to content
Snippets Groups Projects
Commit 99c7eb19 authored by Sam Yaple's avatar Sam Yaple
Browse files

Make OpenStack use Ceph

This implements all the openstack pieces needed to make ceph work.

DocImpact
Change-Id: I1d24476a966602cf955e5ef872b0efb01319894a
Partially-Implements: blueprint ceph-container
Implements: blueprint kolla-live-migration
parent a1b0518b
No related branches found
No related tags found
No related merge requests found
......@@ -87,3 +87,15 @@ user_domain_id = default
project_name = service
username = nova
password = {{ nova_keystone_password }}
{% if enable_ceph | bool %}
[libvirt]
images_type = rbd
images_rbd_pool = vms
images_rbd_ceph_conf = /etc/ceph/ceph.conf
rbd_user = nova
rbd_secret_uuid = {{ rbd_secret_uuid }}
disk_cachemodes="network=writeback"
live_migration_flag="VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_PERSIST_DEST,VIR_MIGRATE_TUNNELLED"
hw_disk_discard = unmap
{% endif %}
<secret ephemeral='no' private='no'>
<uuid>{{ rbd_secret_uuid }}</uuid>
<usage type='ceph'>
<name>client.nova secret</name>
</usage>
</secret>
......@@ -24,11 +24,11 @@
roles:
- { role: swift, tags: swift, when: enable_swift | bool }
- hosts: [glance-api, glance-registry]
- hosts: [glance-api, glance-registry, ceph-mon]
roles:
- { role: glance, tags: glance, when: enable_glance | bool }
- hosts: [nova-api, nova-conductor, nova-consoleauth, nova-novncproxy, nova-scheduler, compute]
- hosts: [nova-api, nova-conductor, nova-consoleauth, nova-novncproxy, nova-scheduler, compute, ceph-mon]
roles:
- { role: nova, tags: nova, when: enable_nova | bool }
......@@ -36,7 +36,7 @@
roles:
- { role: neutron, tags: neutron, when: enable_neutron | bool }
- hosts: [cinder-api, cinder-backup, cinder-scheduler, cinder-volume]
- hosts: [cinder-api, cinder-backup, cinder-scheduler, cinder-volume, ceph-mon]
roles:
- { role: cinder, tags: cinder, when: enable_cinder | bool }
......
......@@ -28,8 +28,11 @@ RUN yum -y install lvm2 \
{% elif base_distro in ['ubuntu', 'debian'] %}
RUN apt-get install -y --no-install-recommends lvm2 \
&& apt-get clean
RUN apt-get install -y --no-install-recommends \
lvm2 \
ceph-common \
&& apt-get clean \
&& mkdir -p /etc/ceph
{% endif %}
......
......@@ -19,6 +19,15 @@ RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
{% endif %}
{% elif install_type == 'source' %}
{% if base_distro in ['ubuntu', 'debian'] %}
RUN apt-get install -y --no-install-recommends \
python-rbd \
python-rados \
&& apt-get clean \
&& mkdir -p /etc/ceph/
{% endif %}
ADD glance-base-archive /glance-base-source
RUN ln -s glance-base-source/* glance \
......
......@@ -22,8 +22,11 @@ RUN yum -y install \
{% elif base_distro in ['ubuntu', 'debian'] %}
RUN apt-get install -y --no-install-recommends qemu-utils \
&& apt-get clean
RUN apt-get install -y --no-install-recommends \
qemu-utils \
ceph-common \
&& apt-get clean \
&& mkdir -p /etc/ceph
{% endif %}
{% endif %}
......
......@@ -15,12 +15,15 @@ RUN yum -y install \
{% elif base_distro in ['ubuntu', 'debian'] %}
RUN apt-get install -y --no-install-recommends \
ceph-common \
libvirt-bin \
dmidecode \
pm-utils \
qemu \
qemu-block-extra \
ebtables \
&& apt-get clean
&& apt-get clean \
&& mkdir -p /etc/ceph
{% endif %}
......
......@@ -8,12 +8,5 @@ source /opt/kolla/kolla-common.sh
python /opt/kolla/set_configs.py
CMD=$(cat /run_command)
# TODO(SamYaple): Tweak libvirt.conf rather than change permissions.
# Fix permissions for libvirt
if [[ -c /dev/kvm ]]; then
chmod 660 /dev/kvm
chown root:kvm /dev/kvm
fi
echo "Running command: ${CMD}"
exec $CMD
......@@ -7,6 +7,7 @@
# Ceph options
####################
ceph_cluster_fsid: "5fba2fbc-551d-11e5-a8ce-01ef4c5cf93c"
rbd_secret_uuid: "bbc5b4d5-6fca-407d-807d-06a4f4a7bccb"
###################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment