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

Provide VS Code Tekton in plug-in registry #15752

Closed
apupier opened this issue Jan 20, 2020 · 14 comments · Fixed by eclipse-che/che-plugin-registry#503
Closed

Provide VS Code Tekton in plug-in registry #15752

apupier opened this issue Jan 20, 2020 · 14 comments · Fixed by eclipse-che/che-plugin-registry#503
Labels
area/plugin-registry kind/enhancement A feature request - must adhere to the feature request template. severity/P2 Has a minor but important impact to the usage or development of the system.

Comments

@apupier
Copy link
Contributor

apupier commented Jan 20, 2020

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.

@apupier apupier added kind/enhancement A feature request - must adhere to the feature request template. area/plugin-registry labels Jan 20, 2020
@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 Jan 20, 2020
@ibuziuk
Copy link
Member

ibuziuk commented Jan 20, 2020

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

@apupier
Copy link
Contributor Author

apupier commented Jan 20, 2020

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.

@ibuziuk ibuziuk added severity/P2 Has a minor but important impact to the usage or development of the system. team/plugins and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Jan 20, 2020
@ericwill
Copy link
Contributor

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.

@apupier
Copy link
Contributor Author

apupier commented Jan 20, 2020

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

yes

@gattytto
Copy link

gattytto commented Feb 6, 2020

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

# 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

@apupier
Copy link
Contributor Author

apupier commented Feb 6, 2020

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.

@gattytto
Copy link

gattytto commented Feb 6, 2020

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

@apupier
Copy link
Contributor Author

apupier commented Feb 6, 2020

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

@gattytto
Copy link

gattytto commented Feb 6, 2020

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

@benoitf
Copy link
Contributor

benoitf commented Feb 6, 2020

@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.

@gattytto
Copy link

now I get this when using the following meta.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

@gattytto
Copy link

gattytto commented Feb 12, 2020

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

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

@gattytto
Copy link

gattytto commented Mar 10, 2020

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

@gattytto
Copy link

new version of the tekton extension works too!
image

@ericwill ericwill mentioned this issue Apr 22, 2020
52 tasks
@ericwill ericwill mentioned this issue May 13, 2020
43 tasks
ericwill added a commit to eclipse-che/che-plugin-registry that referenced this issue Aug 5, 2020
Closes eclipse-che/che#15752

* WIP as the sidecar container has not been finished -- I am using my own quay repo for testing.
* using vscode-ext 0.2.0
* Update link to 0.2.0 plugin version
* Update to published sidecar, update deps
* Add volume for kube config to persist
* Adjust memory maximum
* Consolidate kube volume names

Signed-off-by: Eric Williams <ericwill@redhat.com>
Co-authored-by: Sun Seng David TAN <sutan@redhat.com>
monaka pushed a commit to PizzaFactory/che-plugin-registry that referenced this issue Aug 8, 2020
Closes eclipse-che/che#15752

* WIP as the sidecar container has not been finished -- I am using my own quay repo for testing.
* using vscode-ext 0.2.0
* Update link to 0.2.0 plugin version
* Update to published sidecar, update deps
* Add volume for kube config to persist
* Adjust memory maximum
* Consolidate kube volume names

Signed-off-by: Eric Williams <ericwill@redhat.com>
Co-authored-by: Sun Seng David TAN <sutan@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/plugin-registry kind/enhancement A feature request - must adhere to the feature request template. severity/P2 Has a minor but important impact to the usage or development of the system.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants