Skip to content

Commit

Permalink
Fix the offline installation instructions for podman and k3s
Browse files Browse the repository at this point in the history
  • Loading branch information
cbosdo committed Oct 18, 2023
1 parent 2d488df commit dbb7058
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions containers/doc/server-kubernetes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,21 @@ done
skopeo copy docker://registry.opensuse.org/systemsmanagement/uyuni/master/containers/uyuni/server:latest docker-archive:server.tar:registry.opensuse.org/systemsmanagement/uyuni/master/containers/uyuni/server:latest
```

If using K3S's default local-path-provider, also pull the helper pod image for offline use:

```
helper_pod_image=$(grep helper-pod -A1 /var/lib/rancher/k3s/server/manifests/local-storage.yaml | grep image | sed 's/^ \+image: //')
podman pull $helper_pod_image
podman save --output helper_pod.tar $helper_pod_image
```

or

```
helper_pod_image=$(grep helper-pod -A1 /var/lib/rancher/k3s/server/manifests/local-storage.yaml | grep image | sed 's/^ \+image: //')
skopeo copy docker://$(helper_pod_image) docker-archive:helper-pod.tar:$(helper_pod_image)
```

Copy the `cert-manager` and `uyuni/server` helm charts locally:

```
Expand All @@ -79,32 +94,19 @@ done
In order to tell K3s to not pull the images, set the image pull policy needs to be set to `Never`.
This needs to be done for both Uyuni and cert-manager helm charts.

For the Uyuni helm chart, set the `pullPolicy` chart value to `Never` by passing a `--helm-uyuni-values=uyuni-values.yaml` parameter to `uyuniadm install` with the following `uyuni-values.yaml` file content:

```
pullPolicy: Never
```

For the cert-manager helm chart, create a `cert-values.yaml` file with the following content and pass `--helm-certmanager-values=values.yaml` parameter to `uyuniadm install`:

```
image:
pullPolicy: Never
```
To prevent Helm from pulling the images pass the `--image=pullPolicy=never` parameter to `uyuniadm install` or `uyuniadm migrate`.

To use the downloaded helm charts instead of the default ones, pass `--helm-uyuni-chart=server-2023.9.0.tgz` and `--helm-certmanager-chart=cert-manager-v1.13.1.tgz` or add the following to the `uyuniadm` configuration file. Of course the versions in the file name need to be adjusted to what you downloaded:

```
helm:
uyuni:
chart: server-2023.9.0.tgz
values: uyuni-values.yaml
certmanager:
chart: cert-manager-v1.13.1.tgz
values: cert-values.yaml
```

Set the helper-pod `imagePullPolicy` to `Never` in `/var/lib/rancher/k3s/server/manifests/local-storage.yaml` using the following command:
If using K3S's default local-path-provisioner, set the helper-pod `imagePullPolicy` to `Never` in `/var/lib/rancher/k3s/server/manifests/local-storage.yaml` using the following command:

```
sed 's/imagePullPolicy: IfNotPresent/imagePullPolicy: Never/' -i /var/lib/rancher/k3s/server/manifests/local-storage.yaml
Expand Down Expand Up @@ -153,6 +155,8 @@ Transfer the resulting `server-image.tar` to the server and load it using the fo
podman load -i server-image.tar
```

To prevent pulling the images pass the `--image=pullPolicy=never` parameter to `uyuniadm install` or `uyuniadm migrate`.

# Migrating from a regular server

In order to migrate a regular Uyuni server to containers, a new machine is required: it is not possible to perform an in-place migration.
Expand Down

0 comments on commit dbb7058

Please sign in to comment.