About this task
Do not install the App Host software until
instructed in the procedure.
Procedure
- Log in as a privileged user to the system that is to host the App Host software.
- Copy the downloaded App Host,
k3s-airgap-images, and private repository self-signed cert (domain.crt) files
to this system.
- Add the private repository self-signed cert to the trust certificates.
cp <cert_file> /etc/pki/ca-trust/source/anchors
update-ca-trust extract
If it is a certificate chain, add the root certificate to trusted certs.
- If the private repository DNS name cannot be resolved, add the domain to
/etc/hosts.
192.168.xxx.1 <registry_dns_name>
- Place the
k3s-airgap-images.tar file in the images directory.
sudo mkdir -p /var/lib/rancher/k3s/agent/images/
sudo cp <k3s-airgap-images tar file> /var/lib/rancher/k3s/agent/images/
- Create the registries.yaml file.
sudo mkdir -p /etc/rancher/k3s
sudo vi /etc/rancher/k3s/registries.yaml
Make sure that there are two mirrors in the
registries.yaml file, one for
docker.io and another for
quay.io. For both mirrors, the
endpoint is the private repository URL, as shown in the following example.
mirrors:
docker.io:
endpoint:
- "<private registry URL>"
quay.io:
endpoint:
- "<private registry URL>"
configs:
"<private registry URL>":
auth:
username: xxx # this is the registry username
password: xxx # this is the registry password
tls: # if needed
cert_file: # path to the cert file used in the registry
key_file: # path to the key file used in the registry
ca_file: # path to the ca file used in the registry
- Use the procedure in Changed in 51.0.0.0 Installing the App Host stand-alone software to install the standalone
software.
- Check that all the pods are in the
running state:
- Deploy the App Host containers
with the configured private registry as described in Create an App Host pairing:
sudo manageAppHost install -p <pairing information.json> --registry <registry_URL> --user <username>
- Again, verify that all pods are in the
running state:
Results
The App Host image is successfully
installed and configured to use a private repository.
The next step is to deploy App Host
instances as described in Create an App Host pairing.