Deploy to podman Using Digital.ai Deploy
Before you Begin
This how-to demonstrates how you can leverage the Digital.ai Deploy application's DevOps as code capabilities (deployment manifest files) and deploy applications, files, and folders to a podman container. It also illustrates how you can create pods, volumes, networks, and secrets using Digital.ai Deploy manifest files. You can also map a podman host's port to a podman container's port using a manifest file.
This tutorial involves working with a variety of tools and technologies such as podman, Digital.ai Deploy, XL CLI, Digital.ai Deploy's DevOps as code repositories (YAML manifest files), and so on. You can perform this task by simply following the instructions. However, being familiar with these tools and technologies can help you considerably when you try this out in your test environment.
What's the objective?
Deploy an application, file or folder to a podman container using Digital.ai Deploy. Also, learn how to create the following podman resources using the Digital.ai Deploy YAML manifest files:
- pod
- volume
- network
- secret
What do you need?
- A GitHub account
- A Linux or Windows server (with root and Internet access) to install and work with
- Digital.ai Deploy 22.3 (or later) with xld-podman-integration.xldp plugin installed
- XL CLI 22.3 (or later)
- A Linux server (with root and Internet access) to install and work with podman
- A public IP to access the podman host
What do you have?
We have created a xebialabs-community/how-to GitHub repository that hosts the following.
- An application DAR file to create a deployment package of the web application in Digital.ai Deploy for use with this example deployment
- The environment.yaml and infrastructure.yaml manifest files to create the podman infrastructure and environment in Digital.ai Deploy
How does it work?
Here's a high-level overview of how this works. A more elaborate step-by-step is available later in this topic.
- Install podman.
- Install Digital.ai Deploy.
- Install the XL CLI.
- Install the xld-podman-integration.xldp plugin for Digital.ai Deploy.
- Fork the xebialabs-community/how-to GitHub repository.
- Update the deployment manifest files (infrastructure.yaml and environment.yaml) to connect to your podman host.
- Use the XL CLI to create the Deploy configuration items (infrastructure and environment) using the DevOps As Code YAML manifest files (infrastructure.yaml and environment.yaml).
- Import the application DAR file.
- Deploy the application to podman.
Set up Your Deploy and podman Hosts
-
Install podman on the podman host.
-
In a cloud setup, configure a public IP to access the podman host via internet.
-
Start the podman API service with the following command.
podman system service tcp:localhost:8081 --log-level=debug --time=0 -
Prepare your Digital.ai Deploy Linux host.
-
Install Digital.ai Deploy.
-
Install and configure the XL CLI.
-
Contact the Digital.ai Support and get the xld-podman-integration.xldp plugin.
-
Make sure you keep the xld-podman-integration plugin xld-podman-integration.xldp file at
<xl-deploy-server-home>/plugins/xld-officialdirectory. -
Run the following command to start your Deploy server.
run.sh -plugin-source=filesystem
-
-
Fork the xebialabs-community/how-to GitHub repository. Suppose you fork the repository to the user's home directory (for example,
/home/john). -
Update the
environment.yamlandinfrastructure.yamlmanifest files in the forked repository. Here's an example.infrastructure.yaml
apiVersion: xl-deploy/v1
kind: Infrastructure
spec:
- name: Infrastructure/localhost
type: podman.Engine
podmanHost: http://127.0.0.1:8081 # the url of your podman hostImportant: Make sure you update the
nameandpodmanHostkeys with values that suit your environment.environment.yaml
apiVersion: xl-deploy/v1
kind: Environments
spec:
- name: Environments/localEnv
type: udm.Environment
members:
- Infrastructure/localhostImportant: Make sure you update the
nameandmemberskeys with values that suit your environment. -
Use XL CLI and create the Deploy configuration items.
-
Run the following XL CLI commands to create the deployment environment and infrastructure.
xl apply -f environment.yaml
xl apply -f infrastructure.yaml


The Environment and Infrastructure configuration items are now created.
-
-
Once the infrastructure is created, check connection with the podman host.

-
Import the application DAR file.
-
Select Applications > Import > From Computer.

-
Click Browse and select the
newpodapp-1.0.darfrom the forked repo.
-
Click Import and make sure the DAR package is imported successfully.

-
Deploy Application to a podman Container
-
Hover over the deployment package, click the ellipses icon
select New > podman and click ContainerSpec.

-
Type the details of the container such as the container name, image name, and so on and click Save.
Here's an example specification for the
podman.ContainerSpec.<?xml version="1.0" encoding="UTF-8"?>
<udm.DeploymentPackage version="1.0" application="Test-Container-Spec">
<application />
<orchestrator />
<deployables>
<podman.ContainerSpec name="/newcont">
<tags />
<containerName>sample-newcontainer2505</containerName>
<image>docker.io/library/tomcat:latest</image>
<labels />
<environment />
<showLogsAfter>1</showLogsAfter>
<networks />
<dnsOptions />
<links />
<portBindings />
<volumeBindings />
</podman.ContainerSpec>
</deployables>
<applicationDependencies />
<dependencyResolution>LATEST</dependencyResolution>
<undeployDependencies>false</undeployDependencies>
<templates />
<boundTemplates />
</udm.DeploymentPackage> -
Hover over the deployment package, click the ellipses icon and select Deploy.

-
Select the target environment.

-
Click Continue.

-
Click Deploy.