Che: Provide VS Code Tekton in plug-in registry

Created on 20 Jan 2020  路  14Comments  路  Source: eclipse/che

Is your enhancement related to a problem? Please describe.

Tekton is one of the solution to do CI/CD for Kubernetes development. Sounds like a good addition to the Kubernetes application development story in Eclipse Che.

Describe the solution you'd like

Describe alternatives you've considered

Additional context

Red Hat integration and Apache Camel K are planning to provide quickstarts with Tekton pipelines. it will be a good fit with Apache Camel K stack.

areplugin-registry kinenhancement severitP2 teaplugins

Most helpful comment

My point is as "the tekton vscode extension required the kubernetes one", why not extending the che-sidecar-kubernetes?

You will have a much simpler Dockerfile to maintain and it will provide smaller images to download, something like:

FROM quay.io/eclipse/che-sidecar-kubernetes-tooling:1.0.9-a40b3bb

RUN dnf install -y dnf-plugins-core && \
      dnf copr enable -y chmouel/tektoncd-cli && \
      dnf install -y tektoncd-cli

All 14 comments

@apupier could you please clarify if you are going to work on this issue?

could you please clarify if you are going to work on this issue?

I have no plan to work on this issue myself on short term.

By VS Code Tekton I assume you mean: https://github.com/redhat-developer/vscode-tekton

This might be a nice ramp-up task for me to look at next sprint.

By VS Code Tekton I assume you mean: https://github.com/redhat-developer/vscode-tekton

yes

yaml apiVersion: v2 publisher: ms-vscode name: tekton version: 0.0.3 type: VS Code extension displayName: Tekton title: Tekton pipelines support description: This extension adds rich pipeline support for Tekton icon: https://www.eclipse.org/che/images/logo-eclipseche.svg repository: https://github.com/redhat-developer/vscode-tekton category: Language firstPublicationDate: '2019-09-19' spec: containers: - image: "quay.io/gattytto/che-sidecar-tekton:latest" name: vscode-tekton memoryLimit: '256Mi' extensions: - https://github.com/redhat-developer/vscode-yaml/releases/download/0.4.0/redhat.vscode-yaml-0.4.0.vsix - https://download.jboss.org/jbosstools/vscode/3rdparty/vscode-kubernetes-tools/vscode-kubernetes-tools-1.0.9.vsix - https://github.com/redhat-developer/vscode-tekton/releases/download/v0.0.3/tekton-pipelines-0.0.3-105.vsix

che-sidecar-tekton
````Dockerfile

Copyright (c) 2019 Red Hat, Inc.

This program and the accompanying materials are made

available under the terms of the Eclipse Public License 2.0

which is available at https://www.eclipse.org/legal/epl-2.0/

#

SPDX-License-Identifier: EPL-2.0

#

Contributors:

Red Hat, Inc. - initial API and implementation

FROM quay.io/buildah/stable:v1.11.3

ENV KUBECTL_VERSION v1.17.0
ENV HELM_VERSION v3.0.2
ENV HOME=/home/theia

ADD etc/storage.conf $HOME/.config/containers/storage.conf

RUN mkdir /projects && \
# Change permissions to let any arbitrary user
for f in "${HOME}" "/etc/passwd" "/projects"; do \
echo "Changing permissions on ${f}" && chgrp -R 0 ${f} && \
chmod -R g+rwX ${f}; \
done && \
# buildah login requires writing to /run
chgrp -R 0 /run && chmod -R g+rwX /run && \
curl https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /usr/local/bin/kubectl && \
chmod +x /usr/local/bin/kubectl && \
curl -o- -L https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz | tar xvz -C /usr/local/bin --strip 1 && \
# 'which' utility is used by VS Code Kubernetes extension to find the binaries, e.g. 'kubectl'
dnf install -y which nodejs dnf-plugins-core && \
dnf copr enable -y chmouel/tektoncd-cli && \
dnf install -y tektoncd-cli

