Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

test: add azure test for os-replace #197

Merged
merged 2 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/os-replace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
strategy:
matrix:
arch: [x86_64]
platform: [openstack, gcp, aws, libvirt, beaker]
platform: [openstack, gcp, aws, azure, libvirt, beaker]
include:
- arch: aarch64
platform: aws
Expand Down Expand Up @@ -87,8 +87,8 @@ jobs:
pull_request_status_name: "bootc-rhel94-${{ matrix.arch }}-replace-${{ matrix.platform }}"
tmt_plan_regex: "${{ matrix.platform }}"
tf_scope: private
secrets: "OS_USERNAME=${{ secrets.OS_USERNAME }};OS_PASSWORD=${{ secrets.OS_PASSWORD }};OS_AUTH_URL=${{ secrets.OS_AUTH_URL }};QUAY_USERNAME=${{ secrets.QUAY_USERNAME }};QUAY_PASSWORD=${{ secrets.QUAY_PASSWORD }};QUAY_SECRET=${{ secrets.QUAY_SECRET }};RHEL_REGISTRY_URL=${{ secrets.RHEL_REGISTRY_URL }};DOWNLOAD_NODE=${{ secrets.DOWNLOAD_NODE }};GCP_SERVICE_ACCOUNT_FILE_B64=${{ secrets.GCP_SERVICE_ACCOUNT_FILE_B64 }};AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }};AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }};CERT_URL=${{ secrets.CERT_URL }};RHC_AK=${{ secrets.RHC_AK }};RHC_ORGID=${{ secrets.RHC_ORGID }};BEAKER_KEYTAB_B64=${{ secrets.BEAKER_KEYTAB_B64 }};BEAKER_CLIENT_B64=${{ secrets.BEAKER_CLIENT_B64 }};KRB5_CONF_B64=${{ secrets.KRB5_CONF_B64 }}"
variables: "TEST_OS=rhel-9-4;PLATFORM=${{ matrix.platform }};ARCH=${{ matrix.arch }};OS_PROJECT_NAME=${{ secrets.OS_PROJECT_NAME }};OS_USER_DOMAIN_NAME=${{ secrets.OS_USER_DOMAIN_NAME }};OS_PROJECT_DOMAIN_NAME=${{ secrets.OS_PROJECT_DOMAIN_NAME }};GCP_PROJECT=${{ secrets.GCP_PROJECT }};AWS_REGION=${{ secrets.AWS_REGION }};FIRMWARE=${{ matrix.firmware }}"
secrets: "OS_USERNAME=${{ secrets.OS_USERNAME }};OS_PASSWORD=${{ secrets.OS_PASSWORD }};OS_AUTH_URL=${{ secrets.OS_AUTH_URL }};QUAY_USERNAME=${{ secrets.QUAY_USERNAME }};QUAY_PASSWORD=${{ secrets.QUAY_PASSWORD }};QUAY_SECRET=${{ secrets.QUAY_SECRET }};RHEL_REGISTRY_URL=${{ secrets.RHEL_REGISTRY_URL }};DOWNLOAD_NODE=${{ secrets.DOWNLOAD_NODE }};GCP_SERVICE_ACCOUNT_FILE_B64=${{ secrets.GCP_SERVICE_ACCOUNT_FILE_B64 }};AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }};AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }};CERT_URL=${{ secrets.CERT_URL }};RHC_AK=${{ secrets.RHC_AK }};RHC_ORGID=${{ secrets.RHC_ORGID }};BEAKER_KEYTAB_B64=${{ secrets.BEAKER_KEYTAB_B64 }};BEAKER_CLIENT_B64=${{ secrets.BEAKER_CLIENT_B64 }};KRB5_CONF_B64=${{ secrets.KRB5_CONF_B64 }};AZURE_SECRET=${{ secrets.AZURE_SECRET }}"
variables: "TEST_OS=rhel-9-4;PLATFORM=${{ matrix.platform }};ARCH=${{ matrix.arch }};OS_PROJECT_NAME=${{ secrets.OS_PROJECT_NAME }};OS_USER_DOMAIN_NAME=${{ secrets.OS_USER_DOMAIN_NAME }};OS_PROJECT_DOMAIN_NAME=${{ secrets.OS_PROJECT_DOMAIN_NAME }};GCP_PROJECT=${{ secrets.GCP_PROJECT }};AWS_REGION=${{ secrets.AWS_REGION }};FIRMWARE=${{ matrix.firmware }};AZURE_SUBSCRIPTION_ID=${{ secrets.AZURE_SUBSCRIPTION_ID }};AZURE_CLIENT_ID=${{ secrets.AZURE_CLIENT_ID }};AZURE_TENANT=${{ secrets.AZURE_TENANT }}"

