From 31dbbf54a22202dfcce44dbb82f8bfcb4ea5181c Mon Sep 17 00:00:00 2001 From: Chengcheng Mu Date: Wed, 18 Nov 2015 11:10:16 +0100 Subject: add a volume on master host, in AWS provisioning --- playbooks/aws/openshift-cluster/tasks/launch_instances.yml | 4 ++++ playbooks/aws/openshift-cluster/templates/user_data.j2 | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'playbooks/aws') diff --git a/playbooks/aws/openshift-cluster/tasks/launch_instances.yml b/playbooks/aws/openshift-cluster/tasks/launch_instances.yml index 9c699120b..f392fdbc3 100644 --- a/playbooks/aws/openshift-cluster/tasks/launch_instances.yml +++ b/playbooks/aws/openshift-cluster/tasks/launch_instances.yml @@ -97,6 +97,10 @@ volume_size: "{{ lookup('env', 'os_master_root_vol_size') | default(25, true) }}" device_type: "{{ lookup('env', 'os_master_root_vol_type') | default('gp2', true) }}" iops: "{{ lookup('env', 'os_master_root_vol_iops') | default(500, true) }}" + docker: + volume_size: "{{ lookup('env', 'os_docker_vol_size') | default(10, true) }}" + device_type: "{{ lookup('env', 'os_docker_vol_type') | default('gp2', true) }}" + iops: "{{ lookup('env', 'os_docker_vol_iops') | default(500, true) }}" node: root: volume_size: "{{ lookup('env', 'os_node_root_vol_size') | default(85, true) }}" diff --git a/playbooks/aws/openshift-cluster/templates/user_data.j2 b/playbooks/aws/openshift-cluster/templates/user_data.j2 index 82c2f4d57..b7d89eac1 100644 --- a/playbooks/aws/openshift-cluster/templates/user_data.j2 +++ b/playbooks/aws/openshift-cluster/templates/user_data.j2 @@ -19,7 +19,7 @@ fs_setup: partition: auto {% endif %} -{% if type == 'node' %} +{% if type == 'node' or type == 'master' %} mounts: - [ xvdb ] - [ ephemeral0 ] -- cgit v1.2.3 From f9d918450b27b8f7429f050ed5f781492406b385 Mon Sep 17 00:00:00 2001 From: Jason DeTiberus Date: Wed, 18 Nov 2015 14:38:22 -0500 Subject: small tweaks for adding docker volume for aws master hosts --- playbooks/aws/openshift-cluster/tasks/launch_instances.yml | 3 +-- playbooks/aws/openshift-cluster/templates/user_data.j2 | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'playbooks/aws') diff --git a/playbooks/aws/openshift-cluster/tasks/launch_instances.yml b/playbooks/aws/openshift-cluster/tasks/launch_instances.yml index f392fdbc3..b109c165c 100644 --- a/playbooks/aws/openshift-cluster/tasks/launch_instances.yml +++ b/playbooks/aws/openshift-cluster/tasks/launch_instances.yml @@ -81,7 +81,6 @@ - set_fact: latest_ami: "{{ ami_result.results | oo_ami_selector(ec2_image_name) }}" - user_data: "{{ lookup('template', '../templates/user_data.j2') }}" volume_defs: etcd: root: @@ -125,7 +124,7 @@ count: "{{ instances | length }}" vpc_subnet_id: "{{ ec2_vpc_subnet | default(omit, true) }}" assign_public_ip: "{{ ec2_assign_public_ip | default(omit, true) }}" - user_data: "{{ user_data }}" + user_data: "{{ lookup('template', '../templates/user_data.j2') }}" wait: yes instance_tags: created-by: "{{ created_by }}" diff --git a/playbooks/aws/openshift-cluster/templates/user_data.j2 b/playbooks/aws/openshift-cluster/templates/user_data.j2 index b7d89eac1..22ab84977 100644 --- a/playbooks/aws/openshift-cluster/templates/user_data.j2 +++ b/playbooks/aws/openshift-cluster/templates/user_data.j2 @@ -1,5 +1,5 @@ #cloud-config -{% if type =='etcd' %} +{% if type == 'etcd' and 'etcd' in volume_defs[type] %} cloud_config_modules: - disk_setup - mounts @@ -19,7 +19,7 @@ fs_setup: partition: auto {% endif %} -{% if type == 'node' or type == 'master' %} +{% if type in ['node', 'master'] and 'docker' in volume_defs[type] %} mounts: - [ xvdb ] - [ ephemeral0 ] -- cgit v1.2.3