summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTlacenka <tlacencin@gmail.com>2017-08-17 13:48:20 +0200
committerTomas Sedovic <tomas@sedovic.cz>2017-08-17 13:48:20 +0200
commit6a528d5803619f93c734c23be44a2021f1d35ee9 (patch)
tree00d2fc09f5ba5430981d98e103d178ecc2cdc11e
parent1210754f3620c1121665cb49b71d0cef70dc16d1 (diff)
downloadopenshift-6a528d5803619f93c734c23be44a2021f1d35ee9.tar.gz
openshift-6a528d5803619f93c734c23be44a2021f1d35ee9.tar.bz2
openshift-6a528d5803619f93c734c23be44a2021f1d35ee9.tar.xz
openshift-6a528d5803619f93c734c23be44a2021f1d35ee9.zip
Configure different Docker volume sizes for different roles (#644)
* README, all.yml, stack_params.yaml, openstack-stack: added docker volume size customisation - app_volume_size changed to node_volume_size (it is node everywhere else) * all.yml, stack_params.yaml,openstack-stack: added customisation for lb, etcd, dns * README: updated * README: updated info about ephemeral volumes
-rw-r--r--playbooks/provisioning/openstack/README.md10
-rw-r--r--playbooks/provisioning/openstack/sample-inventory/group_vars/all.yml9
-rw-r--r--playbooks/provisioning/openstack/stack_params.yaml9
-rw-r--r--roles/openstack-stack/defaults/main.yml3
-rw-r--r--roles/openstack-stack/templates/heat_stack.yaml.j24
5 files changed, 29 insertions, 6 deletions
diff --git a/playbooks/provisioning/openstack/README.md b/playbooks/provisioning/openstack/README.md
index afaeb430b..ae572f9b6 100644
--- a/playbooks/provisioning/openstack/README.md
+++ b/playbooks/provisioning/openstack/README.md
@@ -135,6 +135,16 @@ cluster node groups, like app or infra nodes. For example: `{'region': 'infra'}`
The `openstack_nodes_to_remove` allows you to specify the numerical indexes
of App nodes that should be removed; for example, ['0', '2'],
+The `docker_volume_size` is the default Docker volume size the servers will use.
+In order to set a different volume size for a role,
+uncomment the line with the corresponding variable (e. g. `docker_master_volume_size`
+for master) and change its value. `docker_volume_size` must stay defined as it is
+used as a default value for some of the servers (master, infra, app node).
+The rest of the roles (etcd, load balancer, dns) have their defaults hard-coded.
+
+**Note**: If the `ephemeral_volumes` is set to `true`, the `*_volume_size` variables
+will be ignored and the deployment will not create any cinder volumes.
+
The `openstack_flat_secgrp`, controls Neutron security groups creation for Heat
stacks. Set it to true, if you experience issues with sec group rules
quotas. It trades security for number of rules, by sharing the same set
diff --git a/playbooks/provisioning/openstack/sample-inventory/group_vars/all.yml b/playbooks/provisioning/openstack/sample-inventory/group_vars/all.yml
index 19f916508..bdd98d239 100644
--- a/playbooks/provisioning/openstack/sample-inventory/group_vars/all.yml
+++ b/playbooks/provisioning/openstack/sample-inventory/group_vars/all.yml
@@ -45,6 +45,15 @@ openstack_default_flavor: "m1.medium"
# # Numerical index of nodes to remove
# openstack_nodes_to_remove: []
+# # Docker volume size
+# # - set specific volume size for roles by uncommenting corresponding lines
+# # - note: do not remove docker_default_volume_size definition
+#docker_master_volume_size: "15"
+#docker_infra_volume_size: "15"
+#docker_node_volume_size: "15"
+#docker_etcd_volume_size: "2"
+#docker_dns_volume_size: "1"
+#docker_lb_volume_size: "5"
docker_volume_size: "15"
openstack_subnet_prefix: "192.168.99"
diff --git a/playbooks/provisioning/openstack/stack_params.yaml b/playbooks/provisioning/openstack/stack_params.yaml
index 27fa5ec8c..60e9bcf45 100644
--- a/playbooks/provisioning/openstack/stack_params.yaml
+++ b/playbooks/provisioning/openstack/stack_params.yaml
@@ -30,9 +30,12 @@ num_masters: "{{ openstack_num_masters }}"
num_nodes: "{{ openstack_num_nodes }}"
num_infra: "{{ openstack_num_infra }}"
num_dns: "{{ openstack_num_dns | default(1) }}"
-master_volume_size: "{{ docker_volume_size }}"
-app_volume_size: "{{ docker_volume_size }}"
-infra_volume_size: "{{ docker_volume_size }}"
+master_volume_size: "{{ docker_master_volume_size | default(docker_volume_size) }}"
+infra_volume_size: "{{ docker_infra_volume_size | default(docker_volume_size) }}"
+node_volume_size: "{{ docker_node_volume_size | default(docker_volume_size) }}"
+etcd_volume_size: "{{ docker_etcd_volume_size | default('2') }}"
+dns_volume_size: "{{ docker_dns_volume_size | default('1') }}"
+lb_volume_size: "{{ docker_lb_volume_size | default('5') }}"
nodes_to_remove: "{{ openstack_nodes_to_remove | default([]) | to_yaml }}"
use_bastion: "{{ openstack_use_bastion|default(False) }}"
ui_ssh_tunnel: "{{ openshift_ui_ssh_tunnel|default(False) }}"
diff --git a/roles/openstack-stack/defaults/main.yml b/roles/openstack-stack/defaults/main.yml
index c8529612e..fbca0bdf6 100644
--- a/roles/openstack-stack/defaults/main.yml
+++ b/roles/openstack-stack/defaults/main.yml
@@ -1,5 +1,4 @@
---
-dns_volume_size: 1
ssh_ingress_cidr: 0.0.0.0/0
node_ingress_cidr: 0.0.0.0/0
master_ingress_cidr: 0.0.0.0/0
@@ -12,5 +11,7 @@ num_dns: 1
num_infra: 1
nodes_to_remove: []
etcd_volume_size: 2
+dns_volume_size: 1
+lb_volume_size: 5
use_bastion: False
ui_ssh_tunnel: False
diff --git a/roles/openstack-stack/templates/heat_stack.yaml.j2 b/roles/openstack-stack/templates/heat_stack.yaml.j2
index 3623035c6..c0da4c184 100644
--- a/roles/openstack-stack/templates/heat_stack.yaml.j2
+++ b/roles/openstack-stack/templates/heat_stack.yaml.j2
@@ -550,7 +550,7 @@ resources:
template: openshift-ansible-cluster_id-net
params:
cluster_id: {{ stack_name }}
- volume_size: 5
+ volume_size: {{ lb_volume_size }}
depends_on:
- interface
{% endif %}
@@ -658,7 +658,7 @@ resources:
template: openshift-ansible-cluster_id-net
params:
cluster_id: {{ stack_name }}
- volume_size: {{ app_volume_size }}
+ volume_size: {{ node_volume_size }}
depends_on:
- interface