Google Distributed Cloud (GDC) air-gapped appliance provides APT packages for Ubuntu virtual machines (VM) and RPM packages for Rocky Linux VMs. GDC air-gapped appliance provides the packages from the following repositories:
| Operating system name | Operating system version | Repository name |
|---|---|---|
| Ubuntu | 20.04 | focal main |
| Rocky Linux | 8.8 | baseos and appstream |
The repository focal main includes the latest packages from the
focal-security main and the focal-updates main pockets.
These instructions show you how to set up your VM to connect to a GDC air-gapped appliance package repository, and install and update packages from the repository.
Before you begin
To use gdcloud command-line interface (CLI) commands, ensure that you have downloaded, installed,
and configured the gdcloud CLI.
All commands for GDC air-gapped appliance use the gdcloud or
kubectl CLI, and require an operating system (OS) environment.
Get the kubeconfig file path
To run commands against the Management API server, ensure you have the following resources:
Locate the Management API server name, or ask your Platform Administrator (PA) what the server name is.
Sign in and generate the kubeconfig file for the Management API server if you don't have one.
Use the path to replace
MANAGEMENT_API_SERVER{"</var>"}}in these instructions.
Consume packages from a GDC air-gapped appliance package repository
To consume packages from a package repository, work through the following steps:
Ubuntu
- Connect to the VM that needs to consume packages.
Check whether the APT sources point to the GDC air-gapped appliance APT package repository:
if grep -qs "http://pkg.org.internal/ubuntu" /etc/apt/sources.list; then echo "yes"; \ else echo "no"; fiIf the previous command returns
no, run the following commands to point the APT sources of the VM to the GDC air-gapped appliance APT package repository.sudo rm -f /etc/apt/sources.list sudo tee /etc/apt/sources.list << EOF # GDC repo for Ubuntu focal main packages. # The repo includes packages from focal-updates and focal-security. deb [trusted=yes] http://pkg.org.internal/ubuntu focal main EOF sudo tee /etc/cloud/cloud.cfg.d/01_gdch_apt_sources.cfg << EOF #cloud-config # Preserve the sources.list so that it points to the GDC package repo. apt: preserve_sources_list: true EOFConsume packages from the repository:
sudo apt update sudo apt install APT_PACKAGEReplace APT_PACKAGE with the name of the package the VM needs to consume.
Rocky Linux
- Connect to the VM that needs to consume packages.
Check whether the YUM sources already point to the GDC air-gapped appliance YUM package repository:
if grep -qs "http://pkg.org.internal/rocky" /etc/yum.repos.d/*; then echo "yes"; \ else echo "no"; fi noIf the previous command returns
no, run the following commands to point theyumsources of the VM to the GDC air-gapped appliance YUM package repository:sudo rm -rf /etc/yum.repos.d/* sudo tee /etc/yum.repos.d/Rocky-BaseOS-GDCH.repo << EOF # GDC repository for Rocky BaseOS packages. [baseos-gdch] name=Rocky Linux 8 - BaseOS - GDCH baseurl=http://pkg.org.internal/rocky/baseos gpgcheck=0 enabled=1 EOF sudo tee /etc/yum.repos.d/Rocky-AppStream-GDCH.repo << EOF # GDC repository for Rocky AppStream packages. [appstream-gdch] name=Rocky Linux 8 - AppStream - GDCH baseurl=http://pkg.org.internal/rocky/appstream gpgcheck=0 enabled=1 EOFConsume packages from the repository:
sudo dnf update sudo dnf install RPM_PACKAGEReplace RPM_PACKAGE with the name of the package the VM needs to consume.