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 Petclinic+MySQL stack, petclinic mysql sample project. Fix dashbo… #2376

Merged
1 commit merged into from
Sep 12, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class ReadyToGoStacksController {
* Gets privileged stack position
*/
getPrivilegedSortPosition(item) {
let privilegedNames = ['Java', 'Blank'];
let privilegedNames = ['Java', 'Java-MySQL', 'Blank'];

let sortPos = privilegedNames.indexOf(item.name);
if (sortPos > -1) {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
78 changes: 71 additions & 7 deletions ide/che-core-ide-stacks/src/main/resources/stacks.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,74 @@
[
{
"id": "java-mysql",
"creator": "ide",
"name": "Java-MySQL",
"description": "Multi-machine environment with Default Java Stack and MySQL database",
"scope": "general",
"tags": [
"Java 1.8, Tomcat 8, MySQL 5.7"
],
"components": [

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of the suggestions that I made to Stevan was that we should probably be more complete on the list of components that we have and their versions. We should list all of the libraries that we are installing into the Ubuntu system - so bash, openssl, etc. Anything that we are explicitly installing with a RUN command should probably be added here.

We also need the mysql reference, and I think the JDK / maven versions are out of date?

Copy link
Author

@ghost ghost Sep 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are tags, smth that will show up in user dashboard. We use tags to match stacks and samples.

So, if I like versions of everything, we just do not have space in the stack box on UD.

Also, this will break all the filtering.

This is a UD issue. Perhaps, we should use components to display in UD but use tags that can be super unique but not super readable to match samples.

@ashumilova can comment - we talked about it.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eivantsov - I think there is a difference between components and tags in this document. The tags are used for filtering and they are a different list of labels. But I believe the components are the list that appears in the UD.

If we have a long list of components, are we concerned about the display height of the stack boxes? @ashumilova - if we have a super long list of components, do we just cut off the list or do we make the box taller? We probably need to think about what to do here.

But I would think that we should go ahead and make the components list complete and then as a secondary measure work on improving the UX display of the stack box?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TylerJewell Tag appear in UI and they are used to match stacks and filters. Components aren't used at all now in master.

This is a broader question and does not affect this PR only. This is how things work now, you may check with @ashumilova if you have doubts.

{
"name": "JDK",
"version": "1.8.0_45"
},
{
"name": "Maven",
"version": "3.2.2"
},
{
"name": "Tomcat",
"version": "8.0.24"
}
],
"source": {
"type": "image",
"origin": "codenvy/ubuntu_jdk8"
},
"workspaceConfig": {
"environments": {
"default": {
"machines": {
"dev-machine": {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the most user friendly name we can give it? Is this the name that shows up in the machine drop down? I think that this name is super clear for us, but perhaps it's not as clear as it could be for new users experiencing the system the first time.

Copy link
Author

@ghost ghost Sep 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dev-machine is the only value that dashboard accepts. @ashumilova has a fix

"agents": [
"ws-agent"
],
"servers": {},
"attributes" : {}
}
},
"recipe": {
"content": "services:\n db:\n image: codenvy/mysql\n environment:\n MYSQL_DATABASE: petclinic\n MYSQL_USER: petclinic\n MYSQL_PASSWORD: password\n mem_limit: 2147483648\n dev-machine:\n image: codenvy/ubuntu_jdk8\n mem_limit: 2147483648\n links:\n - db",
"contentType": "application/x-yaml",
"type": "compose"
}
}
},
"name": "default",
"defaultEnv": "default",
"description": null,
"commands": [
{
"commandLine": "mysql -u $MYSQL_USER -p$MYSQL_PASSWORD -e 'show databases;'",
"name": "show databases",
"type": "custom"
}
]
},
"acl": [
{
"user": "*",
"actions": [
"search"
]
}
],
"stackIcon": {
"name": "type-java-mysql.svg",
"mediaType": "image/svg+xml"
}
},
{
"id": "che-in-che",
"creator": "ide",
Expand Down Expand Up @@ -1467,13 +1537,7 @@
"description": "Default Java Stack with JDK 8, Maven and Apache TomEE 1.7.3.",
"scope": "advanced",
"tags": [
"Ubuntu",
"Java",
"JDK",
"Maven",
"TomEE",
"Subversion",
"Git"
"TomEE"
],
"components": [
{
Expand Down
77 changes: 66 additions & 11 deletions ide/che-core-ide-templates/src/main/resources/samples.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,65 @@
[
{
"name": "web-java-petclinic",
"displayName": "web-java-petclinic",
"path": "/web-java-petclinic",
"description": "Petclinic app using MySQL as persistent storage",
"projectType": "maven",
"mixins": [],
"attributes": {
"language": [
"java"
]
},
"modules": [],
"problems": [],
"source": {
"type": "git",
"location": "https://github.com/che-samples/web-java-spring-petclinic.git",
"parameters": {
"branch":"mysql"
}
},
"commands": [
{
"name": "build",
"type": "mvn",
"commandLine": "mvn -f ${current.project.path} clean install -DskipTests",
"attributes": {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you check this macro with M1 - according to what Vlad produced, this macro is now in a different format. Should we update it?

https://eclipse-che.readme.io/docs/commands

"previewUrl": ""
}
},
{
"name": "stop tomcat",
"type": "custom",
"commandLine": "$TOMCAT_HOME/bin/catalina.sh stop",
"attributes": {
"previewUrl": ""
}
},
{
"name": "build and deploy",
"type": "mvn",
"commandLine": "mvn -f ${current.project.path} clean install -DskipTests && cp ${current.project.path}/target/*.war $TOMCAT_HOME/webapps/ROOT.war && $TOMCAT_HOME/bin/catalina.sh run",
"attributes": {
"previewUrl": "http://${server.port.8080}"
}
},
{
"name": "debug",
"type": "mvn",
"commandLine": "mvn -f ${current.project.path} clean install -DskipTests && cp ${current.project.path}/target/*.war $TOMCAT_HOME/webapps/ROOT.war && $TOMCAT_HOME/bin/catalina.sh jpda run",
"attributes": {
"previewUrl": "http://${server.port.8080}"
}
}
],
"links": [],
"category": "Samples",
"tags": [
"Java 1.8, Tomcat 8, MySQL 5.7"
]
},
{
"name": "che-in-che",
"displayName": "eclipse-che",
Expand Down Expand Up @@ -456,7 +517,7 @@
"mixins": [],
"attributes": {
"language": [
"ruby"
"javascript"
]
},
"modules": [],
Expand All @@ -479,8 +540,7 @@
"links": [],
"category": "Samples",
"tags": [
"nodejs",
"javascript"
"Node.JS"
]
},
{
Expand Down Expand Up @@ -593,7 +653,7 @@
"displayName": "web-nodejs-simple",
"path": "/web-nodejs-simple",
"description": "Yeoman Starter project.",
"projectType": "blank",
"projectType": "node-js",
"mixins": [],
"attributes": {
"language": [
Expand Down Expand Up @@ -628,9 +688,7 @@
"links": [],
"category": "Samples",
"tags": [
"nodejs",
"yeoman",
"javascript"
"Node.JS"
]
},
{
Expand Down Expand Up @@ -871,10 +929,7 @@
"links": [],
"category": "Samples",
"tags": [
"maven",
"java",
"javaee",
"jaxrs"
"TomEE"
]
}
]