Skip to content

Commit

Permalink
Fixing some typos and improve readability
Browse files Browse the repository at this point in the history
  • Loading branch information
kdubois committed May 2, 2024
1 parent dbbcfaa commit f78af50
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 28 deletions.
18 changes: 9 additions & 9 deletions documentation/modules/ROOT/pages/building-images.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ image::podman-desktop-python-app-browser.png[Podman Desktop Python App, 600]

== Getting Started with the Source Code

Let's start off with downloading the source code for the demo application, found https://github.com/redhat-developer/podman-desktop-demo[here on GitHub]. This repository contains a variety of different Podman related demo's you can try later, including Minikube, WASM, Compose, and more!
Let's start off with downloading the source code for the demo application, found https://github.com/redhat-developer/podman-desktop-demo[here on GitHub]. This repository contains a variety of different Podman related demos you can try later, including Minikube, WASM, Compose, and more!

image::podman-desktop-demo-repo.png[Podman Desktop Demo Repo, 600]

I've cloned the repository to my local machine using https://desktop.github.com/[GitHub Desktop], but today let's use the command line to clone the repository. Open up the terminal, and use the noNVC menu to copy these next two commands to your clipboard, and paste/execute them.
While you could eg. clone the repository to a local machine using https://desktop.github.com/[GitHub Desktop], today let's use the command line to clone the repository. Open up the terminal, and use the noNVC menu to copy these next two commands to your clipboard, and paste/execute them.

[.console-input]
[source,bash,subs="+macros,+attributes"]
Expand All @@ -40,7 +40,7 @@ image::podman-desktop-demo-source-code.png[Podman Desktop Demo Source Code, 600]
We're using Flask as a Python framework to serve the web application, as you can see from the `app.py` file. However, more important is the `Dockerfile` in the project directory, which is used to build the container image for the web application, like a recipe:

