cli
cli copied to clipboard
[WIP]feature/podman: Updating dapr cli to allow different container runtime
Description
This is to continue work on - https://github.com/dapr/cli/pull/948
Taken from original PR -
Adding a new argument --container-runtime to be passed during dapr init and dapr uninstall commands. This allows a user to provide a container runtime environment such as podman where in some instances docker is unavailable.
This would be used to stand up a repeatable Dapr environment with the placement, zipkin and redis containers in the desired container runtime environment.
The default container runtime is docker, therefore the behavior is unaltered unless we provide podman as the runtime.
Example:
# Install Dapr using podman as container runtime
$ dapr init --container-runtime podman
# Uninstall Dapr using podman as container runtime
$ dapr uninstall --cotnainer-runtime podman
Issue reference
Please reference the issue this PR will close: #257
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list:
- [ ] Code compiles correctly
- [ ] Created/updated tests
- [ ] Extended the documentation
@pravinpushkar Please fix failures .. Also enable e2e to run on macOS-latest with brew install podman
.
Codecov Report
Merging #1041 (bce94b2) into master (d229506) will decrease coverage by
0.10%
. The diff coverage is0.00%
.
@@ Coverage Diff @@
## master #1041 +/- ##
==========================================
- Coverage 29.34% 29.24% -0.11%
==========================================
Files 35 35
Lines 2334 2342 +8
==========================================
Hits 685 685
- Misses 1574 1582 +8
Partials 75 75
Impacted Files | Coverage Δ | |
---|---|---|
pkg/standalone/container.go | 0.00% <0.00%> (ø) |
|
pkg/standalone/standalone.go | 4.55% <0.00%> (-0.05%) |
:arrow_down: |
pkg/standalone/uninstall.go | 0.00% <0.00%> (ø) |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
@mukundansundar
With podman also, sometime podman machine start
gets stuck. But with re-run the tests couple of times, it works.
RN in the current PR I have configured the macos tests to use podman. As you can see all tests except uninstall is passing.
I am facing a peculiar issue with uninstall whereas it is passing locally but failing in github action.
@mukundansundar With podman also, sometime
podman machine start
gets stuck. But with re-run the tests couple of times, it works. RN in the current PR I have configured the macos tests to use podman. As you can see all tests except uninstall is passing. I am facing a peculiar issue with uninstall whereas it is passing locally but failing in github action.
Could this be the issue ?
$ docker rmi -f daprio/dapr
Error: No such image: daprio/dapr
$ # Exits without error
$ podman rmi -f daprio/dapr
Error: daprio/dapr: image not known
$ # Exits with error
@pravinpushkar
@mukundansundar With podman also, sometime
podman machine start
gets stuck. But with re-run the tests couple of times, it works. RN in the current PR I have configured the macos tests to use podman. As you can see all tests except uninstall is passing. I am facing a peculiar issue with uninstall whereas it is passing locally but failing in github action.Could this be the issue ?
$ docker rmi -f daprio/dapr Error: No such image: daprio/dapr $ # Exits without error $ podman rmi -f daprio/dapr Error: daprio/dapr: image not known $ # Exits with error
@pravinpushkar
Actually the issue was we are using import dockerClient "github.com/docker/docker/client"
in tests for verifying the containers and it expects api forwarding to listen on /var/run/docker.sock
but with podman api forwarding listens on /Users/runner/.local/share/containers/podman/machine/podman-machine-default/podman.sock
. There are two approach I can think of -
- There is a utility that comes with podman
podman-mac-helper install
which makes api forwarding to listen same as docker. - Using slim mode for macos tests.
I have made the changes using 1st approach i.e. podman-mac-helper install
.
@mukundansundar
Is there any update to implement this on dapr for windows as well?
Is there any update to implement this on dapr for windows as well?
Are you facing any issue while running dapr with Podman on Windows ? I believe if Podman can be installed on windows then dapr should work as expected. Kindly check Podman docs for installation on windows.