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

Podman support #151

Merged
merged 18 commits into from
Nov 9, 2020
Merged

Podman support #151

merged 18 commits into from
Nov 9, 2020

Conversation

edigaryev
Copy link
Contributor

@edigaryev edigaryev commented Nov 9, 2020

The most simplest invocation (in the directory with the .cirrus.yml) looks like this:

cirrus run --container-backend=podman

The Podman backend will also be automatically selected when no Docker daemon is present on the host.

TestResourceLimits had to be disabled when running with Podman backend due to containers/podman#7959.

There are some things that still need to be done before this gets merged:

  • Podman socket location auto-detection
  • Rename DockerOptions to ContainerOptions and other de-Dockerizations (e.g. 'docker pull' succeeded in 4.2s)

@edigaryev
Copy link
Contributor Author

@fkorotkov what do you think about moving podmanapi package to a separate repository to avoid huge diff?

@edigaryev
Copy link
Contributor Author

Rename DockerOptions to ContainerOptions and other de-Dockerizations (e.g. 'docker pull' succeeded in 4.2s)

be8883e and 43f152d.

Podman socket location auto-detection

I'm reading the Podman's API document and thinking that we could probably combine Using the REST API with the Running as a subprocess to get the best of both worlds.

By spawning a podman system service process in containerbackend.NewPodman(), we could get a predictable socket location and provide an experience similar to what Docker does when everything works out of the box.

An additional --podman-binary flag can be provided for development purposes in case putting a custom-built podman binary in PATH is not feasible for some reason.

Copy link
Contributor

@fkorotkov fkorotkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks amazing! What do you think about an option to pass backend as an argument to run command? Something like cirrus run --backend=podman. Or we can do in the follow up PR about running podman binary instead of relying on a running podman service.

.cirrus.yml Outdated
test_script:
- wget --no-verbose -O - https://golang.org/dl/go1.15.linux-amd64.tar.gz | tar -C /usr/local -xz
- export PATH=$PATH:/usr/local/go/bin
- go test ./...
env:
HOME: /root

docker_builder:
name: Test (Podman)
alias: test-podman
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think aliass are not uniques so you can use "tests" in both tasks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed in e908393.

@edigaryev
Copy link
Contributor Author

edigaryev commented Nov 9, 2020

What do you think about an option to pass backend as an argument to run command? Something like cirrus run --backend=podman.

Added in b3b9add.

Or we can do in the follow up PR about running podman binary instead of relying on a running podman service.

This was already has been done here in a4d143c.

@edigaryev edigaryev merged commit c80fb32 into master Nov 9, 2020
@edigaryev edigaryev deleted the podman branch November 9, 2020 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants