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

Add an ability to use Devfile as part of Stack API #13338

Closed
sleshchenko opened this issue May 15, 2019 · 1 comment
Closed

Add an ability to use Devfile as part of Stack API #13338

sleshchenko opened this issue May 15, 2019 · 1 comment
Assignees
Labels
kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P1 Has a major impact to usage or development of the system. status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community.

Comments

@sleshchenko
Copy link
Member

Description

This is issues about adding an ability to use Defile as part of Stack.
It should cover Stacks for End-User user story of the following epic #12924.

It includes reworking Stack API in the same way as we did with Workspace API.
Add a new field devfile to stack object, modify REST API, DAOs to respect it.
Then stack can be defined with workspace config or devfile mutually exclusive.

As an example of Stack with devfile defined

Stacks with Devfile in JSON format
  {
    "id": "che7-preview",
    "creator": "ide",
    "name": "Che 7",
    "description": "Workspace.next sidecars and Theia as IDE",
    "scope": "general",
    "tags": [
      "ws.next",
      "Theia",
      "Java",
      "JDK",
      "Node.JS",
      "NPM",
      "Yeoman"
    ],
    "components": [
      {
        "name": "Centos",
        "version": "7"
      },
      {
        "name": "OpenJDK",
        "version": "1.8.0_181"
      },
      {
        "name": "NodeJS",
        "version": "8.12.0"
      },
      {
        "name": "NPM",
        "version": "6.4.1"
      }
    ],
    "devfile": {
      "name": "che7",
      "components": [
        {
          "type": "cheEditor",
          "id": "eclipse/che-theia/next"
        },
        {
          "type": "chePlugin",
          "id": "eclipse/che-machine-exec-plugin/0.0.1"
        },
        {
          "type": "kubernetes",
          "referenceContent": "kind: List\nitems:\n - \n  apiVersion: v1\n  kind: Pod\n  metadata:\n   name: ws\n  spec:\n   containers:\n    - \n     image: 'eclipse/che-dev:nightly'\n     name: dev\n     resources:\n      limits:\n       memory: 512Mi\n"
        }
      ]
    },
    "stackIcon": {
      "name": "type-che7.svg",
      "mediaType": "image/svg+xml"
    }
  }
Stacks with Devfile in YAML format
---
id: che7-preview
creator: ide
name: Che 7
description: Workspace.next sidecars and Theia as IDE
scope: general
tags:
- ws.next
- Theia
- Java
- JDK
- Node.JS
- NPM
- Yeoman
components:
- name: Centos
  version: '7'
- name: OpenJDK
  version: 1.8.0_181
- name: NodeJS
  version: 8.12.0
- name: NPM
  version: 6.4.1
devfile:
  name: che7
  components:
  - type: cheEditor
    id: eclipse/che-theia/next
  - type: chePlugin
    id: eclipse/che-machine-exec-plugin/0.0.1
  - type: kubernetes
    referenceContent: |
      kind: List
      items:
      - 
      apiVersion: v1
      kind: Pod
      metadata:
        name: ws
      spec:
        containers:
        - image: 'eclipse/che-dev:nightly'
          name: dev
          resources:
            limits:
             memory: 512Mi
stackIcon:
  name: type-che7.svg
  mediaType: image/svg+xml
@skabashnyuk skabashnyuk added kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P1 Has a major impact to usage or development of the system. team/platform labels May 15, 2019
@skabashnyuk skabashnyuk changed the title Add an ability to use Devfile as part of Stack Add an ability to use Devfile as part of Stack API May 15, 2019
@sleshchenko sleshchenko self-assigned this May 16, 2019
@sleshchenko sleshchenko added the status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community. label May 16, 2019
@skabashnyuk
Copy link
Contributor

This task goes in a bit different direction.
After discussion with @l0rd and @slemeur we identified that we want to go in the path of Che devfile registry. Similar to the plugin registry. Stacks API would be abandoned in Che7 eventually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P1 Has a major impact to usage or development of the system. status/code-review This issue has a pull request posted for it and is awaiting code review completion by the community.
Projects
None yet
Development

No branches or pull requests

2 participants