forked from jboss-developer/jboss-eap-quickstarts
-
Notifications
You must be signed in to change notification settings - Fork 1
/
devfile.yaml
72 lines (72 loc) · 2.57 KB
/
devfile.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
schemaVersion: 2.1.0
metadata:
name: jboss-eap-quickstarts
components:
- name: tools
container:
image: registry.redhat.io/devspaces/udi-rhel8:3.4
memoryLimit: 3Gi
volumeMounts:
- name: m2
path: /home/user/.m2
- name: eap
container:
image: registry.redhat.io/jboss-eap-7/eap74-openjdk11-openshift-rhel8:7.4.4
env:
- name: MAVEN_OPTS
value: "-Xmx200m -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/jboss"
- name: JAVA_OPTS_APPEND
value: "-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n -Dsun.util.logging.disableCallerCheck=true"
- value: '-Dmaven.repo.local=/home/jboss/.m2/repository/repository -Dcom.redhat.xpaas.repo.jbossorg'
name: MVN_ARGS_APPEND
memoryLimit: 1Gi
endpoints:
- exposure: public
name: eap
protocol: http
targetPort: 8080
path: /index.jsp
- exposure: internal
name: jgroups
protocol: http
targetPort: 7600
volumeMounts:
- name: m2
path: /home/jboss/.m2
- name: m2
volume:
size: 1G
commands:
- id: 1-build
exec:
component: tools
workingDir: ${PROJECTS_ROOT}/jboss-eap-quickstarts/kitchensink-jsp
commandLine: mvn ${MVN_ARGS_APPEND} clean install
group:
kind: build
- id: 2-configure-web-server
exec:
component: eap
workingDir: /opt/eap/bin
commandLine: >-
./jboss-cli.sh --connect --command="data-source add --name=ExampleDS
--jndi-name=java:jboss/datasources/ExampleDS --driver-name=h2
--connection-url=jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
--user-name=sa --password=sa" && echo 'Server was configured'
group:
kind: build
- id: 3-copy-war
exec:
component: eap
workingDir: ${PROJECTS_ROOT}/jboss-eap-quickstarts/kitchensink-jsp
commandLine: cp target/*.war /opt/eap/standalone/deployments/ROOT.war &&
echo 'Archive was deployed, click on eap endpoint from Workspace view to open the application'
group:
kind: run
- id: 4-hot-update
exec:
component: eap
workingDir: ${PROJECTS_ROOT}/jboss-eap-quickstarts/kitchensink-jsp
commandLine: "mvn ${MVN_ARGS_APPEND} clean install && sleep 2 && cp target/*.war /opt/eap/standalone/deployments/ROOT.war"
group:
kind: run