Skip to content

Commit bf88bff

Browse files
committed
use podman as molecule driver
1 parent 3e44e8c commit bf88bff

File tree

21 files changed

+30
-51
lines changed

21 files changed

+30
-51
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
matrix:
2626
image:
2727
- 'centos:7'
28-
- 'rockylinux:8.5'
28+
- 'rockylinux:8.6'
2929
scenario:
3030
- test1
3131
- test1b
@@ -79,7 +79,9 @@ jobs:
7979
python-version: '3.x'
8080

8181
- name: Install test dependencies.
82-
run: pip3 install -U ansible molecule[docker] docker yamllint ansible-lint
82+
run: |
83+
pip3 install -U ansible molecule[podman] yamllint ansible-lint
84+
ansible-galaxy collection install containers.podman:>=1.10.1 # otherwise get https://github.com/containers/ansible-podman-collections/issues/428
8385
8486
- name: Display ansible version
8587
run: ansible --version
@@ -110,7 +112,9 @@ jobs:
110112
python-version: '3.x'
111113

112114
- name: Install test dependencies.
113-
run: pip3 install -U ansible molecule[docker] docker yamllint ansible-lint
115+
run: |
116+
pip3 install -U ansible molecule[podman] yamllint ansible-lint
117+
ansible-galaxy collection install containers.podman:>=1.10.1 # otherwise get https://github.com/containers/ansible-podman-collections/issues/428
114118
115119
- name: Display ansible version
116120
run: ansible --version

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This Ansible role installs packages and performs configuration to provide an Ope
66

77
As a role it must be used from a playbook, for which a simple example is given below. This approach means it is totally modular with no assumptions about available networks or any cluster features except for some hostname conventions. Any desired cluster fileystem or other required functionality may be freely integrated using additional Ansible roles or other approaches.
88

9-
The minimal image for nodes is a Centos7 or Centos8 cloud image. These use OpenHPC v1 and v2 respectively. Centos8/OpenHPCv2 is generally preferred as it provides additional functionality for Slurm, compilers, MPI and transport libraries.
9+
The minimal image for nodes is a CentOS 7 or RockyLinux 8 GenericCloud image. These use OpenHPC v1 and v2 respectively. Centos8/OpenHPCv2 is generally preferred as it provides additional functionality for Slurm, compilers, MPI and transport libraries.
1010

1111
## Role Variables
1212

molecule/README.md

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,30 +28,21 @@ test15 | 1 | N | No compute nodes.
2828

2929
Local installation on a RockyLinux 8.x machine looks like:
3030

31-
sudo yum install -y gcc python3-pip python3-devel openssl-devel python3-libselinux
32-
sudo yum install -y yum-utils
33-
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
34-
sudo yum install -y docker-ce docker-ce-cli containerd.io
35-
sudo yum install -y iptables
36-
sudo systemctl start docker
37-
sudo usermod -aG docker ${USER}
38-
sudo usermod -aG docker rocky
39-
newgrp docker
40-
docker run hello-world # test docker works without sudo
41-
31+
sudo dnf install -y podman
4232
sudo yum install -y git
4333
git clone [email protected]:stackhpc/ansible-role-openhpc.git
4434
cd ansible-role-openhpc/
45-
python3 -m venv venv
35+
python3.9 -m venv venv
4636
. venv/bin/activate
4737
pip install -U pip
4838
pip install -r molecule/requirements.txt
39+
ansible-galaxy collection install containers.podman:>=1.10.1
4940

5041
Then to run tests, e.g.::
5142

5243
cd ansible-role-openhpc/
5344
MOLECULE_IMAGE=centos:7 molecule test --all # NB some won't work as require OpenHPC v2.x (-> CentOS 8.x) features - see `.github/workflows/ci.yml`
54-
MOLECULE_IMAGE=rockylinux:8.5 molecule test --all
45+
MOLECULE_IMAGE=rockylinux:8.6 molecule test --all
5546

5647
**NB:** If the host network has an MTU smaller than 1500 (the docker default), check `molecule.yml` for the relevant test contains `DOCKER_MTU`, then prepend `DOCKER_MTU=<mtu>` to your command. If you have already run molecule you will need to destroy the instances and run `docker network prune` before retrying.
5748

