nephio-experimental / one-summit-22-workshop

Apache License 2.0
5 stars 34 forks source link

adds support for podman container runtime #140

Closed vjayaramrh closed 1 year ago

vjayaramrh commented 1 year ago

fixes: #108

Co-authored-by: @steiler

Note: Supports podman on Ubuntu 22.04 and greater only. Has been tested on Fedora 37 as well.

vjayaramrh commented 1 year ago

@henderiw @s3wong @aravind254 @johnbelamaric

vjayaramrh commented 1 year ago

@henderiw I am seeing the below and would need some help from you related to topology deployment when using clab and podman

TASK [topo/deploy : deploy topo] *********************************************************************************************************************************************************************************************************************************************** changed: [192.168.122.227] => {"changed": true, "cmd": "CLAB_RUNTIME=podman clab deploy -t /tmp/topology.yaml", "delta": "0:00:00.674656", "end": "2023-03-10 10:38:56.861160", "failed_when_result": false, "msg": "non-zero return code", "rc": 1, "start": "2023-03-10 10:38:56.186504", "stderr": "time=\"2023-03-10T10:38:56-05:00\" level=info msg=\"Containerlab v0.37.1 started\"\ntime=\"2023-03-10T10:38:56-05:00\" level=info msg=\"Parsing & checking topology file: topology.yaml\"\nError: unable to connect to Podman socket: Get \"http://d/v4.4.1/libpod/_ping\": dial unix /run//podman/podman.sock: connect: no such file or directory", "stderr_lines": ["time=\"2023-03-10T10:38:56-05:00\" level=info msg=\"Containerlab v0.37.1 started\"", "time=\"2023-03-10T10:38:56-05:00\" level=info msg=\"Parsing & checking topology file: topology.yaml\"", "Error: unable to connect to Podman socket: Get \"http://d/v4.4.1/libpod/_ping\": dial unix /run//podman/podman.sock: connect: no such file or directory"], "stdout": "", "stdout_lines": []}

vjayaramrh commented 1 year ago

@henderiw I am seeing the below and would need some help from you related to topology deployment when using clab and podman

TASK [topo/deploy : deploy topo] *********************************************************************************************************************************************************************************************************************************************** changed: [192.168.122.227] => {"changed": true, "cmd": "CLAB_RUNTIME=podman clab deploy -t /tmp/topology.yaml", "delta": "0:00:00.674656", "end": "2023-03-10 10:38:56.861160", "failed_when_result": false, "msg": "non-zero return code", "rc": 1, "start": "2023-03-10 10:38:56.186504", "stderr": "time=\"2023-03-10T10:38:56-05:00\" level=info msg=\"Containerlab v0.37.1 started\"\ntime=\"2023-03-10T10:38:56-05:00\" level=info msg=\"Parsing & checking topology file: topology.yaml\"\nError: unable to connect to Podman socket: Get \"http://d/v4.4.1/libpod/_ping\": dial unix /run//podman/podman.sock: connect: no such file or directory", "stderr_lines": ["time=\"2023-03-10T10:38:56-05:00\" level=info msg=\"Containerlab v0.37.1 started\"", "time=\"2023-03-10T10:38:56-05:00\" level=info msg=\"Parsing & checking topology file: topology.yaml\"", "Error: unable to connect to Podman socket: Get \"http://d/v4.4.1/libpod/_ping\": dial unix /run//podman/podman.sock: connect: no such file or directory"], "stdout": "", "stdout_lines": []}

Found a solution at https://stackoverflow.com/questions/72690495/interact-with-podman-docker-via-socket-in-redhat-9

steiler commented 1 year ago

I see, you found out that the RestfulAPI server needs to be up.

According to https://docs.podman.io/en/latest/_static/api.html?version=v4.4 this API would also be available via

podman system service -t 0 &

Anyways on my Ubuntu 22.04 I've installed the latest 4.4.2 via the kubic apt repo. (https://podman.io/getting-started/installation)

Then I had to unmask the podman.service and the podman.socket

systemctl unmask podman.socket
systemctl unmask podman.service

And simply start the service.

systemctl start podman.service
henderiw commented 1 year ago

lgtm