question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Devfile] Support commands for Os/K8s tool

See original GitHub issue

Description

Now we support commands only for the ChePlugin or CheEditor tool. We want to introduce an ability to define commands for OS/K8s tools Like

specVersion: 0.0.1
name: che-in-che
projects:
  - name: che
    source:
      type: git
      location: 'https://github.com/eclipse/che.git'
tools:
  - name: theia-editor
    type: cheEditor
    id: org.eclipse.che.editor.theia:1.0.0
  - name: exec-plugin
    type: chePlugin
    id: che-machine-exec-plugin:0.0.1
  - name: che-dev
    type: openshift
    local: .che-dev.yaml
commands:
  - name: build
    actions:
      - type: exec
        tool: che-dev
        command: mvn clean install
        workdir: /projects/che

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
sleshchenkocommented, Jan 30, 2019
  1. If a tool has a single pod with one container - run inside of it.

It’s what I mentioned - We can easily implement it now - let’s do it.

  1. If a tool has multiple pods with one container inside of each - use selectors to match pod with a single container.
  2. all other cases - let Theia to ask concrete container + create an issue if necessary to improve this situation.

We can create another issue for Implement an ability to specify container for Kubernetes/OpenShift tool command where we can discuss and implement the following Devfile format changes

specVersion: 0.0.1
name: che-in-che
projects:
   ...
tools:
  - name: theia-editor
    type: cheEditor
    id: org.eclipse.che.editor.theia:1.0.0
  - name: che-dev
    type: openshift
    local: che-dev.yaml
commands:
  - name: build
    actions:
      - type: exec
        tool: 
          name: che-dev
          containerName: mysql
          podName: db
          selector:
            app.kubernetes.io/component: database
        command: mvn clean install
        workdir: /projects/che

Where new fields selector, containerName, podName can pick up needed containers/container.

0reactions
sleshchenkocommented, Feb 6, 2019

A case when K8s/OS tool has only one container is already handled by the following PR https://github.com/eclipse/che/pull/12589. For handling a case when K8s/OS tool has several containers there new issue is registered https://github.com/eclipse/che/issues/12606

Read more comments on GitHub >

github_iconTop Results From Across the Web

Introduction to Devfile - GitHub Pages
A list of commands: actions to manage the workspace components like running the dev tools, starting the runtime environments etc… Example of the...
Read more >
Chapter 4. Authoring devfiles - Red Hat Customer Portal
List of commands: Actions to manage the workspace components, such as running the development tools, starting the runtime environments, and others. Example of...
Read more >
Adding commands - Devfile
A devfile allows to specify commands to be available for execution in a workspace. ... The support groups are: build , run ,...
Read more >
Devfile Reference - odo
This API Reference uses examples and snippets to help you create your own ... These commands are typically tied to Kubernetes or OpenShift...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found