OpenShift Virtualization deployment
This guide describes how to deploy an Airlock Gateway VM on OpenShift Virtualization. The deployment process includes the following tasks:
- Create a golden disk image for a specific Airlock Gateway release.
- Select the VM instance type and preferences.
- Create the VM resource template and refine it with networking and Cloud Init configuration.
- Create the VM instance.
- Verify the deployment.
- Create a Service to expose the VM and enable access to the Configuration Center.
Unsupported and experimental features are listed at the end of this guide.
Scope and assumptions
This deployment guide assumes a sound understanding of managing and administering OpenShift Virtualization. It does not cover the following topics:
- installing OpenShift Virtualization
- general instructions or best practices for running virtual machine workloads
The target OpenShift cluster is assumed to be properly set up and sized to run virtual machine workloads.
Prerequisites
- OpenShift version 4.21 or later
ocOpenShift CLI utilityvirtctlutility compatible with the OpenShift version- For more information, see Red Hat documentation for using CLI tools with OpenShift Virtualization.
tarutility, GNU versiongziputility
Create the golden disk image
Download and prepare the disk image
Virtual machine images are available for all Airlock Gateway releases on the Airlock Gateway download page in Techzone. For OpenShift Virtualization, use the image labeled for the GCP cloud with the file ending .tar.gz.
To prepare the image:
- Download the GCP image of the Airlock Gateway version to be deployed, e.g.:
- Extract the raw disk image from the archive and compress it again with
gzip– e.g., for Airlock Gateway 8.5.1: This command writes the prepared image to
airlock_IMG_x64_8.5.1.raw.gz.
Create a DataSource for the golden image
- Upload the disk image to a
PersistentVolumeClaim(PVC) in the target namespace. The following command creates a PVC named
airlock-8-5-1-golden-imagein theairlock-nsnamespace and uploads the previously prepared imageairlock_IMG_x64_8.5.1.raw.gzfrom the current directory:- Verify the PVC:
- Create a
DataSourcethat references the uploaded image. The following YAML creates a DataSource based on the previously created PVC in the same namespace:
Select the VM instance type and preferences
- To determine the installation profile for the virtual machine, consult Requirements and limitations.
The CPU and memory requirements of the Red Hat standard VM instance cluster types match the Airlock Gateway installation profiles as follows:
Instance type
Airlock Gateway profile
Recommended target disk size
u1.largeSmall
80 GiB
u1.2xlargeMedium
200 GiB
u1.4xlargeLarge
200 GiB
- Use the standard Preference
linuxto create the VM resource template.
Create and refine the VM resource template
Create the basic VM resource template
Create an initial draft of the VM resource with virtctl:
This command generates a template and writes it to airlock-gateway-vm.yaml. It does not create the VM or any related OpenShift resources and defines the following configuration:
- a VM named
airlock-gatewayin theairlock-nsnamespace - instance type
u1.2xlarge, which corresponds to the Medium profile - a
DataVolumenamedairlock-gateway-dvwithsize:200Gi - a
DataVolumesource based on the previously preparedDataSourcenamedairlock8-5-1
The generated airlock-gateway-vm.yaml template looks as follows:
Before creating the VM, this template must be extended with the required networking and Cloud Init configuration, as described below.
Configure networking
Currently, only single-homed Airlock Gateway setups are supported on OpenShift Virtualization.
Add the following configuration to the generated VM resource template specifying the MAC address for which the Airlock Gateway license was issued:
Configure Cloud Init
Use Cloud Init to configure the virtual machine during the first boot.
- Prepare a Cloud Init configuration:
This configuration meets the following requirements:
- It defines the hostname and FQDN for the Airlock Gateway VM.
- It specifies the SWAP size for the selected installation profile, as described in Requirements and limitations.
- It includes the SSH public keys that are allowed to access the Airlock Gateway VM as
root.
- Add the prepared Cloud Init configuration to the VM resource template:
Create the VM instance
The final VM resource specification should now look similar to the following example:
- Create the VM:
- Wait until the
DataVolumeand VM are ready:
Verify the deployment
- Connect to the virtual machine instance console and monitor the boot process with
virtctl: - After the machine has successfully booted, establish an SSH connection with
virtctland one of the configured SSH keys:
Create a Service to expose the VM
If the VM must be reachable through Kubernetes networking, create a Service to expose the required ports. The virtual machine exposes four ports that can be made available by using a Service:
Port | Purpose |
|---|---|
| Connections to the Configuration Center |
| SSH access |
| HTTP traffic |
| HTTPS traffic |
The corresponding Service definition looks as follows:
In production environments, expose the Service by using the LoadBalancer service type or an OpenShift Route.
Restrictions
Unsupported features
The following features are not supported when running Airlock Gateway on OpenShift Virtualization:
- running the VM on ARM nodes
- active/passive setups that rely on Layer 2 connectivity for failover
Experimental features
The features listed below should work from a technical perspective, but have not been thoroughly tested on OpenShift Virtualization. They are considered experimental. There is no guarantee that a setup using these features can be successfully deployed on OpenShift. Contact the support team if one of these features is required:
- multi-homed Airlock Gateway instances
- dual-stack networking with IPv4 and IPv6 addresses
- active/active deployments