Skip to content

Commit

Permalink
proxy: Fix rebase issue
Browse files Browse the repository at this point in the history
  • Loading branch information
henrywang committed May 2, 2023
1 parent 744c6fe commit 25c3ccb
Showing 1 changed file with 386 additions and 0 deletions.
386 changes: 386 additions & 0 deletions proxy/install_runner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,392 @@
- instance_status_result_1 is failed
- instance_status_result_2 is failed
- instance_status_result_3 is failed

- name: Deploy Fedora instance attempt 1
openstack.cloud.server:
cloud: "{{ cloud_profile }}"
name: "{{ instance_name }}"
image: "{{ images[os] }}"
flavor: "{{ flavor['rhos-01'][flavor_type] }}"
network: "shared_net_9"
key_name: "rhel-edge"
security_groups: ssh_only
auto_ip: yes
config_drive: yes
wait: yes
timeout: 600
userdata: |
#cloud-config
users:
- default
- name: admin
gecos: Administrator
groups: users,wheel
sudo: ALL=(ALL) NOPASSWD:ALL
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCzxo5dEcS+LDK/OFAfHo6740EyoDM8aYaCkBala0FnWfMMTOq7PQe04ahB0eFLS3IlQtK5bpgzxBdFGVqF6uT5z4hhaPjQec0G3+BD5Pxo6V+SxShKZo+ZNGU3HVrF9p2V7QH0YFQj5B8F6AicA3fYh2BVUFECTPuMpy5A52ufWu0r4xOFmbU7SIhRQRAQz2u4yjXqBsrpYptAvyzzoN4gjUhNnwOHSPsvFpWoBFkWmqn0ytgHg3Vv9DlHW+45P02QH1UFedXR2MqLnwRI30qqtaOkVS+9rE/dhnR+XPpHHG+hv2TgMDAuQ3IK7Ab5m/yCbN73cxFifH4LST0vVG3Jx45xn+GTeHHhfkAfBSCtya6191jixbqyovpRunCBKexI5cfRPtWOitM3m7Mq26r7LpobMM+oOLUm4p0KKNIthWcmK9tYwXWSuGGfUQ+Y8gt7E0G06ZGbCPHOrxJ8lYQqXsif04piONPA/c9Hq43O99KPNGShONCS9oPFdOLRT3U= ostree-image-test
packages:
- python3
- python3-dnf
register: tmp_instance_result_1
ignore_errors: yes
when: "'fedora' in os"

- name: Makre sure VM is running attempt 1
openstack.cloud.server_info:
cloud: "{{ cloud_profile }}"
server: "{{ instance_name }}"
register: instance_status_result_1
retries: 20
until: instance_status_result_1.servers[0].vm_state == "active" and instance_status_result_1.servers[0].access_ipv4 != ""
ignore_errors: yes
when: "'fedora' in os"

- name: Delete instance if attempt 1 vm has error
openstack.cloud.server:
cloud: "{{ cloud_profile }}"
name: "{{ instance_name }}"
state: absent
ignore_errors: yes
when:
- instance_status_result_1 is failed
- "'fedora' in os"

- set_fact:
instance_ip: "{{ instance_status_result_1.servers[0].addresses.shared_net_9[0].addr }}"
when:
- "'fedora' in os"
- instance_status_result_1 is succeeded

- name: Deploy Fedora instance attempt 2
openstack.cloud.server:
cloud: "{{ cloud_profile }}"
name: "{{ instance_name }}"
image: "{{ images[os] }}"
flavor: "{{ flavor['rhos-01'][flavor_type] }}"
network: "shared_net_9"
key_name: "rhel-edge"
security_groups: ssh_only
auto_ip: yes
config_drive: yes
wait: yes
timeout: 600
userdata: |
#cloud-config
users:
- default
- name: admin
gecos: Administrator
groups: users,wheel
sudo: ALL=(ALL) NOPASSWD:ALL
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCzxo5dEcS+LDK/OFAfHo6740EyoDM8aYaCkBala0FnWfMMTOq7PQe04ahB0eFLS3IlQtK5bpgzxBdFGVqF6uT5z4hhaPjQec0G3+BD5Pxo6V+SxShKZo+ZNGU3HVrF9p2V7QH0YFQj5B8F6AicA3fYh2BVUFECTPuMpy5A52ufWu0r4xOFmbU7SIhRQRAQz2u4yjXqBsrpYptAvyzzoN4gjUhNnwOHSPsvFpWoBFkWmqn0ytgHg3Vv9DlHW+45P02QH1UFedXR2MqLnwRI30qqtaOkVS+9rE/dhnR+XPpHHG+hv2TgMDAuQ3IK7Ab5m/yCbN73cxFifH4LST0vVG3Jx45xn+GTeHHhfkAfBSCtya6191jixbqyovpRunCBKexI5cfRPtWOitM3m7Mq26r7LpobMM+oOLUm4p0KKNIthWcmK9tYwXWSuGGfUQ+Y8gt7E0G06ZGbCPHOrxJ8lYQqXsif04piONPA/c9Hq43O99KPNGShONCS9oPFdOLRT3U= ostree-image-test
packages:
- python3
- python3-dnf
register: tmp_instance_result_2
ignore_errors: yes
when:
- "'fedora' in os"
- instance_status_result_1 is failed

- name: Makre sure VM is running attempt 2
openstack.cloud.server_info:
cloud: "{{ cloud_profile }}"
server: "{{ instance_name }}"
register: instance_status_result_2
retries: 20
until: instance_status_result_2.servers[0].vm_state == "active" and instance_status_result_2.servers[0].access_ipv4 != ""
ignore_errors: yes
when:
- "'fedora' in os"
- instance_status_result_1 is failed

- name: Delete instance if attempt 2 vm has error
openstack.cloud.server:
cloud: "{{ cloud_profile }}"
name: "{{ instance_name }}"
state: absent
ignore_errors: yes
when:
- instance_status_result_1 is failed
- instance_status_result_2 is failed
- "'fedora' in os"

- set_fact:
instance_ip: "{{ instance_status_result_2.servers[0].addresses.shared_net_9[0].addr }}"
when:
- "'fedora' in os"
- instance_status_result_2 is succeeded
- instance_status_result_1 is failed

- name: Deploy Fedora instance attempt 3
openstack.cloud.server:
cloud: "{{ cloud_profile }}"
name: "{{ instance_name }}"
image: "{{ images[os] }}"
flavor: "{{ flavor['rhos-01'][flavor_type] }}"
network: "shared_net_9"
key_name: "rhel-edge"
security_groups: ssh_only
auto_ip: yes
config_drive: yes
wait: yes
timeout: 600
userdata: |
#cloud-config
users:
- default
- name: admin
gecos: Administrator
groups: users,wheel
sudo: ALL=(ALL) NOPASSWD:ALL
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCzxo5dEcS+LDK/OFAfHo6740EyoDM8aYaCkBala0FnWfMMTOq7PQe04ahB0eFLS3IlQtK5bpgzxBdFGVqF6uT5z4hhaPjQec0G3+BD5Pxo6V+SxShKZo+ZNGU3HVrF9p2V7QH0YFQj5B8F6AicA3fYh2BVUFECTPuMpy5A52ufWu0r4xOFmbU7SIhRQRAQz2u4yjXqBsrpYptAvyzzoN4gjUhNnwOHSPsvFpWoBFkWmqn0ytgHg3Vv9DlHW+45P02QH1UFedXR2MqLnwRI30qqtaOkVS+9rE/dhnR+XPpHHG+hv2TgMDAuQ3IK7Ab5m/yCbN73cxFifH4LST0vVG3Jx45xn+GTeHHhfkAfBSCtya6191jixbqyovpRunCBKexI5cfRPtWOitM3m7Mq26r7LpobMM+oOLUm4p0KKNIthWcmK9tYwXWSuGGfUQ+Y8gt7E0G06ZGbCPHOrxJ8lYQqXsif04piONPA/c9Hq43O99KPNGShONCS9oPFdOLRT3U= ostree-image-test
packages:
- python3
- python3-dnf
register: tmp_instance_result_3
ignore_errors: yes
when:
- "'fedora' in os"
- instance_status_result_1 is failed
- instance_status_result_2 is failed

- name: Makre sure VM is running attempt 3
openstack.cloud.server_info:
cloud: "{{ cloud_profile }}"
server: "{{ instance_name }}"
register: instance_status_result_3
retries: 20
until: instance_status_result_3.servers[0].vm_state == "active" and instance_status_result_3.servers[0].access_ipv4 != ""
ignore_errors: yes
when:
- "'fedora' in os"
- instance_status_result_1 is failed
- instance_status_result_2 is failed

- name: Delete instance if attempt 3 vm has error
openstack.cloud.server:
cloud: "{{ cloud_profile }}"
name: "{{ instance_name }}"
state: absent
ignore_errors: yes
when:
- "'fedora' in os"
- instance_status_result_1 is failed
- instance_status_result_2 is failed
- instance_status_result_3 is failed

- set_fact:
instance_ip: "{{ instance_status_result_3.servers[0].addresses.shared_net_9[0].addr }}"
when:
- "'fedora' in os"
- instance_status_result_3 is succeeded
- instance_status_result_1 is failed
- instance_status_result_2 is failed

