-
Notifications
You must be signed in to change notification settings - Fork 8
/
devfile.yaml
183 lines (182 loc) · 5.45 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
173
174
175
176
177
178
179
180
181
182
183
apiVersion: 1.0.0
metadata:
name: Hogarama_Workspace
projects:
- name: Hogarama
source:
location: 'git@github.com:Gepardec/Hogarama.git'
type: git
branch: codereadyws
- name: JBoss
source:
location: 'http://download.jboss.org/wildfly/14.0.0.Final/wildfly-14.0.0.Final.zip'
type: zip
components:
- id: redhat/java8/latest
type: chePlugin
- id: redhat/vscode-yaml/latest
type: chePlugin
- alias: jboss-setup
image: 'gepardec/jbss:java8'
env:
- name: HOME
value: /
- name: CODE_READY_WORKSPACE
value: 'true'
- name: CODE_READY_JBOSS
value: '/projects/JBoss/wildfly-14.0.0.Final'
- name: JBOSS_HOME
value: '/projects/JBoss/work'
- name: JBOSS_RELEASE_NAME
value: 'jboss-eap-7.2.0'
- name: ENV_FILE
value: '/projects/Hogarama/codereadyworkspace/hogarama_dev.env'
mountSources: true
endpoints:
- name: hogajama
port: 8080
- name: hogajama-admin
port: 9990
command:
- sleep
- infinity
memoryLimit: 2048Mi
type: dockerimage
- alias: kube-tools
image: 'fhochleitner/kube-tools:dev'
env:
- name: ENV_FILE
value: '/projects/Hogarama/codereadyworkspace/hogarama_dev.env'
mountSources: true
command:
- sleep
- infinity
memoryLimit: 512Mi
type: dockerimage
- alias: maven
image: 'fhochleitner/maven:3.6.3-jdk8-ocp4'
mountSources: true
env:
- name: MAVEN_OPTS
value: >-
-Xmx1000m -XX:+UseParallelGC -Xms500m
-Djava.security.egd=file:/dev/./urandom
volumes:
- name: m2
containerPath: /home/.m2
command:
- sleep
- infinity
memoryLimit: 2024Mi
type: dockerimage
- alias: postgres
image: 'docker.io/bitnami/postgresql:11.9.0-debian-10-r1'
env:
- name: ENV_FILE
value: '/projects/Hogarama/codereadyworkspace/hogarama_dev.env'
mountSources: true
command:
- sleep
- infinity
memoryLimit: 512Mi
type: dockerimage
commands:
- name: Install Postgres
actions:
- component: kube-tools
command: './install-pg.sh'
workdir: '${CHE_PROJECTS_ROOT}/Hogarama/codereadyworkspace/postgresql/'
type: exec
- name: Install MongoDB
actions:
- component: kube-tools
command: './install-mongodb.sh'
workdir: '${CHE_PROJECTS_ROOT}/Hogarama/codereadyworkspace/mongodb/'
type: exec
- name: Install ActiveMQ
actions:
- component: kube-tools
command: './install-amq.sh'
workdir: '${CHE_PROJECTS_ROOT}/Hogarama/codereadyworkspace/amq/'
type: exec
- name: Uninstall Postgres
actions:
- component: kube-tools
command: 'helm uninstall postgresql'
type: exec
- name: Uninstall MongoDB
actions:
- component: kube-tools
command: 'helm uninstall mongodb'
type: exec
- name: Uninstall ActiveMQ
actions:
- component: kube-tools
command: 'helm uninstall amq'
type: exec
- name: Clean Install
actions:
- component: maven
command: 'mvn clean install'
workdir: '${CHE_PROJECTS_ROOT}/Hogarama/Hogajama'
type: exec
- name: Clean Install (ohne Frontend)
actions:
- component: maven
command: 'mvn clean install -P!full-build'
workdir: '${CHE_PROJECTS_ROOT}/Hogarama/Hogajama'
type: exec
- name: Configure Hogajama JBoss
actions:
- component: jboss-setup
workdir: '${CHE_PROJECTS_ROOT}/Hogarama/Hogajama'
type: exec
command: jbss stop; jbss configure /projects/Hogarama/Hogajama/configuration/local_configuration && jbss log
- name: Restart Hogajama JBoss
actions:
- component: jboss-setup
workdir: '${CHE_PROJECTS_ROOT}/Hogarama/Hogajama'
type: exec
command: jbss restart && jbss log
- name: Deploy All Hogarama
actions:
- component: jboss-setup
workdir: '${CHE_PROJECTS_ROOT}/Hogarama/Hogajama'
type: exec
command: >-
jbss deploy hogajama-angular-frontend/target/hogajama-angular-frontend*.war ;
jbss deploy hogajama-frontend/target/hogajama-frontend*.war ;
jbss deploy hogajama-rs/target/hogajama-rs*.war
- name: Connect to Hogajama DB
actions:
- component: postgres
workdir: '${CHE_PROJECTS_ROOT}/Hogarama/Hogajama'
type: exec
command: >-
. $ENV_FILE &&
export PGPASSWORD=$POSTGRESQL_PASSWORD &&
psql --host $POSTGRESQL_HOST -U hogajama -d management -p 5432
- name: Debug JBoss
actions:
- referenceContent: |
{
"version": "0.2.0",
"configurations": [
{
"type": "java",
"request": "attach",
"name": "Debug JBoss",
"hostName": "localhost",
"port": 8787
},
{
"type": "java",
"name": "MockCli",
"request": "launch",
"mainClass": "com.gepardec.hogarama.mocks.cli.MockCli",
"projectName": "raspberry-pi-mocks-cli",
"args": "-t /projects/Hogarama/Hogajama/raspberry-pi-mocks/raspberry-pi-mocks-cli/examples/testData.json -c /projects/Hogarama/Hogajama/raspberry-pi-mocks/raspberry-pi-mocks-cli/examples/testConfigCRW.prop --delayMs 5000"
}
]
}
type: vscode-launch