forked from yangcao77/web-coolstore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
devfile.yaml
172 lines (172 loc) · 4.91 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
schemaVersion: 2.1.0
metadata:
name: web-coolstore
# projects:
# - name: catalog-spring-boot
# git:
# remotes:
# origin: 'https://github.com/yangcao77/catalog-spring-boot'
# - name: inventory-quarkus
# git:
# remotes:
# origin: 'https://github.com/yangcao77/inventory-quarkus'
# - name: gateway-vertx
# git:
# remotes:
# origin: 'https://github.com/yangcao77/gateway-vertx'
# - name: web-nodejs
# git:
# remotes:
# origin: 'https://github.com/yangcao77/web-nodejs'
projects:
- name: web-coolstore
git:
remotes:
origin: 'https://github.com/yangcao77/cloud-native-workshop.git'
checkoutFrom:
remote: origin
revision: 'completed-sample'
components:
- name: nodejs
container:
image: quay.io/eclipse/che-nodejs10-ubi:next
memoryLimit: 1024Mi
mountSources: true
endpoints:
- name: web
targetPort: 3000
- name: java11-maven
container:
image: quay.io/eclipse/che-java11-maven:next
memoryLimit: 1024Mi
mountSources: true
env:
- name: MAVEN_CONFIG
value: ""
- 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)
endpoints:
- name: catalog
targetPort: 9000
- name: gateway
targetPort: 9090
volumeMounts:
- name: m2
path: /home/user/.m2
- name: m2
volume:
size: 3Gi
- name: java-quarkus
container:
image: quay.io/eclipse/che-quarkus:next
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: QUARKUS_HTTP_HOST
value: 0.0.0.0
memoryLimit: 4G
mountSources: true
volumeMounts:
- name: m2
path: /home/user/.m2
endpoints:
- name: inventory
targetPort: 8080
commands:
- id: catalog-build
exec:
component: java11-maven
commandLine: "mvn clean -Dmaven.repo.local=/home/user/.m2/repository package -Dmaven.test.skip=true"
workingDir: $PROJECTS_ROOT/web-coolstore/catalog-spring-boot
group:
kind: build
- id: catalog-run
exec:
component: java11-maven
commandLine: "mvn -Dmaven.repo.local=/home/user/.m2/repository spring-boot:run"
workingDir: $PROJECTS_ROOT/web-coolstore/catalog-spring-boot
group:
kind: run
- id: inventory-compile
exec:
component: java-quarkus
commandLine: "mvn -Dmaven.repo.local=/home/user/.m2/repository compile"
workingDir: $PROJECTS_ROOT/web-coolstore/inventory-quarkus
- id: inventory-run
exec:
component: java-quarkus
commandLine: "mvn -Dmaven.repo.local=/home/user/.m2/repository quarkus:dev -Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
hotReloadCapable: true
group:
kind: run
workingDir: $PROJECTS_ROOT/web-coolstore/inventory-quarkus
- id: gateway-build
exec:
commandLine: mvn package -Dmaven.test.skip=true
component: java11-maven
workingDir: $PROJECTS_ROOT/web-coolstore/gateway-vertx
group:
kind: build
- id: gateway-run
exec:
commandLine: mvn io.reactiverse:vertx-maven-plugin:run
component: java11-maven
workingDir: $PROJECTS_ROOT/web-coolstore/gateway-vertx
group:
kind: run
- id: web-install
exec:
component: nodejs
commandLine: npm install
workingDir: $PROJECTS_ROOT/web-coolstore/web-nodejs
group:
kind: build
- id: web-run
exec:
component: nodejs
commandLine: npm start
workingDir: $PROJECTS_ROOT/web-coolstore/web-nodejs
group:
kind: run
- id: deploy-catalog
composite:
commands:
- catalog-build
- catalog-run
parallel: false
- id: deploy-inventory
composite:
commands:
- inventory-compile
- inventory-run
parallel: false
- id: deploy-gateway
composite:
commands:
- gateway-build
- gateway-run
parallel: false
- id: deploy-web
composite:
commands:
- web-install
- web-run
parallel: false
- id: deploy-all
composite:
commands:
- deploy-catalog
- deploy-inventory
- deploy-gateway
- deploy-web
parallel: false