molecule/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
pip
22
setuptools
3-
molecule[docker,lint,ansible]
3+
molecule[podman,lint,ansible]
44
ansible>=2.9.0

molecule/test1/molecule.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
name: single partition, group is partition
32
driver:
4-
name: docker
3+
name: podman
54
platforms:
65
- name: testohpc-login-0
76
image: ${MOLECULE_IMAGE}

molecule/test10/molecule.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
name: single partition, group is partition
32
driver:
4-
name: docker
3+
name: podman
54
platforms:
65
- name: testohpc-login-0
76
image: ${MOLECULE_IMAGE}

molecule/test11/molecule.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
name: single partition, group is partition
32
driver:
4-
name: docker
3+
name: podman
54
platforms:
65
- name: testohpc-login-0
76
image: ${MOLECULE_IMAGE}

molecule/test12/molecule.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
name: single partition, group is partition
32
driver:
4-
name: docker
3+
name: podman
54
platforms:
65
- name: testohpc-login-0
76
image: ${MOLECULE_IMAGE}

molecule/test13/molecule.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
name: single partition, group is partition
32
driver:
4-
name: docker
3+
name: podman
54
platforms:
65
- name: testohpc-control
76
image: ${MOLECULE_IMAGE}

molecule/test14/molecule.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
name: single partition, group is partition
32
driver:
4-
name: docker
3+
name: podman
54
platforms:
65
- name: testohpc-login-0
76
image: ${MOLECULE_IMAGE}

molecule/test15/molecule.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
name: single partition, group is partition
32
driver:
4-
name: docker
3+
name: podman
54
platforms:
65
- name: testohpc-control
76
image: ${MOLECULE_IMAGE}

molecule/test1b/molecule.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
---
2-
name: single partition, group is partition, single node
32
dependency:
43
name: galaxy
54
driver:
6-
name: docker
5+
name: podman
76
platforms:
87
- name: testohpc-login-0
98
image: ${MOLECULE_IMAGE}

molecule/test1c/molecule.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
name: single partition, group is partition, nonsequential names
32
driver:
4-
name: docker
3+
name: podman
54
platforms:
65
- name: testohpc-login-0
76
image: ${MOLECULE_IMAGE}

molecule/test2/molecule.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
name: 2x partitions, group is partition
32
driver:
4-
name: docker
3+
name: podman
54
platforms:
65
- name: testohpc-login-0
76
image: ${MOLECULE_IMAGE}

molecule/test3/molecule.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: 2x partitions, group is partition
33
driver:
4-
name: docker
4+
name: podman
55
platforms:
66
- name: testohpc-login-0
77
image: ${MOLECULE_IMAGE}

molecule/test4/molecule.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
name: single partition, group is partition
32
driver:
4-
name: docker
3+
name: podman
54
platforms:
65
- name: testohpc-login-0
76
image: ${MOLECULE_IMAGE}

molecule/test5/molecule.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
name: single partition, group is partition
32
driver:
4-
name: docker
3+
name: podman
54
platforms:
65
- name: testohpc-login-0
76
image: ${MOLECULE_IMAGE}

molecule/test6/molecule.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
name: single partition, group is partition
32
driver:
4-
name: docker
3+
name: podman
54
platforms:
65
- name: testohpc-login-0
76
image: ${MOLECULE_IMAGE}

molecule/test7/molecule.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
name: single partition, group is partition
32
driver:
4-
name: docker
3+
name: podman
54
platforms:
65
- name: testohpc-compute-0
76
image: ${MOLECULE_IMAGE}

molecule/test8/molecule.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
name: single partition, group is partition
32
driver:
4-
name: docker
3+
name: podman
54
platforms:
65
- name: testohpc-control
76
image: ${MOLECULE_IMAGE}

molecule/test9/molecule.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
name: single partition, group is partition
32
driver:
4-
name: docker
3+
name: podman
54
platforms:
65
- name: testohpc-control
76
image: ${MOLECULE_IMAGE}

0 commit comments

Comments
 (0)