-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Implementation of local part of devfile feature #11832
Comments
hello, do we already have complete examples of the new model ? |
@mshaposhnik I think it makes sense to duplicate plan what should be done in PR description or at least specify the comment in the description. Otherwise, DoD of the issue is not clear enough. |
@skabashnyuk repo_url is not related to this issue. And proposed schema is only a draft afaiu |
@mshaposhnik fixed |
Current Che7 command configuration is:
The good point that we can now specify the machine name on which the command will be run.
should be mapped into workspace config as two different commands, with machine names somehow mapped from the |
So the proposed both directions mapping:
@skabashnyuk @l0rd is that seems ok for the beginning? |
Why do not do tool as optional parameter, which could mean that user should choose machine (tool) where command should be run? |
I wasn't involved into the discussion of the devfile functionality previously. Now I'm trying to understand how it should work and how to implement what is described here and don't understand that. Other points @sleshchenko and I came across during our discussion of dev file concept: It doesn't mention recipe of the user environment, but shows that MySQL can be started from a compose file or dockerimage. Isn't this conflicts with the idea of adding tooling on top of a user production definition as we wanted to see in Che 7? Without any user recipe it looks like a new Che 6 feature. Should we have an action to run user recipe described in a file(OS templates or helm)? Another thing we wanted to comment is that Che plugin is not equal to container since some of them do not bring any containers but just get integrated inTheia (or other IDE). As to the currently described model we think that it can be improved with the follwing structure:
Where the changes are:
We might want to postpone implementation of some of the features but would be great to think about the model structure at least. And having a spec or issue with all the described features would help to save the context and decisions implementation of which was postponed. |
@mshaposhnik I think you have swapped @sleshchenko I see your point but it's not about making the tool name optional (the command should always be run inside a container) but making it possible to decide the tool name at runtime with a variable or prompting the user. So the author of a devfile should make it explicit: name: run
toolsCommands:
- tool: ${user.param1}
action:
exec:
command: mvn spring-boot:run
workdir: /projects/spring-petclinic |
@mshaposhnik @skabashnyuk given the feedbacks I would like to do some changes in the
- name: theia-ide
definition:
cheEditor:
name: theia:0.0.3
commands:
- name: build
tools:
- name: mvn-stack
(...)
- name: theia-ide
definition:
cheEditor:
id: eclipse/theia:0.0.3 |
@garagatyi I somehow missed your (quite long and difficult to miss :-)) comment. Anyway I like your changes for the model. I will reflect them in https://github.com/l0rd/devfile/ and ask your review from @skabashnyuk and @mshaposhnik for approval. I will also look at moving the devfile repository in the redhat-developer organisation. For your concerns at the beginning of your comment:
Let's do a call if you think there are still some aspects that need to be clarified. |
@l0rd let me explain our concerns about plugin brokering. As for the recipe. We saw that it is possible to configure something in your devfile repo, but this is not part of the description of this issue. This is our concern. Is the plan to add recipe related stuff to the spec later or just implement it later? What should we treat as a reference spec - issues from the platform team or your repo? |
To summarize: the biggest concern, probably, is how this dev file would be written and used by an end user. |
@garagatyi if I understand correctly you are worried about users that add command for tools that are not sidecars. I would not worry about that for now:
|
@mshaposhnik @skabashnyuk @benoitf @garagatyi I have opened this PR to change the spec https://github.com/l0rd/devfile/pull/1/commits. Please have a look. The petclinic example has become: ---
version: 0.0.1
name: petclinic-dev-environment
projects:
- name: petclinic
source:
type: git
location: 'git@github.com:spring-projects/spring-petclinic.git'
tools:
- name: mvn-stack
type: dockerImage
image: maven:3.5.4-jdk-8
entryPoint: sleep infinity
persistentVolumes:
- name: maven-repo
containerPath: /root/.m2
services:
- name: spring-boot
port: 8080
mountProjectsSources: true
- name: mysql
type: composeFile
local: docker-compose.yml
- name: theia-ide
type: cheEditor
id: eclipse/theia:0.0.3
- name: jdt.ls
type: chePlugin
id: eclipse/theia-jdtls:0.0.3
commands:
- name: build
actions:
- type: exec
tool: mvn-stack
command: mvn package
workdir: /projects/spring-petclinic
- name: run
attributes:
runType: sequential
actions:
- type: start
tool: mysql
timeout: 20s
- type: exec
tool: mvn-stack
command: mvn spring-boot:run
workdir: /projects/spring-petclinic Once the PR is merged I will move the repository to redhat-developer. @mshaposhnik something that you may do as part of this issue is to create a json-schema for the devfile and add it to the devfile github repo. It's a well known standard for defining data formats. It will help with the discussion and allows to generate doc and API source code too. |
@l0rd @skabashnyuk @mshaposhnik |
Implement local part of devfile feature (not related to remote repository fetching via git URL etc) which includes:
etc...
Example of yaml functionality
The text was updated successfully, but these errors were encountered: