Skip to content

Commit 3a72be1

Browse files
ovalentijdao-rhmdafsanhossain
authored
ROX-31357: Backport IBM VM creation fixes (#2630)
* Swaps ibmcloud region to us-east for s390x (#2372) * Update ansible tasks for ppc64le (#2097) Co-authored-by: jdao-rh <[email protected]> Co-authored-by: Afsan Hossain <[email protected]>
1 parent b0c2298 commit 3a72be1

File tree

4 files changed

+15
-17
lines changed

4 files changed

+15
-17
lines changed

ansible/requirements.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@ collections:
55
- community.docker
66
- containers.podman
77
- kubernetes.core
8-
- name: ibm.cloudcollection
9-
version: 1.51.0
8+
- ibm.cloudcollection

ansible/roles/create-vm/tasks/create-ppc64le-vm.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@
5353
pi_cloud_instance_id: "{{ pi_cloud_instance_id }}"
5454
failed_when:
5555
- pi_network_existing_output.rc != 0
56-
- '"unable to get network" not in pi_network_existing_output.stderr'
57-
- '"Error:item not found" not in pi_network_existing_output.stderr'
56+
- '"could not be found" not in pi_network_existing_output.stderr'
5857
register: pi_network_existing_output
5958

6059
- set_fact:
@@ -132,12 +131,12 @@
132131

133132
- name: Print Public IP Address
134133
debug:
135-
var: pi_instance.addresses[0].external_ip
134+
var: pi_instance.networks[0].external_ip
136135

137136
- name: Add VSI to Ansible inventory
138137
add_host:
139138
name: "{{ pi_name }}"
140-
ansible_host: "{{ pi_instance.addresses[0].external_ip }}"
139+
ansible_host: "{{ pi_instance.networks[0].external_ip }}"
141140
ansible_user: root
142141
groups:
143142
- job_id_{{ job_id }}

ansible/roles/destroy-vm/tasks/destroy-ppc64le-vm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
- name: Save network details
2727
delegate_to: localhost
2828
set_fact:
29-
public_subnet: "{{ pi_instance.addresses|rejectattr('external_ip', 'equalto', '') | list | first }}"
29+
public_subnet: "{{ pi_instance.networks|rejectattr('external_ip', 'equalto', '') | list | first }}"
3030
when: pi_instance_existing_output.rc == 0
3131

3232
- name: Delete instance by id

ansible/vars/s390x.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@
33

44
s390x:
55
#rhel-8-6-s390x
6-
vsi_image_id: r038-0d89bf54-c28f-4dc4-bec0-0f8e03a74de3
6+
vsi_image_id: r014-bd269dc6-aa79-4998-b2bc-1eccbda68ed2
77
vsi_profile: bz2-2x8
88

99
# IBM Cloud setup
10-
# vpc_name: lei-vpc-toronto
11-
vpc_id: r038-c4f8e233-4b56-44bd-af71-140ebd1664e9
12-
# subnet_name: stackrox-ci-sn3 (ca-tor-3)
10+
# vpc_name: stackrox-vpc-us-east
11+
vpc_id: r014-c42556dc-1754-488c-a94f-e384fee53bcd
12+
# subnet_name: stackrox-ci-sn3 (us-east-2)
1313
# subnet_id: 02s7-0fca7f4f-7e53-40d5-a087-f8cb5d7ab682
1414
#
15-
# ca-tor-2
16-
subnet_id: 02r7-68814545-4e23-4fe9-b557-a557f03a2b71
17-
zone: ca-tor-2
18-
# ssh_key_name: acs-sshkey
19-
ssh_key_id: r038-fb0260c7-c01d-45c8-8026-7d50042943b9
15+
# us-east-2
16+
subnet_id: 0767-43e68696-83cd-4072-9741-74543bbc2696
17+
zone: us-east-2
18+
# ssh_key_name: acs-sshkey-us-east
19+
ssh_key_id: r014-e3c69aa9-d9ea-4950-92e5-65406d6a785c
2020
# vsi_resource_group: stackrox-ci-resource-group
2121
vsi_resource_group_id: 1a33a6a9bd6e498f8115e9b1064bfa97
2222
disk_size: "{{ ibm_disk_size }}"
2323

2424
env:
2525
IC_API_KEY: "{{ lookup('env', 'IBM_CLOUD_S390X_API_KEY') }}"
26-
IC_REGION: ca-tor
26+
IC_REGION: us-east

0 commit comments

Comments
 (0)