k8s:rancher:run_the_rancher_ui_as_a_container_image
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| k8s:rancher:run_the_rancher_ui_as_a_container_image [2023/11/11 22:02] – admin | k8s:rancher:run_the_rancher_ui_as_a_container_image [2023/11/15 22:01] (current) – admin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| # Run the Rancher UI as a container image | # Run the Rancher UI as a container image | ||
| - | We use CentOS 8 as base distribution for running Rancher UI. | + | We use CentOS 8/9 as base distribution for running Rancher UI. |
| Traditionally Rancher UI came in form of (docker) container images which conained the kubernetes cluster Rancher UI runs on. | Traditionally Rancher UI came in form of (docker) container images which conained the kubernetes cluster Rancher UI runs on. | ||
| This is now phased out in favor of a solution that launches a small kubernetes distribution directly instead of packaging it in a container. | This is now phased out in favor of a solution that launches a small kubernetes distribution directly instead of packaging it in a container. | ||
| + | |||
| + | ## First install prerequisites | ||
| + | |||
| + | ```bash | ||
| + | sudo modprobe ip_tables && echo ' | ||
| + | sudo firewall-cmd --zone=public --permanent --add-service=http | ||
| + | sudo firewall-cmd --zone=public --permanent --add-service=https | ||
| + | sudo firewall-cmd --zone=public --add-service=http | ||
| + | sudo firewall-cmd --zone=public --add-service=https | ||
| + | ``` | ||
| ## Getting a certificate using certbot | ## Getting a certificate using certbot | ||
| Line 24: | Line 34: | ||
| ```bash | ```bash | ||
| - | sudo podman create --name rancher-2-7-9 \ | + | sudo podman create --name rancher-2-a-b \ |
| -v / | -v / | ||
| -v / | -v / | ||
| Line 33: | Line 43: | ||
| | | ||
| -p 80:80 -p 443:443 --log-driver journald \ | -p 80:80 -p 443:443 --log-driver journald \ | ||
| - | | + | |
| ``` | ``` | ||
| Line 44: | Line 54: | ||
| [Unit] | [Unit] | ||
| Description=Rancher Management Server | Description=Rancher Management Server | ||
| - | After=heketi.service | ||
| - | Wants=heketi.service | ||
| - | |||
| [Service] | [Service] | ||
| Line 67: | Line 74: | ||
| _Note:_ `sudo podman stop rancher` will result in an immediate restart. Use `sudo systemctl stop rancher` instead | _Note:_ `sudo podman stop rancher` will result in an immediate restart. Use `sudo systemctl stop rancher` instead | ||
| + | Check the certbot timer | ||
| + | ```bash | ||
| + | # watch | ||
| + | journalctl -f | ||
| + | # in another terminal | ||
| + | sudo certbot renew --standalone --dry-run | ||
| + | # This should stop and restart rancher | ||
| + | sudo systemctl enable --now certbot-renew.timer | ||
| + | ``` | ||
| ## Upgrading to a new Rancher version | ## Upgrading to a new Rancher version | ||
| Line 109: | Line 125: | ||
| ```bash | ```bash | ||
| sudo podman create --name rancher-2-a-b \ | sudo podman create --name rancher-2-a-b \ | ||
| - | | + | -v / |
| - | -e HTTPS_PROXY=" | + | -v / |
| - | -e NO_PROXY=" | + | -e HTTP_PROXY=" |
| - | -e no_proxy=" | + | -e HTTPS_PROXY=" |
| - | --privileged \ | + | -e NO_PROXY=" |
| - | -p 80:80 -p 443:443 --log-driver journald rancher/ | + | -e no_proxy=" |
| + | | ||
| + | -p 80:80 -p 443:443 --log-driver journald | ||
| + | rancher/ | ||
| ``` | ``` | ||
| Now restore the backup of the entire configuration into the new container | Now restore the backup of the entire configuration into the new container | ||
k8s/rancher/run_the_rancher_ui_as_a_container_image.1699736551.txt.gz · Last modified: by admin