|
| 1 | +# SPDX-FileCopyrightText: Helmholtz Centre for Environmental Research (UFZ) |
| 2 | +# SPDX-FileCopyrightText: Helmholtz-Zentrum Dresden - Rossendorf (HZDR) |
| 3 | +# |
| 4 | +# SPDX-License-Identifier: Apache-2.0 |
| 5 | + |
| 6 | +--- |
| 7 | +dependency: |
| 8 | + name: "galaxy" |
| 9 | + options: |
| 10 | + requirements-file: "molecule/gitlab_runner/requirements.yml" |
| 11 | +driver: |
| 12 | + name: "podman" |
| 13 | +platforms: |
| 14 | + - name: "instancegitlabciopenstack1" |
| 15 | + image: "${MOLECULE_IMAGE:-ghcr.io/hifis-net/ubuntu-systemd:24.04}" |
| 16 | + pre_build_image: true |
| 17 | + override_command: false |
| 18 | + privileged: true # Required to run Docker in Podman |
| 19 | + systemd: true |
| 20 | + tty: true |
| 21 | + - name: "instancegitlabciopenstack2" |
| 22 | + image: "${MOLECULE_IMAGE:-ghcr.io/hifis-net/ubuntu-systemd:24.04}" |
| 23 | + pre_build_image: true |
| 24 | + override_command: false |
| 25 | + privileged: true # Required to run Docker in Podman |
| 26 | + systemd: true |
| 27 | + tty: true |
| 28 | +provisioner: |
| 29 | + name: "ansible" |
| 30 | + playbooks: |
| 31 | + prepare: "prepare.yml" |
| 32 | + converge: "converge.yml" |
| 33 | + inventory: |
| 34 | + hosts: |
| 35 | + all: |
| 36 | + vars: |
| 37 | + gitlab_runner_concurrent: 4 |
| 38 | + host_vars: |
| 39 | + instancegitlabciopenstack1: |
| 40 | + gitlab_runner_version: "16.11.0" |
| 41 | + gitlab_runner_deb_file: "https://packages.gitlab.com/runner/gitlab-runner/packages/{{ ansible_distribution | lower }}/{{ ansible_distribution_release | lower }}/gitlab-runner_{{ gitlab_runner_pkg_version }}_amd64.deb/download.deb" |
| 42 | + gitlab_runner_install_docker: true |
| 43 | + gitlab_runner_ssh_public_key: "test_key.pub" |
| 44 | + gitlab_runner_ssh_private_key: "test_key" |
| 45 | + gitlab_runner_sentry_dsn: "https://[email protected]/1" |
| 46 | + gitlab_runner_registry_mirrors: |
| 47 | + - "http://registry-mirror1.example" |
| 48 | + - "https://registry-mirror2.example" |
| 49 | + gitlab_runner_insecure_registries: |
| 50 | + - "registry-mirror1.example" |
| 51 | + gitlab_runner_enable_session_server: true |
| 52 | + gitlab_runner_list: |
| 53 | + - name: "test01" |
| 54 | + url: "https://gitlab.com" |
| 55 | + description: "Molecule test runner" |
| 56 | + authentication_token: "${AUTHENTICATION_TOKEN}" |
| 57 | + executor: "docker" |
| 58 | + environment: ["CI_CPUS=8", "DOCKER_TLS_CERTDIR=/certs"] |
| 59 | + docker_security_opts: ["seccomp=unconfined"] |
| 60 | + docker_volumes: ["/cache", "/certs/client"] |
| 61 | + docker_devices: ["/dev/kfd", "/dev/dri"] |
| 62 | + docker_cpus: 2 |
| 63 | + docker_gpus: "all" |
| 64 | + docker_memory: "2g" |
| 65 | + docker_image: "python:3.8" |
| 66 | + docker_network_mtu: 1442 |
| 67 | + tags: ["docker", "hifis"] |
| 68 | + locked: true |
| 69 | + limit: 10 |
| 70 | + instancegitlabciopenstack2: |
| 71 | + gitlab_runner_version: "16.11.0" |
| 72 | + gitlab_runner_install_docker: false |
| 73 | + gitlab_runner_ssh_public_key: "" |
| 74 | + gitlab_runner_ssh_private_key: "" |
| 75 | + gitlab_runner_registry_mirror: "https://registry-mirror.example" |
| 76 | + gitlab_runner_listen_address: "127.0.0.1:9252" |
| 77 | + gitlab_runner_set_default_network_opts: true |
| 78 | + gitlab_runner_list: |
| 79 | + - name: "test01" |
| 80 | + url: "https://gitlab.com" |
| 81 | + description: "Molecule test runner" |
| 82 | + authentication_token: "${AUTHENTICATION_TOKEN}" |
| 83 | + executor: "docker+machine" |
| 84 | + environment: ["CI_CPUS=8", "DOCKER_TLS_CERTDIR=/certs"] |
| 85 | + docker_volumes: ["/cache", "/certs/client", "/opt/docker/daemon.json:/etc/docker/daemon.json:ro"] |
| 86 | + docker_image: "python:3.8" |
| 87 | + docker_shm_size: 2147483648 |
| 88 | + docker_disable_cache: true |
| 89 | + tags: ["docker", "hifis"] |
| 90 | + locked: true |
| 91 | + limit: 10 |
| 92 | + machine_idle_count: 5 |
| 93 | + machine_idle_time: 7200 |
| 94 | + machine_max_builds: 4 |
| 95 | + machine_max_growth_rate: 2 |
| 96 | + machine_driver: "openstack" |
| 97 | + machine_name: "auto-scale-%s" |
| 98 | + machine_options: |
| 99 | + - "openstack-auth-url=https://openstack.example:5000/v3" |
| 100 | + - "openstack-image-id=73f07dd3-fa8b-468f-b6bc-b0cd4510f5d0" |
| 101 | + - "openstack-flavor-name=m1.small" |
| 102 | + - "openstack-net-id=7834deeb-8bd5-4fc7-b35b-24035d8f47a7" |
| 103 | + - "openstack-username=gitlab-runner" |
| 104 | + - "openstack-password=secret" |
| 105 | + - "openstack-tenant-id=123456" |
| 106 | + - "openstack-domain-name=default" |
| 107 | + - "openstack-ssh-user=core" |
| 108 | + - "openstack-sec-groups=Internal" |
| 109 | + - "openstack-keypair-name=runners-internal" |
| 110 | + - "openstack-private-key-file=/etc/gitlab-runner/gitlab_runner_key" |
| 111 | + - "openstack-user-data-file=/etc/gitlab-runner/ignition.json" |
| 112 | + - "openstack-active-timeout=300" |
| 113 | + - "engine-registry-mirror=https://registry-mirror.example" |
| 114 | + cache_type: "s3" |
| 115 | + cache_server_address: "https://cache.example" |
| 116 | + cache_access_key: "key" |
| 117 | + cache_secret_key: "secret" |
| 118 | + cache_bucket_name: "bucket" |
| 119 | + cache_bucket_location: "eu-west-1" |
| 120 | + cache_insecure: "false" |
| 121 | +verifier: |
| 122 | + name: "ansible" |
| 123 | +scenario: |
| 124 | + name: "gitlab_runner" |
| 125 | + test_sequence: |
| 126 | + - "destroy" |
| 127 | + - "dependency" |
| 128 | + - "syntax" |
| 129 | + - "create" |
| 130 | + - "prepare" |
| 131 | + - "check" |
| 132 | + - "converge" |
| 133 | + - "idempotence" |
| 134 | + - "check" |
| 135 | + - "side_effect" |
| 136 | + - "verify" |
| 137 | + - "destroy" |
0 commit comments