Browse Source

Merge "Move c7 mol jobs to c8" into stable/train

changes/31/751631/1
Zuul 2 weeks ago
committed by Gerrit Code Review
parent
commit
902c3c8cc0
32 changed files with 165 additions and 753 deletions
  1. +1
    -0
      bindep.txt
  2. +4
    -6
      tripleo_ansible/roles/test_deps/molecule/default/molecule.yml
  3. +1
    -0
      tripleo_ansible/roles/test_deps/tasks/main.yml
  4. +0
    -37
      tripleo_ansible/roles/tripleo-bootstrap/molecule/default/Dockerfile
  5. +24
    -50
      tripleo_ansible/roles/tripleo-bootstrap/molecule/default/molecule.yml
  6. +1
    -1
      tripleo_ansible/roles/tripleo-container-rm/defaults/main.yml
  7. +1
    -11
      tripleo_ansible/roles/tripleo-container-rm/molecule/default/molecule.yml
  8. +3
    -6
      tripleo_ansible/roles/tripleo-container-rm/molecule/default/playbook.yml
  9. +14
    -49
      tripleo_ansible/roles/tripleo-container-rm/molecule/default/prepare.yml
  10. +0
    -55
      tripleo_ansible/roles/tripleo-container-rm/molecule/docker_rm/molecule.yml
  11. +0
    -33
      tripleo_ansible/roles/tripleo-container-rm/molecule/docker_rm/playbook.yml
  12. +0
    -1
      tripleo_ansible/roles/tripleo-container-rm/molecule/docker_rm/prepare.yml
  13. +1
    -6
      tripleo_ansible/roles/tripleo-container-rm/molecule/legacy_vars/molecule.yml
  14. +1
    -6
      tripleo_ansible/roles/tripleo-container-rm/molecule/podman-rm-stopped/molecule.yml
  15. +0
    -50
      tripleo_ansible/roles/tripleo-container-rm/molecule/podman/molecule.yml
  16. +0
    -26
      tripleo_ansible/roles/tripleo-container-rm/molecule/podman/playbook.yml
  17. +0
    -48
      tripleo_ansible/roles/tripleo-container-rm/molecule/podman/prepare.yml
  18. +1
    -1
      tripleo_ansible/roles/tripleo-container-tag/defaults/main.yml
  19. +2
    -10
      tripleo_ansible/roles/tripleo-container-tag/molecule/default/molecule.yml
  20. +2
    -3
      tripleo_ansible/roles/tripleo-container-tag/molecule/default/playbook.yml
  21. +8
    -47
      tripleo_ansible/roles/tripleo-container-tag/molecule/default/prepare.yml
  22. +0
    -48
      tripleo_ansible/roles/tripleo-container-tag/molecule/podman/molecule.yml
  23. +0
    -30
      tripleo_ansible/roles/tripleo-container-tag/molecule/podman/playbook.yml
  24. +0
    -32
      tripleo_ansible/roles/tripleo-container-tag/molecule/podman/prepare.yml
  25. +0
    -37
      tripleo_ansible/roles/tripleo-module-load/molecule/default/Dockerfile
  26. +27
    -48
      tripleo_ansible/roles/tripleo-module-load/molecule/default/molecule.yml
  27. +1
    -0
      tripleo_ansible/roles/tripleo-module-load/molecule/default/prepare.yml
  28. +27
    -48
      tripleo_ansible/roles/tripleo-module-load/molecule/legacy_vars/molecule.yml
  29. +1
    -0
      tripleo_ansible/roles/tripleo-module-load/molecule/legacy_vars/prepare.yml
  30. +28
    -48
      tripleo_ansible/roles/tripleo-module-load/molecule/remove_module/molecule.yml
  31. +1
    -0
      tripleo_ansible/roles/tripleo-module-load/molecule/remove_module/prepare.yml
  32. +16
    -16
      zuul.d/molecule.yaml

+ 1
- 0
bindep.txt View File

@@ -18,6 +18,7 @@ gcc-c++ [platform:rpm]
git [platform:rpm]
libffi-devel [platform:rpm]
openssl-devel [platform:rpm]
podman [platform:rpm]
python-devel [platform:rpm !platform:rhel-8 !platform:centos-8]
python3-devel [platform:rpm !platform:rhel-7 !platform:centos-7]
PyYAML [platform:rpm !platform:rhel-8 !platform:centos-8]


+ 4
- 6
tripleo_ansible/roles/test_deps/molecule/default/molecule.yml View File

@@ -1,6 +1,6 @@
---
driver:
name: docker
name: podman

log: true

@@ -17,6 +17,8 @@ platforms:
environment: &env
http_proxy: "{{ lookup('env', 'http_proxy') }}"
https_proxy: "{{ lookup('env', 'https_proxy') }}"
ulimits: &ulimit
- host

- name: centos8
hostname: centos8
@@ -27,6 +29,7 @@ platforms:
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
environment:
<<: *env
ulimits: *ulimit

provisioner:
name: ansible
@@ -43,10 +46,5 @@ scenario:
- verify
- destroy

lint:
enabled: false

verifier:
name: testinfra
lint:
name: flake8

+ 1
- 0
tripleo_ansible/roles/test_deps/tasks/main.yml View File

@@ -61,6 +61,7 @@
state: latest

- name: Tripleo setup block
become: true
when:
- (ansible_os_family | lower) == 'redhat'
- test_deps_setup_tripleo | bool


+ 0
- 37
tripleo_ansible/roles/tripleo-bootstrap/molecule/default/Dockerfile View File

@@ -1,37 +0,0 @@
# Molecule managed
# Copyright 2019 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.


{% if item.registry is defined %}
FROM {{ item.registry.url }}/{{ item.image }}
{% else %}
FROM {{ item.image }}
{% endif %}

RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install sudo python*-devel python*-dnf bash {{ item.pkg_extras | default('') }} && dnf clean all; \
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl python-setuptools bash {{ item.pkg_extras | default('') }} && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml {{ item.pkg_extras | default('') }} && zypper clean -a; \
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates {{ item.pkg_extras | default('') }}; \
elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates {{ item.pkg_extras | default('') }} && xbps-remove -O; fi

{% for pkg in item.easy_install | default([]) %}
# install pip for centos where there is no python-pip rpm in default repos
RUN easy_install {{ pkg }}
{% endfor %}


CMD ["sh", "-c", "while true; do sleep 10000; done"]

+ 24
- 50
tripleo_ansible/roles/tripleo-bootstrap/molecule/default/molecule.yml View File

@@ -1,71 +1,45 @@
---
driver:
name: docker
name: delegated
options:
managed: false
login_cmd_template: >-
ssh
-o UserKnownHostsFile=/dev/null
-o StrictHostKeyChecking=no
-o Compression=no
-o TCPKeepAlive=yes
-o VerifyHostKeyDNS=no
-o ForwardX11=no
-o ForwardAgent=no
{instance}
ansible_connection_options:
ansible_connection: ssh

log: true

platforms:
- name: centos7
hostname: centos7
image: centos:7
dockerfile: Dockerfile
pkg_extras: python-setuptools
easy_install:
- pip
environment: &env
http_proxy: "{{ lookup('env', 'http_proxy') }}"
https_proxy: "{{ lookup('env', 'https_proxy') }}"
command: /sbin/init
tmpfs:
- /run
- /tmp
capabilities:
- ALL # CENT7 requires all due to the age of the software
volumes:
- /run/udev:/run/udev:ro
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro

- name: centos8
hostname: centos8
image: centos:8
dockerfile: Dockerfile
pkg_extras: python*-setuptools NetworkManager
environment:
http_proxy: "{{ lookup('env', 'http_proxy') }}"
https_proxy: "{{ lookup('env', 'https_proxy') }}"
command: /sbin/init
privileged: true
tmpfs:
- /run
- /tmp
capabilities:
- SYS_ADMIN
volumes:
- /run/udev:/run/udev:ro
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /etc/ci/mirror_info.sh:/etc/ci/mirror_info.sh:ro
- name: instance

provisioner:
name: ansible
inventory:
hosts:
all:
hosts:
instance:
ansible_host: localhost
log: true
env:
ANSIBLE_STDOUT_CALLBACK: yaml
ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}"
ANSIBLE_FILTER_PLUGINS: "${ANSIBLE_FILTER_PLUGINS:-/usr/share/ansible/plugins/filter}"

scenario:
test_sequence:
- destroy
- create
- prepare
- converge
- check
- verify
- destroy

lint:
enabled: false

verifier:
name: testinfra
lint:
name: flake8

+ 1
- 1
tripleo_ansible/roles/tripleo-container-rm/defaults/main.yml View File

@@ -26,7 +26,7 @@
# is no longer in use.
#
# Set the container command line entry-point
tripleo_container_cli: "{{ container_cli | default('docker') }}"
tripleo_container_cli: "{{ container_cli | default('podman') }}"

# List of containers to delete
tripleo_containers_to_rm: "{{ containers_to_rm | default([]) }}"

