Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #12 from sleshchenko/moreDevfiles
Browse files Browse the repository at this point in the history
Add samples to existing devfiles
  • Loading branch information
sleshchenko authored Jun 18, 2019
2 parents 55f2921 + 1e89e61 commit 5a64991
Show file tree
Hide file tree
Showing 9 changed files with 168 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
# SPDX-License-Identifier: EPL-2.0
#

docker build -t openshiftio/che-devfile-registry/che-devfile-registry:latest .
docker build -t quay.io/openshiftio/che-devfile-registry:latest .
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
---
apiVersion: 1.0.0
metadata:
name: apache-camel-springboot-che7
name: apache-camel-springboot
projects:
-
name: fuse-rest-http-booster
source:
type: git
location: "https://github.com/jboss-fuse/fuse-rest-http-booster"
components:
-
type: chePlugin
Expand Down Expand Up @@ -46,3 +52,22 @@ components:
- name: '8080/tcp'
port: 8080
mountSources: true
commands:
-
name: build the project
actions:
- type: exec
component: maven
command: cd ${CHE_PROJECTS_ROOT}/fuse-rest-http-booster && mvn clean install
-
name: run the services
actions:
- type: exec
component: maven
command: cd ${CHE_PROJECTS_ROOT}/fuse-rest-http-booster && mvn spring-boot:run -DskipTests
-
name: run and debug the services
actions:
- type: exec
component: maven
command: cd ${CHE_PROJECTS_ROOT}/fuse-rest-http-booster && mvn spring-boot:run -DskipTests -Drun.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
19 changes: 19 additions & 0 deletions devfiles/dotnet/devfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
apiVersion: 1.0.0
metadata:
name: dotnet
projects:
-
name: dotnet-web-simple
source:
type: git
location: "https://github.com/che-samples/dotnet-web-simple"
components:
-
type: chePlugin
Expand Down Expand Up @@ -30,3 +36,16 @@ components:
volumes:
- name: dotnet
containerPath: "/home/user"
commands:
-
name: update dependencies
actions:
- type: exec
component: dotnet
command: "cd ${CHE_PROJECTS_ROOT}/dotnet-web-simple && dotnet restore"
-
name: run
actions:
- type: exec
component: dotnet
command: "cd ${CHE_PROJECTS_ROOT}/dotnet-web-simple && dotnet run"
21 changes: 21 additions & 0 deletions devfiles/java-gradle/devfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
apiVersion: 1.0.0
metadata:
name: java-gradle
projects:
-
name: console-java-simple
source:
type: git
location: "https://github.com/che-samples/console-java-simple.git"
components:
-
type: chePlugin
Expand Down Expand Up @@ -35,3 +41,18 @@ components:
- name: gradle
containerPath: /home/user/.gradle
mountSources: true
commands:
-
name: gradle build
actions:
-
type: exec
command: "cd ${CHE_PROJECTS_ROOT}/console-java-simple; gradle build"
component: gradle
-
name: gradle run
actions:
-
type: exec
command: "cd ${CHE_PROJECTS_ROOT}/console-java-simple && gradle run"
component: gradle
21 changes: 21 additions & 0 deletions devfiles/java-maven/devfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
apiVersion: 1.0.0
metadata:
name: java-maven
projects:
-
name: console-java-simple
source:
type: git
location: "https://github.com/che-samples/console-java-simple.git"
components:
-
type: chePlugin
Expand Down Expand Up @@ -40,3 +46,18 @@ components:
volumes:
- name: m2
containerPath: /home/user/.m2
commands:
-
name: maven build
actions:
-
type: exec
command: "mvn -Duser.home=${HOME} -f ${CHE_PROJECTS_ROOT}/console-java-simple clean install"
component: maven
-
name: maven build and run
actions:
-
type: exec
command: "mvn -Duser.home=${HOME} -f ${CHE_PROJECTS_ROOT}/console-java-simple clean install && java -jar ${CHE_PROJECTS_ROOT}/console-java-simple/target/*.jar"
component: maven
60 changes: 60 additions & 0 deletions devfiles/python-django/devfile.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
apiVersion: 1.0.0
metadata:
name: python-django
projects:
-
name: django-realworld-example-app
source:
type: git
location: "https://github.com/gothinkster/django-realworld-example-app"
components:
-
type: chePlugin
id: ms-python/python/latest
memoryLimit: 512Mi
-
type: dockerimage
alias: python
image: centos/python-36-centos7:1
command: ['sleep']
args: ['infinity']
env:
- name: HOME
value: /home/user
- name: PS1
value: $(echo ${0})\\$
memoryLimit: 512Mi
endpoints:
- name: 'django'
port: 7000
mountSources: true
commands:
-
name: install requirements
actions:
-
type: exec
component: python
command: cd ${CHE_PROJECTS_ROOT}/django-realworld-example-app && pip install -r requirements.txt
-
name: migrate
actions:
-
type: exec
component: python
command: cd ${CHE_PROJECTS_ROOT}/django-realworld-example-app && python manage.py migrate
-
name: patch resources
actions:
-
type: exec
component: python
command: cd ${CHE_PROJECTS_ROOT}/django-realworld-example-app && sed -i "s/ALLOWED_HOSTS = \[\]/ALLOWED_HOSTS = \['*'\]/g" conduit/settings.py
-
name: run server
actions:
-
type: exec
component: python
command: cd ${CHE_PROJECTS_ROOT}/django-realworld-example-app && python manage.py runserver 0.0.0.0:7000
6 changes: 6 additions & 0 deletions devfiles/python-django/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
displayName: Python with Theia IDE
description: Default stack with Python 3.7 and Theia IDE adapted to work with Django
tags: ["Theia", "Debian", "Python", "pip"]
icon: https://www.eclipse.org/che/images/logo-eclipseche.svg
globalMemoryLimit: 1686Mi
17 changes: 14 additions & 3 deletions devfiles/python/devfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
apiVersion: 1.0.0
metadata:
name: python
projects:
-
name: python-hello-world
source:
type: git
location: "https://github.com/che-samples/python-hello-world.git"
components:
-
type: chePlugin
Expand All @@ -19,7 +25,12 @@ components:
- name: PS1
value: $(echo ${0})\\$
memoryLimit: 512Mi
endpoints:
- name: 'django'
port: 7000
mountSources: true
commands:
-
name: run
actions:
-
type: exec
command: "cd ${CHE_PROJECTS_ROOT}/python-hello-world && python hello-world.py"
component: python

0 comments on commit 5a64991

Please sign in to comment.