Make sure to use Podman 4.5 or later.
Make sure to install Podman Desktop 1.0 or later.
In order to accelerate demo script, we'll use pre-built images from quay.io and pre-load them.
- Go to Devsandbox: https://developers.redhat.com/developer-sandbox
- Login with your Red Hat account
- Get the login command for the OpenShift cluster
- Run the login command in a terminal
Make sure to init with the proper image
podman machine init --image-path ./fedora-coreos-36.20220806.3.0-qemu.x86_64.qcow2
Podman Machine start
podman machine start
- Open a new browser http://podman-desktop.io
- Open another tab with Developer Sandbox and the Topology view
- Make sure you have Podman Desktop bigger and zoomed in (usually 2 levels are enough).
- Make sure to zoom in your browser as well.
- Open Podman Desktop
- Show the containers running in the Podman Machine
- Explain a little bit about the demo application we are using for the demo
For this demo, we are going to use a simple microservice which is leveraging Redis. It's a basic Quarkus hello world, which is displaying Hello World and the number of time we opened up the app. For that, we have a Quarkus app running in its container, and a Redis container running in the background.
-
Get into the details of one of the container
- Show the container logs
- Show the ability to get a shell into the container
- Show the inspect, with all the metadata of the container
-
Now let's open the application, by clicking on the small "open" icon from podman desktop
-
Show the application running in the browser and refresh it multiple times
-
Get back into Podman Desktop. And speak about the ability to run pods inside of Podman.
- Open the Pod tab from Podman Desktop
- It is empty, but now we want to turn our 2 containers running into a pod.
-
Create a pod from the container view in the Podman Desktop UI
-
Podman Desktop is showing a new page where the user can customize the creation of the Pod. Let's just get the default settings.
Wait until the pod is getting created. You'll be automatically redirected to the pod view.
-
Once on the pod, you can speak over the ability to run that pod, get details about it.
- Show the pod details
- Get back to the container view, and you can show you can still access to a terminal inside of the container running into the pod
-
Now let's open the application again, by clicking on the small "open" icon from podman desktop
-
Now, what we want to do, is to transition that pod to OpenShift!
- From the pod view, click on the "Deploy to kubernetes" button
-
Podman Desktop is showing a new page where the user can customize the deployment of the Pod to OpenShift. Let's just get the default settings.
- We can speak over the generate kube capabilities from Podman
- We have some adjustment to make sure it's going to run OpenShift. We need to create services and routes for the pod to be accessible from outside of the cluster.
- It detects the current kubernetes context
-
Run the deployment, by clicking on the button "Deploy"
- Wait until the deployment is done. You'll be have links to open the application running on OpenShift.
- On Openshift, get back to your previous tab with the Topology view. You can see the pod running on OpenShift.
- Open the Pod details
- You can click on "my pod" in the pod section, to show details of the pod
- Show running containers, access to logs, terminal
- Get back into podman desktop.
podman network create quarkus
podman run -d -p 6379:6379 --network=quarkus --name redis quay.io/podman-desktop-demo/podify-demo-backend:v1
(it is also published and public on quay.io)
podman build -t quay.io/rhdevelopers/quarkus-redis -f ./src/main/docker/Dockerfile.jvm .
podman run -d -p 8080:8080 --network=quarkus -e redis=redis --name quarkus-app quay.io/rhdevelopers/quarkus-redis
Make sure you are running a podman machine with at least CPU 2 and Memory 4GB.
Here we declare all the ports that we need for the application. It has to be done each time creating a new pod.
podman run -dt --pod new:quarkus-pod -p 6379:6379 -p 8080:8080 --name redis quay.io/podman-desktop-demo/podify-demo-backend:v1
podman run -dt --pod quarkus-pod --name quarkus-app quay.io/rhdevelopers/quarkus-redis