summaryrefslogtreecommitdiffstats
path: root/roles/openstack-stack/templates
diff options
context:
space:
mode:
authorTomas Sedovic <tomas@sedovic.cz>2017-08-04 15:26:35 +0200
committerGitHub <noreply@github.com>2017-08-04 15:26:35 +0200
commite4cb854086c845fa301cddaefcba1e3accaa17d8 (patch)
tree2bc5157707f03240807a635702d4696304511cd6 /roles/openstack-stack/templates
parent8734927bf2157d155f0042db0700df433ac05275 (diff)
downloadopenshift-e4cb854086c845fa301cddaefcba1e3accaa17d8.tar.gz
openshift-e4cb854086c845fa301cddaefcba1e3accaa17d8.tar.bz2
openshift-e4cb854086c845fa301cddaefcba1e3accaa17d8.tar.xz
openshift-e4cb854086c845fa301cddaefcba1e3accaa17d8.zip
Allow using ephemeral volumes for docker storage (#615)
For testing cases it's sometimes useful to not create Cinder volumes for the VMs. It can also sometimes be a little faster and more robust (but unfit for production). This adds an option called `ephemeral_volumes` that will use the VM's storage instead of creating volumes when set to true.
Diffstat (limited to 'roles/openstack-stack/templates')
-rw-r--r--roles/openstack-stack/templates/heat_stack_server.yaml.j22
-rw-r--r--roles/openstack-stack/templates/heat_stack_server_nofloating.yaml.j22
2 files changed, 4 insertions, 0 deletions
diff --git a/roles/openstack-stack/templates/heat_stack_server.yaml.j2 b/roles/openstack-stack/templates/heat_stack_server.yaml.j2
index 5851d3b9b..85af311ec 100644
--- a/roles/openstack-stack/templates/heat_stack_server.yaml.j2
+++ b/roles/openstack-stack/templates/heat_stack_server.yaml.j2
@@ -156,6 +156,7 @@ resources:
floating_network: { get_param: floating_network }
port_id: { get_resource: port }
+{% if not ephemeral_volumes|default(false)|bool %}
cinder_volume:
type: OS::Cinder::Volume
properties:
@@ -168,3 +169,4 @@ resources:
volume_id: { get_resource: cinder_volume }
instance_uuid: { get_resource: server }
mountpoint: /dev/sdb
+{% endif %}
diff --git a/roles/openstack-stack/templates/heat_stack_server_nofloating.yaml.j2 b/roles/openstack-stack/templates/heat_stack_server_nofloating.yaml.j2
index 792a8b90c..a22b7c6d0 100644
--- a/roles/openstack-stack/templates/heat_stack_server_nofloating.yaml.j2
+++ b/roles/openstack-stack/templates/heat_stack_server_nofloating.yaml.j2
@@ -135,6 +135,7 @@ resources:
- subnet: { get_param: subnet }
security_groups: { get_param: secgrp }
+{% if not ephemeral_volumes|default(false)|bool %}
cinder_volume:
type: OS::Cinder::Volume
properties:
@@ -147,3 +148,4 @@ resources:
volume_id: { get_resource: cinder_volume }
instance_uuid: { get_resource: server_nofloating }
mountpoint: /dev/sdb
+{% endif %}