Added cinder block storage.

This commit is contained in:
Egon Rijpkema 2017-08-28 11:50:57 +02:00
parent b148b04a0b
commit 5571858b23
5 changed files with 28 additions and 4 deletions

9
cinder-controller.yml Normal file
View File

@ -0,0 +1,9 @@
---
- hosts: all
name: Dummy to gather facts
tasks: []
- hosts: cinder-controller
become: True
roles:
- cinder-controller

9
cinder-storage.yml Normal file
View File

@ -0,0 +1,9 @@
---
- hosts: all
name: Dummy to gather facts
tasks: []
- hosts: cinder-storage
become: True
roles:
- cinder-storage

6
hosts
View File

@ -39,5 +39,11 @@ openstack01-node01 provider_interface_name=ens192
[nova-controller] [nova-controller]
openstack01-node03 openstack01-node03
[cinder-controller]
openstack01-node03
[cinder-storage]
openstack01-node01 storage_volume=/dev/loop0
[nova-compute] [nova-compute]
openstack01-node04 provider_interface_name=dummy0 openstack01-node04 provider_interface_name=dummy0

View File

@ -31,8 +31,8 @@
state: directory state: directory
mode: 0777 mode: 0777
with_items: with_items:
- /srv/cinder - /srv/cinder-controller
- /srv/cinder/root - /srv/cinder-controller/root
- name: install service file. - name: install service file.
template: template:
@ -48,7 +48,7 @@
command: > command: >
/usr/bin/docker run --rm /usr/bin/docker run --rm
{{ env_vars }} {{ env_vars }}
-v /srv/cinder/root:/root \ -v /srv/cinder-controller/root:/root \
{{ docker_image }} /etc/bootstrap.sh {{ docker_image }} /etc/bootstrap.sh
tags: bootstrap tags: bootstrap

View File

@ -10,7 +10,7 @@ ExecStartPre=-/usr/bin/docker kill %n
ExecStartPre=-/usr/bin/docker rm %n ExecStartPre=-/usr/bin/docker rm %n
ExecStart=/usr/bin/docker run --name %n \ ExecStart=/usr/bin/docker run --name %n \
{{ env_vars | replace('\n', '') }} \ {{ env_vars | replace('\n', '') }} \
-v /srv/glance/root:/root \ -v /srv/cinder-controller/root:/root \
-p 8776:8776 \ -p 8776:8776 \
{{ docker_image }} {{ docker_image }}