ADD etc/entrypoint.sh /entrypoint.sh

ENTRYPOINT [ "/entrypoint.sh" ]
CMD ${PLUGIN_REMOTE_ENDPOINT_EXECUTABLE}
````

image

what about inheriting from the che-sidecar-kubernetes so that you just have to add the tekton specific bits?
It will allow to have layered images and have faster download.

base is buildah, I use the same for kube/bazel/tekton and in each case I add what's needed from dnf (like java for bazel and tekton bin using dnf copr plugin).

the tekton vscode extension required the kubernetes one and kubernetes one required the yaml one.. that's why the 3 are present in the manifest

My point is as "the tekton vscode extension required the kubernetes one", why not extending the che-sidecar-kubernetes?

You will have a much simpler Dockerfile to maintain and it will provide smaller images to download, something like:

FROM quay.io/eclipse/che-sidecar-kubernetes-tooling:1.0.9-a40b3bb

RUN dnf install -y dnf-plugins-core && \
      dnf copr enable -y chmouel/tektoncd-cli && \
      dnf install -y tektoncd-cli

thanks I'll do the improvements to the image soon, now found a working test. I had to run it in "che" namespace using the command: "tkn p start pipeline-test -n che"

image

@apupier yes, good idea about reusing parts of other images.
Also, as we want to reduce the number of containers when extensions may work in the same container, inheriting from the kubernetes image might help to achieve that.

now I get this when using the following meta.yaml.

yaml apiVersion: v2 publisher: ms-vscode name: tekton version: 0.0.3 type: VS Code extension displayName: Tekton title: Tekton pipelines support description: This extension adds rich pipeline support for Tekton icon: https://www.eclipse.org/che/images/logo-eclipseche.svg repository: https://github.com/redhat-developer/vscode-tekton category: Language firstPublicationDate: '2019-09-19' spec: containers: - image: "quay.io/gattytto/che-sidecar-tekton:latest" name: vscode-tekton memoryLimit: '512Mi' extensions: - https://github.com/redhat-developer/vscode-yaml/releases/download/0.7.0-prerelease/redhat.vscode-yaml-0.7.0-prerelease.vsix - https://download.jboss.org/jbosstools/vscode/3rdparty/vscode-kubernetes-tools/vscode-kubernetes-tools-1.0.9.vsix - https://download.jboss.org/jbosstools/adapters/snapshots/vscode-tekton/tekton-pipelines-0.0.4-114.vsix

image

@JPinkney provided the solution which was using the 0.7.2 release of the yaml extension:

yaml apiVersion: v2 publisher: ms-vscode name: tekton version: 0.0.3 type: VS Code extension displayName: Tekton title: Tekton pipelines support description: This extension adds rich pipeline support for Tekton icon: https://www.eclipse.org/che/images/logo-eclipseche.svg repository: https://github.com/redhat-developer/vscode-tekton category: Language firstPublicationDate: '2019-09-19' spec: containers: - image: "quay.io/gattytto/che-sidecar-tekton:latest" name: vscode-tekton memoryLimit: '512Mi' extensions: - https://github.com/redhat-developer/vscode-yaml/releases/download/0.7.2/redhat.vscode-yaml-0.7.2.vsix - https://download.jboss.org/jbosstools/vscode/3rdparty/vscode-kubernetes-tools/vscode-kubernetes-tools-1.0.9.vsix - https://download.jboss.org/jbosstools/adapters/snapshots/vscode-tekton/tekton-pipelines-0.0.4-114.vsix
image

there's now some more work from the people working around Tekton. There's an app called Octant which looks very much like the kubernetes dashboard, then Tekton ppl made a tekton-plugin for it.

I tried adding it to my tekton sidecar and it seems to work almost out of the box.
https://github.com/gattytto/che-sidecar-tekton/blob/master/Dockerfile

image

Peek 12-03-2020 14-45

new version of the tekton extension works too!
image

Was this page helpful?
0 / 5 - 0 ratings