cs9-replace:
needs: pr-info
Expand All @@ -99,7 +99,7 @@ jobs:
strategy:
matrix:
arch: [x86_64]
platform: [openstack, gcp, aws, libvirt, beaker]
platform: [openstack, gcp, aws, azure, libvirt, beaker]
include:
- arch: aarch64
platform: aws
Expand Down Expand Up @@ -128,8 +128,8 @@ jobs:
pull_request_status_name: "bootc-cs9-${{ matrix.arch }}-replace-${{ matrix.platform }}"
tmt_plan_regex: "${{ matrix.platform }}"
tf_scope: private
secrets: "OS_USERNAME=${{ secrets.OS_USERNAME }};OS_PASSWORD=${{ secrets.OS_PASSWORD }};OS_AUTH_URL=${{ secrets.OS_AUTH_URL }};QUAY_USERNAME=${{ secrets.QUAY_USERNAME }};QUAY_PASSWORD=${{ secrets.QUAY_PASSWORD }};QUAY_SECRET=${{ secrets.QUAY_SECRET }};GCP_SERVICE_ACCOUNT_FILE_B64=${{ secrets.GCP_SERVICE_ACCOUNT_FILE_B64 }};AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }};AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }};CERT_URL=${{ secrets.CERT_URL }};BEAKER_KEYTAB_B64=${{ secrets.BEAKER_KEYTAB_B64 }};BEAKER_CLIENT_B64=${{ secrets.BEAKER_CLIENT_B64 }};KRB5_CONF_B64=${{ secrets.KRB5_CONF_B64 }}"
variables: "TEST_OS=centos-stream-9;PLATFORM=${{ matrix.platform }};ARCH=${{ matrix.arch }};OS_PROJECT_NAME=${{ secrets.OS_PROJECT_NAME }};OS_USER_DOMAIN_NAME=${{ secrets.OS_USER_DOMAIN_NAME }};OS_PROJECT_DOMAIN_NAME=${{ secrets.OS_PROJECT_DOMAIN_NAME }};GCP_PROJECT=${{ secrets.GCP_PROJECT }};AWS_REGION=${{ secrets.AWS_REGION }};FIRMWARE=${{ matrix.firmware }}"
secrets: "OS_USERNAME=${{ secrets.OS_USERNAME }};OS_PASSWORD=${{ secrets.OS_PASSWORD }};OS_AUTH_URL=${{ secrets.OS_AUTH_URL }};QUAY_USERNAME=${{ secrets.QUAY_USERNAME }};QUAY_PASSWORD=${{ secrets.QUAY_PASSWORD }};QUAY_SECRET=${{ secrets.QUAY_SECRET }};GCP_SERVICE_ACCOUNT_FILE_B64=${{ secrets.GCP_SERVICE_ACCOUNT_FILE_B64 }};AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }};AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }};CERT_URL=${{ secrets.CERT_URL }};BEAKER_KEYTAB_B64=${{ secrets.BEAKER_KEYTAB_B64 }};BEAKER_CLIENT_B64=${{ secrets.BEAKER_CLIENT_B64 }};KRB5_CONF_B64=${{ secrets.KRB5_CONF_B64 }};AZURE_SECRET=${{ secrets.AZURE_SECRET }}"
variables: "TEST_OS=centos-stream-9;PLATFORM=${{ matrix.platform }};ARCH=${{ matrix.arch }};OS_PROJECT_NAME=${{ secrets.OS_PROJECT_NAME }};OS_USER_DOMAIN_NAME=${{ secrets.OS_USER_DOMAIN_NAME }};OS_PROJECT_DOMAIN_NAME=${{ secrets.OS_PROJECT_DOMAIN_NAME }};GCP_PROJECT=${{ secrets.GCP_PROJECT }};AWS_REGION=${{ secrets.AWS_REGION }};FIRMWARE=${{ matrix.firmware }};AZURE_SUBSCRIPTION_ID=${{ secrets.AZURE_SUBSCRIPTION_ID }};AZURE_CLIENT_ID=${{ secrets.AZURE_CLIENT_ID }};AZURE_TENANT=${{ secrets.AZURE_TENANT }}"