* *Base Image:*
** `FROM registry.access.redhat.com/ubi9/ubi:9.2-755 AS ubi-builder` (Starts with Red Hat's UBI image)
** `FROM registry.access.redhat.com/ubi9/ubi:9.2-755 AS ubi-builder` (Starts with Red Hat's https://catalog.redhat.com/software/base-images[UBI] image)

* *Build Stage:*
** `RUN ...` (Installs tools like Python)
Expand All @@ -66,11 +66,11 @@ NOTE: While this isn't a basic Dockerfile, it's a good example of a multi-stage

== Building the Container Image

Now that we've taken a look at the source code and Dockerfile, let's build the container image from directly within Podman Desktop. From the *Images* section, click the *Build* button in the top right corner.
Now that we've taken a look at the source code and Dockerfile, let's build the container image from within Podman Desktop. From the *Images* section, click the *Build* button in the top right corner.

image::podman-desktop-build-image-button.png[Podman Desktop Build Image, 600]

This will open up a new window where we can specify the Dockerfile/Containerfile, the build context, and image name. Let's select the `Dockerfile`, the build directory as `primary-podify-demo/front`, and `python-app` for the image name.
This will open up a new window where we can specify the Dockerfile (=Containerfile), the build context, and image name. Let's select the `Dockerfile`, the build directory as `primary-podify-demo/front`, and `python-app` for the image name.

NOTE: The build context is the directory where the source code and Dockerfile are located, and the Dockerfile is the recipe for building the container image. We can use Podman Desktop to easily rename/retag the image later, so don't worry too much about the image name for now.

Expand Down Expand Up @@ -98,15 +98,15 @@ quay.io/podman-desktop-demo/podify-demo-frontend:v1

image::podman-desktop-built-image-layers.png[Podman Desktop Built Image, 600]

TIP: Due to it's popularity, Podman uses the Docker Hub registry to pull images by default. However, you can authenticate other registries in the Podman Desktop *Settings > Registries*, or set defaults via the https://www.redhat.com/sysadmin/manage-container-registries[Podman registry configuration file].
TIP: Due to its popularity, Podman uses the Docker Hub registry to pull images by default. However, you can authenticate other registries in the Podman Desktop *Settings > Registries*, or set defaults via the https://www.redhat.com/sysadmin/manage-container-registries[Podman registry configuration file].

== Pulling the Redis Image

As you may have seen from the Python web application source code, we're using a Redis cache to store the number of times we've visited the webpage. Thus, if you were to start the Python web application without the Redis cache, it would crash.
As you may have seen from the Python web application source code, we're using a Redis cache to store the number of times we've visited the webpage. Redis is a popular choice for caching in containerized applications. The Python web application actually has a hard dependency on the Redis service, so if the Redis service is not available, the container would crash.

image::podman-desktop-redis-image-start.png[Podman Desktop Redis Image, 600]

Let's go ahead and pull a pre-build Redis image from Quay.io by clicking the *Pull* button from the top right corner menu. We'll be pulling an image of redis that has been build with the Red Hat UBI, with redis installed on top, which is a popular choice for caching in containerized applications.
Fortunately we can also run a Redis container next to our Python application. Let's go ahead and pull a pre-built Redis image from Quay.io by clicking the *Pull* button from the top right corner menu. We'll be pulling an image of Redis that has been built with the Red Hat https://catalog.redhat.com/software/base-images[UBI] and Redis installed on top.

[.console-input][.console-input]
[source,bash,subs="+macros,+attributes"]
Expand All @@ -116,7 +116,7 @@ quay.io/podman-desktop-demo/podify-demo-backend:v1

image::podman-desktop-redis-image-layers.png[Podman Desktop Redis Image, 600]

TIP: The Containerfile used to build the Redis image is available in the `podman-desktop-demo/primary-podify-demo/back` directory, but can also be found here. https://github.com/redhat-developer/podman-desktop-demo/blob/main/primary-podify-demo/backend/Dockerfile[here, window="_blank"].
TIP: The Dockerfile used to build the Redis image is available in the `podman-desktop-demo/primary-podify-demo/back` directory, but can also be found here. https://github.com/redhat-developer/podman-desktop-demo/blob/main/primary-podify-demo/backend/Dockerfile[here, window="_blank"].

== Next Steps

Expand Down
4 changes: 2 additions & 2 deletions documentation/modules/ROOT/pages/env-setup.adoc
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
= Taking a Look at the Workshop Environment

Again, welcome to the Podman Desktop workshop! Uou'll learn how to use link:https://podman-desktop.io[Podman Desktop] to build, run, and manage containers on your local machine. Podman Desktop provides a user-friendly graphical interface for working with link:https://podman.io/[Podman], a powerful container engine that is compatible with Docker. The workshop environment is a virtual machine that has been pre-configured with Podman Desktop and all the tools you need to complete the exercises.
Again, welcome to the Podman Desktop workshop! You'll learn how to use link:https://podman-desktop.io[Podman Desktop] to build, run, and manage containers on your local machine. Podman Desktop provides a user-friendly graphical interface for working with link:https://podman.io/[Podman], a powerful container engine that is compatible with Docker. The workshop environment is a virtual machine that has been pre-configured with Podman Desktop and all the tools you need to complete the exercises.

== Accessing the Workshop Environment

To access the workshop environment, you'll need to connect to the virtual machine using a web-based desktop environment. The virtual machine is running in the cloud and is accessible via a web browser. To connect to the virtual machine, first access the noVNC link from the workshop landing page:

image::podman-desktop-novnc-access.png[noVNC Access]

Click the noVNC link to open the web-based desktop environment in a new browser tab. You'll see a login screen where you can enter the username and password provided by the landing page. After logging in, you'll see the desktop environment, which includes a GNOME desktop environment on RHEL 9, including Podman Desktop, Firefox, and VSCode. Everything a developer needs!
Click the noVNC link to open the web-based desktop environment in a new browser tab. You'll see a login screen where you can enter the username and password provided by the landing page. After logging in, you'll see the desktop environment, which includes a GNOME desktop environment on RHEL 9, including Podman Desktop, Firefox, and VSCode. Virtually everything a developer needs!

image::podman-desktop-desktop-environment.png[Desktop Environment]

Expand Down
2 changes: 1 addition & 1 deletion documentation/modules/ROOT/pages/intro.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ include::_attributes.adoc[]

As https://podman-desktop.io[Podman Desktop] is an open source graphical tool for working with containers, let's quickly overview the concept of containers and their benefits.

NOTE: As a developer, you've likely heard about containers and their benefits, so feel free to skip this section.
NOTE: As a developer, you've likely heard about containers and their benefits. If you're already comfortable with this concept, feel free to skip this section.

== Understanding Containers

Expand Down
4 changes: 2 additions & 2 deletions documentation/modules/ROOT/pages/kubernetes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ image::podman-desktop-images-load-into-cluster.png[Podman Desktop Load Images in

=== Connecting to a Remote Kubernetes Cluster

Let's take a look, however, at how to connect to a remote Kubernetes cluster. In this workshop, we'll be using the https://developers.redhat.com/developer-sandbox[*Developer Sandbox*] extension, which allows us to provision and connect to a remote Kubernetes cluster in the cloud, with 14GB of RAM and 40GB of storage. To get started, let's install it from the *Dashboard*, or from the *Settings -> Extensions* section in Podman Desktop.
While working with a local Kubernetes instance is one way to tackle the inner loop of your development cycle, it's also quite common to work with remote dev/test clusters. Let's take a look at how we can connect to a remote Kubernetes cluster. In this workshop, we'll be using the https://developers.redhat.com/developer-sandbox[*Developer Sandbox*] extension, which allows us to provision and connect to a remote Kubernetes cluster in the cloud, with 14GB of RAM and 40GB of storage. To get started, let's install it from the *Dashboard*, or from the *Settings -> Extensions* section in Podman Desktop.

image::podman-desktop-extensions-devsandbox.png[Podman Desktop Extensions, 600]

Expand Down Expand Up @@ -131,7 +131,7 @@ NOTE: Because of the desktop environment, you won't be able to see the Kubernete

Podman Desktop provides a centralized interface for managing Kubernetes resources, including pods, services, deployments, and more. You can view and interact with Kubernetes objects directly from the Podman Desktop interface, although it's only visible once you have a connection to a Kubernetes cluster.

The *Kubernetes* inferface in Podman Desktop displays an overview of the cluster, including the number of nodes, pods, and services. You can drill down into specific namespaces and view the details of individual resources.
The *Kubernetes* interface in Podman Desktop displays an overview of the cluster, including the number of nodes, pods, and services. You can drill down into specific namespaces and view the details of individual resources.

image::podman-desktop-kubernetes-overview-dashboard.png[Podman Desktop Kubernetes Overview, 600]

Expand Down
16 changes: 9 additions & 7 deletions documentation/modules/ROOT/pages/podman-basics.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ image::podman-desktop-overview.png[Podman Desktop Overview, 600]

In addition, you can view the status of other featured extensions, such as https://developers.redhat.com/products/openshift-local/overview[OpenShift Local], https://www.docker.com/products/docker-desktop/[Docker], https://kind.sigs.k8s.io/[Kind], https://minikube.sigs.k8s.io/docs/[Minikube], https://developers.redhat.com/developer-sandbox[Developer Sandbox], and https://lima-vm.io/[Lima]. Each of these extensions can be crutial to the development of your applications and workflow.

NOTE: Because of the workshop environment, not all of these entensions may be available, but feel free to try them on your own machine afterwards!
NOTE: Because of the workshop environment, not all of these extensions may be available, but feel free to try them on your own machine afterwards!

== Containers

Expand All @@ -33,7 +33,7 @@ After creating a Pod through Podman Desktop (selecting one or more containers in

image::podman-desktop-pods-section.png[Podman Desktop Pods, 600]

After selecting a Pod, we can view the indivual containers that make up the Pod, their logs (or combined logs), and inspect the Pod details, such as the Kubernetes YAML.
After selecting a Pod, we can view the individual containers that make up the Pod, their logs (or combined logs), and inspect the Pod details, such as the Kubernetes YAML.

image::podman-desktop-pod-details.png[Podman Desktop Pod Details, 600]

Expand All @@ -43,19 +43,21 @@ image::podman-deploy-pod.gif[Podman Desktop Pod Details, 600]

== Images

The Podman Desktop images section is powerful, and allows you to pull images from registries (publicily available, or authenticated from a private registry via Settings), or build images from a Dockerfile/Containerfile.
The Podman Desktop images section is powerful, and allows you to pull images from registries (publicly available, or authenticated from a private registry via Settings), or build images from a Containerfile.

NOTE: `Containerfile` is the vendor-agnostic way to refer to the commonly known `Dockerfile`. You can use them interchangeably with Podman, and in fact you'll see both naming conventions pop up throughout this tutorial.

image::podman-desktop-images.png[Podman Desktop Images, 600]

While pulling images is fairly standard, you can select target platform architectures when building images, in addition to selecting the Dockerfile/Containerfile, and the build context directory.
While pulling images is fairly standard, you can select target platform architectures when building images, in addition to selecting the Containerfile, and the build context directory.

image::podman-desktop-build-image.png[Podman Desktop Build Image, 600]

== Kubernetes

Fairly new to Podman Desktop is the Kubernetes section, which provides a more advanced UI for working with Kubernetes clusters. We won't be taking a look at it in this workshop, but there are several other sessions and lightning talks about it at Summit!

TIP: On Linux, there isn't yet support for this feature, but soon! On older versions of Podman Desktop, you may need to enable the experimental Kubernetes UI in *Settings > Kubernetes*.
TIP: On older versions of Podman Desktop, you may need to enable the experimental Kubernetes UI in *Settings > Kubernetes*.

image::podman-desktop-kubernetes.png[Podman Desktop Kubernetes, 600]

Expand All @@ -67,9 +69,9 @@ The Settings section is where you can configure almost everything about Podman D

image::podman-desktop-settings.png[Podman Desktop Settings, 600]

TIP: There's enterprise features, such as the ability to connect to a private registry, as well as use a proxy configuration from behind a VPN.
TIP: There are enterprise features, such as proxy configuration and the ability to connect to a private registry.

One of Podman Desktop's biggest feature is the extensibility, thus you can view the included extensions, manage them, and also add new OCI & Docker Desktop extensions to Podman Desktop.
One of Podman Desktop's biggest feature is the extensibility through the use of (OCI) Extensions. In fact, Podman Desktop even supports Docker Desktop extensions. With Podman Dekstop add, view and manage OCI & Docker Desktop Extensions on the fly.

image::podman-desktop-extensions.png[Podman Desktop Extensions, 600]

Expand Down
4 changes: 2 additions & 2 deletions documentation/modules/ROOT/pages/pods.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ A new window will appear, allowing you to configure basic pod parameters. Provid

image::podman-desktop-podify-window.png[Podman Desktop Podify, 600]

TIP: You'll notice that here, you only have the option to expose the port of the Python web server container. Due to the pod's internal networking, it's not necessary to expose the Redis port externally for this application, as they can communicate using `localhost`.
TIP: You'll notice that you only have the option to expose the port of the Python web server container. Due to the pod's internal networking, it's not necessary to expose the Redis port externally for this application, as they can communicate using `localhost`.

Podman Desktop will now stop the existing containers and create a new pod that encapsulates the selected containers. To view the pod's details and manage its lifecycle, navigate to the *Pods* section in the Podman Desktop interface.

image::podman-desktop-pods-created.png[Podman Desktop Pods, 600]

Once selected, you can view the individual container logs within the pod, it's Kubernetes manifest, view the application's exposed port in the browser, or directly deploy it to a local or remote Kubernetes cluster.
Once selected, you can view the individual container logs within the pod, their Kubernetes manifest, view the application's exposed port in the browser, or directly deploy the pod to a local or remote Kubernetes cluster.

image::podman-desktop-pod-details-deploy.png[Podman Desktop Pod Details, 600]

Expand Down
Loading

0 comments on commit f78af50

Please sign in to comment.