Gitpod on vanilla kubernetes (Centos8)

Hi

tried to install this on a vanilla kubernetes instance on centos8,

made some progress

git clone https://github.com/gitpod-io/gitpod instead of git clone https://github.com/gitpod-io/self-hosted

then cd to /chart

created configuration.txt with values.xml

and then finally run

helm repo add charts.gitpod.io https://charts.gitpod.io
helm dep update
helm upgrade --install $(for i in $(cat configuration.txt); do echo -e "-f $i"; done) gitpod .

this gets the pods going but I have some issues with some pods

1 : minio and mysql
1 pod has unbound immediate PersistentVolumeClaims

is there a way to use a local instance of minio and mysql? I could do it with the the self-hosted option repo but not sure which config items to change in the values.xml. or alternatively does anyone know how to create the persistent volume on a clean centos8 box?

2: registry-facade-xxx
says Back-off restarting failed container

[root@FCVMSRV025 ~]# kubectl logs registry-facade-db5945d84-rbltz
{"message":"enabled JSON logging","serviceContext":{"service":"registry-facade","version":""},"severity":"info","time":"2020-09-28T11:40:45Z"}
{"message":"enabled verbose logging","serviceContext":{"service":"registry-facade","version":""},"severity":"info","time":"2020-09-28T11:40:45Z"}
{"fn":"/mnt/pull-secret.json","message":"using authentication for backing registries","serviceContext":{"service":"registry-facade","version":""},"severity":"info","time":"2020-09-28T11:40:45Z"}
{"message":"preparing static layer","serviceContext":{"service":"registry-facade","version":""},"severity":"info","time":"2020-09-28T11:40:45Z"}
{"host":"gcr.io","message":"resolving","severity":"debug","time":"2020-09-28T11:40:45Z"}
{"host":"gcr.io","message":"do request","request.header.accept":"application/vnd.docker.distribution.manifest.v2+json, application/vnd.docker.distribution.manifest.list.v2+json, application/vnd.oci.image.manifest.v1+json, application/vnd.oci.image.index.v1+json, */*","request.header.user-agent":"containerd/1.3.3+unknown","request.method":"HEAD","severity":"debug","time":"2020-09-28T11:40:45Z","url":"https://gcr.io/v2/gitpod-io/supervisor/manifests/v0.4.0"}
{"host":"gcr.io","message":"fetch response received","response.header.accept-ranges":"none","response.header.cache-control":"private","response.header.content-type":"application/json","response.header.date":"Mon, 28 Sep 2020 11:40:46 GMT","response.header.docker-distribution-api-version":"registry/2.0","response.header.server":"Docker Registry","response.header.vary":"Accept-Encoding","response.header.x-frame-options":"SAMEORIGIN","response.header.x-xss-protection":"0","response.status":"404 Not Found","severity":"debug","time":"2020-09-28T11:40:46Z","url":"https://gcr.io/v2/gitpod-io/supervisor/manifests/v0.4.0"}
{"@type":"type.googleapis.com/google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent","error":"cannot source layer from gcr.io/gitpod-io/supervisor:v0.4.0: gcr.io/gitpod-io/supervisor:v0.4.0: not found","message":"cannot create registry","serviceContext":{"service":"registry-facade","version":""},"severity":"fatal","time":"2020-09-28T11:40:46Z"}

3: ws proxy error

Error from server (BadRequest): container “ws-proxy” in pod “ws-proxy-6c7cbb494c-4mtk4” is waiting to start: trying and failing to pull image

note : using latest docker image works fine, but trying to get this running outside of docker

Hi,

mysql:
It is possible to use an external MySQL instance. You have to disable the deployment of the built-in mysql and set the credentials for the external database.

db:
  # the username has to be `gitpod`
  host: <DB_HOST>
  port: 3306
  password: <DB_PASSWORD>
mysql:
  enabled: false

minio:
Minio can also be added seperately.

components:
  remoteStorage:
    kind: minio
    minio:
      endpoint: <MINIO_URL>:9000
      accessKey: <MINIO_ACCESS_KEY>
      secretKey: <MINIO_SECRET_KEY>
      tmpdir: /tmp
      region: local

minio:
  enabled: false

Best regards,
Wulf

made a bit more progress

setting minio enabled: false removes the pod however in the server pod we still see

MINIO_END_POINT:                     minio.default.svc.cluster.local
      MINIO_PORT:                          9000
      MINIO_ACCESS_KEY:                    EXAMPLEvalue
      MINIO_SECRET_KEY:                    Someone.Should/ReallyChangeThisKey!!

that must be a bug

still many more issues that require working , maybe when I have a bit more free time

until then, probably best sticking to docker images

Hi,
when you install minio seperately using https://hub.helm.sh/charts/minio/minio, the minio installation in Gitpod has to be disabled. The MINIO_END_POINT is the internal address to the minio service. If the service is named minio the url is minio. MINIO_ACCESS_KEY and MINIO_SECRET_KEY have to be set to the values given to the minio installation.

Best regards,
Wulf

having another go at this

Events:
Type Reason Age From Message


Warning BackOff 3m15s (x254 over 3h43m) kubelet Back-off restarting failed container

took a fair bit of time but finally got there

1 Like

Hi @hm2075,
what was the solution to your problems?

Hi

it was a combination of things

  1. install mysql at the OS level, then disable mysql on values.yaml and use own instance, make sure to use IP addresss instead of local host

  2. install minio seperately at OS level, and modify values.yaml accordingly

  3. Patch the proxy using
    kubectl patch svc proxy -p ‘{“spec”: {“type”: “LoadBalancer”, “externalIPs”:[“10.164.36.66”]}}’

  4. if doing a helm install repeatedly, need to kubectl edit node, remove label for theia

to be fair, after all that work its probably easier to just do

docker pull eu.gcr.io/gitpod-core-dev/build/gitpod-k3s:${VERSION:-latest}

docker run --privileged=true -ti -e DOMAIN=‘xxx’ -e DNSSERVER=‘xxx’ -p 80:80 -v $(pwd)/values.yaml:/values/values.yaml -v $(pwd)/certs:/certs 507eadfe8886

this gives us your latest version but then you dont get the benefits of multiple servers on kubernetes

I havent got any further as I am waiting for

unfortunately at corporate level my server name is xxx.domain.xx.uk hence waiting on that fix

with you guys now being open source, i think its best to come up with a standard build so that whichever way you install this, whether helm charts, aws, GCP etc everyone gets the same experience.

Gitlab was pretty easy for us to install on premise, “yum install gitlab-ee” or something :slight_smile: maybe one day gitpod will be the same? or how about packaging gitlab with gitpod?