Below you will find pages that utilize the taxonomy term “Podman”
Programming Jan-April 2024
This year started off pretty light when it came to programming because I’ve been addicted to the video game Against the Storm since last winter. But I eventually started working again on various projects - some old and some new. I didn’t do any programming in January, so we’ll start in February.
February and March
Over these two months I worked on my replacement for web access to my Taskwarrior TODO list because Inthe.am had shut down. In February I got the podman containers set up - one to run the taskd server and one to run the website I’d coded up in Flask. In March I had to write some rudimentary Javascript to get the website to highlight the selected tab (Overdue, Today, This Month, etc). The rest of the interactivity on the site works using HTMX, letting me focus on Python instead of Javascript, but I just wasn’t able to get that part of the site to work without a tiny bit of Javascript. I also added some fixes because the date/time widget assumes UTC. Of course, now that I have it all working correctly and get lots of use for it (especially when I’m at work and I want to quickly get something out of my brain’s short-term buffer), Taskwarrior went to 3.0 which completely changes the way the program works, the API, and the way syncing works. I think in the end it’ll be for the best, but it’s annoying that I need to figure this out. That may involve finally learning how to use PyO3 to interact with Rust or re-writing part of my backend in Rust. We’ll have to see where that goes.
My Programming Projects and Progress in 2020
Back in 2019, when I did my programming retrospective I made a few predictions. How did those go?
- Work on my Extra Life Donation Tracker? Yup! See below!
- Write more C++ thanks to Arduino? Not so much.
- C# thanks to Unity? Yes, but not in the way I thought. I only did minor work on my game, but I did start a new GameDev.tv class.
- Learning Ruby? Well, I wouldn’t necessarily say I learned Ruby. I did finish the book Ruby Wizardry and I took copious notes. But until I do some practice - maybe via some code katas, I don’t think I’ll have solidified it in my mind.
- 3D Game Dev? Nope, not really.
- Rust and Go? Not even close. Although I did make sure to get some books on the languages.
So, what happened? On the programming front, I wanted to continue my journey to truly master Python after having used it at a surface level for the past 15ish years. I dedicated myself to doing the Python Morsels challenges (more on that below) and working through various Python development exercises. Outside of programming, the time I had off from COVID was used to play with my kids and they wanted to play lots of video games. So we took advantage of having way more time than usual to do that. So a lot of my goals slipped. We’ll get to 2021 predictions at the end, so let’s take a look at 2020!
Attempting a podman play on another VM
The podman saga continues. The podman equivalent of a docker-compose.yml can be created from a pod with the following command:
podman generate kube (name of pod) > (filename).yaml
So I did that with the pod that I’d created with an SELinux context. Now it was time to try it on another Fedora 31 VM to see if it would work. To be on the safe side, I started off creating the phpIPAM folder, chowning it to nobody and chmoding it to 777.
SELinux and Podman
Last time I messed around with Podman, I finally got things working and had what I think was a pretty good understanding of how to go forward. But in order to get things working, I’d had to turn off SELinux. Now it was time to see what I had to do to make Podman work with SELinux. I’ve got some ideas based on some Googling and might also need to try a program called udica to create the right contexts.
Second Followup to Podman and PHPIPAM
Turns out that on my Fedora 30 VM something got screwed up with the CNI networking (the networking that Podman uses) and instead of pointing to the address that Podman is using according to Cockpit:
10.88.0.1
It’s pointing somewhere else. I found that via iptables -L. Not sure how to fix it, though. When I tried, it complained:
“`87-podman-bridge.conflist’ not found”
But changing the hostname environment variable turned out to be the solution as I tested on my Fedora 31 VM:
Followup to Podman and PHPIpam
Adding the –name mysql - it wasn’t enough to get the PHPIpam apache container to find the mysql container. They’re in the same pod, but something’s not quite right. So I decided to see if I could modify the config.php by mounting the container and modifying that.
# podman mount beautiful_gauss
/var/lib/containers/storage/overlay/5a33decc2cfad7e9bda5f9048d94a814267d954e97d5dd7befb057a84367f27a/merged
While this allowed me to see the config files and open them in vi (not included in the container) I could not modify the contents. I think the key is passing “phpIPAM5” (or whatever the pod is called) into the MYSQL_ENV_MYSQL_HOST environment variable. So let’s try that. First, I had to stop phpIPAM5. I’ve been using
Every once in a while the puerile makes me laugh
Like these random container names that podman generated:
# podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b83a26bb2c5d docker.io/library/mysql:5.6 mysqld 2 minutes ago Up 2 minutes ago 0.0.0.0:8081->80/tcp hungry_wilson
f35ec64d3b3c docker.io/pierrecdn/phpipam:latest apache2-foregroun… 2 minutes ago Up 2 minutes ago 0.0.0.0:8081->80/tcp nice_johnson
Makes me think perhaps there should be a list of adjectives and names that shouldn’t go together?
Can Docker and Podman both run on the same machine?
I’ve been hearing about Podman for a while now - at Red Hat Summit and at various local Red Hat presentations. I’ve seen the slides where the RHEL presenter (it’s always the same guy, but I’m terrible with names - after a bit of research, I think it’s Dan Walsh) asks you to pledge to call them container images, not Docker images, etc. But up until now, even though I’m a huge Red Hat fan, I’ve continued to use Docker as my container engine because I am just running a few containers for myself. I don’t even use a one-machine Docker Swarm. I use docker-compose. And that’s just not something that Podman is ever going to officially support. This makes sense because Red Hat is thinking enterprise. And in the enterprise there are two scenarios: 1) Orchestration - vanilla Kubernetes, OpenShift, etc - and 2) are devs running docker run (or podman run) to test the images before putting them into the orchestrator. I’m an anti-pattern, even if I’m not the only one doing things this way.