Skip to content

Add OS check to ensure host machine uses Ubuntu 18.04+ #8789

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

Closed
Tracked by #8840
mrsimonemms opened this issue Mar 14, 2022 · 10 comments
Closed
Tracked by #8840

Add OS check to ensure host machine uses Ubuntu 18.04+ #8789

mrsimonemms opened this issue Mar 14, 2022 · 10 comments
Assignees

Comments

@mrsimonemms
Copy link
Contributor

mrsimonemms commented Mar 14, 2022

IMPORTANT self-hosted installations of Gitpod should target an LTS version of Ubuntu. The non-LTS versions are included in the checks for completeness but are untested.

Gitpod requires that the Kubernetes cluster is hosted on an Ubuntu machine. Make a KOTS preflight check to check this:

OS Version Result
Ubuntu 20.04 and above Pass
Ubuntu 18.04 - 19.10 Warn
Ubuntu Less than 18.04 Fail
Any non-Ubuntu Any Fail

Have attempted this already and this has proven problematic getting the data in the collector. Barry's code in shared docs SHOULD work, but isn't working currently so will require investigation.

See internal comment for details/documentation

@mrsimonemms mrsimonemms self-assigned this Mar 14, 2022
@mrsimonemms mrsimonemms moved this from 🧊Backlog to ⚒In Progress in 🚚 Security, Infrastructure, and Delivery Team (SID) Mar 15, 2022
@mrsimonemms mrsimonemms moved this from ⚒In Progress to 📓Scheduled in 🚚 Security, Infrastructure, and Delivery Team (SID) Mar 15, 2022
@mrsimonemms mrsimonemms added this to the release/2022.05 milestone Mar 15, 2022
@hewjoe
Copy link

hewjoe commented Mar 16, 2022

Hi @mrsimonemms, we are just getting started with on-premise Gitpod running in our EKS environment. Our standard is using Amazon Linux 2 with their EKS optimized AMI. We have it up and running with the latest version and are working on modifications to support in our air gapped VPC config.

I am curious about why you require that the Kubernetes cluster is hosted on Ubuntu? Is there a limitation on other platforms that we are missing here? If so, is there an opportunity to support other platforms in the future?

BTW: I tried looking for more details in the linked internal Slack comments, but didn't have access.

@mrsimonemms
Copy link
Contributor Author

@hewjoe in order to create a workspace, we need to do various operations on the node itself (check out the initContainers as part of the ws-daemon daemonset). This is only supported on Ubuntu. This is linked to why we can only support Kubernetes clusters with a containerd runtime and a few other restrictions.

It's not inconceivable that we'll support other platforms in future, but it's not currently planned.

Basically, treat this as a requirement as you would any other.

The full list of restrictions is on gitpod.io

@hewjoe
Copy link

hewjoe commented Mar 16, 2022

Thanks for the context. We have seen some issues with runc which we were able to stumble through, but did not have anything we would be comfortable using in prod. Hearing your explanation, I understand it will not be possible to work around these unless we make the switch to Ubuntu.

@mrsimonemms
Copy link
Contributor Author

The code is going to be something like this:

  collectors:
    - copyFromHost:
        collectorName: os-release
        image: busybox:1
        name: os-release
        hostPath: /usr/lib/os-release
        extractArchive: true
  analyzers:
    - textAnalyze:
        checkName: "Host operating system distribution"
        fileName: os-release/*/os-release
        regexGroups: 'NAME="(?P<Name>\w+)"'
        outcomes:
          - pass:
              when: "Name == Ubuntu"
              message: Host operating system detected as Ubuntu
            fail:
              message: Host operating system not detected as Ubuntu
    - textAnalyze:
        checkName: "Host operating system version"
        fileName: os-release/gitpod-1/os-release
        regexGroups: 'VERSION_ID="(?P<Version>.*)"'
        outcomes:
          - fail:
              when: "Version < 18.04"
              message: Host operating system must be at least Ubuntu 18.04
          - pass:
              when: "Version == 18.04"
          - pass:
              when: "Version == 20.04"
            warn:
              message: Unknown Ubuntu version
`

@mrsimonemms
Copy link
Contributor Author

mrsimonemms commented Apr 7, 2022

This is currently blocked by this issue

@gsharma-jiggzy
Copy link

@hewjoe in order to create a workspace, we need to do various operations on the node itself (check out the initContainers as part of the ws-daemon daemonset). This is only supported on Ubuntu. This is linked to why we can only support Kubernetes clusters with a containerd runtime and a few other restrictions.

It's not inconceivable that we'll support other platforms in future, but it's not currently planned.

Basically, treat this as a requirement as you would any other.

The full list of restrictions is on gitpod.io

Hi @mrsimonemms do you have any documentation about the ws-daemon/ubuntu dependency? and just to make sure right now Ubuntu is a Hard Requirement.

@gsharma-jiggzy
Copy link

@hewjoe in order to create a workspace, we need to do various operations on the node itself (check out the initContainers as part of the ws-daemon daemonset). This is only supported on Ubuntu. This is linked to why we can only support Kubernetes clusters with a containerd runtime and a few other restrictions.
It's not inconceivable that we'll support other platforms in future, but it's not currently planned.
Basically, treat this as a requirement as you would any other.
The full list of restrictions is on gitpod.io

Hi @mrsimonemms do you have any documentation about the ws-daemon/ubuntu dependency? and just to make sure right now Ubuntu is a Hard Requirement.

Just did some digging for the initContainers on Amazon Linux. Looks like the mount is for /var/lib/containerd/io.containerd.runtime.v2.task/k8s.io in ubuntu and from the amazon linux optomize eks it is /var/lib/containerd/io.containerd.runtime.v2.task/moby.

@mrsimonemms
Copy link
Contributor Author

@gsharma-jiggzy Ubuntu is currently a hard requirement, but this requirement is owned by @gitpod-io/engineering-workspace who can comment further on the reasonings and any planned changes in that

@lucasvaltl
Copy link
Contributor

@mrsimonemms could you decide on the next steps for this and then potentially move it back to scheduled?

@lucasvaltl lucasvaltl moved this from 📓Scheduled to 🧊Backlog in 🚚 Security, Infrastructure, and Delivery Team (SID) Jul 6, 2022
@mrsimonemms
Copy link
Contributor Author

mrsimonemms commented Jul 6, 2022

I'm going to close this. The previous issue was that there was an issue with eStartgz in image builder on OSes other than Ubuntu. That has recently been removed.

I've checked this on a CentOS 9-based k3s cluster and able to build an image, start a workspace and run a Docker image inside the workspace.

Personally, I think we should still recommend Ubuntu as the preferred node, but it's no longer impossible to run on others.

Repository owner moved this from 🧊Backlog to ✨Done in 🚚 Security, Infrastructure, and Delivery Team (SID) Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

5 participants