Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify Airgap image installs #6308

Closed
dereknola opened this issue Jul 11, 2024 · 2 comments
Closed

Simplify Airgap image installs #6308

dereknola opened this issue Jul 11, 2024 · 2 comments
Assignees
Labels
area/install-script Issues that seem to be related to install.sh or the other shell scripts

Comments

@dereknola
Copy link
Contributor

Is your feature request related to a problem? Please describe.
When installing additional CNIs for airgap, you must manually copy any/all rke2-images-${CNI}.${ARCH}.tar.gz to /var/lib/rancher/rke2/agent/images.

Describe the solution you'd like
Expand the existing install script, which already copies rke2-images.${ARCH}.tar.gz from the RKE2_ARTIFACTS_PATH, to also copy any additional rke2-images-XXXXX found in that folder.

Describe alternatives you've considered

Additional context

@caroline-suse-rancher caroline-suse-rancher added the area/install-script Issues that seem to be related to install.sh or the other shell scripts label Jul 15, 2024
@mdrahman-suse mdrahman-suse self-assigned this Jul 23, 2024
@dereknola dereknola added this to the August 2024 Release Cycle milestone Jul 29, 2024
@mdrahman-suse
Copy link
Contributor

mdrahman-suse commented Aug 23, 2024

Validated using the RCs

Example with v1.28.13-rc2+rke2r1 with Window agent

$ ls -la artifacts/
total 1217408
drwxr-xr-x 2 ubuntu ubuntu       4096 Aug 23 22:28 .
drwxr-x--- 5 ubuntu ubuntu       4096 Aug 23 22:28 ..
-rw-r--r-- 1 ubuntu ubuntu  121689804 Aug 23 22:22 rke2-images-flannel.linux-amd64.tar.gz
-rw-r--r-- 1 ubuntu ubuntu 1090910209 Aug 23 22:22 rke2-images.linux-amd64.tar.gz
-rw-r--r-- 1 ubuntu ubuntu   34004119 Aug 23 22:22 rke2.linux-amd64.tar.gz
-rw-r--r-- 1 ubuntu ubuntu       3939 Aug 23 22:22 sha256sum-amd64.txt

~$ sudo INSTALL_RKE2_ARTIFACT_PATH=artifacts/ sh rke2-install.sh
[INFO]  staging local checksums from artifacts//sha256sum-amd64.txt
[INFO]  staging gzip airgap image tarball from artifacts//rke2-images.linux-amd64.tar.gz
[INFO]  staging tarball from artifacts//rke2.linux-amd64.tar.gz
[INFO]  verifying airgap tarball
[INFO]  decompressing airgap tarball to /var/lib/rancher/rke2/agent/images
[INFO]  Installing airgap image from artifacts//rke2-images-flannel.linux-amd64.tar.gz
[INFO]  verifying tarball
[INFO]  unpacking tarball file to /usr/local

$ ls -la /var/lib/rancher/rke2/agent/images/
total 3195240
drwxr-xr-x 2 root root       4096 Aug 23 22:38 .
drwxr-xr-x 3 root root       4096 Aug 23 22:37 ..
-rw-r--r-- 1 root root  121689804 Aug 23 22:38 rke2-images-flannel.linux-amd64.tar.gz
-rw-r--r-- 1 root root 3150215680 Aug 23 22:38 rke2-images.linux-amd64.tar
$ kgn
NAME               STATUS   ROLES                       AGE   VERSION
ip-172-31-22-136   Ready    control-plane,etcd,master   33m   v1.28.13+rke2r1
ip-ac1f2610        Ready    <none>                      97s   v1.28.13

$ kgp
NAMESPACE     NAME                                                   READY   STATUS      RESTARTS   AGE
kube-system   cloud-controller-manager-ip-172-31-22-136              1/1     Running     0          25m
kube-system   etcd-ip-172-31-22-136                                  1/1     Running     0          26m
kube-system   helm-install-rke2-coredns-njmtt                        0/1     Completed   0          26m
kube-system   helm-install-rke2-flannel-rpnv2                        0/1     Completed   0          26m
kube-system   helm-install-rke2-ingress-nginx-6bnlg                  0/1     Completed   0          26m
kube-system   helm-install-rke2-metrics-server-74c7h                 0/1     Completed   0          26m
kube-system   helm-install-rke2-snapshot-controller-7zg9t            0/1     Completed   1          26m
kube-system   helm-install-rke2-snapshot-controller-crd-jwjbs        0/1     Completed   0          26m
kube-system   helm-install-rke2-snapshot-validation-webhook-sjbld    0/1     Completed   0          26m
kube-system   kube-apiserver-ip-172-31-22-136                        1/1     Running     0          26m
kube-system   kube-controller-manager-ip-172-31-22-136               1/1     Running     0          26m
kube-system   kube-flannel-ds-cxxhc                                  1/1     Running     0          26m
kube-system   kube-proxy-ip-172-31-22-136                            1/1     Running     0          26m
kube-system   kube-scheduler-ip-172-31-22-136                        1/1     Running     0          25m
kube-system   rke2-coredns-rke2-coredns-autoscaler-db75d9cdc-vgzxq   1/1     Running     0          26m
kube-system   rke2-coredns-rke2-coredns-b97fb45df-bzhmq              1/1     Running     0          26m
kube-system   rke2-ingress-nginx-controller-mkppk                    1/1     Running     0          25m
kube-system   rke2-metrics-server-655477f655-jtv67                   1/1     Running     0          25m
kube-system   rke2-snapshot-controller-59cc9cd8f4-jxbsb              1/1     Running     0          25m
kube-system   rke2-snapshot-validation-webhook-54c5989b65-z4xrp      1/1     Running     0          25m

@dereknola
Copy link
Contributor Author

We should be able to do something similar. Opening a separate ticket would be best.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/install-script Issues that seem to be related to install.sh or the other shell scripts
Projects
None yet
Development

No branches or pull requests

3 participants