Journey into Theiacloud on Darwin #170
-
Here are my experiences with testing the Theiacloud demo on my local dev machine, which is a M1 mac, with some open questions left. Out-of-the-box, the architecture behaves a little bit different (and more troublesome) than some of the guides expect, so for future mac users, here is what I found: VirtualBox is unavailable for this architecuture, so I used Docker (for Desktop). I modified the minikube_getting_started.tf to use driver="docker" in the "cluster" module parameters, then preloaded minikube with 'minikube start --driver=docker --download-only' It took some time to figure out why neither terraform nor helm were properly setting up the environment - on MacOs the Ingresses are not automatically reachable from the host machine. This caused the keycloak setup to fail. What finally worked was opening up tunnels in a different terminal with 'sudo minikube tunnel'. This should be done after the initial cluster setup. With this, the environment finally spun up. I could not access the landing page until I added 127.0.0.1.nip.io to my /etc/hosts file. With that, the landing page is reachable, but receives an internal server error when trying to launch Theia from the service container. I brought up a debugging instance of the theiacloud-service and redirected the landing page. This showed me that the queries to the CRDs came up empty, perhaps because no namespace was used. I overrode the default namespace to use "theiacloud", and now the workspace CR is properly created. I am not sure if this is an issue due to launching the service in the dev environment - perhaps the deployed container is being properly configured by terraform. The server error may also have been caused by the next issue: The session CR was not created, due to a mismatch of APIs. The service was calling with v4beta, but the CRD did not have a service definition for that (I suspect the helm chart is not up-to-date). Updating the CRD definition gave me a proper session custom resource, and instance pods are created. Unfortunately, the oauth2-proxy do not configure properly. Overriding the OIDC issuer url to "http://keycloak.keycloak.svc.cluster.local/keycloak/realms/TheiaCloud" helped the oauth2-proxy to go online, but that caused later issues with redirecting, as that url is not resolvable to the browser from the outside. Similarly, the operator was not able to detect the running instance pod to update the url, as it could not reach the instance due to the access via the host url, and after manually setting the url in the session CR, the callback to the oauth2proxy was similarly blocked. Clearly, I am still missing a piece of the puzzle. If anyone has experience in this area, I could use some advice. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
Hi, sorry to hear about the troubles on Mac. Our regular developers are on Linux. Regarding the default Minikube driver used in our terraform charts. So I think your ingress problems might originate from the Docker driver. Most issues sound related to networking. We currently require that the hostnames set via the ingresses are reachable from the host and within the cluster. Regarding launching from the dev environment in general. Our released helm charts map to tags: https://github.com/eclipsesource/theia-cloud/tags |
Beta Was this translation helpful? Give feedback.
-
Hi, given that it was my first foray into Kubernetes, some trouble was expected. I think the team did a great job in making things accessible, and I appreciate the effort into putting together getting started configurations for beginners like me. I apologize if I came across as venting. Starting on darwin may not have been the best choice :-) I think you are right with the problems originating from docker. I will ditch it and report back on that issue. About the versioning issues. Running
downloads 'https://github.com/eclipsesource/theia-cloud-helm/releases/download/theia-cloud-0.7.8/theia-cloud-0.7.8.tgz'
Is there another way to get the appropriate chart? |
Beta Was this translation helpful? Give feedback.
-
I only now saw that the helm error message points to an URL on github, where I can browse the tags. helm pull with version 0.8.0.MS9v1 also does not work, but I can download it locally. I am using the helm repo |
Beta Was this translation helpful? Give feedback.
-
While updating and experimenting a bit, I noticed some things that don't quite line up. I then made some changes in the value file terraform/modules/helm/theia-cloud.yaml (replaced demo image with one of mine) I went on to update the cluster using the helm chart instead and found some discrepancies. Also, 'helm list' only shows charts directly installed with the helm command, not those from terraform. (and correspondingly, can only uninstall it's own charts). It seems that one should not mix these approaches. Do you have a recommendation which one to use? |
Beta Was this translation helpful? Give feedback.
Below should be the required commands, currently shown for the base chart.
Please also not that helm can't update CRDs at the moment: https://helm.sh/docs/chart_best_practices/custom_resource_definitions/#some-caveats-and-explanations
So if the CRDs were already installed, you have to manually remove them, e.g.
Steps to see contents from helm repo:
Update Helm Repo