Coder Social home page Coder Social logo

che-plugin-registry's Introduction

CircleCI Build Status

Eclipse Che plugin registry

Build Eclipse Che plugin registry container image

Most of the time you won't need to rebuild the image because we build quay.io/openshiftio/che-plugin-registry:latest after every commit in master. In case you needed to change the content of the registry (e.g. add or modify some plugins meta.yaml) you can build your own image executing

docker build --no-cache -t quay.io/openshiftio/che-plugin-registry .

Where --no-cache is needed to prevent usage of cached layers with plugin registry files. Useful when you change plugin metadata files and rebuild the image.

Note that the Dockerfiles feature multi-stage build, so it requires Docker version 17.05 or higher.

Run Eclipse Che plugin registry on OpenShift

You can deploy Che plugin registry on Openshift with command.

  oc new-app -f openshift/che-plugin-registry.yml \
             -p IMAGE="quay.io/openshiftio/che-plugin-registry" \
             -p IMAGE_TAG="latest" \
             -p PULL_POLICY="IfNotPresent"

Run Eclipse Che plugin registry on Kubernetes

You can deploy Che plugin registry on Kubernetes using helm. For example if you want to deploy it in the namespace kube-che and you are using minikube you can use the following command.

NAMESPACE="kube-che"
DOMAIN="$(minikube ip).nip.io"
helm upgrade --install che-plugin-registry \
    --debug \
    --namespace ${NAMESPACE} \
    --set global.ingressDomain=${DOMAIN} \
    ./kubernetes/che-plugin-registry/

You can use the following command to uninstall it.

helm delete --purge che-plugin-registry

Run Eclipse Che plugin registry using Docker

docker run -it  --rm  -p 8080:8080 quay.io/openshiftio/che-plugin-registry

Plugin meta YAML structure

Here is an overview of all fields that can be present in plugin meta YAML files. This document represents the current v3 version.

apiVersion:            # plugin meta.yaml API version -- v2; v1 supported for backwards compatability
publisher:             # publisher name; must match [-a-z0-9]+
name:                  # plugin name; must match [-a-z0-9]+
version:               # plugin version; must match [-.a-z0-9]+
type:                  # plugin type; e.g. "Theia plugin", "Che Editor"
displayName:           # name shown in user dashboard
title:                 # plugin title
description:           # short description of plugin's purpose
icon:                  # link to SVG icon
repository:            # URL for plugin (e.g. Github repo)
category:              # see [1]
firstPublicationDate:  # optional; see [2]
latestUpdateDate:      # optional; see [3]
deprecate:             # optional; section for deprecating plugins in favor of others
  autoMigrate:         # boolean
  migrateTo:           # new plugin id
spec:                  # spec (used to be che-plugin.yaml)
  endpoints:           # optional; plugin endpoints -- see https://www.eclipse.org/che/docs/che-6/servers.html for more details
    - name:
      public:            # if true, endpoint is exposed publicly
      targetPort:
      attributes:
        protocol:        # protocol used for communicating over endpoint, e.g. 'ws' or 'http'
        secure:          # use secure version of protocol above; convert 'ws' -> 'wss', 'http' -> 'https'
        discoverable:    # if false, no k8s service is created for this endpoint
        cookiesAuthEnabled: # if true, endpoint is exposed through JWTProxy
        type:
        path:
  containers:          # optional; sidecar containers for plugin
    - image:
      name:              # name used for sidecar container
      memorylimit:       # Kubernetes/OpenShift-spec memory limit string (e.g. "512Mi")
      env:               # list of env vars to set in sidecar
        - name:
          value:
      volumes:           # volumes required by plugin
        - mountPath:
          name:
      ports:             # ports exposed by plugin (on the container)
        - exposedPort:
      commands:          # commands available to plugin container
        - name:
          workingDir:
          command:       # list of commands + arguments, e.g.:
            - rm
            - -rf
            - /cache/.m2/repository
      mountSources:      # boolean
  workspaceEnv:        # optional; env vars for the workspace
    - name:
      value:
  extensions:            # optional; required for VS Code/Theia plugins; list of urls to plugin artifacts (.vsix/.theia files) -- examples follow
    - https://github.com/Azure/vscode-kubernetes-tools/releases/download/0.1.17/vscode-kubernetes-tools-0.1.17.vsix # example
    - vscode:extension/redhat.vscode-xml # example
    - https://github.com/redhat-developer/omnisharp-theia-plugin/releases/download/v0.0.1/omnisharp_theia_plugin.theia # example

