summaryrefslogtreecommitdiffstats
path: root/playbooks/aws/openshift-cluster
diff options
context:
space:
mode:
authorJason DeTiberus <jdetiber@redhat.com>2015-11-24 14:47:54 -0500
committerJason DeTiberus <jdetiber@redhat.com>2015-11-24 14:47:54 -0500
commitb169e206f7964b3dcf3c1d142d945042618782a7 (patch)
treed8ce3a291a4309bdff5ac1308418ed1149b85499 /playbooks/aws/openshift-cluster
parent4ffde064c126e54930f776c727ab91b8c150166d (diff)
downloadopenshift-b169e206f7964b3dcf3c1d142d945042618782a7.tar.gz
openshift-b169e206f7964b3dcf3c1d142d945042618782a7.tar.bz2
openshift-b169e206f7964b3dcf3c1d142d945042618782a7.tar.xz
openshift-b169e206f7964b3dcf3c1d142d945042618782a7.zip
more aws support for scaleup
Diffstat (limited to 'playbooks/aws/openshift-cluster')
-rw-r--r--playbooks/aws/openshift-cluster/addNodes.yml58
-rw-r--r--playbooks/aws/openshift-cluster/scaleup.yml9
2 files changed, 67 insertions, 0 deletions
diff --git a/playbooks/aws/openshift-cluster/addNodes.yml b/playbooks/aws/openshift-cluster/addNodes.yml
new file mode 100644
index 000000000..09bf34666
--- /dev/null
+++ b/playbooks/aws/openshift-cluster/addNodes.yml
@@ -0,0 +1,58 @@
+---
+- name: Launch instance(s)
+ hosts: localhost
+ connection: local
+ gather_facts: no
+ vars_files:
+ - vars.yml
+ - ["vars.{{ deployment_type }}.{{ cluster_id }}.yml", vars.defaults.yml]
+ tasks:
+ - fail:
+ msg: Deployment type not supported for aws provider yet
+ when: deployment_type == 'enterprise'
+
+ - include: ../../common/openshift-cluster/tasks/set_etcd_launch_facts.yml
+ - include: tasks/launch_instances.yml
+ vars:
+ instances: "{{ etcd_names }}"
+ cluster: "{{ cluster_id }}"
+ type: "{{ k8s_type }}"
+ g_sub_host_type: "default"
+
+ - include: ../../common/openshift-cluster/tasks/set_master_launch_facts.yml
+ - include: tasks/launch_instances.yml
+ vars:
+ instances: "{{ master_names }}"
+ cluster: "{{ cluster_id }}"
+ type: "{{ k8s_type }}"
+ g_sub_host_type: "default"
+
+ - include: ../../common/openshift-cluster/tasks/set_node_launch_facts.yml
+ vars:
+ type: "compute"
+ count: "{{ num_nodes }}"
+ - include: tasks/launch_instances.yml
+ vars:
+ instances: "{{ node_names }}"
+ cluster: "{{ cluster_id }}"
+ type: "{{ k8s_type }}"
+ g_sub_host_type: "{{ sub_host_type }}"
+
+ - include: ../../common/openshift-cluster/tasks/set_node_launch_facts.yml
+ vars:
+ type: "infra"
+ count: "{{ num_infra }}"
+ - include: tasks/launch_instances.yml
+ vars:
+ instances: "{{ node_names }}"
+ cluster: "{{ cluster_id }}"
+ type: "{{ k8s_type }}"
+ g_sub_host_type: "{{ sub_host_type }}"
+
+ - add_host:
+ name: "{{ master_names.0 }}"
+ groups: service_master
+ when: master_names is defined and master_names.0 is defined
+
+- include: update.yml
+- include: list.yml
diff --git a/playbooks/aws/openshift-cluster/scaleup.yml b/playbooks/aws/openshift-cluster/scaleup.yml
index 3c2deff70..d7454b6d6 100644
--- a/playbooks/aws/openshift-cluster/scaleup.yml
+++ b/playbooks/aws/openshift-cluster/scaleup.yml
@@ -8,6 +8,15 @@
- set_fact:
g_ssh_user_tmp: "{{ deployment_vars[deployment_type].ssh_user }}"
g_sudo_tmp: "{{ deployment_vars[deployment_type].sudo }}"
+ - name: Evaluate oo_hosts_to_update
+ add_host:
+ name: "{{ item }}"
+ groups: oo_hosts_to_update
+ ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
+ ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
+ with_items: groups.nodes_to_add
+
+- include: ../../common/openshift-cluster/update_repos_and_packages.yml
- include: ../../common/openshift-cluster/scaleup.yml
vars: