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

New devfile based stacks should contain samples #13529

Closed
l0rd opened this issue Jun 12, 2019 · 20 comments
Closed

New devfile based stacks should contain samples #13529

l0rd opened this issue Jun 12, 2019 · 20 comments
Assignees
Labels
kind/enhancement A feature request - must adhere to the feature request template. severity/blocker Causes system to crash and be non-recoverable or prevents Che developers from working on Che code. status/in-progress This issue has been taken by an engineer and is under active development.
Milestone

Comments

@l0rd
Copy link
Contributor

l0rd commented Jun 12, 2019

Description

Currently a Che stack (i.e. java-maven) is associated to one or more samples (e.g. web-java-petclinic and console-java-simple). But often different samples of the same stack requires different settings (env variables, memory, commands) and making generic stacks that work with every project is hard.

Another point is that from a UX point of view it's more straightforward to select a vue.js or a angular stack rather than selecting the node js stack and then the angular sample.

So this issue is about the proposal to associate every stack to one unique project sample. The project, as well as the commands, would be specified in the the stack devfiles. The user would still be able to override the sample stack project and commands.

image

@l0rd
Copy link
Contributor Author

l0rd commented Jun 13, 2019

stack sample reference
java-maven https://github.com/che-samples/console-java-simple ✔️ PR
java-gradle https://github.com/che-samples/console-java-simple ✔️ PR
java-spring-web https://github.com/che-samples/web-java-spring.git ✔️ PR
java-vertx https://github.com/vert-x3/vertx-examples ✔️ PR
java-postgresql java-mysql https://github.com/che-samples/web-java-spring-petclinic/tree/ ✔️ PR
apache-camel https://github.com/apache/camel/tree/master/examples/camel-example-spring-boot ✔️ PR
python3 https://github.com/che-samples/console-python3-simple.git ✔️ PR
django https://github.com/gothinkster/django-realworld-example-app ✔️ PR
c# https://github.com/che-samples/dotnet-web-simple.git ✔️ PR
ASP.NET https://github.com/che-samples/dotnet-web-simple.git @tolusha
Go https://github.com/golang/example/tree/master/outyet ✔️ PR
Go https://github.com/xesina/golang-echo-realworld-example-app HOLD - issue
PHP https://github.com/che-samples/web-php-simple ✔️ Languages Team Issue
PHP-laravel https://github.com/gothinkster/laravel-realworld-example-app ✔️ Languages Team Issue
PHP-symfony https://github.com/gothinkster/laravel-realworld-example-app ✔️ Languages Team Issue
PHP-mysql https://github.com/taniarascia/pdo/tree/master ✔️ Languages Team Issue
nodejs https://github.com/che-samples/web-nodejs-sample ✔️ eclipse-che/che-devfile-registry#15
nodejs-mongo https://github.com/gothinkster/node-express-realworld-example-app ✔️ eclipse-che/che-devfile-registry#22
react https://github.com/gothinkster/react-redux-realworld-example-app ✔️ PR
angular https://github.com/gothinkster/angular-realworld-example-app ✔️ eclipse-che/che-devfile-registry#19
vuejs https://github.com/gothinkster/vue-realworld-example-app HOLD - issue

@skabashnyuk
Copy link
Contributor

@l0rd is this issue #13533 will be handled in your pr eclipse-che/che-devfile-registry#15 ? Do you know?

@l0rd
Copy link
Contributor Author

l0rd commented Jun 19, 2019

@skabashnyuk that issue looked related to an outdated sample. The devfile I have added in the PR is not affected by that problem.

@l0rd
Copy link
Contributor Author

l0rd commented Jun 20, 2019

Other nice to have stacks...AFTER CHE 7.0.0 GA

stack
quarkus
jib
ko
micronaut
microprofile
kubernetes-operator
che
theia
che-operator
chectl
che-plugin-broker
vs-code-extension-dev
che-doc

@skabashnyuk
Copy link
Contributor

@l0rd are they blocker for GA?

@l0rd
Copy link
Contributor Author

l0rd commented Jun 20, 2019

"nice to have"

@l0rd l0rd mentioned this issue Jun 27, 2019
85 tasks
@l0rd l0rd added severity/blocker Causes system to crash and be non-recoverable or prevents Che developers from working on Che code. target/che7GA and removed target/che7GA severity/P1 Has a major impact to usage or development of the system. labels Jun 27, 2019
@metlos
Copy link
Contributor

metlos commented Jul 3, 2019

Before I leave on vacation, let me describe the state of the outstanding samples as I am aware about them.

Vuejs

We can either wait for #13672 to be finished or, if we postpone that issue to 7.1 but need to have a vuejs sample in 7.0, we can use the following devfile in the sample (it will lack support for Vue-specific stuff but will have support for typescript/javascript and npm):

---
apiVersion: 1.0.0
metadata:
  name: vuejs
projects:
  -
    name: vuejs-app
    source:
      type: git
      location: "https://github.com/gothinkster/vue-realworld-example-app.git"
components:
  -
    type: chePlugin
    id: che-incubator/typescript/latest
    memoryLimit: 512Mi
  -
    type: dockerimage
    alias: nodejs
    image: registry.access.redhat.com/ubi8/nodejs-10
    command: ['sleep']
    args: ['infinity']
    env:
      - name: HOME
        value: /tmp/user
      - name: PS1
        value: $(echo ${0})\\$
    memoryLimit: 512Mi
    endpoints:
      - name: 'vuejs-app'
        port: 8080
        attributes:
          discoverable: 'true'
    mountSources: true