+ 1
- 11
tripleo_ansible/roles/tripleo-container-rm/molecule/default/molecule.yml View File

@@ -23,10 +23,6 @@ platforms:

provisioner:
name: ansible
config_options:
defaults:
fact_caching: jsonfile
fact_caching_connection: /tmp/molecule/facts
inventory:
hosts:
all:
@@ -36,20 +32,14 @@ provisioner:
log: true
env:
ANSIBLE_STDOUT_CALLBACK: yaml
ANSIBLE_ROLES_PATH: "${ANSIBLE_ROLES_PATH}:${HOME}/zuul-jobs/roles"
ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}"
ANSIBLE_FILTER_PLUGINS: "${ANSIBLE_FILTER_PLUGINS:-/usr/share/ansible/plugins/filter}"

scenario:
name: default
test_sequence:
- prepare
- converge
- check

lint:
enabled: false

verifier:
name: testinfra
lint:
name: flake8

+ 3
- 6
tripleo_ansible/roles/tripleo-container-rm/molecule/default/playbook.yml View File

@@ -21,9 +21,6 @@
roles:
- role: tripleo-container-rm
tripleo_containers_to_rm:
- docker-container1
- docker-container2
tripleo_container_cli: docker

vars:
ansible_python_interpreter: "{{ ansible_user_dir }}/test-python/bin/python"
- podman-container1
- podman-container2
tripleo_container_cli: podman

+ 14
- 49
tripleo_ansible/roles/tripleo-container-rm/molecule/default/prepare.yml View File

@@ -19,58 +19,23 @@
hosts: all
become: true
gather_facts: true
pre_tasks:
- name: Check for docker cli
command: "command -v docker"
register: docker_cli
failed_when: false
changed_when: false

- name: Check for docker connection
command: "docker ps"
register: docker_ps
failed_when: false
changed_when: false

- name: set basic user fact
set_fact:
ansible_user: "{{ lookup('env', 'USER') }}"
when:
- ansible_user is undefined

- name: set basic home fact
set_fact:
ansible_user_dir: "{{ lookup('env', 'HOME') }}"
when:
- ansible_user_dir is undefined
vars:
required_packages:
- podman
roles:
- role: test_deps
- role: ensure-docker
when:
- (docker_cli.rc != 0) or
(docker_ps.rc != 0)
post_tasks:
- name: Install docker-sdk
pip:
name: docker
virtualenv: "{{ ansible_user_dir }}/test-python"
virtualenv_site_packages: true
- name: Install podman
become: true
package:
name: "{{ required_packages }}"
state: latest

- name: pull an image
docker_image:
name: fedora
source: pull
vars:
ansible_python_interpreter: "{{ ansible_user_dir }}/test-python/bin/python"
- name: Pull container image
command: "podman pull centos:8"

- name: Create a data container
docker_container:
name: "{{ item }}"
image: fedora
detach: true
command: sleep 1d
- name: Create test containers
command: "podman run -itd --systemd true --name {{ item }} fedora bash"
with_items:
- docker-container1
- docker-container2
vars:
ansible_python_interpreter: "{{ ansible_user_dir }}/test-python/bin/python"
- podman-container1
- podman-container2

+ 0
- 55
tripleo_ansible/roles/tripleo-container-rm/molecule/docker_rm/molecule.yml View File

@@ -1,55 +0,0 @@
---
driver:
name: delegated
options:
managed: false
login_cmd_template: >-
ssh
-o UserKnownHostsFile=/dev/null
-o StrictHostKeyChecking=no
-o Compression=no
-o TCPKeepAlive=yes
-o VerifyHostKeyDNS=no
-o ForwardX11=no
-o ForwardAgent=no
{instance}
ansible_connection_options:
ansible_connection: ssh

log: true

platforms:
- name: instance

provisioner:
name: ansible
config_options:
defaults:
fact_caching: jsonfile
fact_caching_connection: /tmp/molecule/facts
inventory:
hosts:
all:
hosts:
instance:
ansible_host: localhost
log: true
env:
ANSIBLE_STDOUT_CALLBACK: yaml
ANSIBLE_ROLES_PATH: "${ANSIBLE_ROLES_PATH}:${HOME}/zuul-jobs/roles"
ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}"

scenario:
name: docker
test_sequence:
- prepare
- converge
- check

lint:
enabled: false

verifier:
name: testinfra
lint:
name: flake8

+ 0
- 33
tripleo_ansible/roles/tripleo-container-rm/molecule/docker_rm/playbook.yml View File

@@ -1,33 +0,0 @@
---
# Copyright 2019 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.


