diff --git a/.gitlab/ci_scripts/create_vps.sh b/.gitlab/ci_scripts/create_vps.sh index 0a3210fa06a628a92b9cdda0f9e3ee6c74c7130c..0df99e4f6d5fcbfa7c3e4f6af5ce1bfe1c57814a 100644 --- a/.gitlab/ci_scripts/create_vps.sh +++ b/.gitlab/ci_scripts/create_vps.sh @@ -7,7 +7,7 @@ set -ve echo "Deleting old machine" python3 -c "import greenhost_cloud; greenhost_cloud.terminate_droplets_by_name(\"^${HOSTNAME}$\")" echo "Creating new machine" -# Uses a custom disk image built with 386e3614 on 2021-07-08. See +# Uses a custom disk image built with 42aa12b on 2021-09-14. See # CONTRIBUTING.md#ci-pipeline-image for more info. python3 -m openappstack $HOSTNAME create \ --create-droplet $DOMAIN \ @@ -15,7 +15,7 @@ python3 -m openappstack $HOSTNAME create \ --ssh-key-id $SSH_KEY_ID \ --create-domain-records \ --subdomain $SUBDOMAIN \ - --disk-image-id '-8115' \ + --disk-image-id '-8751' \ --truncate-subdomain \ --docker-mirror-server="${CI_DEPENDENCY_PROXY_SERVER}" \ --docker-mirror-endpoint="${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}" \ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b48c5f1643c3805a8a496a6fff07c98a0946d9a0..864401c706da93547bf0b7c52edc73861ca93e08 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -79,9 +79,9 @@ use it. This is a manual process for now. Follow these steps: 1. Create a new VPS 2. Run the following to install *only kubernetes* on the VPS: ``` - $ python3 -m openappstack <cluster> install --install-kubernetes --no-install-openappstack + $ python3 -m openappstack <cluster> install ``` -3. Log into your machine and clean up the k3s server, then delete the cluster +3. Log into your machine and clean up the k3s server, then delete the cluster data: ``` # Clean up running containers and firewall @@ -96,7 +96,7 @@ use it. This is a manual process for now. Follow these steps: 2. Set VPS to `-- not assigned --` 3. Click 'make template' 4. Choose "Linux Latest LTS" as the kernel - 5. Choose OS type Debian 10 + 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 6. Change the `--disk-image-id` argument in `.gitlab/ci_scripts/create_vps.sh` diff --git a/ansible/roles/pre-configure/tasks/main.yml b/ansible/roles/pre-configure/tasks/main.yml index 5a48f98f814741bd17a2b41b50b84c55ed2bc876..a3466176c9a1c1b10d6587e9655c18f1fe01151e 100644 --- a/ansible/roles/pre-configure/tasks/main.yml +++ b/ansible/roles/pre-configure/tasks/main.yml @@ -47,12 +47,43 @@ with_items: - python3-pip +# We work around a Debian Bullseye issue with installing snaps on Xen nodes: +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983357 (Debian link) +# https://code.greenhost.net/greenhost/sysops/-/issues/915#note_108038 (GH # internal link) +# Once the debian issue is solved and Greenhost has patched the kernel, these +# three workaround commands can be removed. +- name: Workaround debian bug 1/3 + shell: "journalctl -k | awk '/input: Xen Virtual Keyboard/ {print $11}'" + args: + # Only run this if kubectl snap has not been installed yet + creates: /snap/bin/kubectl + register: kbd_device + failed_when: false + changed_when: false + +- name: Workaround debian bug 2/3 + # kubectl needs to get installed as "classic" snap + mount: + opts: bind + src: /dev/zero + path: /sys/{{ kbd_device.stdout }}/uevent + fstype: none + state: mounted + when: kbd_device.stdout != "" and kbd_device.stdout != "skipped, since /snap/bin/kubectl exists" + - name: Install kubectl snap # kubectl needs to get installed as "classic" snap command: snap install --classic kubectl args: creates: /snap/bin/kubectl +- name: Workaround debian bug 3/3 + # kubectl needs to get installed as "classic" snap + mount: + path: /sys/{{ kbd_device.stdout }}/uevent + state: unmounted + when: kbd_device.stdout != "" and kbd_device.stdout != "skipped, since /snap/bin/kubectl exists" + - name: Create kubectl symlink to /usr/local/bin file: state: link diff --git a/docs/installation/create_cluster.rst b/docs/installation/create_cluster.rst index 1e1ca1ef037ee66c00cd147a30a86b2aa133e333..181f7f8ff9b0f176e8b812876a17eb1ab7a85fb9 100644 --- a/docs/installation/create_cluster.rst +++ b/docs/installation/create_cluster.rst @@ -18,7 +18,7 @@ Prerequisites During these instructions, you are asked to create a VPS, or have a bare metal server ready. The server should meet these requirements: -- Debian "buster" installed +- Debian 11 (bullseye) installed - A public IP address - The ability to create DNS records for this IP - 6 cores and 12 GB of RAM diff --git a/docs/installation/overview.rst b/docs/installation/overview.rst index 883228ea00b0ad4c79bed2ef2bd8469ca098e88f..55aab1fe85d43eb6919783a58a4cd6bfd0373480 100644 --- a/docs/installation/overview.rst +++ b/docs/installation/overview.rst @@ -5,22 +5,22 @@ Installation overview ===================== .. warning:: - - OpenAppStack is still under heavy development and is not ready for + - OpenAppStack is still under heavy development and is not ready for production use! We anticipate major changes and do not guarantee a data-preserving upgrade path from current installations. However, we encourage you to try OpenAppStack and ask you to `report all issues you encounter <https://openappstack.net/contact.html>`__. - - When you install OpenAppStack on a server, the installation process + - When you install OpenAppStack on a server, the installation process will make some substantial changes to the server's configuration, so please do not use a server that functions as anything other than a testing ground. - .. note:: - You should also have a trusted machine to run the installer on, i.e. your - laptop. We call this the ``provisioning machine``. - All commands in these installation instructions need to be - run this provisioning machine that is *not* the server that will run - OpenAppStack, unless specified otherwise. +.. note:: + You should also have a trusted machine to run the installer on, i.e. your + laptop. We call this the ``provisioning machine``. + All commands in these installation instructions need to be + run this provisioning machine that is *not* the server that will run + OpenAppStack, unless specified otherwise. Setup ===== diff --git a/openappstack/cluster.py b/openappstack/cluster.py index 9a45a001b7639ba904a50ec0ebb89f3bb454121a..960914624f08ee101e0644d4c98df07f4d96dce2 100644 --- a/openappstack/cluster.py +++ b/openappstack/cluster.py @@ -35,8 +35,8 @@ DEFAULT_REGION = 'ams1' DEFAULT_DISK_SIZE_GB = 30 """Default amount of memory""" DEFAULT_MEMORY_SIZE_MB = 12288 -"""Default "image" (operating system): 19 = Debian buster-x64 """ -DEFAULT_IMAGE = 19 +"""Default "image" (operating system): 26 = Debian bullseye-x64 """ +DEFAULT_IMAGE = 26 class Cluster: diff --git a/test/pytest/test_system.py b/test/pytest/test_system.py index 6c7e0a47e275131a82e11a0ea79692e5b4b9c08b..db28e4c0fbf7cedae94301fc22255f934b5415e8 100644 --- a/test/pytest/test_system.py +++ b/test/pytest/test_system.py @@ -6,5 +6,5 @@ import pprint @pytest.mark.testinfra def test_os_release(host): system_info = host.system_info - assert system_info.release == '10' + assert system_info.release == '11'