commands:
  -
    name: run the web app
    actions:
      - type: exec
        component: nodejs
        command: npm install && npm run serve
        workdir: ${CHE_PROJECTS_ROOT}/vuejs-app
  -
    name: enable app preview
    actions:
      - type: exec
        component: nodejs
        command: |
          echo "module.exports = {devServer: {disableHostCheck: true}};" > vue.config.js
        workdir: ${CHE_PROJECTS_ROOT}/vuejs-app

Go with https://github.com/xesina/golang-echo-realworld-example-app

This needs discussion with @tolusha and @tsmaeder on how best to define the sample, because our che plugin for Go uses golang 1.10.7 but the project requires Go modules, which are available from golang 1.11.

java-mysql

I updated this devfile to use the oficial spring petclinic project.

java-spring-web

I swapped the example for the spring-petclinic so that we have a more modern Spring-based application. As such this sample only differs from java-mysql in the fact that it doesn't defin the MySQL component and uses H2 instead.

##java-vertx

I think this is ready as is in the PR mentioned in the table.

react

I have done nothing on this.

ASP.NET

No progress has been made on the sample.

@tolusha
Copy link
Contributor

tolusha commented Jul 5, 2019

@l0rd @metlos @tsmaeder
If nobody minds I will start working on react sample

@l0rd
Copy link
Contributor Author

l0rd commented Jul 5, 2019

@tolusha go ahead

@sparkoo
Copy link
Member

sparkoo commented Jul 9, 2019

I've created an issue for Go realworld sample project #13803. This should be linked in the table #13529 (comment). Could someone please edit the table and add reference there? Thanks

@sparkoo
Copy link
Member

sparkoo commented Jul 10, 2019

status update of #13529 (comment)

Vuejs

postponed to 7.1.0 #13672

java-spring-web & java-vertx & java-mysql

in review eclipse-che/che-devfile-registry#18 which is blocked by #13796 (in review already eclipse-che/che-theia#337)

Go realworld

posponed to 7.1.0 #13803

ASP.NET

@tolusha is going to do that one

@l0rd
Copy link
Contributor Author

l0rd commented Jul 10, 2019

@sparkoo table updated

@tolusha
Copy link
Contributor

tolusha commented Jul 12, 2019

@sparkoo

c# and ASP.NET reference to the same project. Is it done by mistake? Because we already have the devfile for dotnet-web-simple [1]

c# | https://github.com/che-samples/dotnet-web-simple.git |
ASP.NET | https://github.com/che-samples/dotnet-web-simple.git |

[1] https://github.com/eclipse/che-devfile-registry/blob/ab/fixPythonStack/devfiles/dotnet/devfile.yaml

I think It should be https://github.com/gothinkster/aspnetcore-realworld-example-app

@sparkoo
Copy link
Member

sparkoo commented Jul 15, 2019

@l0rd @tolusha user experience in ASP.NET sample (in PR now eclipse-che/che-devfile-registry#32) is not good. See my comments eclipse-che/che-devfile-registry#32 (comment) and eclipse-che/che-devfile-registry#32 (comment). It's probably caused by #13739 as @svor mentioned.
I would suggest to either fix #13739 or don't ship ASP.NET sample at all in 7.0.0GA. We should also retest C#.NET devfile as I guess that one will be also affected by that bug.

@sparkoo
Copy link
Member

sparkoo commented Jul 16, 2019

status update:

java-spring-web & java-vertx & java-mysql

👍 merged eclipse-che/che-devfile-registry#18

ASP.NET

in review eclipse-che/che-devfile-registry#32. IMHO very bad user experience at this state. See my previous comment and PR itself.

Go

New issue with GOPATH permissions #13823. There is a fix (eclipse-che/che-theia#348), but it either doesn't fix the issue or it's not in che-theia:next. @tolusha is on it.
Note that this is about first, already merged, Go devfile!

Vue.js and Go realworld

postponed to 7.1.0


I've created follow-up issue to retest all devfiles #13863

@skabashnyuk
Copy link
Contributor

skabashnyuk commented Jul 19, 2019

@tolusha any updates on eclipse-che/che-devfile-registry#32 ?

@tolusha
Copy link
Contributor

tolusha commented Jul 19, 2019

@skabashnyuk No

@sparkoo
Copy link
Member

sparkoo commented Jul 19, 2019

status update (@l0rd @skabashnyuk):

ASP.NET

PR open eclipse-che/che-devfile-registry#32. However, there is issue with Omnisharp plugin (#13739) and without this fix, I vote to not include the ASP.NET sample to 7.0.0. This issue also affects C#.NET sample!
I would suggest to include #13739 into 7.0.0 and then merge ASP.NET XOR remove C#.NET devfile.

Go

There is still issue #13823. I've tested just now with eclipse/che-theia/7.0.0-next and issue is still there. It is blocker for me as every go file with at least one external dependency won't work at this moment. I'm not sure whether the fix is wrong or it's just not in 7.0.0-next image. @tolusha ?

@skabashnyuk skabashnyuk added this to the 7.0.0 milestone Jul 22, 2019
@l0rd
Copy link
Contributor Author

l0rd commented Jul 23, 2019

I believe that the remaining problems are:

And we have dedicated issues for them. So I would close this issue @sparkoo is it ok for you?

@sparkoo
Copy link
Member

sparkoo commented Jul 23, 2019

@l0rd yes, I would close this one as well. We have all devfiles we want merged and following issues should be solved separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A feature request - must adhere to the feature request template. severity/blocker Causes system to crash and be non-recoverable or prevents Che developers from working on Che code. status/in-progress This issue has been taken by an engineer and is under active development.
Projects
None yet
Development

No branches or pull requests

6 participants