# NOTE(Cloudnull): This role is a linked role to `tripleo-container-rm`. This role and exists
# to ensure we're providing a stable interface as we transition. In a future
# release this link will be removed in favor of using the stable role,
# `tripleo-container-rm`.
- name: Converge
become: true
hosts: all
roles:
- role: tripleo-docker-rm
container_cli: docker
containers_to_rm:
- docker-container1
- docker-container2

vars:
ansible_python_interpreter: "{{ ansible_user_dir }}/test-python/bin/python"

+ 0
- 1
tripleo_ansible/roles/tripleo-container-rm/molecule/docker_rm/prepare.yml View File

@@ -1 +0,0 @@
../default/prepare.yml

+ 1
- 6
tripleo_ansible/roles/tripleo-container-rm/molecule/legacy_vars/molecule.yml View File

@@ -32,8 +32,8 @@ provisioner:
log: true
env:
ANSIBLE_STDOUT_CALLBACK: yaml
ANSIBLE_ROLES_PATH: "${ANSIBLE_ROLES_PATH}:${HOME}/zuul-jobs/roles"
ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}"
ANSIBLE_FILTER_PLUGINS: "${ANSIBLE_FILTER_PLUGINS:-/usr/share/ansible/plugins/filter}"

scenario:
test_sequence:
@@ -41,10 +41,5 @@ scenario:
- converge
- check

lint:
enabled: false

verifier:
name: testinfra
lint:
name: flake8

+ 1
- 6
tripleo_ansible/roles/tripleo-container-rm/molecule/podman-rm-stopped/molecule.yml View File

@@ -32,8 +32,8 @@ provisioner:
log: true
env:
ANSIBLE_STDOUT_CALLBACK: yaml
ANSIBLE_ROLES_PATH: "${ANSIBLE_ROLES_PATH}:${HOME}/zuul-jobs/roles"
ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}"
ANSIBLE_FILTER_PLUGINS: "${ANSIBLE_FILTER_PLUGINS:-/usr/share/ansible/plugins/filter}"

scenario:
test_sequence:
@@ -41,10 +41,5 @@ scenario:
- converge
- check

lint:
enabled: false

verifier:
name: testinfra
lint:
name: flake8

+ 0
- 50
tripleo_ansible/roles/tripleo-container-rm/molecule/podman/molecule.yml View File

@@ -1,50 +0,0 @@
---
driver:
name: delegated
options:
managed: false
login_cmd_template: >-
ssh
-o UserKnownHostsFile=/dev/null
-o StrictHostKeyChecking=no
-o Compression=no
-o TCPKeepAlive=yes
-o VerifyHostKeyDNS=no
-o ForwardX11=no
-o ForwardAgent=no
{instance}
ansible_connection_options:
ansible_connection: ssh

log: true

platforms:
- name: instance

provisioner:
name: ansible
inventory:
hosts:
all:
hosts:
instance:
ansible_host: localhost
log: true
env:
ANSIBLE_STDOUT_CALLBACK: yaml
ANSIBLE_ROLES_PATH: "${ANSIBLE_ROLES_PATH}:${HOME}/zuul-jobs/roles"
ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}"

scenario:
test_sequence:
- prepare
- converge
- check

lint:
enabled: false

verifier:
name: testinfra
lint:
name: flake8

+ 0
- 26
tripleo_ansible/roles/tripleo-container-rm/molecule/podman/playbook.yml View File

@@ -1,26 +0,0 @@
---
# Copyright 2019 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.


- name: Converge
become: true
hosts: all
roles:
- role: tripleo-container-rm
tripleo_container_cli: podman
tripleo_containers_to_rm:
- podman-container1
- podman-container2

+ 0
- 48
tripleo_ansible/roles/tripleo-container-rm/molecule/podman/prepare.yml View File

@@ -1,48 +0,0 @@
---
# Copyright 2019 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.


- name: Prepare
hosts: all
become: true
gather_facts: true
vars:
required_packages:
- podman
roles:
- role: test_deps
post_tasks:
- name: Install podman
become: true
package:
name: "{{ required_packages }}"
state: latest

- name: Pull container image
podman_image:
name: fedora

- name: Create test containers
podman_container:
name: "{{ item }}"
interactive: true
tty: true
detach: true
image: fedora
command: bash
with_items:
- podman-container1
- podman-container2

+ 1
- 1
tripleo_ansible/roles/tripleo-container-tag/defaults/main.yml View File