cs9-dev-replace:
needs: pr-info
Expand All @@ -140,7 +140,7 @@ jobs:
strategy:
matrix:
arch: [x86_64]
platform: [openstack, gcp, aws, libvirt, beaker]
platform: [openstack, gcp, aws, azure, libvirt, beaker]
include:
- arch: aarch64
platform: aws
Expand Down Expand Up @@ -175,8 +175,8 @@ jobs:
pull_request_status_name: "bootc-cs9-dev-${{ matrix.arch }}-replace-${{ matrix.platform }}"
tmt_plan_regex: "${{ matrix.platform }}"
tf_scope: private
secrets: "OS_USERNAME=${{ secrets.OS_USERNAME }};OS_PASSWORD=${{ secrets.OS_PASSWORD }};OS_AUTH_URL=${{ secrets.OS_AUTH_URL }};QUAY_USERNAME=${{ secrets.QUAY_USERNAME }};QUAY_PASSWORD=${{ secrets.QUAY_PASSWORD }};QUAY_SECRET=${{ secrets.QUAY_SECRET }};GCP_SERVICE_ACCOUNT_FILE_B64=${{ secrets.GCP_SERVICE_ACCOUNT_FILE_B64 }};AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }};AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }};CERT_URL=${{ secrets.CERT_URL }};BEAKER_KEYTAB_B64=${{ secrets.BEAKER_KEYTAB_B64 }};BEAKER_CLIENT_B64=${{ secrets.BEAKER_CLIENT_B64 }};KRB5_CONF_B64=${{ secrets.KRB5_CONF_B64 }}"
variables: "TEST_OS=centos-stream-9;PLATFORM=${{ matrix.platform }};ARCH=${{ matrix.arch }};IMAGE_NAME=centos-bootc-dev;OS_PROJECT_NAME=${{ secrets.OS_PROJECT_NAME }};OS_USER_DOMAIN_NAME=${{ secrets.OS_USER_DOMAIN_NAME }};OS_PROJECT_DOMAIN_NAME=${{ secrets.OS_PROJECT_DOMAIN_NAME }};GCP_PROJECT=${{ secrets.GCP_PROJECT }};AWS_REGION=${{ secrets.AWS_REGION }};FIRMWARE=${{ matrix.firmware }}"
secrets: "OS_USERNAME=${{ secrets.OS_USERNAME }};OS_PASSWORD=${{ secrets.OS_PASSWORD }};OS_AUTH_URL=${{ secrets.OS_AUTH_URL }};QUAY_USERNAME=${{ secrets.QUAY_USERNAME }};QUAY_PASSWORD=${{ secrets.QUAY_PASSWORD }};QUAY_SECRET=${{ secrets.QUAY_SECRET }};GCP_SERVICE_ACCOUNT_FILE_B64=${{ secrets.GCP_SERVICE_ACCOUNT_FILE_B64 }};AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }};AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }};CERT_URL=${{ secrets.CERT_URL }};BEAKER_KEYTAB_B64=${{ secrets.BEAKER_KEYTAB_B64 }};BEAKER_CLIENT_B64=${{ secrets.BEAKER_CLIENT_B64 }};KRB5_CONF_B64=${{ secrets.KRB5_CONF_B64 }};AZURE_SECRET=${{ secrets.AZURE_SECRET }}"
variables: "TEST_OS=centos-stream-9;PLATFORM=${{ matrix.platform }};ARCH=${{ matrix.arch }};IMAGE_NAME=centos-bootc-dev;OS_PROJECT_NAME=${{ secrets.OS_PROJECT_NAME }};OS_USER_DOMAIN_NAME=${{ secrets.OS_USER_DOMAIN_NAME }};OS_PROJECT_DOMAIN_NAME=${{ secrets.OS_PROJECT_DOMAIN_NAME }};GCP_PROJECT=${{ secrets.GCP_PROJECT }};AWS_REGION=${{ secrets.AWS_REGION }};FIRMWARE=${{ matrix.firmware }};AZURE_SUBSCRIPTION_ID=${{ secrets.AZURE_SUBSCRIPTION_ID }};AZURE_CLIENT_ID=${{ secrets.AZURE_CLIENT_ID }};AZURE_TENANT=${{ secrets.AZURE_TENANT }}"

