Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRAFT: restore podman #231

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft
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
33 changes: 33 additions & 0 deletions templates.fif.json
Original file line number Diff line number Diff line change
Expand Up @@ -1432,6 +1432,39 @@
"USER_LOGIN": "false"
}
},
"podman": {
"profiles": {
"rocky-dvd-iso-x86_64-*-uefi": 30
},
"settings": {
"BOOTFROM": "c",
"HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2",
"NICTYPE": "tap",
"POSTINSTALL": "podman",
"POST_STATIC": "172.16.2.114 podman001.test.openqa.rockylinux.org",
"ROOT_PASSWORD": "weakpassword",
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%",
"USER_LOGIN": "false",
"WORKER_CLASS": "tap2"
}
},
"podman_client": {
"profiles": {
"rocky-dvd-iso-x86_64-*-uefi": 30
},
"settings": {
"BOOTFROM": "c",
"HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2",
"NICTYPE": "tap",
"PARALLEL_WITH": "podman",
"POSTINSTALL": "_podman_client",
"POST_STATIC": "172.16.2.115 podclient001.test.openqa.rockylinux.org",
"ROOT_PASSWORD": "weakpassword",
"START_AFTER_TEST": "%DEPLOY_UPLOAD_TEST%",
"USER_LOGIN": "false",
"WORKER_CLASS": "tap2"
}
},
"realmd_join_cockpit": {
"profiles": {
"rocky-dvd-iso-aarch64-*-aarch64": 30,
Expand Down
14 changes: 7 additions & 7 deletions tests/podman.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ sub run {
# check podman is installed
assert_script_run "rpm -q podman";
# check to see if you can pull an image from the registry
assert_script_run "podman pull registry.fedoraproject.org/fedora:latest", 300;
assert_script_run "podman pull docker.io/rockylinux/rockylinux:9", 300;
# run hello-world to test
validate_script_output "podman run -it registry.fedoraproject.org/fedora:latest echo Hello-World", sub { m/Hello-World/ };
validate_script_output "podman run -it docker.io/rockylinux/rockylinux:9 echo Hello-World", sub { m/Hello-World/ };
# create a Dockerfile
assert_script_run 'printf \'FROM registry.fedoraproject.org/fedora:latest\nRUN /usr/bin/dnf install -y httpd\nEXPOSE 80\nCMD ["-D", "FOREGROUND"]\nENTRYPOINT ["/usr/sbin/httpd"]\n\' > Dockerfile';
assert_script_run 'printf \'FROM docker.io/rockylinux/rockylinux:9\nRUN /usr/bin/dnf install -y httpd\nEXPOSE 80\nCMD ["-D", "FOREGROUND"]\nENTRYPOINT ["/usr/sbin/httpd"]\n\' > Dockerfile';
# Build an image
assert_script_run 'podman build -t fedora-httpd $(pwd)', 180;
assert_script_run 'podman build -t rocky-httpd $(pwd)', 180;
# Verify the image
validate_script_output "podman images", sub { m/fedora-httpd/ };
validate_script_output "podman images", sub { m/rocky-httpd/ };
# Run the container
assert_script_run "podman run -d -p 80:80 localhost/fedora-httpd";
assert_script_run "podman run -d -p 80:80 localhost/rocky-httpd";
# Verify the container is running
validate_script_output "podman container ls", sub { m/fedora-httpd/ };
validate_script_output "podman container ls", sub { m/rocky-httpd/ };
# Test apache is working
assert_script_run "curl http://localhost";
# Open the firewall, except on CoreOS where it's not installed
Expand Down