@@ -28,7 +28,7 @@
# is no longer in use.
#
# Set the container command line entry-point
tripleo_container_cli: "{{ container_cli | default('docker') }}"
tripleo_container_cli: "{{ container_cli | default('podman') }}"

# Enable or disable pulling images.
tripleo_container_pull_image: "{{ pull_image | default(true) }}"


+ 2
- 10
tripleo_ansible/roles/tripleo-container-tag/molecule/default/molecule.yml View File

@@ -23,10 +23,6 @@ platforms:

provisioner:
name: ansible
config_options:
defaults:
fact_caching: jsonfile
fact_caching_connection: /tmp/molecule/facts
inventory:
hosts:
all:
@@ -36,7 +32,8 @@ provisioner:
log: true
env:
ANSIBLE_STDOUT_CALLBACK: yaml
ANSIBLE_ROLES_PATH: "${ANSIBLE_ROLES_PATH}:${HOME}/zuul-jobs/roles"
ANSIBLE_LIBRARY: "${ANSIBLE_LIBRARY:-/usr/share/ansible/plugins/modules}"
ANSIBLE_FILTER_PLUGINS: "${ANSIBLE_FILTER_PLUGINS:-/usr/share/ansible/plugins/filter}"

scenario:
test_sequence:
@@ -44,10 +41,5 @@ scenario:
- converge
- check

lint:
enabled: false

verifier:
name: testinfra
lint:
name: flake8

+ 2
- 3
tripleo_ansible/roles/tripleo-container-tag/molecule/default/playbook.yml View File

@@ -22,10 +22,9 @@
- role: "tripleo-container-tag"
tripleo_container_image: centos:8
tripleo_container_image_latest: test-latest
tripleo_container_cli: docker
tripleo_container_pull_image: true
tripleo_container_cli: podman
- role: "tripleo-container-tag"
tripleo_container_image: centos:8
tripleo_container_image_latest: test-latest-2
tripleo_container_cli: docker
tripleo_container_cli: podman
tripleo_container_pull_image: false

+ 8
- 47
tripleo_ansible/roles/tripleo-container-tag/molecule/default/prepare.yml View File

@@ -19,53 +19,14 @@
hosts: all
become: true
gather_facts: true
pre_tasks:
- name: Check for docker cli
command: "command -v docker"
register: docker_cli
failed_when: false
changed_when: false

- name: Check for docker connection
command: "docker ps"
register: docker_ps
failed_when: false
changed_when: false

- name: set basic user fact
set_fact:
ansible_user: "{{ lookup('env', 'USER') }}"
when:
- ansible_user is undefined

- name: set basic home fact
set_fact:
ansible_user_dir: "{{ lookup('env', 'HOME') }}"
when:
- ansible_user_dir is undefined
vars:
required_packages:
- podman
roles:
- role: test_deps
- role: ensure-docker
when:
- (docker_cli.rc != 0) or
(docker_ps.rc != 0)
post_tasks:
- name: Install docker-sdk
pip:
name: docker
virtualenv: "{{ ansible_user_dir }}/test-python"
virtualenv_site_packages: true

- name: pull an image
docker_image:
name: centos:8
source: pull
vars:
ansible_python_interpreter: "{{ ansible_user_dir }}/test-python/bin/python"

- name: Create a data container
docker_container:
name: test-container
image: centos:8
vars:
ansible_python_interpreter: "{{ ansible_user_dir }}/test-python/bin/python"
- name: Install podman
become: true
package:
name: "{{ required_packages }}"
state: latest

+ 0
- 48
tripleo_ansible/roles/tripleo-container-tag/molecule/podman/molecule.yml View File

@@ -1,48 +0,0 @@
---
driver:
name: delegated
options:
managed: false
login_cmd_template: >-
ssh
-o UserKnownHostsFile=/dev/null
-o StrictHostKeyChecking=no
-o Compression=no
-o TCPKeepAlive=yes
-o VerifyHostKeyDNS=no
-o ForwardX11=no
-o ForwardAgent=no
{instance}
ansible_connection_options:
ansible_connection: ssh

log: true

platforms:
- name: instance

provisioner:
name: ansible
inventory:
hosts:
all:
hosts:
instance:
ansible_host: localhost
log: true
env:
ANSIBLE_STDOUT_CALLBACK: yaml

scenario:
test_sequence:
- prepare
- converge
- check

lint:
enabled: false

verifier:
name: testinfra
lint:
name: flake8

+ 0
- 30
tripleo_ansible/roles/tripleo-container-tag/molecule/podman/playbook.yml View File

@@ -1,30 +0,0 @@
---
# Copyright 2019 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.


