summaryrefslogtreecommitdiffstats
path: root/deployment/playbooks/roles/create-vm-cns-prod-ose
diff options
context:
space:
mode:
authorValerii Ponomarov <vponomar@redhat.com>2019-12-21 00:09:11 +0530
committerValerii Ponomarov <vponomar@redhat.com>2019-12-21 00:15:18 +0530
commitd28b637d972aa600ed15ef437e4cb59c53e0ca5e (patch)
tree5cefd011a1d3b6d2ebc395227494ed64dc1da286 /deployment/playbooks/roles/create-vm-cns-prod-ose
parent678dd026c8961a713dec15a153ef9da64c6b171b (diff)
Delete 'deployment' dir as obsolete and not supported
'deployment' directory contains obsolete and unsupported approach for deploying OpenShift and GlusterFS storage. Separate deployment approach has already been used for significant amount of time. So, delete local 'directory' as it makes no sense to keep it. Moreover, it may be confusing for people who may try it out and see unpredictable errors. Change-Id: Ibf353500bab59853f597304cb9c1990102c000ef
Diffstat (limited to 'deployment/playbooks/roles/create-vm-cns-prod-ose')
-rw-r--r--deployment/playbooks/roles/create-vm-cns-prod-ose/tasks/main.yaml142
1 files changed, 0 insertions, 142 deletions
diff --git a/deployment/playbooks/roles/create-vm-cns-prod-ose/tasks/main.yaml b/deployment/playbooks/roles/create-vm-cns-prod-ose/tasks/main.yaml
deleted file mode 100644
index e01f1dd0..00000000
--- a/deployment/playbooks/roles/create-vm-cns-prod-ose/tasks/main.yaml
+++ /dev/null
@@ -1,142 +0,0 @@
----
-- name: Define set of main disks (system and heketi)
- set_fact:
- disks_info: "{{ disks_info | default([
- {'size_gb': 60, 'type': 'thin', 'datastore': vcenter_datastore},
- {'size_gb': 40, 'type': 'thin', 'datastore': vcenter_datastore},
- {'size_gb': 40, 'type': 'thin', 'datastore': vcenter_datastore}])
- }} + {{
- [{'size_gb': (item.strip() | int),
- 'type': container_storage_disk_type,
- 'datastore': vcenter_datastore}]
- }}"
- with_items: "{{ container_storage_disks.split(',') }}"
-
-- name: Define set of additional disks which will be just attached to nodes
- set_fact:
- additional_disks_info: "{{ additional_disks_info | default([]) }} + {{
- [{'size_gb': (item.strip() | int),
- 'type': container_storage_disk_type,
- 'datastore': vcenter_datastore}]
- }}"
- with_items: "{{ additional_disks_to_storage_nodes.split(',') }}"
-
-- name: Create CNS production VMs on vCenter
- vmware_guest:
- hostname: "{{ vcenter_host }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- validate_certs: False
- name: "{{ item.value.guestname }}"
- cluster: "{{ vcenter_cluster}}"
- datacenter: "{{ vcenter_datacenter }}"
- resource_pool: "{{ vcenter_resource_pool }}"
- template: "{{vcenter_template_name}}"
- state: poweredon
- wait_for_ip_address: true
- folder: "/{{ vcenter_folder }}"
- annotation: "{{ item.value.tag }}"
- disk: "{{ disks_info }} + {{ additional_disks_info }}"
- hardware:
- memory_mb: 32768
- networks: "[{'name': '{{ vm_network }}', 'type': 'dhcp' }]"
- customization:
- domain: "{{dns_zone}}"
- dns_suffix: "{{dns_zone}}"
- hostname: "{{ item.value.guestname}}"
- with_dict: "{{host_inventory}}"
- when: "item.value.guesttype in ['cns', ]"
- async: "{{ 6 * 600 }}"
- poll: 0
- register: async_vms_creation
-
-- name: Check async status of VMs creation
- async_status:
- jid: "{{ async_result_item.ansible_job_id }}"
- with_items: "{{ async_vms_creation.results }}"
- loop_control:
- loop_var: "async_result_item"
- register: async_poll_results
- until: async_poll_results.finished
- retries: "{{ 6 * 100 }}"
-
-- name: Read info of newly created VMs
- vmware_guest_tools_wait:
- hostname: "{{ vcenter_host }}"
- username: "{{ vcenter_username }}"
- password: "{{ vcenter_password }}"
- folder: "/{{ vcenter_folder }}"
- validate_certs: False
- uuid: "{{ item.instance.hw_product_uuid }}"
- with_items: "{{ async_poll_results.results }}"
- register: facts
-
-- name: Map node names and their IP addresses
- set_fact:
- ip4addrs: "{{ ip4addrs | default({}) | combine(
- {item.instance.hw_name: (
- item.instance.hw_eth0.ipaddresses | ipv4 | first)},
- recursive=True) }}"
- hostnames_for_reboot: "{{
- (hostnames_for_reboot | default([])) +
- [(item.instance.hw_eth0.ipaddresses | ipv4 | first)] }}"
- with_items: "{{ facts.results }}"
-
-- name: Define glusterfs devices
- set_fact:
- glusterfs_devices: "{{ glusterfs_devices | default([]) }} +
- {{ ['/dev/sd' + 'defghijklmnopqrstuvwxyz'[item.0]] }}"
- with_indexed_items: "{{ disks_info[3::] }}"
-
-- name: Define glusterfs additional devices
- set_fact:
- glusterfs_additional_devices: "{{
- glusterfs_additional_devices | default([])
- }} + {{
- ['/dev/sd' + 'defghijklmnopqrstuvwxyz'[item.0 + (glusterfs_devices|length)]]
- }}"
- with_indexed_items: "{{ additional_disks_info }}"
-
-- name: Add CNS production VMs to inventory
- add_host:
- hostname: "{{ item.value.guestname }}"
- ansible_fqdn: "{{ item.value.guestname }}.{{ dns_zone }}"
- ansible_ssh_host: "{{ ip4addrs[item.value.guestname] }}"
- groups: "{{ item.value.tag }}, new_nodes, storage, cns, glusterfs"
- openshift_node_group_name: "node-config-storage"
- # Following vars are for 'openshift_storage_glusterfs' role from
- # 'openshift/openshift-ansible' repo
- glusterfs_devices: "{{ glusterfs_devices }}"
- glusterfs_hostname: "{{ item.value.guestname }}"
- glusterfs_ip: "{{ ip4addrs[item.value.guestname] }}"
- glusterfs_zone: "{{ ip4addrs[item.value.guestname].split('.')[-2::] | join('') | int }}"
- with_dict: "{{ host_inventory }}"
- when: "item.value.guesttype in ['cns', ]"
-
-# Following updates config file
-# which is required for automated tests from 'glusterfs-containers-tests' repo
-
-- name: Combine data about gluster servers for 'glusterfs-containers-tests' config file
- set_fact:
- gluster_servers: "{{
- gluster_servers | default({}) | combine({
- ip4addrs[item.value.guestname]: {
- 'manage': item.value.guestname,
- 'storage': ip4addrs[item.value.guestname],
- 'additional_devices': glusterfs_additional_devices,
- }
- })
- }}"
- with_dict: "{{ host_inventory }}"
- when:
- - item.value.guesttype in ['cns', ]
- - cns_automation_config_file_path | length > 0
-
-- name: Update 'glusterfs-containers-tests' config file
- yedit:
- src: "{{ cns_automation_config_file_path }}"
- state: present
- edits:
- - key: gluster_servers
- value: "{{ gluster_servers }}"
- when: gluster_servers is defined