- name: Failed rhos-01 deployment
fail:
msg: The 3 times vm deployments failed
when:
- "'fedora' in os"
- instance_status_result_1 is failed
- instance_status_result_2 is failed
- instance_status_result_3 is failed

- name: Deploy CS instance attempt 1
openstack.cloud.server:
cloud: "{{ cloud_profile }}"
name: "{{ instance_name }}"
image: "{{ images[os] }}"
flavor: "{{ flavor['rhos-01'][flavor_type] }}"
network: "shared_net_9"
key_name: "rhel-edge"
security_groups: ssh_only
auto_ip: yes
config_drive: yes
wait: yes
timeout: 600
userdata: |
#cloud-config
users:
- default
- name: admin
gecos: Administrator
groups: users,wheel
sudo: ALL=(ALL) NOPASSWD:ALL
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCzxo5dEcS+LDK/OFAfHo6740EyoDM8aYaCkBala0FnWfMMTOq7PQe04ahB0eFLS3IlQtK5bpgzxBdFGVqF6uT5z4hhaPjQec0G3+BD5Pxo6V+SxShKZo+ZNGU3HVrF9p2V7QH0YFQj5B8F6AicA3fYh2BVUFECTPuMpy5A52ufWu0r4xOFmbU7SIhRQRAQz2u4yjXqBsrpYptAvyzzoN4gjUhNnwOHSPsvFpWoBFkWmqn0ytgHg3Vv9DlHW+45P02QH1UFedXR2MqLnwRI30qqtaOkVS+9rE/dhnR+XPpHHG+hv2TgMDAuQ3IK7Ab5m/yCbN73cxFifH4LST0vVG3Jx45xn+GTeHHhfkAfBSCtya6191jixbqyovpRunCBKexI5cfRPtWOitM3m7Mq26r7LpobMM+oOLUm4p0KKNIthWcmK9tYwXWSuGGfUQ+Y8gt7E0G06ZGbCPHOrxJ8lYQqXsif04piONPA/c9Hq43O99KPNGShONCS9oPFdOLRT3U= ostree-image-test
packages:
- python3
- python3-dnf
register: tmp_instance_result_1
ignore_errors: yes
when: "'centos' in os"

- name: Makre sure VM is running attempt 1
openstack.cloud.server_info:
cloud: "{{ cloud_profile }}"
server: "{{ instance_name }}"
register: instance_status_result_1
retries: 20
until: instance_status_result_1.servers[0].vm_state == "active" and instance_status_result_1.servers[0].access_ipv4 != ""
ignore_errors: yes
when: "'centos' in os"

- name: Delete instance if attempt 1 vm has error
openstack.cloud.server:
cloud: "{{ cloud_profile }}"
name: "{{ instance_name }}"
state: absent
ignore_errors: yes
when:
- instance_status_result_1 is failed
- "'centos' in os"

- set_fact:
instance_ip: "{{ instance_status_result_1.servers[0].addresses.shared_net_9[0].addr }}"
when:
- "'centos' in os"
- instance_status_result_1 is succeeded

- name: Deploy CS instance attempt 2
openstack.cloud.server:
cloud: "{{ cloud_profile }}"
name: "{{ instance_name }}"
image: "{{ images[os] }}"
flavor: "{{ flavor['rhos-01'][flavor_type] }}"
network: "shared_net_9"
key_name: "rhel-edge"
security_groups: ssh_only
auto_ip: yes
config_drive: yes
wait: yes
timeout: 600
userdata: |
#cloud-config
users:
- default
- name: admin
gecos: Administrator
groups: users,wheel
sudo: ALL=(ALL) NOPASSWD:ALL
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCzxo5dEcS+LDK/OFAfHo6740EyoDM8aYaCkBala0FnWfMMTOq7PQe04ahB0eFLS3IlQtK5bpgzxBdFGVqF6uT5z4hhaPjQec0G3+BD5Pxo6V+SxShKZo+ZNGU3HVrF9p2V7QH0YFQj5B8F6AicA3fYh2BVUFECTPuMpy5A52ufWu0r4xOFmbU7SIhRQRAQz2u4yjXqBsrpYptAvyzzoN4gjUhNnwOHSPsvFpWoBFkWmqn0ytgHg3Vv9DlHW+45P02QH1UFedXR2MqLnwRI30qqtaOkVS+9rE/dhnR+XPpHHG+hv2TgMDAuQ3IK7Ab5m/yCbN73cxFifH4LST0vVG3Jx45xn+GTeHHhfkAfBSCtya6191jixbqyovpRunCBKexI5cfRPtWOitM3m7Mq26r7LpobMM+oOLUm4p0KKNIthWcmK9tYwXWSuGGfUQ+Y8gt7E0G06ZGbCPHOrxJ8lYQqXsif04piONPA/c9Hq43O99KPNGShONCS9oPFdOLRT3U= ostree-image-test
packages:
- python3
- python3-dnf
register: tmp_instance_result_2
ignore_errors: yes
when:
- "'centos' in os"
- instance_status_result_1 is failed

