Skip to main content

3 posts tagged with "containers"

View All Tags

Using CNCF projects with Podman Desktop

· 3 min read
Charlie Drage
Software Engineer

plane

Podman Desktop serves as a powerful tool for managing and visualizing cloud-native applications and can interact seamlessly with a range of CNCF (Cloud Native Computing Foundation) projects.

It's an accessible platform for developers working with single-container applications, multi-container configurations with Compose files, and complex, distributed applications on Kubernetes clusters.

Key features of Podman Desktop for CNCF projects

Podman Desktop brings together three powerful features for managing small to large-scale projects:

  • Container Management: Supports creating, running, and monitoring containers.
  • Compose Support: Allows you to deploy applications defined in Compose files. This is particularly useful for managing applications that require multiple services, such as web servers, databases, and caches.
  • Kubernetes Integration: Offers tools to manage multi-node Kubernetes clusters, making it ideal for handling more complex distributed applications that need orchestration across several pods and services. You can setup your own development cluster with Podman Desktop using our Minikube or Kind extensions.

Minikube

Minikube is a local Kubernetes development cluster which allows for an easy way to learn and develop for Kubernetes.

Minikube can be seamlessly integrated with Podman Desktop, enabling Kubernetes development workflows within Podman’s environment. This is made possible by installing the Minikube extension, which allows creating, managing, and deploying clusters directly from the Podman Desktop.

The following video provides a complete guide from installation to cluster creation:

Backstage

Backstage is an open-source platform for building developer portals, designed by Spotify. It empowers engineering teams to create customized, centralized hubs for managing and documenting their services, applications, and infrastructure. Backstage’s extensible architecture includes features for cataloging software components, organizing documentation, managing cloud resources, and tracking workflows.

A popular method for deploying Backstage is through a Helm chart. Once deployed, you can view Backstage’s services in the Kubernetes Dashboard to monitor components and ensure proper configuration:

backstage services

You can also access your deployed Backstage instance by using Podman Desktop's port forwarding feature. This feature allows you to securely forward a local port to the Backstage service running on your Kubernetes cluster, making it easy to access the instance from a local browser.

backstage port forward

Dapr

Dapr (Distributed Application Runtime) is an open-source, event-driven runtime designed to help developers build resilient, stateless, and stateful applications that can run seamlessly on cloud or edge environments.

Dapr abstracts the complexities of distributed systems, offering building blocks for service invocation, state management, publish/subscribe messaging, and resource bindings, which simplify the development of microservices and cloud-native applications.

Dapr can be deployed in a local environment using Podman by following their self-hosted podman setup.

To initialize Dapr with Podman after installing the Dapr CLI, execute the following command:

$ dapr init --container-runtime podman

Once initialized, you can manage and interact with Dapr directly within Podman Desktop:

dapr

Additionally, Podman Desktop provides a "Launch Browser" button, allowing quick and convenient access to the Dapr UI for monitoring and management:

dapr browser

Conclusion

Whether you’re managing Kubernetes clusters, harnessing the power of Backstage for developer portals, or deploying microservices with Dapr, Podman Desktop provides a unified environment to streamline your workflows.

Check out the list of graduate and incubating projects to discover even more possibilities with Podman Desktop.

Podman Desktop Wins 2024 DEVIES Award

· 2 min read
Cedric Clyburn
Developer Advocate

We’re honored to announce that Podman Desktop has been recognized with the prestigious 2024 DEVIES Award in the category of Containers & Kubernetes. This award is a testimony to the effectiveness of the Podman Desktop team and greater open-source community's efforts to help developers. Podman Desktop increases developer container workflow efficiency as well as provides an easy transition of applications from containers to Kubernetes, the leading open-source container orchestration platform.

“While Podman Desktop only went into general availability last year, the community response has been very impressive and incredibly gratifying. We are extremely proud to receive this outstanding recognition which celebrates passion, commitment and innovation for shaping the future of container development backed by the vibrant open-source standards that Red Hat supports. ” said Stévan Le Meur, Product Manager on the Podman Desktop team.

hero

What are the DEVIES awards?

The DEVIES Awards, presented by DeveloperWeek, recognize the most innovative and impactful tools, platforms, and technologies in the software development community. Podman Desktop's win as the best innovation in Containers & Kubernetes highlights its significant impact on the industry and its role in revolutionizing the way developers build, ship, and run their applications. DEVIES Award winners are selected from hundreds of nominees by the independent, industry-leading DevNetwork Advisory Board.

Join us in celebrating!

We’re excited to be receiving this award on stage at DeveloperWeek 2024, happening on February 21-23, 2024, in Oakland, CA and February 27-29, 2024 (Virtually). In addition, Red Hat developer advocate Cedric Clyburn will be presenting a session on Podman Desktop, titled “Going from Containers, to Pods, to Kubernetes – Help for Your Developer Environments!”, with a full presentation on Podman, a demonstration of the Podman Desktop experience, and a multi-tier application going from containers, to pods, to finally Kubernetes!

Finally, it would be seal-y to not include and acknowledge that this award was earned by the entire Podman Desktop community of contributors! We also thank the DevNetwork Advisory Board and DeveloperWeek for this honorable award, and for the opportunity to share Podman Desktop's innovations with the greater developer community.

