Files
ironic/playbooks/metal3-ci/run.yaml
Riccardo Pittau b25a3cad60 [CI] Use bigger partition as work dir for metal3 job
In Rackspace env a bigger partition is available and configured
as /dev/xvde1 but not mounted.
We should use that as working dir for the metal3 job as the
standard one is too small and the job fails regularly when
running there.

This allows to make the metal3 job voting again.

Change-Id: I4d50b9c07367a5b1ad25887d87cf2e29ac6b4257
2025-03-11 13:34:34 +00:00

62 lines
2.1 KiB
YAML

---
- hosts: all
tasks:
- name: Define the metal3 variables
set_fact:
metal3_dev_env_src_dir: '{{ ansible_user_dir }}/metal3-dev-env'
metal3_environment:
ANSIBLE_VERBOSITY: 2
BOOT_MODE: "legacy"
CONTROL_PLANE_MACHINE_COUNT: 1
DOCKER_REGISTRY_IMAGE: "quay.io/libpod/registry:2.8"
IMAGE_OS: ubuntu
IMAGE_USERNAME: zuul
IRONIC_FROM_SOURCE: "true"
IRONIC_SOURCE: "/home/zuul/src/opendev.org/openstack/ironic"
LIBVIRT_DOMAIN_TYPE: "qemu"
# NOTE(dtantsur): we don't have enough resources to provision even
# a 2-node cluster, so only provision a control plane node.
NUM_NODES: 2
TEST_TIME_INTERVAL: 9
TEST_MAX_TIME: 200
WORKER_MACHINE_COUNT: 1
- name: Format bigger partition for /opt/metal3-dev-env if available
filesystem:
fstype: ext4
dev: /dev/xvde1
force: true
become: true
when: ansible_devices.xvde.partitions.xvde1 is defined
- name: Mount /opt/metal3-dev-env in bigger partition if available
mount:
path: /opt/metal3-dev-env
src: /dev/xvde1
fstype: ext4
state: ephemeral
boot: false
become: true
when: ansible_devices.xvde.partitions.xvde1 is defined
# TODO(dtantsur): add metal3-io/metal3-dev-env as a recognized project to
# https://opendev.org/openstack/project-config/src/commit/e15b9cae77bdc243322cee64b3688a2a43dd193c/zuul/main.yaml#L1416
- name: Clone metal3-dev-env
git:
dest: "{{ metal3_dev_env_src_dir }}"
repo: "https://github.com/metal3-io/metal3-dev-env"
- name: Build a metal3 environment
command: make
args:
chdir: "{{ metal3_dev_env_src_dir }}"
environment: "{{ metal3_environment }}"
# NOTE(rpittau) skip the tests for the time begin, they imply the presence of
# 2 nodes, 1 control plus 1 worker
# - name: Run metal3 tests
# command: make test
# args:
# chdir: "{{ metal3_dev_env_src_dir }}"
# environment: "{{ metal3_environment }}"