- name: Makre sure VM is running attempt 2
openstack.cloud.server_info:
cloud: "{{ cloud_profile }}"
server: "{{ instance_name }}"
register: instance_status_result_2
retries: 20
until: instance_status_result_2.servers[0].vm_state == "active" and instance_status_result_2.servers[0].access_ipv4 != ""
ignore_errors: yes
when:
- "'centos' in os"
- instance_status_result_1 is failed

- name: Delete instance if attempt 2 vm has error
openstack.cloud.server:
cloud: "{{ cloud_profile }}"
name: "{{ instance_name }}"
state: absent
ignore_errors: yes
when:
- instance_status_result_1 is failed
- instance_status_result_2 is failed
- "'centos' in os"

- set_fact:
instance_ip: "{{ instance_status_result_2.servers[0].addresses.shared_net_9[0].addr }}"
when:
- "'centos' in os"
- instance_status_result_2 is succeeded
- instance_status_result_1 is failed

- name: Deploy CS instance attempt 3
openstack.cloud.server:
cloud: "{{ cloud_profile }}"
name: "{{ instance_name }}"
image: "{{ images[os] }}"
flavor: "{{ flavor['rhos-01'][flavor_type] }}"
network: "shared_net_9"
key_name: "rhel-edge"
security_groups: ssh_only
auto_ip: yes
config_drive: yes
wait: yes
timeout: 600
userdata: |
#cloud-config
users:
- default
- name: admin
gecos: Administrator
groups: users,wheel
sudo: ALL=(ALL) NOPASSWD:ALL
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCzxo5dEcS+LDK/OFAfHo6740EyoDM8aYaCkBala0FnWfMMTOq7PQe04ahB0eFLS3IlQtK5bpgzxBdFGVqF6uT5z4hhaPjQec0G3+BD5Pxo6V+SxShKZo+ZNGU3HVrF9p2V7QH0YFQj5B8F6AicA3fYh2BVUFECTPuMpy5A52ufWu0r4xOFmbU7SIhRQRAQz2u4yjXqBsrpYptAvyzzoN4gjUhNnwOHSPsvFpWoBFkWmqn0ytgHg3Vv9DlHW+45P02QH1UFedXR2MqLnwRI30qqtaOkVS+9rE/dhnR+XPpHHG+hv2TgMDAuQ3IK7Ab5m/yCbN73cxFifH4LST0vVG3Jx45xn+GTeHHhfkAfBSCtya6191jixbqyovpRunCBKexI5cfRPtWOitM3m7Mq26r7LpobMM+oOLUm4p0KKNIthWcmK9tYwXWSuGGfUQ+Y8gt7E0G06ZGbCPHOrxJ8lYQqXsif04piONPA/c9Hq43O99KPNGShONCS9oPFdOLRT3U= ostree-image-test
packages:
- python3
- python3-dnf
register: tmp_instance_result_3
ignore_errors: yes
when:
- "'centos' in os"
- instance_status_result_1 is failed
- instance_status_result_2 is failed

- name: Makre sure VM is running attempt 3
openstack.cloud.server_info:
cloud: "{{ cloud_profile }}"
server: "{{ instance_name }}"
register: instance_status_result_3
retries: 20
until: instance_status_result_3.servers[0].vm_state == "active" and instance_status_result_3.servers[0].access_ipv4 != ""
ignore_errors: yes
when:
- "'centos' in os"
- instance_status_result_1 is failed
- instance_status_result_2 is failed

- name: Delete instance if attempt 3 vm has error
openstack.cloud.server:
cloud: "{{ cloud_profile }}"
name: "{{ instance_name }}"
state: absent
ignore_errors: yes
when:
- "'centos' in os"
- instance_status_result_1 is failed
- instance_status_result_2 is failed
- instance_status_result_3 is failed

- set_fact:
instance_ip: "{{ instance_status_result_3.servers[0].addresses.shared_net_9[0].addr }}"
when:
- "'centos' in os"
- instance_status_result_3 is succeeded
- instance_status_result_1 is failed
- instance_status_result_2 is failed

- name: Failed rhos-01 deployment
fail:
msg: The 3 times vm deployments failed
when:
- "'centos' in os"
- instance_status_result_1 is failed
- instance_status_result_2 is failed
- instance_status_result_3 is failed
when: cloud_profile == "rhos-01"

- name: Deploy runner on Google Cloud
Expand Down

0 comments on commit 25c3ccb

Please sign in to comment.