Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce Devfile V2 #1

Merged
merged 36 commits into from
Nov 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
0d9aaa9
chore(devfile2): adapt sample to be working in devworkspaces
vitaliy-guliy Oct 19, 2021
9453030
chore(devfile2): adapt sample to be working in devworkspaces
vitaliy-guliy Oct 19, 2021
b6e1da2
chore(devfile2): adapt sample to be working in devworkspaces
vitaliy-guliy Oct 19, 2021
90fe10a
chore(devfile2): adapt sample to be working in devworkspaces
vitaliy-guliy Oct 19, 2021
c706649
chore(devfile2): adapt sample to be working in devworkspaces
vitaliy-guliy Oct 20, 2021
fc0e206
chore(devfile2): adapt sample to be working in devworkspaces
vitaliy-guliy Oct 20, 2021
4287472
chore(devfile2): adapt sample to be working in devworkspaces
vitaliy-guliy Oct 20, 2021
f07a931
chore(devfile2): adapt sample to be working in devworkspaces
vitaliy-guliy Oct 20, 2021
1a7cef2
chore(devfile2): adapt sample to be working in devworkspaces
vitaliy-guliy Oct 20, 2021
8b9e6a4
chore(devfile2): adapt sample to be working in devworkspaces
vitaliy-guliy Oct 20, 2021
5f42e52
chore(devfile2): adapt sample to be working in devworkspaces
vitaliy-guliy Oct 20, 2021
583d5c2
chore(devfile2): adapt sample to be working in devworkspaces
vitaliy-guliy Oct 21, 2021
4c09f04
chore(devfile2): adapt sample to be working in devworkspaces
vitaliy-guliy Oct 21, 2021
e19a60c
chore(devfile2): adapt sample to be working in devworkspaces
vitaliy-guliy Oct 21, 2021
b611098
chore(devfile2): adapt sample to be working in devworkspaces
vitaliy-guliy Oct 25, 2021
5ff4a91
chore(devfile2): use universal-developer-image for dev container
vitaliy-guliy Oct 26, 2021
ef2701e
chore(devfile2): use universal-developer-image for dev container
vitaliy-guliy Oct 26, 2021
b0ec830
chore(devfile2): use universal-developer-image for dev container
vitaliy-guliy Oct 26, 2021
6515d58
chore(devfile2): use universal-developer-image for dev container
vitaliy-guliy Oct 26, 2021
58ef0fa
chore(devfile2): use universal-developer-image for dev container
vitaliy-guliy Oct 26, 2021
82f7b52
chore(devfile2): use universal-developer-image for dev container
vitaliy-guliy Oct 27, 2021
6eebe30
chore(devfile2): use universal-developer-image for dev container
vitaliy-guliy Oct 27, 2021
b4711d5
chore(devfile2): use universal-developer-image for dev container
vitaliy-guliy Oct 27, 2021
46d3733
chore(devfile2): use universal-developer-image for dev container
vitaliy-guliy Oct 27, 2021
ad823e6
chore(devfile2): adapt sample to be working in devworkspaces
vitaliy-guliy Oct 27, 2021
411f8ad
chore(devfile2): code cleanup
vitaliy-guliy Nov 2, 2021
a9b7d0b
chore(devfile2): code cleanup
vitaliy-guliy Nov 2, 2021
d4121d1
chore(devfile2): code cleanup
vitaliy-guliy Nov 2, 2021
6dd8fd0
chore(devfile2): code cleanup
vitaliy-guliy Nov 2, 2021
7db20bf
chore(devfile2): code cleanup
vitaliy-guliy Nov 2, 2021
c168ca2
chore(devfile2): code cleanup
vitaliy-guliy Nov 2, 2021
444f00d
chore(devfile2): use universal developer container for tools
vitaliy-guliy Nov 3, 2021
6074832
chore(devfile2): use universal developer container for tools
vitaliy-guliy Nov 3, 2021
354c428
chore(devfile2): use universal developer container for tools
vitaliy-guliy Nov 3, 2021
8c762e8
chore(devfile2): use universal developer container for tools
vitaliy-guliy Nov 3, 2021
9a8c7f0
chore(devfile2): use universal developer container for tools
vitaliy-guliy Nov 3, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
.idea/compiler.xml
.idea/encodings.xml
.idea/vcs.xml
.vscode
**/*.iml
target
*.iml
Expand Down
19 changes: 19 additions & 0 deletions .theia/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Debug (Attach) - Backend",
"request": "attach",
"hostName": "localhost",
"port": 5006
},
{
"type": "java",
"name": "Debug (Attach) - Frontend",
"request": "attach",
"hostName": "localhost",
"port": 5005
}
]
}
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"redhat.java"
]
}
108 changes: 108 additions & 0 deletions devfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
schemaVersion: 2.1.0
metadata:
name: java-guestbook
components:
- name: tools
container:
image: quay.io/devfile/universal-developer-image:ubi8-d433ed6
memoryLimit: 3Gi

endpoints:
- name: java-guestbook-backend
exposure: public
protocol: http
targetPort: 8080

- name: java-guestbook
exposure: public
protocol: tcp
targetPort: 8443

- name: debug
exposure: none
protocol: tcp
targetPort: 5005

volumeMounts:
- name: m2
path: /home/user/.m2

- name: mongo
container:
image: quay.io/eclipse/che--centos--mongodb-36-centos7:latest-ffdf2431bbc6d9a9d2a03e95bbbe8adb49ab9eac301f268a35038c84288259c1
memoryLimit: 300Mi
env:
- name: MONGODB_USER
value: user

- name: MONGODB_PASSWORD
value: password

- name: MONGODB_DATABASE
value: guestbook

- name: MONGODB_ADMIN_PASSWORD
value: password

endpoints:
- name: java-guestbook-mongodb
exposure: none
protocol: tcp
targetPort: 27017

volumeMounts:
- name: mongodbdata
path: /var/lib/mongodb/data

- name: m2
volume:
size: 1G

- name: mongodbdata
volume:
size: 1G

commands:
- id: maven-build-backend
exec:
label: "build backend"
component: tools
workingDir: "${PROJECTS_ROOT}/java-guestbook/backend"
commandLine: "mvn clean install"
group:
kind: build
isDefault: true

- id: maven-build-frontend
exec:
label: "build frontend"
component: tools
workingDir: "${PROJECTS_ROOT}/java-guestbook/frontend"
commandLine: "mvn clean install"
group:
kind: build
isDefault: true

- id: run-backend
exec:
label: "run backend"
component: tools
workingDir: "${PROJECTS_ROOT}/java-guestbook/backend"
commandLine: |
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5006,quiet=y \
-jar target/backend-1.0.jar
group:
kind: run
isDefault: true

- id: run-frontend
exec:
label: "run frontend"
component: tools
workingDir: "${PROJECTS_ROOT}/java-guestbook/frontend"
commandLine: |
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005,quiet=y \
-jar target/frontend-1.0.jar
group:
kind: run
isDefault: true