Getting started with Compose on Podman Desktop

· 5 min read
Charlie Drage
Software Engineer

In this blog post we will learn how take a multi-container Compose application and use it within Podman Desktop.

Objectives

  • Start the Compose YAML through podman compose up.
  • View the guestbook web application.
  • Confirm the web application is being synchronized and running correctly with the database.
  • Use Podman Desktop to view, inspect and access the terminal of the Redis cluster.

What is Compose

Compose is a specification for defining and running multi-container Docker applications. With pose, you use a YAML file to configure your application’s services, networks, and volumes. This allows you to capture in a single file the entire configuration necessary to run a set of interconnected containers as an application. For example, if you have an application that requires a web server, a database, and a caching service, you can define these components and their relationships in your Compose file.

To use the Compose YAML, you can use a specification implementation such as podman compose and docker compose.

Before we begin

If you do not have Compose installed, let's go through the onboarding process to install the Compose implementation binary:

  1. Get to Resources under Settings > Resources.
  2. Click Setup under Compose (it will appear if it has not been installed yet).
  3. Go through the onboarding process.

Onboarding process

Confirm that you are able to run podman compose:

podman compose
Run compose workloads via an external provider such as docker-compose or podman-compose

Description:
This command is a thin wrapper around an external compose provider such as docker-compose or podman-compose. This means that podman compose is executing another tool that implements the compose functionality but sets up the environment in a way to let the compose provider communicate transparently with the local Podman socket. The specified options as well the command and argument are passed directly to the compose provider.
...

Download and run the example application

Our example application is located at github.com/redhat-developer/podman-desktop-demo.

We will use git clone so we can build the Go binary web application:

git clone https://github.com/redhat-developer/podman-desktop-demo
cd podman-desktop-demo/guestbook-compose

Run podman compose up -d to start the application:

podman compose up -d
>>>> Executing external compose provider "/usr/local/bin/docker-compose". Please refer to the documentation for details. <<<<

[+] Running 3/3
✔ Container redis-replica Started 0.0s
✔ Container web Started 0.0s
✔ Container redis-leader Started 0.0s

Viewing the guestbook application

Within Podman Desktop, you can now see that all three containers are up and operational.

Click the "Open Browser" button to view the web application:

Open browser

Within the Guestbook web application, you can:

  • "Sign" the guestbook, which will write to the Redis leader and synchronize to the replicas.
  • "Read" from the guestbook, which will read from the pool of Redis replicas. This allows for readability even if the Redis leader is unavailable.
  • /env: View the container's environment variables.
  • /info: View information about the Redis cluster.

Guestbook application

Viewing and modifying the database

Using Podman Desktop, you can also access the container's terminal directly from the GUI and modify the database.

Click "Open Terminal" to access the redis-leader terminal:

Open terminal

Modify the database as if you are doing database administration:

  1. Run redis-cli within the container to access the Redis database.
  2. Type LPUSH guestbook "Hello World!" and you will see your web application update in real-time.
  3. Type DEL guestbook and you will see that your database drops the guestbook key and clears the database.

Redis CLI

Changes will reflect in real-time on the guestbook.

You can further modify the database and see the changes propagate to the Redis replicas.

For example, view the logs of the redis-replica, and you will notice that there are periodic database synchronizations as well as reads to the database:

Redis replica logs

How does it work?

A quick overview of how the architecture works in this multi-container scenario:

  • Within the Guestbook application, it looks for a database with the names redis-leader and redis-replica on port 6379.
  • Because it is a Compose application, the containers are connected on the same network. This means that a neighboring container can be network-accessible simply by its container name.

There is a set of environment variables that the web application can modify in the Compose application:

  • REDIS_LEADER: The default is redis-leader.
  • REDIS_REPLICAS: The default is redis-replica. Can be comma-separated, such as redis-replica-1,redis-replica-2.
  • REDIS_PORT: The default is 6379.
  • SERVER_PORT: The default is 8080.

Scaling more replicas

Want to scale more replicas? This can be achieved by adding an environment variable to your compose.yaml and duplicating your redis-replica entry.

Modify your compose.yaml as follows:

services:
redis-leader:
container_name: redis-leader
image: redis:latest
ports:
- '6379'

redis-replica:
container_name: redis-replica
image: redis:latest
ports:
- '6379'
command: redis-server --replicaof redis-leader 6379

redis-replica-2:
container_name: redis-replica-2
image: redis:latest
ports:
- '6379'
command: redis-server --replicaof redis-leader 6379

web:
container_name: web
build: ./web
environment:
- REDIS_REPLICAS=redis-replica1,redis-replica2
ports:
- '8080:8080'

Run podman compose up -d again to ensure the new container has been added and the new environment variable has propagated:

podman compose up -d
>>>> Executing external compose provider "/usr/local/bin/docker-compose". Please refer to the documentation for details. <<<<

[+] Running 4/4
✔ Container redis-replica-2 Started 0.0s
✔ Container redis-leader Running 0.0s
✔ Container web Started 0.0s
✔ Container redis-replica Running 0.0s