From ecaa2915670edceca85107844adb1ead922e9bea Mon Sep 17 00:00:00 2001 From: Nicolas MASSE Date: Mon, 23 Jan 2023 21:34:05 +0100 Subject: [PATCH] Update devfile.yaml --- devfile.yaml | 138 +++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 111 insertions(+), 27 deletions(-) diff --git a/devfile.yaml b/devfile.yaml index 169d218..0436886 100644 --- a/devfile.yaml +++ b/devfile.yaml @@ -22,47 +22,72 @@ starterProjects: origin: 'https://github.com/odo-devfiles/springboot-ex.git' components: - attributes: - che-code.eclipse.org/contribute-cpuLimit: false - che-code.eclipse.org/contribute-cpuRequest: false + che-code.eclipse.org/contribute-cpuLimit: true + che-code.eclipse.org/contribute-cpuRequest: true che-code.eclipse.org/contribute-endpoint/che-code: 3100 + che-code.eclipse.org/contribute-endpoint/code-redirect-1: 13131 + che-code.eclipse.org/contribute-endpoint/code-redirect-2: 13132 + che-code.eclipse.org/contribute-endpoint/code-redirect-3: 13133 che-code.eclipse.org/contribute-entry-point: true che-code.eclipse.org/contribute-memoryLimit: true - che-code.eclipse.org/contribute-memoryRequest: false + che-code.eclipse.org/contribute-memoryRequest: true che-code.eclipse.org/contribute-volume-mount/checode: /checode che-code.eclipse.org/contributed-container: tools che-code.eclipse.org/original-memoryLimit: 4G - name: tools container: - image: docker.io/adoptopenjdk/openjdk11:jdk-11.0.16.1_1-centos command: - /checode/entrypoint-volume.sh - memoryLimit: 5.07G - mountSources: true + cpuLimit: 500m + cpuRequest: 30m endpoints: - - exposure: public - name: quizz-question - targetPort: 8080 - protocol: tcp - - exposure: public - name: quizz-client - targetPort: 8081 - protocol: tcp - exposure: none name: debug - targetPort: 5858 protocol: tcp - volumeMounts: - - name: m2 - path: /home/user/.m2 + targetPort: 5005 + - exposure: public + name: hello-greeting-endpoint + path: /hello/greeting/devspaces-user + protocol: http + targetPort: 8080 + - attributes: + contributed-by: che-code.eclipse.org + cookiesAuthEnabled: true + discoverable: false + type: main + urlRewriteSupported: true + exposure: public + name: che-code + path: '?tkn=eclipse-che' + protocol: https + secure: false + targetPort: 3100 + - attributes: + contributed-by: che-code.eclipse.org + discoverable: false + urlRewriteSupported: true + exposure: public + name: code-redirect-1 + protocol: http + targetPort: 13131 + - attributes: + contributed-by: che-code.eclipse.org + discoverable: false + urlRewriteSupported: true + exposure: public + name: code-redirect-2 + protocol: http + targetPort: 13132 + - attributes: + contributed-by: che-code.eclipse.org + discoverable: false + urlRewriteSupported: true + exposure: public + name: code-redirect-3 + protocol: http + targetPort: 13133 env: - - name: DEBUG_PORT - value: '5858' - - name: MAVEN_OPTS - value: -Dmaven.repo.local=/home/user/.m2/repository - - name: MAVEN_USER_HOME - value: /home/user/.m2 - - name: HOME - value: /home/user + - name: QUARKUS_HTTP_HOST + value: 0.0.0.0 - name: CHE_DASHBOARD_URL value: 'https://devspaces.apps.appdev.itix.xyz' - name: CHE_PLUGIN_REGISTRY_URL @@ -71,6 +96,65 @@ components: value: 'http://plugin-registry.openshift-devspaces.svc:8080/v3' - name: OPENVSX_REGISTRY_URL value: 'https://open-vsx.org' + image: 'registry.redhat.io/devspaces/udi-rhel8@sha256:ac5aaba0bbf1caa7f23205ab837e3029ff9f605211ebf38bdf4b9f1b8fb1ba83' + memoryLimit: 5.07G + memoryRequest: 256Mi + mountSources: true + sourceMapping: /projects + volumeMounts: + - name: m2 + path: /home/user/.m2 + - name: checode + path: /checode + name: tools - name: m2 + volume: + size: 1G + - name: kube volume: {} + - name: openshift + container: + image: quay.io/openshift/origin-cli:4.11 + command: ["tail", "-f", "/dev/null"] + memoryLimit: 512Mi + mountSources: true + volumeMounts: + - name: kube + path: /home/user/.kube + env: + - name: PATH + value: '/tmp/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' +commands: + - id: model-install + exec: + component: tools + workingDir: ${PROJECT_SOURCE}/quizz-model + commandLine: './mvnw clean install -DskipTests' + group: + kind: build + isDefault: true + - id: client-devmode + exec: + component: tools + workingDir: ${PROJECT_SOURCE}/quizz-client + commandLine: './mvnw compile quarkus:dev' + group: + kind: build + isDefault: true + - id: question-devmode + exec: + component: tools + workingDir: ${PROJECT_SOURCE}/quizz-question + commandLine: './mvnw compile quarkus:dev' + group: + kind: build + isDefault: true + - id: tkn-start-pipeline + exec: + component: openshift + workingDir: ${PROJECT_SOURCE} + commandLine: 'mkdir -p /tmp/bin ; if [ ! -f /tmp/bin/tkn ]; then curl -sSL https://github.com/tektoncd/cli/releases/download/v0.27.0/tkn_0.27.0_Linux_x86_64.tar.gz | tar -zx -C /tmp/bin tkn ; fi ; tkn pipeline start -n cheese-quizz quizz-client-pipeline' + group: + kind: build + isDefault: true