diff options
author | Chengcheng Mu <chengcheng.mu@amadeus.com> | 2015-08-18 10:46:23 +0200 |
---|---|---|
committer | Chengcheng Mu <chengcheng.mu@amadeus.com> | 2015-10-01 13:30:03 +0200 |
commit | d0b167bd075eda5ffa104229103dfad772e9f403 (patch) | |
tree | 71d353ec2e001ae9b854d230099f0815fbeeb05a /playbooks/gce/openshift-cluster/terminate.yml | |
parent | 318ac6b9b65f42f032382114f35d3c9fa7f5610b (diff) | |
download | openshift-d0b167bd075eda5ffa104229103dfad772e9f403.tar.gz openshift-d0b167bd075eda5ffa104229103dfad772e9f403.tar.bz2 openshift-d0b167bd075eda5ffa104229103dfad772e9f403.tar.xz openshift-d0b167bd075eda5ffa104229103dfad772e9f403.zip |
fixed some issues to boot VM on GCE
corrected openshift master config, commented infra
correct list and terminate, it was bugged in case where no instance were terminated
Using openshift-sdn for gce
new join_node playbook for gce
openstack/hosts/nova.py is now taking the nova/ini of its directory and not the directory of execution of bin/cluster
add fix of ICMP reject rules
Avoid a recursive loop
Jenkins image was renamed
Default masters to t2.medium instead of t2.small
Fix a minor bug involving AWS ENV Keys
* If a user forgot to set their AWS keys, we'd get a non descriptive error about a variable not being set
* This patch uses the correct variable so the error message is more informative
delete some fix that are needed anymore (selinux, iptables rules for sdn)
GCE : all variables needed are in gce.ini, it will be used by bin/cluster (now check better the presence of gce.init in the default place or use GCE_INI_PATH to locate it ), also by gce.ini
openshift_node_labels : get from oo_option
fix syntax error in bin/cluster
fix lookup for openshift_node_labels
Adding desc, multiplier, and units to zabbix item
Adding capability to have descriptions on triggers
updated triggers and items to have better descriptions and multipliers
Move openshift_data_dir to a fact based on deployment_type
Previously this was being set to /var/lib/origin regardless of deployment_type
which isn't correct given that existing 'enterprise' and 'online' deployments
would have been deployed with /var/lib/openshift
Verify again that ansible version is different than 1.9.0 and 1.9.0.1
bin/cluste does not take -a and -s anymore
fix master_public_api_url : using by default a correct url
Really fixed master public api url this time
Really fixed master public api url this time
uncommented infra deployment like before
fixed again masterpublicurl in a template
README_GCE.md : use GCE_INI_PATH in order to locate gce.ini, update description of gce.ini
Diffstat (limited to 'playbooks/gce/openshift-cluster/terminate.yml')
-rw-r--r-- | playbooks/gce/openshift-cluster/terminate.yml | 55 |
1 files changed, 34 insertions, 21 deletions
diff --git a/playbooks/gce/openshift-cluster/terminate.yml b/playbooks/gce/openshift-cluster/terminate.yml index 098b0df73..f705745d9 100644 --- a/playbooks/gce/openshift-cluster/terminate.yml +++ b/playbooks/gce/openshift-cluster/terminate.yml @@ -1,25 +1,18 @@ --- - name: Terminate instance(s) hosts: localhost + connection: local gather_facts: no vars_files: - vars.yml tasks: - - set_fact: scratch_group=tag_env-host-type-{{ cluster_id }}-openshift-node + - set_fact: scratch_group=tag_env-{{ cluster_id }} - add_host: name: "{{ item }}" - groups: oo_hosts_to_terminate, oo_nodes_to_terminate + groups: oo_hosts_to_terminate ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user | default(ansible_ssh_user, true) }}" ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}" - with_items: groups[scratch_group] | default([]) | difference(['localhost']) | difference(groups.status_terminated) - - - set_fact: scratch_group=tag_env-host-type-{{ cluster_id }}-openshift-master - - add_host: - name: "{{ item }}" - groups: oo_hosts_to_terminate, oo_masters_to_terminate - ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user | default(ansible_ssh_user, true) }}" - ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}" - with_items: groups[scratch_group] | default([]) | difference(['localhost']) | difference(groups.status_terminated) + with_items: groups[scratch_group] | default([]) | difference(['localhost']) | difference(groups.status_terminated | default([])) - name: Unsubscribe VMs hosts: oo_hosts_to_terminate @@ -32,14 +25,34 @@ lookup('oo_option', 'rhel_skip_subscription') | default(rhsub_skip, True) | default('no', True) | lower in ['no', 'false'] -- include: ../openshift-node/terminate.yml - vars: - gce_service_account_email: "{{ lookup('env', 'gce_service_account_email_address') }}" - gce_pem_file: "{{ lookup('env', 'gce_service_account_pem_file_path') }}" - gce_project_id: "{{ lookup('env', 'gce_project_id') }}" +- name: Terminate instances(s) + hosts: localhost + connection: local + gather_facts: no + vars_files: + - vars.yml + tasks: + + - name: Terminate instances that were previously launched + local_action: + module: gce + state: 'absent' + name: "{{ item }}" + service_account_email: "{{ lookup('env', 'gce_service_account_email_address') }}" + pem_file: "{{ lookup('env', 'gce_service_account_pem_file_path') }}" + project_id: "{{ lookup('env', 'gce_project_id') }}" + zone: "{{ lookup('env', 'zone') }}" + with_items: groups['oo_hosts_to_terminate'] | default([]) + when: item is defined -- include: ../openshift-master/terminate.yml - vars: - gce_service_account_email: "{{ lookup('env', 'gce_service_account_email_address') }}" - gce_pem_file: "{{ lookup('env', 'gce_service_account_pem_file_path') }}" - gce_project_id: "{{ lookup('env', 'gce_project_id') }}" +#- include: ../openshift-node/terminate.yml +# vars: +# gce_service_account_email: "{{ lookup('env', 'gce_service_account_email_address') }}" +# gce_pem_file: "{{ lookup('env', 'gce_service_account_pem_file_path') }}" +# gce_project_id: "{{ lookup('env', 'gce_project_id') }}" +# +#- include: ../openshift-master/terminate.yml +# vars: +# gce_service_account_email: "{{ lookup('env', 'gce_service_account_email_address') }}" +# gce_pem_file: "{{ lookup('env', 'gce_service_account_pem_file_path') }}" +# gce_project_id: "{{ lookup('env', 'gce_project_id') }}" |