Prerequisites
DNS server NTP server TLS certificates Installed on machine running Omni- genuuid
- Used to generate a unique account ID for Omni.
- Docker
- Used for running the suite of applications
- Wireguard
- Used by Siderolink
Gathering Dependencies
In this package, we will be installing:- Gitea
- Keycloak
- Omni
NOTE: The empty directories will be used for the persistent data volumes when we deploy these apps in Docker.
Generate Certificates
TLS Certificates This tutorial will involve configuring all of the applications to be accessed via https with signed.pem
certificates generated with certbot. There are many methods of configuring TLS certificates and this guide will not cover how to generate your own TLS certificates, but there are many resources available online to help with this subject if you do not have certificates already.
Omni Certificate
Omni uses etcd to store the data for our installation and we need to give it a private key to use for encryption of the etcd database.
- First, Generate a GPG key.
quick-generate-key
allows us to quickly generate a new GPG key pair. -"Omni (Used for etcd data encryption) how-to-guide@siderolabs.com"
is the user ID associated with the key which generally consists of the real name, a comment, and an email address for the user.rsa4096
specifies the algorithm type and key size.cert
means this key can be used to certify other keys.never
specifies that this key will never expire.
- Add an encryption subkey
$FPR
with your own keys fingerprint.
$FPR
is the fingerprint of the key we are adding the subkey to.rsa4096
andencr
specify that the new subkey will be an RSA encryption key with a size of 4096 bits.never
means this subkey will never expire.
- Export the secret key
--armor
is an option which creates the output in ASCII format. Without it, the output would be binary.
Create the app.ini File
Gitea uses a configuration file named app.ini which we can use to pre-configure with the necessary information to run Gitea and bypass the intitial startup page. When we start the container, we will mount this file as a volume using Docker. Create the app.ini fileDOMAIN
, SSH_DOMAIN
, and ROOT_URL
values with your own hostname:
NOTE: If running this in a production environment, you will also want to configure the database settings for a production database. This configuration will use an internal sqlite database in the container.
Gathering Images
Next we will gather all the images needed installing Gitea, Keycloak, Omni, and the images Omni will need for creating and installing Talos. Iโll be using the following images for the tutorial: Giteadocker.io/gitea/gitea:1.19.3
Keycloakquay.io/keycloak/keycloak:21.1.1
Omnighcr.io/siderolabs/omni:v0.31.0
ghcr.io/siderolabs/imager:v1.4.5
- pull this image to match the version of Talos you would like to use. Talos
ghcr.io/siderolabs/flannel:v0.21.4
ghcr.io/siderolabs/install-cni:v1.4.0-1-g9b07505
docker.io/coredns/coredns:1.10.1
gcr.io/etcd-development/etcd:v3.5.9
registry.k8s.io/kube-apiserver:v1.27.2
registry.k8s.io/kube-controller-manager:v1.27.2
registry.k8s.io/kube-scheduler:v1.27.2
registry.k8s.io/kube-proxy:v1.27.2
ghcr.io/siderolabs/kubelet:v1.27.2
ghcr.io/siderolabs/installer:v1.4.5
registry.k8s.io/pause:3.6
NOTE: The Talos images needed may be found using the commandPackage the imagestalosctl images
. If you do not havetalosctl
installed, you may find the instructions on how to install it here.
- Pull the images to load them locally into Docker.
- Run the following command for each of the images listed above except for the Omni image which will be provided to you as an archive file already.
- Verify all of the images have been downloaded
- Save all of the images into an archive file.
- All of the images can be saved as a single archive file which can be used to load all at once on our airgapped machine with the following command.
Move Dependencies
Now that we have all the packages necessary for the airgapped deployment of Omni, weโll create a compressed archive file and move it to our airgapped network. The directory structure should look like this now:Log in Airgapped Machine
From here on out, the rest of the tutorial will take place from the airgapped machine we will be installing Omni, Keycloak, and Gitea on.Gitea
Gitea will be used as a container registry for storing our images, but also many other functionalities including Git, Large File Storage, and the ability to store packages for many different package types. For more information on what you can use Gitea for, visit their documentation.Install Gitea
Load the images we moved over. This will load all the images into Docker on the airgapped machine.- The app.ini file is already configured and mounted below with the
- v
argument.
https://${GITEA_HOSTNAME}:3000
to begin configuring Gitea to store all the images needed for Omni and Talos.
Gitea setup
This is just the bare minimum setup to run Omni. Gitea has many additional configuration options and security measures to use in accordance with your industryโs security standards. More information on the configuration of Gitea can be found here. Create a user Click the Register button at the top right corner. The first user created will be created as an administrator - permissions can be adjusted afterwards if you like. Create organizations After registering an admin user, the organizations can be created which will act as the package repositories for storing images. Create the following organizations:siderolabs
keycloak
coredns
etcd-development
registry-k8s-io-proxy
NOTE: If you are using self-signed certs and would like to push images to your local Gitea using Docker, you will also need to configure your certs.d directory as described here.
Push Images to Gitea
Now that all of our organizations have been created, we can push the images we loaded into our Gitea for deploying Keycloak, Omni, and storing images used by Talos. For all of the images loaded, we first need to tag them for our Gitea.NOTE: Donโt forget to tag all of the images from registry.k8s.io to go to the registry-k8s-io-proxy organization created in Gitea.
Keycloak
Install Keycloak
The image used for keycloak is already loaded into Gitea and there are no files to stage before starting it so Iโll run the following command to start it. Replace KEYCLOAK_HOSTNAME and GITEA_HOSTNAME with your own hostnames.https://${KEYCLOAK\_HOSTNAME}:3000
Configuring Keycloak
For details on configuring Keycloak as a SAML Identity Provider to be used with Omni, follow this guide: Configuring Keycloak SAMLOmni
With Keycloak and Gitea installed and configured, weโre ready to start up Omni and start creating and managing clusters.Install Omni
To install Omni, first generate a UUID to pass to Omni when we start it.--auth-auth0-enabled=false
tells Omni not to use Auth0.--auth-saml-enabled
enables SAML authentication.--talos-installer-registry
,--talos-imager-image
and--kubernetes-registry
allow you to set the default images used by Omni to point to your local repository.--auth-saml-url
is the URL we saved earlier in the configuration of Keycloak.--auth-saml-metadata
may also be used if you would like to pass it as a file instead of a URL and can be used if using self-signed certificates for Keycloak.
Creating a cluster
Guides on creating a cluster on Omni can be found here: Because weโre working in an airgapped environment we will need the following values added to our cluster configs so they know where to pull images from. More information on the Talos MachineConfig.registries can be found here.NOTE: In this example, cluster discovery is also disabled. You may also configure cluster discovery on your network. More information on the Discovery Service can be found here