Podman installation
Podman in beta
Note: Running Terraform Enterprise on Podman is still in beta. You should not deploy beta features in production environments! Provision a dedicated test environment before installing Terraform Enterprise on Podman. If you have questions or feedback about the Podman beta, contact your HashiCorp account representative.These instructions cover installing and running Terraform Enterprise on Podman on a RHEL 8 or RHEL 9 host using a Kubernetes pod specification. This workflow sets up rootful Podman with a non-root user, meaning that the Podman service runs as root while processes within the container run as non-root. Using a Kubernetes pod specification is our recommended workflow. However, you can deploy Terraform Enterprise on Podman using Docker Compose or other tools that integrate with Podman.
Requirements
Before you begin, ensure you meet the requirements for installing Terraform Enterprise on Podman.
Set up
Connect to the instance where you want to run Terraform Enterprise.
Create a new directory with a name of your choice. Our documentation uses
/opt/fdo
as our example directory.For mounted disk installations, navigate into the
/opt/fdo/
directory and create adata
directory. Later, you will use this directory as a volume mount to store Terraform Enterprise application data.From the
/opt/fdo/
directory, create acerts
directory and place your TLS certificate (cert.pem
), TLS private key (key.pem
), and CA certificates bundle (bundle.pem
) inside. If you don’t have a CA certificates bundle, place your TLS certificate (cert.pem
) insidebundle.pem
instead. When finished, thecerts
directory should look like this:Alongside the
certs
and optionaldata
directories, create akube.yaml
file in the/opt/fdo/
directory and populate it with your desired pod configuration. Be sure to replace values enclosed in<>
with your installation's values. For example, setTFE_HOSTNAME
to the DNS hostname you use to access Terraform Enterprise.We recommend automating the Podman requirements listed in this section. These must be in place before downloading and installing Terraform Enterprise.
Download and install image
Log in to the Terraform Enterprise container image registry, using
terraform
as the username, and your Hashicorp Terraform Enterprise license as the password:Pull the Terraform Enterprise image from the registry.
Run
Create a Terraform Enterprise pod by running the following command:
In a separate terminal session, you can monitor the logs by running the following command:
Monitor the health of the application until it starts reporting healthy with the following command:
Create initial admin user
Provision your first administrative user and start using Terraform Enterprise.
Service Management
To learn more about managing the lifecycle of Podman pods, refer to the Podman docs for more information about pods. We have included possible options for managing a pod's lifecycle on a RHEL host for convenience.
Systemd
Complete the following steps to create a systemd
service that automatically starts your pod and its containers. We recommend using Quadlet, which is an opinionated tool for running Podman containers, to deploy systemd
. Quadlet generates a systemd
service that manages the Terraform Enterprise pod and all containers, including the internal infrastructure container.
Ensure the Terraform Enterprise pod is not running.
Navigate to
/etc/containers/systemd/
. Define the service files in this directory.Create a Quadlet unit file for the Terraform Enterprise pod and container at
/etc/containers/systemd/terraform-enterprise.kube
:Copy the
kube.yaml
file to/etc/containers/systemd/kube.yaml
:Reload the
systemd
daemon and enable the service:Check the status of your service:
Kubernetes pod specification reference
Mounted disk
This Kubernetes YAML deploys Terraform Enterprise in mounted disk mode as a pod composed of a Terraform Enterprise container.
This is not an exhaustive list of configuration options. Refer to Configuration Reference for a list of all the configuration options.
This configuration uses a volume mount to store Terraform Enterprise application data. The path you specify as the source of the volume mount must exist on the instance running Terraform Enterprise. This path must be backed by durable storage as provided by your cloud provider.