Skip to content
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

Support deploying devworkspaces on Kubernetes #19944

Closed
Tracked by #19538
metlos opened this issue Jun 8, 2021 · 2 comments
Closed
Tracked by #19538

Support deploying devworkspaces on Kubernetes #19944

metlos opened this issue Jun 8, 2021 · 2 comments
Labels
area/che-operator Issues and PRs related to Eclipse Che Kubernetes Operator kind/enhancement A feature request - must adhere to the feature request template. kind/task Internal things, technical debt, and to-do tasks to be performed.
Milestone

Comments

@metlos
Copy link
Contributor

metlos commented Jun 8, 2021

Is your enhancement related to a problem? Please describe.

Enabling devworkspaces currently only works on OpenShift. To enable this on Kubernetes, too, we need to start deploying all the files from the deployment/kubernetes directory of devworkspace-operator. We also need to make sure that che-operator installs the cert-manager if not present in the cluster (tracked by #19502).

It seems that #19502 might be dependent on #19466

Describe the solution you'd like

When using the devworkspace-operator files on kubernetes, we should make sure we deploy all the files necessary on kubernetes.

@metlos metlos added kind/enhancement A feature request - must adhere to the feature request template. area/che-operator Issues and PRs related to Eclipse Che Kubernetes Operator labels Jun 8, 2021
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Jun 8, 2021
@skabashnyuk skabashnyuk added kind/task Internal things, technical debt, and to-do tasks to be performed. and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Jun 8, 2021
This was referenced Jun 15, 2021
@skabashnyuk skabashnyuk added this to the 7.33 milestone Jun 16, 2021
@skabashnyuk
Copy link
Contributor

  1. Cluster roles has to be add for che-operator SA in che-operator/deploy/cluster_role.yaml
  - apiGroups:
      - cert-manager.io
    resources:
      - issuers
      - certificates
    verbs:
      - create
      - get
      - list
      - update

After that we can deploy che on minikube


#!/bin/bash
set +e
echo 'deploing che'
chectl update next
minikube stop
minikube delete
set -e



minikube start --cpus 4 --memory 600
TMP_DIR=$(mktemp -d)'/templates'
mkdir -p $TMP_DIR'/che-operator'
mkdir -p $TMP_DIR'/devworkspace'

cp -R ~/dev/src/eclipse-che/che-operator/deploy/*  $TMP_DIR'/che-operator'
cp -R ~/dev/src/eclipse-che/devworkspace-operator/deploy/*  $TMP_DIR'/devworkspace'
echo $TMP_DIR 

chectl server:deploy --platform=minikube --installer=operator --workspace-engine=dev-workspace --che-operator-image=quay.io/skabashn/che-operator:che19944 --templates $TMP_DIR 
rm -rf $TMP_DIR


kubectl patch checluster/eclipse-che -n eclipse-che --type=json -p \
   '[{"op": "replace", "path": "/spec/devWorkspace/enable", "value": true}]'



kubectl patch checluster/eclipse-che --patch "{\"spec\":{\"server\":{\"customCheProperties\": {\"CHE_INFRA_KUBERNETES_ENABLE__UNSUPPORTED__K8S\": \"true\"}}}}" --type=merge -n eclipse-che
kubectl create namespace admin-che

After that I got this error

2021-06-25T07:53:34.363Z    INFO    che    validation errors    {"errors": "The following validation errors were detected:\n- workspaceBaseDomain must be specified\n"}                                      │
│ 2021-06-25T07:53:34.384Z    INFO    che    validation errors    {"errors": "The following validation errors were detected:\n- workspaceBaseDomain must be specified\n"}                                      │
│ 2021-06-25T07:53:34.424Z    INFO    che    validation errors    {"errors": "The following validation errors were detected:\n- workspaceBaseDomain must be specified\n"}                                      │
│ 2021-06-25T07:53:34.505Z    INFO    che    validation errors    {"errors": "The following validation errors were detected:\n- workspaceBaseDomain must be specified\n"}                                      │
│ 2021-06-25T07:53:34.665Z    INFO    che    validation errors    {"errors": "The following validation errors were detected:\n- workspaceBaseDomain must be specified\n"}                                      │
│ 2021-06-25T07:53:34.986Z    INFO    che    validation errors    {"errors": "The following validation errors were detected:\n- workspaceBaseDomain must be specified\n"}                                      │
│ 2021-06-25T07:53:35.626Z    INFO    che    validation errors    {"errors": "The following validation errors were detected:\n- workspaceBaseDomain must be specified\n"}                                      │
│ 2021-06-25T07:53:36.907Z    INFO    che    validation errors    {"errors": "The following validation errors were detected:\n- workspaceBaseDomain must be specified\n"}                                      │
│ 2021-06-25T07:53:39.467Z    INFO    che    validation errors    {"errors": "The following validation errors were detected:\n- workspaceBaseDomain must be specified\n"}

To fix it I've manually add to CheManager CR

workspaceBaseDomain: 192.168.64.208.nip.io

Знімок екрана 2021-06-25 о 11 33 24

After that I saw that configbump/trefik deployment

Знімок екрана 2021-06-25 о 11 08 16

After that, I was able to create a workspace from the dashboard.
Знімок екрана 2021-06-25 о 11 10 01
And It pods successfully started
Знімок екрана 2021-06-25 о 11 16 40
Theia showed up. Hower I saw some eroros. Maybe related to TLS
Знімок екрана 2021-06-25 о 11 37 26

@skabashnyuk
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/che-operator Issues and PRs related to Eclipse Che Kubernetes Operator kind/enhancement A feature request - must adhere to the feature request template. kind/task Internal things, technical debt, and to-do tasks to be performed.
Projects
None yet
Development

No branches or pull requests

4 participants