rhel94-beta-replace:
needs: pr-info
Expand Down
9 changes: 9 additions & 0 deletions .tekton/rhel-bootc-integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ spec:
- name: RHEL_REGISTRY_URL
- name: GCP_PROJECT
- name: AWS_REGION
- name: AZURE_SUBSCRIPTION_ID
- name: AZURE_CLIENT_ID
- name: AZURE_TENANT
tasks:
- name: testing-farm
taskRef:
Expand Down Expand Up @@ -74,3 +77,9 @@ spec:
value: $(params.GCP_PROJECT)
- name: AWS_REGION
value: $(params.AWS_REGION)
- name: AZURE_SUBSCRIPTION_ID
value: $(params.AZURE_SUBSCRIPTION_ID)
- name: AZURE_CLIENT_ID
value: $(params.AZURE_CLIENT_ID)
- name: AZURE_TENANT
value: $(params.AZURE_TENANT)
18 changes: 18 additions & 0 deletions .tekton/testing-farm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ spec:
- name: RHEL_REGISTRY_URL
- name: GCP_PROJECT
- name: AWS_REGION
- name: AZURE_SUBSCRIPTION_ID
- name: AZURE_CLIENT_ID
- name: AZURE_TENANT
volumes:
- name: testing-farm-secret
secret:
Expand Down Expand Up @@ -64,6 +67,12 @@ spec:
value: $(params.GCP_PROJECT)
- name: AWS_REGION
value: $(params.AWS_REGION)
- name: AZURE_SUBSCRIPTION_ID
value: $(params.AZURE_SUBSCRIPTION_ID)
- name: AZURE_CLIENT_ID
value: $(params.AZURE_CLIENT_ID)
- name: AZURE_TENANT
value: $(params.AZURE_TENANT)
- name: GCP_SERVICE_ACCOUNT_FILE_B64
valueFrom:
secretKeyRef:
Expand Down Expand Up @@ -99,6 +108,11 @@ spec:
secretKeyRef:
name: "bootc-workflow-test-secret"
key: "RHC_ORGID"
- name: AZURE_SECRET
valueFrom:
secretKeyRef:
name: "bootc-workflow-test-secret"
key: "AZURE_SECRET"
script: |
#!/usr/bin/env bash

Expand Down Expand Up @@ -143,6 +157,9 @@ spec:
--environment RHEL_REGISTRY_URL="${RHEL_REGISTRY_URL}" \
--environment GCP_PROJECT="${GCP_PROJECT}" \
--environment AWS_REGION="${AWS_REGION}" \
--environment AZURE_SUBSCRIPTION_ID="${AZURE_SUBSCRIPTION_ID}" \
--environment AZURE_CLIENT_ID="${AZURE_CLIENT_ID}" \
--environment AZURE_TENANT="${AZURE_TENANT}" \
--environment CI="RHTAP" \
--environment ARCH="${ARCH}" \
--secret QUAY_USERNAME="${QUAY_USERNAME}" \
Expand All @@ -153,6 +170,7 @@ spec:
--secret AWS_SECRET_ACCESS_KEY="${AWS_SECRET_ACCESS_KEY}" \
--secret RHC_AK="${RHC_AK}" \
--secret RHC_ORGID="${RHC_ORGID}" \
--secret AZURE_SECRET="${AZURE_SECRET}" \
--git-url "${GIT_URL}" \
--git-ref "${GIT_REF}" \
--compose "${COMPOSE}" \
Expand Down
3 changes: 1 addition & 2 deletions bib-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,12 @@ localhost

[cloud:vars]
ansible_connection=local
ansible_python_interpreter=/root/venv/bin/python3

[guest:vars]
ansible_user="$SSH_USER"
ansible_private_key_file="$SSH_KEY"
ansible_ssh_common_args="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"

[all:vars]
ansible_python_interpreter=/usr/bin/python3
EOF

Expand Down
5 changes: 3 additions & 2 deletions os-replace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ if [[ "$PLATFORM" == "libvirt" ]] && [[ "$LAYERED_IMAGE" != "cloud-init" ]] && [
elif [[ "$PLATFORM" == "aws" ]] && [[ "$LAYERED_IMAGE" != "cloud-init" ]]; then
USER_CONFIG="RUN dnf -y install cloud-init && \
ln -s ../cloud-init.target /usr/lib/systemd/system/default.target.wants"
elif [[ "$LAYERED_IMAGE" == "azure" ]]; then
sed -i '/cloud.cfg/d' "$INSTALL_CONTAINERFILE"
elif [[ "$LAYERED_IMAGE" == "useradd-ssh" ]]; then
sed -i "s|exampleuser|$SSH_USER|g" "$INSTALL_CONTAINERFILE"
fi
Expand Down Expand Up @@ -143,13 +145,12 @@ localhost

[cloud:vars]
ansible_connection=local
ansible_python_interpreter=/root/venv/bin/python3

[guest:vars]
ansible_user="$SSH_USER"
ansible_private_key_file="$SSH_KEY"
ansible_ssh_common_args="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"

[all:vars]
ansible_python_interpreter=/usr/bin/python3
EOF

Expand Down
153 changes: 153 additions & 0 deletions playbooks/deploy-azure.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
---
- hosts: cloud
gather_facts: false
become: false
vars:
test_os: "{{ lookup('env', 'TEST_OS') | default('centos-stream-9', true) }}"
arch: "{{ lookup('env', 'ARCH') | default('x86_64', true) }}"
ssh_key_pub: ""
inventory_file: ""
download_node: "{{ lookup('env', 'DOWNLOAD_NODE') | default('', true) }}"
rg_image: "bootc-images"
vm_size:
x86_64: Standard_D2ads_v5
aarch64: Standard_D2pds_v5

tasks:
- set_fact:
random_num: "{{ 9999 | random(start=1001) }}"
- set_fact:
rg_name: "bootc-{{ random_num }}"

- name: Read ssh_key_pub content
command: cat "{{ ssh_key_pub }}"
register: out

- set_fact:
ssh_pubkey_content: "{{ out.stdout }}"

- name: List images by resource group
azure_rm_image_info:
resource_group: 'bootc-images'
tags:
- project:bootc
- test_os:{{ test_os }}
- arch:{{ arch }}
register: result_image

- name: Image name
set_fact:
image: "{{ result_image.images[0].name }}"

- debug:
var: image

- name: Create resource group
azure.azcollection.azure_rm_resourcegroup:
name: "{{ rg_name }}"
location: eastus

- name: Create virtual network
azure.azcollection.azure_rm_virtualnetwork:
resource_group: "{{ rg_name }}"
name: "{{ rg_name }}_vnet"
address_prefixes: "172.30.0.0/16"

- name: Add subnet
azure.azcollection.azure_rm_subnet:
resource_group: "{{ rg_name }}"
name: "{{ rg_name }}_subnet"
address_prefix: "172.30.30.0/24"
virtual_network: "{{ rg_name }}_vnet"

- name: Create public IP address
azure.azcollection.azure_rm_publicipaddress:
resource_group: "{{ rg_name }}"
name: "{{ rg_name }}_ip"
allocation_method: Static
register: output_ip_address

- name: Public IP of VM
set_fact:
instance_ip: "{{ output_ip_address.state.ip_address }}"

- name: Create Network Security Group that allows SSH
azure.azcollection.azure_rm_securitygroup:
resource_group: "{{ rg_name }}"
name: "{{ rg_name }}_sg"
rules:
- name: SSH
protocol: Tcp
destination_port_range: 22
access: Allow
priority: 1001
direction: Inbound

- name: Create virtual network interface card
azure.azcollection.azure_rm_networkinterface:
resource_group: "{{ rg_name }}"
name: "{{ rg_name }}_nic"
virtual_network: "{{ rg_name }}_vnet"
subnet: "{{ rg_name }}_subnet"
public_ip_name: "{{ rg_name }}_ip"
security_group: "{{ rg_name }}_sg"

- name: Create VM
azure.azcollection.azure_rm_virtualmachine:
resource_group: "{{ rg_name }}"
name: bootc-{{ test_os }}-{{ random_num }}
vm_size: "{{ vm_size[arch] }}"
priority: Spot
os_type: Linux
storage_container_name: osdisk
network_interface_names: "{{ rg_name }}_nic"
os_disk_size_gb: 64
boot_diagnostics:
enabled: yes
type: managed
image:
resource_group: "{{ rg_image }}"
name: "{{ image }}"
admin_username: cloud-user
ssh_password_enabled: false
ssh_public_keys:
- path: /home/cloud-user/.ssh/authorized_keys
key_data: "{{ ssh_pubkey_content }}"
register: test_vm

- debug:
var: test_vm

- debug:
var: instance_ip

- name: waits until instance is reachable
wait_for:
host: "{{ instance_ip }}"
port: 22
search_regex: OpenSSH
delay: 10
retries: 30
register: result_ssh_check
until: result_ssh_check is success

- name: add instance ip into host group guest
add_host:
name: "{{ instance_ip }}"
groups: guest

- name: Write instance ip to inventory file
community.general.ini_file:
path: "{{ inventory_file }}"
section: guest
option: guest ansible_host
value: "{{ instance_ip }}"
no_extra_spaces: true

- name: Write resource group to inventory file
community.general.ini_file:
path: "{{ inventory_file }}"
section: cloud:vars
option: rg_name
value: "{{ rg_name }}"
no_extra_spaces: true
10 changes: 10 additions & 0 deletions playbooks/remove.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,13 @@
- name: "cancel beaker job {{ job_id }}"
command: bkr job-cancel "{{ job_id }}"
when: platform == "beaker"

- name: Remove Azure resources
block:
- name: "Delete resource group {{ rg_name }}"
azure.azcollection.azure_rm_resourcegroup:
name: "{{ rg_name }}"
location: eastus
force_delete_nonempty: yes
state: absent
when: platform == "azure"
6 changes: 5 additions & 1 deletion tmt/plans/bib-image.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ prepare:
- unzip
- how: shell
script: |
python3 -m venv /root/venv
. /root/venv/bin/activate
pip install boto3 botocore openstacksdk
ansible-galaxy collection install openstack.cloud community.general community.libvirt amazon.aws ansible.posix
ansible-galaxy collection install openstack.cloud community.general community.libvirt amazon.aws azure.azcollection ansible.posix
pip3 install -r ~/.ansible/collections/ansible_collections/azure/azcollection/requirements-azure.txt
deactivate
- how: shell
script: curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "awscliv2.zip" && unzip awscliv2.zip && sudo ./aws/install
execute:
Expand Down
16 changes: 15 additions & 1 deletion tmt/plans/os-replace.fmf
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ prepare:
- unzip
- how: shell
script: |
python3 -m venv /root/venv
. /root/venv/bin/activate
pip install boto3 botocore openstacksdk
ansible-galaxy collection install openstack.cloud community.general community.libvirt amazon.aws ansible.posix
ansible-galaxy collection install openstack.cloud community.general community.libvirt amazon.aws azure.azcollection ansible.posix
pip3 install -r ~/.ansible/collections/ansible_collections/azure/azcollection/requirements-azure.txt
deactivate
- how: shell
script: curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "awscliv2.zip" && unzip awscliv2.zip && sudo ./aws/install
- how: shell
Expand Down Expand Up @@ -58,6 +62,16 @@ execute:
- when: arch != x86_64 and arch != aarch64
enabled: false

/azure:
summary: Run os-replace test on azure
tag: azure
environment+:
PLATFORM: azure
LAYERED_IMAGE: azure
adjust+:
- when: arch != x86_64 and arch != aarch64
enabled: false

/libvirt:
summary: Run os-replace test locally (nested)
tag: [libvirt, stable]
Expand Down
Loading