- name: Converge
hosts: all
become: true
roles:
- role: "tripleo-container-tag"
tripleo_container_image: centos:8
tripleo_container_image_latest: test-latest
tripleo_container_cli: podman
- role: "tripleo-container-tag"
tripleo_container_image: centos:8
tripleo_container_image_latest: test-latest-2
tripleo_container_cli: podman
tripleo_container_pull_image: false

+ 0
- 32
tripleo_ansible/roles/tripleo-container-tag/molecule/podman/prepare.yml View File

@@ -1,32 +0,0 @@
---
# Copyright 2019 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.


- name: Prepare
hosts: all
become: true
gather_facts: true
vars:
required_packages:
- podman
roles:
- role: test_deps
post_tasks:
- name: Install podman
become: true
package:
name: "{{ required_packages }}"
state: latest

+ 0
- 37
tripleo_ansible/roles/tripleo-module-load/molecule/default/Dockerfile View File

@@ -1,37 +0,0 @@
# Molecule managed
# Copyright 2019 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.


{% if item.registry is defined %}
FROM {{ item.registry.url }}/{{ item.image }}
{% else %}
FROM {{ item.image }}
{% endif %}

RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y python sudo bash ca-certificates && apt-get clean; \
elif [ $(command -v dnf) ]; then dnf makecache && dnf --assumeyes install sudo python*-devel python*-dnf bash {{ item.pkg_extras | default('') }} && dnf clean all; \
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y python sudo yum-plugin-ovl python-setuptools bash {{ item.pkg_extras | default('') }} && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml {{ item.pkg_extras | default('') }} && zypper clean -a; \
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates {{ item.pkg_extras | default('') }}; \
elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates {{ item.pkg_extras | default('') }} && xbps-remove -O; fi

{% for pkg in item.easy_install | default([]) %}
# install pip for centos where there is no python-pip rpm in default repos
RUN easy_install {{ pkg }}
{% endfor %}


CMD ["sh", "-c", "while true; do sleep 10000; done"]

+ 27
- 48
tripleo_ansible/roles/tripleo-module-load/molecule/default/molecule.yml View File

@@ -1,69 +1,48 @@
---
driver:
name: docker
name: delegated
options:
managed: false
login_cmd_template: >-
ssh
-o UserKnownHostsFile=/dev/null
-o StrictHostKeyChecking=no
-o Compression=no
-o TCPKeepAlive=yes
-o VerifyHostKeyDNS=no
-o ForwardX11=no
-o ForwardAgent=no
{instance}
ansible_connection_options:
ansible_connection: ssh

log: true

platforms:
- name: centos7
hostname: centos7
image: centos:7
dockerfile: Dockerfile
pkg_extras: python-setuptools
easy_install:
- pip
environment: &env
http_proxy: "{{ lookup('env', 'http_proxy') }}"
https_proxy: "{{ lookup('env', 'https_proxy') }}"
command: /sbin/init
tmpfs:
- /run
- /tmp
capabilities:
- ALL
volumes:
- /dev:/dev
- /lib/modules:/lib/modules

- name: fedora28
hostname: fedora28
image: fedora:28
dockerfile: Dockerfile
pkg_extras: python*-setuptools
environment:
http_proxy: "{{ lookup('env', 'http_proxy') }}"
https_proxy: "{{ lookup('env', 'https_proxy') }}"
command: /sbin/init
privileged: true
tmpfs:
- /run
- /tmp
capabilities:
- ALL
volumes:
- /dev:/dev
- /lib/modules:/lib/modules
- name: instance

provisioner:
name: ansible
config_options:
defaults:
fact_caching: jsonfile
fact_caching_connection: /tmp/molecule/facts
inventory:
hosts:
all:
hosts:
instance:
ansible_host: localhost
log: true
env:
ANSIBLE_STDOUT_CALLBACK: yaml
ANSIBLE_ROLES_PATH: "${ANSIBLE_ROLES_PATH}:${HOME}/zuul-jobs/roles"

scenario:
test_sequence:
- destroy
- create
- prepare
- converge
- check
- verify
- destroy

lint:
enabled: false

verifier:
name: testinfra
lint:
name: flake8

+ 1
- 0
tripleo_ansible/roles/tripleo-module-load/molecule/default/prepare.yml View File

@@ -21,6 +21,7 @@
- role: test_deps
post_tasks:
- name: Install additional dependencies
become: true
package:
name: kmod
state: present

+ 27
- 48
tripleo_ansible/roles/tripleo-module-load/molecule/legacy_vars/molecule.yml View File

