diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 864401c706da93547bf0b7c52edc73861ca93e08..5be2320e0d0a76aa05491f1cd517240dfde263c8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -77,28 +77,36 @@ the k3s version in use, you'll want to generate a new disk image template and use it. This is a manual process for now. Follow these steps: 1. Create a new VPS + ``` + export HOST_NAME=baseimage20211019 + python -m openappstack ${HOST_NAME} create --create-droplet --create-hostname ${HOST_NAME}.openappstack.net --ssh-key-id 112 --create-domain-records --subdomain ${HOST_NAME} openappstack.net + ``` 2. Run the following to install *only kubernetes* on the VPS: ``` - $ python3 -m openappstack <cluster> install + python3 -m openappstack ${HOST_NAME} install ``` 3. Log into your machine and clean up the k3s server, then delete the cluster data: ``` - # Clean up running containers and firewall - /usr/local/bin/k3s-killall.sh - # Remove k3s state - rm -rf /var/lib/rancher/k3s + ssh $HOST_NAME.openappstack.net + # Clean up running containers and firewall + /usr/local/bin/k3s-killall.sh + systemctl disable k3s + # Remove all possible states + rm -rf /var/lib/{rancher,OpenAppStack,kubelet} /etc/rancher /var/log/{OpenAppStack,containers,pods} /tmp/k3s /etc/systemd/system/k3s.service ``` 3. Log into Cosmos with the OpenAppStack account 4. Go to VPS Cloud -> VPS and shut down your VPS -5. Go to VPS Cloud -> Disk Images and click edit for your VPSs disk image - 1. Change the Disk Label to something like `k3s-template` +5. Go to VPS Cloud -> Disk Images and click `Manage` for your VPSs disk image + 1. Change the Disk Label to something like `k3s-template-DATE` 2. Set VPS to `-- not assigned --` - 3. Click 'make template' - 4. Choose "Linux Latest LTS" as the kernel - 5. Choose OS type Debian 11 (bullseye) - 6. Remember the disk image ID that you can see in the current URL as `id=...` - 7. Click save + 3. Click save + 4. `Manage` the same image again + 5. Click 'make template' + 6. Choose "Linux Latest LTS" as the kernel + 7. Choose OS type Debian 11 (bullseye) + 8. Remember the disk image ID that you can see in the current URL as `id=...` + 9. Click save 6. Change the `--disk-image-id` argument in `.gitlab/ci_scripts/create_vps.sh` to your current disk-image-id **with a minus in front of it**. This is because custom images are negative integers, whereas Greenhost's disk images diff --git a/docs/troubleshooting.rst b/docs/troubleshooting.rst index 955404d1039a4f139ea1bbb389ce885ffde54dd2..650f482bc0486561a4000f895a806a168bef836e 100644 --- a/docs/troubleshooting.rst +++ b/docs/troubleshooting.rst @@ -411,7 +411,7 @@ That can mean that one of your values contains a double quote (``"``) or that you quoted a value in ``.flux.env`` during the :ref:`flux_config`. Make sure that ``.flux.env`` does not contain any values that are quoted. -If you need to change ``.flux.env``, run the following commands: +If you need to change ``.flux.env``, run the following commands: .. code:: bash @@ -439,5 +439,5 @@ OAS installation in order to start from scratch: cluster$ /usr/local/bin/k3s-killall.sh cluster$ systemctl disable k3s - cluster$ rm -rf /var/lib/{rancher,OpenAppStack,kubelet,cni,docker,etcd} /etc/{kubernetes,rancher} /var/log/{OpenAppStack,containers,pods} /tmp/k3s /etc/systemd/system/k3s.service + cluster$ rm -rf /var/lib/{rancher,OpenAppStack,kubelet} /etc/rancher /var/log/{OpenAppStack,containers,pods} /tmp/k3s /etc/systemd/system/k3s.service cluster$ systemctl reboot