1 - Category must be equal to one of the following: "Editor", "Debugger", "Formatter", "Language", "Linter", "Snippet", "Theme", "Other"

2 - firstPublicationDate is not required to be present in YAML, as if not present, it will be generated during Plugin Registry dockerimage build

3 - latestUpdateDate is not required to be present in YAML, as it will be generated during Plugin Registry dockerimage build

Note that the spec section above comes from the older che-plugin.yaml spec. The endpoints, containers, and workspaceEnv are passed back to Che server and are used to define the sidecar that is added to the workspace.

At the moment, some of these fields (that are related to plugin viewer) are validated during the Plugin Registry dockerimage build.

Get index list of all plugins

Example:

curl  "http://localhost:8080/v3/plugins/index.json"

or

curl  "http://localhost:8080/v3/plugins/"

Response:

[
  {
    "id": "eclipse/che-theia/latest",
    "displayName": "theia-ide",
    "version": "latest",
    "type": "Che Editor",
    "name": "che-theia",
    "description": "Eclipse Theia",
    "publisher": "eclipse",
    "links": {
      "self": "/v3/plugins/eclipse/che-theia/latest"
    }
  },
  {
    "id": "eclipse/che-theia/next",
    "displayName": "theia-ide",
    "version": "next",
    "type": "Che Editor",
    "name": "che-theia",
    "description": "Eclipse Theia, get the latest release each day.",
    "publisher": "eclipse",
    "links": {
      "self": "/v3/plugins/eclipse/che-theia/next"
    }
  }
]

Get meta.yaml of a plugin

Example:

curl  "http://localhost:8080/v3/plugins/eclipse/che-theia/next/meta.yaml"

or

curl  "http://localhost:8080/v3/plugins/eclipse/che-theia/latest/meta.yaml"

Response:

apiVersion: v2
publisher: eclipse
name: che-theia
version: next
type: Che Editor
displayName: theia-ide
title: Eclipse Theia development version.
description: Eclipse Theia, get the latest release each day.
icon: https://raw.githubusercontent.com/theia-ide/theia/master/logo/theia-logo-no-text-black.svg?sanitize=true
category: Editor
repository: https://github.com/eclipse/che-theia
firstPublicationDate: "2019-03-07"
spec:
  endpoints:
  - name: theia
    public: true
    targetPort: 3100
    attributes:
      protocol: http
      type: ide
      secure: true
      cookiesAuthEnabled: true
      discoverable: false
  - name: theia-dev
    public: true
    targetPort: 3130
    attributes:
      protocol: http
      type: ide-dev
      discoverable: false
  - name: theia-redirect-1
    public: true
    targetPort: 13131
    attributes:
      protocol: http
      discoverable: false
  - name: theia-redirect-2
    public: true
    targetPort: 13132
    attributes:
      protocol: http
      discoverable: false
  - name: theia-redirect-3
    public: true
    targetPort: 13133
    attributes:
      protocol: http
      discoverable: false
  containers:
  - name: theia-ide
    image: eclipse/che-theia:next
    env:
    - name: THEIA_PLUGINS
      value: local-dir:///plugins
    - name: HOSTED_PLUGIN_HOSTNAME
      value: 0.0.0.0
    - name: HOSTED_PLUGIN_PORT
      value: 3130
    volumes:
    - mountPath: /plugins
      name: plugins
    mountSources: true
    ports:
    - exposedPort: 3100
    - exposedPort: 3130
    - exposedPort: 13131
    - exposedPort: 13132
    - exposedPort: 13133
    memoryLimit: 512M
latestUpdateDate: "2019-07-05"

License

Che is open sourced under the Eclipse Public License 2.0.

che-plugin-registry's People

Contributors

amisevsk avatar andrienkoaleksandr avatar apupier avatar azatsarynnyy avatar benoitf avatar delchev avatar evidolob avatar ibuziuk avatar jpinkney avatar l0rd avatar metlos avatar mickaelistria avatar mkuznyetsov avatar mmorhun avatar monaka avatar mshaposhnik avatar skabashnyuk avatar sleshchenko avatar sunix avatar svor avatar tolusha avatar vinokurig avatar vparfonov avatar vrubezhny avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.