@@ -1,69 +1,48 @@
---
driver:
name: docker
name: delegated
options:
managed: false
login_cmd_template: >-
ssh
-o UserKnownHostsFile=/dev/null
-o StrictHostKeyChecking=no
-o Compression=no
-o TCPKeepAlive=yes
-o VerifyHostKeyDNS=no
-o ForwardX11=no
-o ForwardAgent=no
{instance}
ansible_connection_options:
ansible_connection: ssh

log: true

platforms:
- name: centos7
hostname: centos7
image: centos:7
dockerfile: Dockerfile
pkg_extras: python-setuptools
easy_install:
- pip
environment: &env
http_proxy: "{{ lookup('env', 'http_proxy') }}"
https_proxy: "{{ lookup('env', 'https_proxy') }}"
command: /sbin/init
tmpfs:
- /run
- /tmp
capabilities:
- ALL
volumes:
- /dev:/dev
- /lib/modules:/lib/modules

- name: fedora28
hostname: fedora28
image: fedora:28
dockerfile: Dockerfile
pkg_extras: python*-setuptools
environment:
http_proxy: "{{ lookup('env', 'http_proxy') }}"
https_proxy: "{{ lookup('env', 'https_proxy') }}"
command: /sbin/init
privileged: true
tmpfs:
- /run
- /tmp
capabilities:
- ALL
volumes:
- /dev:/dev
- /lib/modules:/lib/modules
- name: instance

provisioner:
name: ansible
config_options:
defaults:
fact_caching: jsonfile
fact_caching_connection: /tmp/molecule/facts
inventory:
hosts:
all:
hosts:
instance:
ansible_host: localhost
log: true
env:
ANSIBLE_STDOUT_CALLBACK: yaml
ANSIBLE_ROLES_PATH: "${ANSIBLE_ROLES_PATH}:${HOME}/zuul-jobs/roles"

scenario:
test_sequence:
- destroy
- create
- prepare
- converge
- check
- verify
- destroy

lint:
enabled: false

verifier:
name: testinfra
lint:
name: flake8

+ 1
- 0
tripleo_ansible/roles/tripleo-module-load/molecule/legacy_vars/prepare.yml View File

@@ -21,6 +21,7 @@
- role: test_deps
post_tasks:
- name: Install additional dependencies
become: true
package:
name: kmod
state: present

+ 28
- 48
tripleo_ansible/roles/tripleo-module-load/molecule/remove_module/molecule.yml View File

@@ -1,69 +1,49 @@
---
driver:
name: docker
name: delegated
options:
managed: false
login_cmd_template: >-
ssh
-o UserKnownHostsFile=/dev/null
-o StrictHostKeyChecking=no
-o Compression=no
-o TCPKeepAlive=yes
-o VerifyHostKeyDNS=no
-o ForwardX11=no
-o ForwardAgent=no
{instance}
ansible_connection_options:
ansible_connection: ssh

log: true

platforms:
- name: centos7
hostname: centos7
image: centos:7
dockerfile: Dockerfile
pkg_extras: python-setuptools
easy_install:
- pip
environment: &env
http_proxy: "{{ lookup('env', 'http_proxy') }}"
https_proxy: "{{ lookup('env', 'https_proxy') }}"
command: /sbin/init
tmpfs:
- /run
- /tmp
capabilities:
- ALL
volumes:
- /dev:/dev
- /lib/modules:/lib/modules

- name: fedora28
hostname: fedora28
image: fedora:28
dockerfile: Dockerfile
pkg_extras: python*-setuptools
environment:
http_proxy: "{{ lookup('env', 'http_proxy') }}"
https_proxy: "{{ lookup('env', 'https_proxy') }}"
command: /sbin/init
privileged: true
tmpfs:
- /run
- /tmp
capabilities:
- ALL
volumes:
- /dev:/dev
- /lib/modules:/lib/modules
- name: instance

provisioner:
name: ansible
config_options:
defaults:
fact_caching: jsonfile
fact_caching_connection: /tmp/molecule/facts
inventory:
hosts:
all:
hosts:
instance:
ansible_host: localhost
log: true
env:
ANSIBLE_STDOUT_CALLBACK: yaml
ANSIBLE_ROLES_PATH: "${ANSIBLE_ROLES_PATH}:${HOME}/zuul-jobs/roles"

scenario:
name: remove_module
test_sequence:
- destroy
- create
- prepare
- converge
- check
- verify
- destroy

lint:
enabled: false

verifier:
name: testinfra
lint:
name: flake8

+ 1
- 0
tripleo_ansible/roles/tripleo-module-load/molecule/remove_module/prepare.yml View File

@@ -21,6 +21,7 @@
- role: test_deps
post_tasks:
- name: Install additional dependencies
become: true
package:
name: kmod
state: present

+ 16
- 16
zuul.d/molecule.yaml View File

@@ -5,14 +5,14 @@
- tripleo-ansible-centos-8-molecule-aide
- tripleo-ansible-centos-8-molecule-test_deps
- tripleo-ansible-centos-8-molecule-test_package_action
- tripleo-ansible-centos-7-molecule-tripleo-bootstrap
- tripleo-ansible-centos-8-molecule-tripleo-bootstrap
- tripleo-ansible-centos-8-molecule-tuned
- tripleo-ansible-centos-8-role-addition
- tripleo-ansible-centos-8-molecule-tripleo-create-admin
- tripleo-ansible-centos-7-molecule-tripleo-module-load
- tripleo-ansible-centos-8-molecule-tripleo-module-load
- tripleo-ansible-centos-8-molecule-tripleo-ssh-known-hosts
- tripleo-ansible-centos-7-molecule-tripleo-container-tag
- tripleo-ansible-centos-7-molecule-tripleo-container-rm
- tripleo-ansible-centos-8-molecule-tripleo-container-tag
- tripleo-ansible-centos-8-molecule-tripleo-container-rm
- tripleo-ansible-centos-8-molecule-tripleo-image-serve
- tripleo-ansible-centos-8-molecule-tripleo-transfer
- tripleo-ansible-centos-7-molecule-tripleo-podman
@@ -52,14 +52,14 @@
- tripleo-ansible-centos-8-molecule-aide
- tripleo-ansible-centos-8-molecule-test_deps
- tripleo-ansible-centos-8-molecule-test_package_action
- tripleo-ansible-centos-7-molecule-tripleo-bootstrap
- tripleo-ansible-centos-8-molecule-tripleo-bootstrap
- tripleo-ansible-centos-8-molecule-tuned
- tripleo-ansible-centos-8-role-addition
- tripleo-ansible-centos-8-molecule-tripleo-create-admin
- tripleo-ansible-centos-7-molecule-tripleo-module-load
- tripleo-ansible-centos-8-molecule-tripleo-module-load
- tripleo-ansible-centos-8-molecule-tripleo-ssh-known-hosts
- tripleo-ansible-centos-7-molecule-tripleo-container-tag
- tripleo-ansible-centos-7-molecule-tripleo-container-rm
- tripleo-ansible-centos-8-molecule-tripleo-container-tag
- tripleo-ansible-centos-8-molecule-tripleo-container-rm
- tripleo-ansible-centos-8-molecule-tripleo-image-serve
- tripleo-ansible-centos-8-molecule-tripleo-transfer
- tripleo-ansible-centos-7-molecule-tripleo-podman
@@ -120,8 +120,8 @@
- job:
files:
- ^tripleo_ansible/roles/tripleo-bootstrap/.*
name: tripleo-ansible-centos-7-molecule-tripleo-bootstrap
parent: tripleo-ansible-centos-7-base
name: tripleo-ansible-centos-8-molecule-tripleo-bootstrap
parent: tripleo-ansible-centos-8-base
vars:
tripleo_role_name: tripleo-bootstrap
- job:
@@ -152,8 +152,8 @@
- job:
files:
- ^tripleo_ansible/roles/tripleo-module-load/.*
name: tripleo-ansible-centos-7-molecule-tripleo-module-load
parent: tripleo-ansible-centos-7-base
name: tripleo-ansible-centos-8-molecule-tripleo-module-load
parent: tripleo-ansible-centos-8-base
vars:
tripleo_role_name: tripleo-module-load
- job:
@@ -166,15 +166,15 @@
- job:
files:
- ^tripleo_ansible/roles/tripleo-container-tag/.*
name: tripleo-ansible-centos-7-molecule-tripleo-container-tag
parent: tripleo-ansible-centos-7-base
name: tripleo-ansible-centos-8-molecule-tripleo-container-tag
parent: tripleo-ansible-centos-8-base
vars:
tripleo_role_name: tripleo-container-tag
- job:
files:
- ^tripleo_ansible/roles/tripleo-container-rm/.*
name: tripleo-ansible-centos-7-molecule-tripleo-container-rm
parent: tripleo-ansible-centos-7-base
name: tripleo-ansible-centos-8-molecule-tripleo-container-rm
parent: tripleo-ansible-centos-8-base
vars:
tripleo_role_name: tripleo-container-rm
- job:


Loading…
Cancel
Save