This repository has been archived by the owner on Aug 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commits contains devfile for: * Java Spring Boot * Java with Spring Boot and MySQL * Java Vert.x Signed-off-by: Sergii Leshchenko <sleshche@redhat.com>
- Loading branch information
1 parent
73967c0
commit 93bcd2e
Showing
6 changed files
with
203 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
--- | ||
apiVersion: 1.0.0 | ||
metadata: | ||
name: java-mysql | ||
projects: | ||
- | ||
name: web-java-spring-petclinic | ||
source: | ||
type: git | ||
location: "/~https://github.com/spring-projects/spring-petclinic.git" | ||
components: | ||
- | ||
type: chePlugin | ||
id: redhat/java/latest | ||
- | ||
type: dockerimage | ||
alias: tools | ||
image: registry.centos.org/che-stacks/centos-jdk8 | ||
command: ['sleep'] | ||
args: ['infinity'] | ||
env: | ||
- name: JAVA_OPTS | ||
value: "-XX:MaxRAMPercentage=50.0 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 | ||
-XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 | ||
-Dsun.zip.disableMemoryMapping=true -Xms20m -Djava.security.egd=file:/dev/./urandom | ||
-Duser.home=/home/user" | ||
- name: MAVEN_OPTS | ||
value: $(JAVA_OPTS) | ||
- name: PS1 | ||
value: $(echo ${0})\\$ | ||
memoryLimit: 700Mi | ||
endpoints: | ||
- name: '8080/tcp' | ||
port: 8080 | ||
mountSources: true | ||
volumes: | ||
- name: m2 | ||
containerPath: /home/user/.m2 | ||
- | ||
type: dockerimage | ||
alias: mysql | ||
image: centos/mysql-57-centos7 | ||
env: | ||
- name: MYSQL_USER | ||
value: petclinic | ||
- name: MYSQL_PASSWORD | ||
value: password | ||
- name: MYSQL_DATABASE | ||
value: petclinic | ||
- name: PS1 | ||
value: $(echo ${0})\\$ | ||
memoryLimit: 256Mi | ||
endpoints: | ||
- name: 'db' | ||
port: 3306 | ||
attributes: | ||
discoverable: "true" | ||
public: "false" | ||
mountSources: false | ||
commands: | ||
- | ||
name: maven build | ||
actions: | ||
- | ||
type: exec | ||
component: tools | ||
command: "./mvnw clean install" | ||
workdir: "${CHE_PROJECTS_ROOT}/web-java-spring-petclinic" | ||
- name: run webapp | ||
actions: | ||
- | ||
type: exec | ||
component: tools | ||
command: | | ||
SPRING_DATASOURCE_URL=jdbc:mysql://db/petclinic SPRING_DATASOURCE_USERNAME=petclinic SPRING_DATASOURCE_PASSWORD=password java -jar target/*.jar --spring.profile.active=mysql | ||
workdir: ${CHE_PROJECTS_ROOT}/web-java-spring-petclinic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
displayName: Java with Spring Boot and MySQL | ||
description: Java stack with OpenJDK 8, MySQL and Spring Boot Petclinic demo application | ||
tags: ["Java", "OpenJDK", "Maven", "Spring Boot", "MySQL"] | ||
icon: https://www.eclipse.org/che/images/logo-eclipseche.svg | ||
globalMemoryLimit: 2930Mi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
apiVersion: 1.0.0 | ||
metadata: | ||
name: java-web-spring | ||
projects: | ||
- | ||
name: java-web-spring | ||
source: | ||
type: git | ||
location: "/~https://github.com/spring-projects/spring-petclinic.git" | ||
components: | ||
- | ||
type: chePlugin | ||
id: redhat/java/latest | ||
- | ||
type: dockerimage | ||
alias: tools | ||
image: registry.centos.org/che-stacks/centos-jdk8 | ||
command: ['sleep'] | ||
args: ['infinity'] | ||
env: | ||
- name: JAVA_OPTS | ||
value: "-XX:MaxRAMPercentage=50.0 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 | ||
-XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 | ||
-Dsun.zip.disableMemoryMapping=true -Xms20m -Djava.security.egd=file:/dev/./urandom | ||
-Duser.home=/home/user" | ||
- name: MAVEN_OPTS | ||
value: $(JAVA_OPTS) | ||
- name: PS1 | ||
value: $(echo ${0})\\$ | ||
memoryLimit: 1024Mi | ||
endpoints: | ||
- name: '8080/tcp' | ||
port: 8080 | ||
mountSources: true | ||
volumes: | ||
- name: m2 | ||
containerPath: /home/user/.m2 | ||
commands: | ||
- | ||
name: maven build | ||
actions: | ||
- | ||
type: exec | ||
component: tools | ||
command: "./mvnw clean install" | ||
workdir: ${CHE_PROJECTS_ROOT}/java-web-spring | ||
- name: run webapp | ||
actions: | ||
- | ||
type: exec | ||
component: tools | ||
command: "java -jar target/*.jar" | ||
workdir: ${CHE_PROJECTS_ROOT}/java-web-spring |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
displayName: Java Spring Boot | ||
description: Java stack with OpenJDK 8 and Spring Boot Petclinic demo application | ||
tags: ["Java", "OpenJDK", "Maven", "Spring Boot"] | ||
icon: https://www.eclipse.org/che/images/logo-eclipseche.svg | ||
globalMemoryLimit: 2674Mi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
apiVersion: 1.0.0 | ||
metadata: | ||
name: java-web-vertx | ||
projects: | ||
- | ||
name: java-web-vertx | ||
source: | ||
type: git | ||
location: "/~https://github.com/che-samples/web-java-vertx" | ||
components: | ||
- | ||
type: chePlugin | ||
id: redhat/java/latest | ||
- | ||
type: dockerimage | ||
alias: maven | ||
image: registry.centos.org/che-stacks/centos-jdk8 | ||
command: ['sleep'] | ||
args: ['infinity'] | ||
env: | ||
- name: JAVA_OPTS | ||
value: "-XX:MaxRAMPercentage=50.0 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 | ||
-XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 | ||
-Dsun.zip.disableMemoryMapping=true -Xms20m -Djava.security.egd=file:/dev/./urandom | ||
-Duser.home=/home/user" | ||
- name: MAVEN_OPTS | ||
value: $(JAVA_OPTS) | ||
- name: PS1 | ||
value: $(echo ${0})\\$ | ||
memoryLimit: 512Mi | ||
endpoints: | ||
- name: '8080/tcp' | ||
port: 8080 | ||
mountSources: true | ||
volumes: | ||
- name: m2 | ||
containerPath: /home/user/.m2 | ||
commands: | ||
- | ||
name: maven build | ||
actions: | ||
- | ||
type: exec | ||
component: maven | ||
command: "mvn -Duser.home=${HOME} clean install" | ||
workdir: "${CHE_PROJECTS_ROOT}/java-web-vertx" | ||
- | ||
name: run app | ||
actions: | ||
- | ||
type: exec | ||
component: maven | ||
command: "JDBC_URL=jdbc:h2:/tmp/db java -jar ./target/*fat.jar" | ||
workdir: "${CHE_PROJECTS_ROOT}/java-web-vertx" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
displayName: Java Vert.x | ||
description: Java stack with OpenJDK 8 and Vert.x demo application | ||
tags: ["Java", "OpenJDK", "Maven", "Vertx"] | ||
icon: https://www.eclipse.org/che/images/logo-eclipseche.svg | ||
globalMemoryLimit: 2674Mi |