-
Notifications
You must be signed in to change notification settings - Fork 5
/
devfile.yaml
89 lines (89 loc) · 2.65 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
apiVersion: 1.0.0
metadata:
name: wksp-debugging
attributes:
extensions.ignoreRecommendations: 'true'
projects:
- name: workshop
source:
location: 'https://github.com/mcouliba/debugging-workshop.git'
type: git
branch: "5.0"
components:
- type: chePlugin
id: redhat/java11/latest
preferences:
java.server.launchMode: Standard
java.autobuild.enabled: false
- type: dockerimage
image: 'quay.io/mcouliba/workshop-tools:5.0'
alias: workshop-tools
memoryLimit: "3072M"
mountSources: true
env:
- name: MAVEN_OPTS
value: '-Xmx2048m -Duser.home=/home/developer'
- name: MAVEN_MIRROR_URL
value: http://nexus.opentlc-shared.svc:8081/repository/maven-all-public
endpoints:
- name: 8080-port
port: 8080
attributes:
protocol: http
public: 'false'
- name: 9000-port
port: 9000
attributes:
protocol: http
public: 'false'
- name: 5005-port
port: 5005
attributes:
protocol: http
public: 'false'
volumes:
- name: kubefolder
containerPath: /home/developer/.kube
commands:
- name: 'OpenShift - Login'
actions:
- workdir: /projects/workshop
type: exec
command: >-
oc login $(oc whoami --show-server) --username=${CHE_WORKSPACE_NAMESPACE} --password=openshift --insecure-skip-tls-verify;
component: workshop-tools
- name: 'Catalog - Route Traffic to Local'
actions:
- workdir: /projects/workshop/catalog-spring-boot
type: exec
command: >-
echo "------ START ------";
pkill ike;
ike develop --deployment catalog-v1 --run 'mvn spring-boot:run' --port 9000:8080 --route header:ike-session-id=dist_trace;
echo "------ END ------";
component: workshop-tools
- name: 'Inventory - Route Traffic to Local'
actions:
- workdir: /projects/workshop/inventory-quarkus
type: exec
command: >-
echo "------ START ------";
pkill ike;
ike develop -d inventory-v1 -p 8080 -r 'mvn compile quarkus:dev' --route header:ike-session-id=live_debug;
echo "------ END ------";
component: workshop-tools
- name: 'Connect Local Java Debugger'
actions:
- type: vscode-launch
referenceContent: |
{
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Debug (Attach) - Local",
"request": "attach",
"hostName": "localhost",
"port": 5005
}]
}