-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdevfile.yaml
134 lines (114 loc) · 4.28 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
apiVersion: 1.0.0
metadata:
generateName: scratch-k8s-
projects:
- name: scratch-gui
source:
location: 'https://github.com/sunix/scratch-gui'
type: git
branch: develop
- name: scratch-vm
source:
location: 'https://github.com/sunix/scratch-vm'
type: git
branch: develop
- name: quarkus-kubernetes-client-service
source:
location: 'https://github.com/sunix/scratch-kubernetes'
type: git
branch: master
components:
- id: che-incubator/typescript/latest
memoryLimit: 0.4Gi
type: chePlugin
- mountSources: true
endpoints:
- name: scratch
port: 8601
memoryLimit: 1Gi
type: dockerimage
image: 'quay.io/eclipse/che-nodejs12-community:nightly'
alias: scratch-nodejs
env:
- value: /projects
name: HOME
- mountSources: true
memoryLimit: 64M
type: dockerimage
image: quay.io/sunix/git-devtools
alias: git
- id: redhat/quarkus-java11/latest
memoryLimit: 1.9Gi
type: chePlugin
- mountSources: true
endpoints:
- attributes:
path: /k8s
name: k8s
port: 8080
memoryLimit: 1Gi
type: dockerimage
volumes:
- name: m2
containerPath: /home/user/.m2
- name: kube
containerPath: /home/user/.kube
alias: quarkus-k8s-service
image: 'quay.io/eclipse/che-quarkus:nightly'
env:
- 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: JAVA_OPTS
- value: $(JAVA_OPTS)
name: MAVEN_OPTS
- id: redhat/vscode-openshift-connector/latest
type: chePlugin
registryUrl: 'https://sunix-plugin-registry-openshift-con-fh0ka.surge.sh/v3'
- id: redhat/vscode-didact/latest
preferences:
didact.openDefaultTutorialAtStartup: true
che.welcome.enable: false
didact.defaultUrl: /projects/quarkus-kubernetes-client-service/scratch-k8s-che.didact.md
type: chePlugin
registryUrl: 'https://che-plugin-registry-main.surge.sh/v3'
alias: didact
commands:
- name: 1. Install all required dependencies
actions:
- workdir: '${CHE_PROJECTS_ROOT}'
type: exec
command: cd scratch-vm && yarn install && yarn link && cd ../scratch-gui && yarn link scratch-vm && yarn install
component: scratch-nodejs
- name: 2. Start Scratch-gui in Devmode
actions:
- workdir: '${CHE_PROJECTS_ROOT}/scratch-gui'
type: exec
command: yarn start
component: scratch-nodejs
- name: Package
actions:
- workdir: '${CHE_PROJECTS_ROOT}/quarkus-kubernetes-client-service'
type: exec
command: ./mvnw package
component: quarkus-k8s-service
- name: 3. Start Development mode (Hot reload + debug)
actions:
- workdir: '${CHE_PROJECTS_ROOT}/quarkus-kubernetes-client-service'
type: exec
command: 'curl -L https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 --output /tmp/jq ; chmod +x /tmp/jq ; export SCRATCH_URL=$(sed -e ''s/^"//'' -e ''s/"$//'' <<<$(curl $CHE_API_INTERNAL''/workspace/''${CHE_WORKSPACE_ID} -H ''Connection: keep-alive'' -H ''Accept: application/json, text/plain, */*'' -H ''Authorization: Bearer ''$CHE_MACHINE_TOKEN | /tmp/jq ''.runtime.machines | .[].servers | select(.scratch) | .scratch.url'')); export K8S_URL=$(sed -e ''s/^"//'' -e ''s/"$//'' <<<$(curl $CHE_API_INTERNAL''/workspace/''${CHE_WORKSPACE_ID} -H ''Connection: keep-alive'' -H ''Accept: application/json, text/plain, */*'' -H ''Authorization: Bearer ''$CHE_MACHINE_TOKEN | /tmp/jq ''.runtime.machines | .[].servers | select(.k8s) | .k8s.url'')); echo $SCRATCH_URL; echo $K8S_URL; ./mvnw compile quarkus:dev'
component: quarkus-k8s-service
- name: Attach remote debugger
actions:
- referenceContent: |
{
"version": "0.2.0",
"configurations": [
{
"type": "java",
"request": "attach",
"name": "Attach to Remote Quarkus App",
"hostName": "localhost",
"port": 5005
}
]
}
type: vscode-launch