From 4dd0e93447cb9168b9856a55b563b4d6078f1595 Mon Sep 17 00:00:00 2001 From: Tosone Date: Thu, 21 Jan 2021 10:12:56 +0800 Subject: [PATCH 1/5] Rename java env directory. --- {jvm-jersey => java-maven-jersey}/.gitignore | 0 {jvm-jersey => java-maven-jersey}/Dockerfile | 0 {jvm-jersey => java-maven-jersey}/Dockerfile-11 | 0 {jvm-jersey => java-maven-jersey}/README.md | 0 {jvm-jersey => java-maven-jersey}/builder/Dockerfile | 0 {jvm-jersey => java-maven-jersey}/builder/Dockerfile-11 | 0 {jvm-jersey => java-maven-jersey}/builder/build.sh | 0 {jvm-jersey => java-maven-jersey}/envconfig.json | 0 {jvm-jersey => java-maven-jersey}/examples/java/.gitignore | 0 {jvm-jersey => java-maven-jersey}/examples/java/README.md | 0 {jvm-jersey => java-maven-jersey}/examples/java/build.sh | 0 {jvm-jersey => java-maven-jersey}/examples/java/pom.xml | 0 {jvm-jersey => java-maven-jersey}/examples/java/specs/README | 0 .../examples/java/specs/env-java.yaml | 0 .../examples/java/specs/fission-deployment-config.yaml | 0 .../examples/java/specs/function-hello.yaml | 0 .../examples/java/specs/package-hellojava.yaml | 0 .../examples/java/src/main/java/io/fission/HelloWorld.java | 0 .../examples/java/src/test/java/io/fission/HelloWorldTest.java | 0 {jvm-jersey => java-maven-jersey}/pom.xml | 0 .../src/main/java/io/fission/FunctionLoadRequest.java | 0 .../src/main/java/io/fission/JerseyServer.java | 0 .../src/main/java/io/fission/Main.java | 0 {jvm => java-maven-spring}/.gitignore | 0 {jvm => java-maven-spring}/Dockerfile | 0 {jvm => java-maven-spring}/README.md | 0 {jvm => java-maven-spring}/builder/Dockerfile | 0 {jvm => java-maven-spring}/builder/build.sh | 0 {jvm => java-maven-spring}/envconfig.json | 0 {jvm => java-maven-spring}/examples/java/.gitignore | 0 {jvm => java-maven-spring}/examples/java/README.md | 0 {jvm => java-maven-spring}/examples/java/build.sh | 0 {jvm => java-maven-spring}/examples/java/pom.xml | 0 {jvm => java-maven-spring}/examples/java/specs/README | 0 {jvm => java-maven-spring}/examples/java/specs/env-java.yaml | 0 .../examples/java/specs/fission-deployment-config.yaml | 0 .../examples/java/specs/function-hello.yaml | 0 .../examples/java/specs/package-hellojava.yaml | 0 .../examples/java/src/main/java/io/fission/HelloWorld.java | 0 .../examples/java/src/test/java/io/fission/HelloWorldTest.java | 0 {jvm => java-maven-spring}/pom.xml | 0 .../src/main/java/io/fission/FunctionLoadRequest.java | 0 {jvm => java-maven-spring}/src/main/java/io/fission/Server.java | 0 43 files changed, 0 insertions(+), 0 deletions(-) rename {jvm-jersey => java-maven-jersey}/.gitignore (100%) rename {jvm-jersey => java-maven-jersey}/Dockerfile (100%) rename {jvm-jersey => java-maven-jersey}/Dockerfile-11 (100%) rename {jvm-jersey => java-maven-jersey}/README.md (100%) rename {jvm-jersey => java-maven-jersey}/builder/Dockerfile (100%) rename {jvm-jersey => java-maven-jersey}/builder/Dockerfile-11 (100%) rename {jvm-jersey => java-maven-jersey}/builder/build.sh (100%) rename {jvm-jersey => java-maven-jersey}/envconfig.json (100%) rename {jvm-jersey => java-maven-jersey}/examples/java/.gitignore (100%) rename {jvm-jersey => java-maven-jersey}/examples/java/README.md (100%) rename {jvm-jersey => java-maven-jersey}/examples/java/build.sh (100%) rename {jvm-jersey => java-maven-jersey}/examples/java/pom.xml (100%) rename {jvm-jersey => java-maven-jersey}/examples/java/specs/README (100%) rename {jvm-jersey => java-maven-jersey}/examples/java/specs/env-java.yaml (100%) rename {jvm-jersey => java-maven-jersey}/examples/java/specs/fission-deployment-config.yaml (100%) rename {jvm-jersey => java-maven-jersey}/examples/java/specs/function-hello.yaml (100%) rename {jvm-jersey => java-maven-jersey}/examples/java/specs/package-hellojava.yaml (100%) rename {jvm-jersey => java-maven-jersey}/examples/java/src/main/java/io/fission/HelloWorld.java (100%) rename {jvm-jersey => java-maven-jersey}/examples/java/src/test/java/io/fission/HelloWorldTest.java (100%) rename {jvm-jersey => java-maven-jersey}/pom.xml (100%) rename {jvm-jersey => java-maven-jersey}/src/main/java/io/fission/FunctionLoadRequest.java (100%) rename {jvm-jersey => java-maven-jersey}/src/main/java/io/fission/JerseyServer.java (100%) rename {jvm-jersey => java-maven-jersey}/src/main/java/io/fission/Main.java (100%) rename {jvm => java-maven-spring}/.gitignore (100%) rename {jvm => java-maven-spring}/Dockerfile (100%) rename {jvm => java-maven-spring}/README.md (100%) rename {jvm => java-maven-spring}/builder/Dockerfile (100%) rename {jvm => java-maven-spring}/builder/build.sh (100%) rename {jvm => java-maven-spring}/envconfig.json (100%) rename {jvm => java-maven-spring}/examples/java/.gitignore (100%) rename {jvm => java-maven-spring}/examples/java/README.md (100%) rename {jvm => java-maven-spring}/examples/java/build.sh (100%) rename {jvm => java-maven-spring}/examples/java/pom.xml (100%) rename {jvm => java-maven-spring}/examples/java/specs/README (100%) rename {jvm => java-maven-spring}/examples/java/specs/env-java.yaml (100%) rename {jvm => java-maven-spring}/examples/java/specs/fission-deployment-config.yaml (100%) rename {jvm => java-maven-spring}/examples/java/specs/function-hello.yaml (100%) rename {jvm => java-maven-spring}/examples/java/specs/package-hellojava.yaml (100%) rename {jvm => java-maven-spring}/examples/java/src/main/java/io/fission/HelloWorld.java (100%) rename {jvm => java-maven-spring}/examples/java/src/test/java/io/fission/HelloWorldTest.java (100%) rename {jvm => java-maven-spring}/pom.xml (100%) rename {jvm => java-maven-spring}/src/main/java/io/fission/FunctionLoadRequest.java (100%) rename {jvm => java-maven-spring}/src/main/java/io/fission/Server.java (100%) diff --git a/jvm-jersey/.gitignore b/java-maven-jersey/.gitignore similarity index 100% rename from jvm-jersey/.gitignore rename to java-maven-jersey/.gitignore diff --git a/jvm-jersey/Dockerfile b/java-maven-jersey/Dockerfile similarity index 100% rename from jvm-jersey/Dockerfile rename to java-maven-jersey/Dockerfile diff --git a/jvm-jersey/Dockerfile-11 b/java-maven-jersey/Dockerfile-11 similarity index 100% rename from jvm-jersey/Dockerfile-11 rename to java-maven-jersey/Dockerfile-11 diff --git a/jvm-jersey/README.md b/java-maven-jersey/README.md similarity index 100% rename from jvm-jersey/README.md rename to java-maven-jersey/README.md diff --git a/jvm-jersey/builder/Dockerfile b/java-maven-jersey/builder/Dockerfile similarity index 100% rename from jvm-jersey/builder/Dockerfile rename to java-maven-jersey/builder/Dockerfile diff --git a/jvm-jersey/builder/Dockerfile-11 b/java-maven-jersey/builder/Dockerfile-11 similarity index 100% rename from jvm-jersey/builder/Dockerfile-11 rename to java-maven-jersey/builder/Dockerfile-11 diff --git a/jvm-jersey/builder/build.sh b/java-maven-jersey/builder/build.sh similarity index 100% rename from jvm-jersey/builder/build.sh rename to java-maven-jersey/builder/build.sh diff --git a/jvm-jersey/envconfig.json b/java-maven-jersey/envconfig.json similarity index 100% rename from jvm-jersey/envconfig.json rename to java-maven-jersey/envconfig.json diff --git a/jvm-jersey/examples/java/.gitignore b/java-maven-jersey/examples/java/.gitignore similarity index 100% rename from jvm-jersey/examples/java/.gitignore rename to java-maven-jersey/examples/java/.gitignore diff --git a/jvm-jersey/examples/java/README.md b/java-maven-jersey/examples/java/README.md similarity index 100% rename from jvm-jersey/examples/java/README.md rename to java-maven-jersey/examples/java/README.md diff --git a/jvm-jersey/examples/java/build.sh b/java-maven-jersey/examples/java/build.sh similarity index 100% rename from jvm-jersey/examples/java/build.sh rename to java-maven-jersey/examples/java/build.sh diff --git a/jvm-jersey/examples/java/pom.xml b/java-maven-jersey/examples/java/pom.xml similarity index 100% rename from jvm-jersey/examples/java/pom.xml rename to java-maven-jersey/examples/java/pom.xml diff --git a/jvm-jersey/examples/java/specs/README b/java-maven-jersey/examples/java/specs/README similarity index 100% rename from jvm-jersey/examples/java/specs/README rename to java-maven-jersey/examples/java/specs/README diff --git a/jvm-jersey/examples/java/specs/env-java.yaml b/java-maven-jersey/examples/java/specs/env-java.yaml similarity index 100% rename from jvm-jersey/examples/java/specs/env-java.yaml rename to java-maven-jersey/examples/java/specs/env-java.yaml diff --git a/jvm-jersey/examples/java/specs/fission-deployment-config.yaml b/java-maven-jersey/examples/java/specs/fission-deployment-config.yaml similarity index 100% rename from jvm-jersey/examples/java/specs/fission-deployment-config.yaml rename to java-maven-jersey/examples/java/specs/fission-deployment-config.yaml diff --git a/jvm-jersey/examples/java/specs/function-hello.yaml b/java-maven-jersey/examples/java/specs/function-hello.yaml similarity index 100% rename from jvm-jersey/examples/java/specs/function-hello.yaml rename to java-maven-jersey/examples/java/specs/function-hello.yaml diff --git a/jvm-jersey/examples/java/specs/package-hellojava.yaml b/java-maven-jersey/examples/java/specs/package-hellojava.yaml similarity index 100% rename from jvm-jersey/examples/java/specs/package-hellojava.yaml rename to java-maven-jersey/examples/java/specs/package-hellojava.yaml diff --git a/jvm-jersey/examples/java/src/main/java/io/fission/HelloWorld.java b/java-maven-jersey/examples/java/src/main/java/io/fission/HelloWorld.java similarity index 100% rename from jvm-jersey/examples/java/src/main/java/io/fission/HelloWorld.java rename to java-maven-jersey/examples/java/src/main/java/io/fission/HelloWorld.java diff --git a/jvm-jersey/examples/java/src/test/java/io/fission/HelloWorldTest.java b/java-maven-jersey/examples/java/src/test/java/io/fission/HelloWorldTest.java similarity index 100% rename from jvm-jersey/examples/java/src/test/java/io/fission/HelloWorldTest.java rename to java-maven-jersey/examples/java/src/test/java/io/fission/HelloWorldTest.java diff --git a/jvm-jersey/pom.xml b/java-maven-jersey/pom.xml similarity index 100% rename from jvm-jersey/pom.xml rename to java-maven-jersey/pom.xml diff --git a/jvm-jersey/src/main/java/io/fission/FunctionLoadRequest.java b/java-maven-jersey/src/main/java/io/fission/FunctionLoadRequest.java similarity index 100% rename from jvm-jersey/src/main/java/io/fission/FunctionLoadRequest.java rename to java-maven-jersey/src/main/java/io/fission/FunctionLoadRequest.java diff --git a/jvm-jersey/src/main/java/io/fission/JerseyServer.java b/java-maven-jersey/src/main/java/io/fission/JerseyServer.java similarity index 100% rename from jvm-jersey/src/main/java/io/fission/JerseyServer.java rename to java-maven-jersey/src/main/java/io/fission/JerseyServer.java diff --git a/jvm-jersey/src/main/java/io/fission/Main.java b/java-maven-jersey/src/main/java/io/fission/Main.java similarity index 100% rename from jvm-jersey/src/main/java/io/fission/Main.java rename to java-maven-jersey/src/main/java/io/fission/Main.java diff --git a/jvm/.gitignore b/java-maven-spring/.gitignore similarity index 100% rename from jvm/.gitignore rename to java-maven-spring/.gitignore diff --git a/jvm/Dockerfile b/java-maven-spring/Dockerfile similarity index 100% rename from jvm/Dockerfile rename to java-maven-spring/Dockerfile diff --git a/jvm/README.md b/java-maven-spring/README.md similarity index 100% rename from jvm/README.md rename to java-maven-spring/README.md diff --git a/jvm/builder/Dockerfile b/java-maven-spring/builder/Dockerfile similarity index 100% rename from jvm/builder/Dockerfile rename to java-maven-spring/builder/Dockerfile diff --git a/jvm/builder/build.sh b/java-maven-spring/builder/build.sh similarity index 100% rename from jvm/builder/build.sh rename to java-maven-spring/builder/build.sh diff --git a/jvm/envconfig.json b/java-maven-spring/envconfig.json similarity index 100% rename from jvm/envconfig.json rename to java-maven-spring/envconfig.json diff --git a/jvm/examples/java/.gitignore b/java-maven-spring/examples/java/.gitignore similarity index 100% rename from jvm/examples/java/.gitignore rename to java-maven-spring/examples/java/.gitignore diff --git a/jvm/examples/java/README.md b/java-maven-spring/examples/java/README.md similarity index 100% rename from jvm/examples/java/README.md rename to java-maven-spring/examples/java/README.md diff --git a/jvm/examples/java/build.sh b/java-maven-spring/examples/java/build.sh similarity index 100% rename from jvm/examples/java/build.sh rename to java-maven-spring/examples/java/build.sh diff --git a/jvm/examples/java/pom.xml b/java-maven-spring/examples/java/pom.xml similarity index 100% rename from jvm/examples/java/pom.xml rename to java-maven-spring/examples/java/pom.xml diff --git a/jvm/examples/java/specs/README b/java-maven-spring/examples/java/specs/README similarity index 100% rename from jvm/examples/java/specs/README rename to java-maven-spring/examples/java/specs/README diff --git a/jvm/examples/java/specs/env-java.yaml b/java-maven-spring/examples/java/specs/env-java.yaml similarity index 100% rename from jvm/examples/java/specs/env-java.yaml rename to java-maven-spring/examples/java/specs/env-java.yaml diff --git a/jvm/examples/java/specs/fission-deployment-config.yaml b/java-maven-spring/examples/java/specs/fission-deployment-config.yaml similarity index 100% rename from jvm/examples/java/specs/fission-deployment-config.yaml rename to java-maven-spring/examples/java/specs/fission-deployment-config.yaml diff --git a/jvm/examples/java/specs/function-hello.yaml b/java-maven-spring/examples/java/specs/function-hello.yaml similarity index 100% rename from jvm/examples/java/specs/function-hello.yaml rename to java-maven-spring/examples/java/specs/function-hello.yaml diff --git a/jvm/examples/java/specs/package-hellojava.yaml b/java-maven-spring/examples/java/specs/package-hellojava.yaml similarity index 100% rename from jvm/examples/java/specs/package-hellojava.yaml rename to java-maven-spring/examples/java/specs/package-hellojava.yaml diff --git a/jvm/examples/java/src/main/java/io/fission/HelloWorld.java b/java-maven-spring/examples/java/src/main/java/io/fission/HelloWorld.java similarity index 100% rename from jvm/examples/java/src/main/java/io/fission/HelloWorld.java rename to java-maven-spring/examples/java/src/main/java/io/fission/HelloWorld.java diff --git a/jvm/examples/java/src/test/java/io/fission/HelloWorldTest.java b/java-maven-spring/examples/java/src/test/java/io/fission/HelloWorldTest.java similarity index 100% rename from jvm/examples/java/src/test/java/io/fission/HelloWorldTest.java rename to java-maven-spring/examples/java/src/test/java/io/fission/HelloWorldTest.java diff --git a/jvm/pom.xml b/java-maven-spring/pom.xml similarity index 100% rename from jvm/pom.xml rename to java-maven-spring/pom.xml diff --git a/jvm/src/main/java/io/fission/FunctionLoadRequest.java b/java-maven-spring/src/main/java/io/fission/FunctionLoadRequest.java similarity index 100% rename from jvm/src/main/java/io/fission/FunctionLoadRequest.java rename to java-maven-spring/src/main/java/io/fission/FunctionLoadRequest.java diff --git a/jvm/src/main/java/io/fission/Server.java b/java-maven-spring/src/main/java/io/fission/Server.java similarity index 100% rename from jvm/src/main/java/io/fission/Server.java rename to java-maven-spring/src/main/java/io/fission/Server.java From 3ebf477f3ab912b8cd8b09af7cca2690ee8f7260 Mon Sep 17 00:00:00 2001 From: Tosone Date: Thu, 21 Jan 2021 10:28:40 +0800 Subject: [PATCH 2/5] Ignore idea dirs. --- .gitignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 5d4065b6..69911e96 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ environments-ui/node_modules #environments-ui/src/resources/environments.json environments-ui/public/bundle.js -environments-ui/server.js \ No newline at end of file +environments-ui/server.js + +.idea/ From daa9f333d811671ca6c56253735a3b33f8fd8c21 Mon Sep 17 00:00:00 2001 From: Tosone Date: Thu, 21 Jan 2021 10:31:38 +0800 Subject: [PATCH 3/5] Add java gradle spring boot environment. --- java-gradle-spring/.dockerignore | 3 + java-gradle-spring/.gitignore | 3 + java-gradle-spring/Dockerfile | 21 +++ java-gradle-spring/README.md | 70 ++++++++++ java-gradle-spring/build.gradle | 20 +++ java-gradle-spring/builder/Dockerfile | 52 ++++++++ java-gradle-spring/builder/build.sh | 8 ++ java-gradle-spring/settings.gradle | 1 + .../java/io/fission/FunctionLoadRequest.java | 32 +++++ .../src/main/java/io/fission/Server.java | 124 ++++++++++++++++++ 10 files changed, 334 insertions(+) create mode 100644 java-gradle-spring/.dockerignore create mode 100644 java-gradle-spring/.gitignore create mode 100644 java-gradle-spring/Dockerfile create mode 100644 java-gradle-spring/README.md create mode 100644 java-gradle-spring/build.gradle create mode 100644 java-gradle-spring/builder/Dockerfile create mode 100755 java-gradle-spring/builder/build.sh create mode 100644 java-gradle-spring/settings.gradle create mode 100644 java-gradle-spring/src/main/java/io/fission/FunctionLoadRequest.java create mode 100644 java-gradle-spring/src/main/java/io/fission/Server.java diff --git a/java-gradle-spring/.dockerignore b/java-gradle-spring/.dockerignore new file mode 100644 index 00000000..01069104 --- /dev/null +++ b/java-gradle-spring/.dockerignore @@ -0,0 +1,3 @@ +build/ +builder/ +.gradle/ diff --git a/java-gradle-spring/.gitignore b/java-gradle-spring/.gitignore new file mode 100644 index 00000000..15aa5a7b --- /dev/null +++ b/java-gradle-spring/.gitignore @@ -0,0 +1,3 @@ +.gradle/ +gradle/ +build/ diff --git a/java-gradle-spring/Dockerfile b/java-gradle-spring/Dockerfile new file mode 100644 index 00000000..1a067021 --- /dev/null +++ b/java-gradle-spring/Dockerfile @@ -0,0 +1,21 @@ +FROM gradle:6.7-jdk8-openj9 as builder + +WORKDIR /usr/src/myapp/ + +COPY build.gradle . +COPY settings.gradle . + +COPY src /usr/src/myapp/src/ + +RUN gradle build + +# get gradle:6.7-jdk8-openj9 base image +FROM adoptopenjdk:8-jdk-openj9 + +VOLUME /tmp + +COPY --from=builder /usr/src/myapp/build/libs/env-java-gradle-spring-0.0.1-SNAPSHOT.jar /app.jar + +ENTRYPOINT java ${JVM_OPTS} -Djava.security.egd=file:/dev/urandom -jar /app.jar --server.port=8888 + +EXPOSE 8888 diff --git a/java-gradle-spring/README.md b/java-gradle-spring/README.md new file mode 100644 index 00000000..e5dbe337 --- /dev/null +++ b/java-gradle-spring/README.md @@ -0,0 +1,70 @@ +# Fission: Java and JVM Environment + +This is the JVM environment for Fission. + +It's a Docker image containing a OpenJDK8 runtime, along with a +dynamic loader. A few dependencies are included in the +pom.xml file. + +Looking for ready-to-run examples? See the [JVM examples directory](../../examples/jvm). + +## Customizing this image + +To add package dependencies, edit pom.xml to add what you +need, and rebuild this image (instructions below). + +## Rebuilding and pushing the image + +You'll need access to a Docker registry to push the image: you can +sign up for Docker hub at hub.docker.com, or use registries from +gcr.io, quay.io, etc. Let's assume you're using a docker hub account +called USER. Build and push the image to the the registry: + +``` bash +docker build -t USER/jvm-env . && docker push USER/jvm-env +``` + +## Using the image in fission + +You can add this customized image to fission with "fission env +create": + +``` bash +fission env create --name jvm --image USER/jvm-env +``` + +Or, if you already have an environment, you can update its image: + +``` bash +fission env update --name jvm --image USER/jvm-env +``` + +After this, fission functions that have the env parameter set to the +same environment name as this command will use this environment. + +## Web Server Framework + +JVM environment uses Tomcat HTTP server by default as it is included in spring web. You can choose to use jetty or undertow by changing the dependency in pom.xml file as shown below. + +``` xml + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-starter-tomcat + + + + + + org.springframework.boot + spring-boot-starter-jetty + +``` + +## Java and JVM builder + +JVM environment builder is based on OpenJDK8 and Maven 3.5.4 version. The default build command runs `mvn clean package` and uses the target/*with-dependencies.jar file for function. The default build command can be overridden as long as the uber jar file is copied to ${DEPLOY_PKG}. diff --git a/java-gradle-spring/build.gradle b/java-gradle-spring/build.gradle new file mode 100644 index 00000000..9543745c --- /dev/null +++ b/java-gradle-spring/build.gradle @@ -0,0 +1,20 @@ +plugins { + id 'org.springframework.boot' version '2.0.1.RELEASE' + id 'io.spring.dependency-management' version '1.0.10.RELEASE' + id 'java' +} + +group = 'io.fission' + +repositories { + mavenCentral() + maven { + url "https://oss.sonatype.org/content/repositories/snapshots/" + } +} + +dependencies { + implementation 'org.springframework.boot:spring-boot-starter-web' + implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml' + implementation 'io.fission:fission-java-core:0.0.2-SNAPSHOT' +} diff --git a/java-gradle-spring/builder/Dockerfile b/java-gradle-spring/builder/Dockerfile new file mode 100644 index 00000000..503658f5 --- /dev/null +++ b/java-gradle-spring/builder/Dockerfile @@ -0,0 +1,52 @@ +## Fission builder base image +ARG BUILDER_IMAGE=fission/builder:latest +FROM ${BUILDER_IMAGE} + +## Section copied from the openjdk:8-jdk-alpine Dockerfile - (https://github.com/docker-library/openjdk/blob/47a6539cd18023dafb45db9013455136cc0bca07/8/jdk/alpine/Dockerfile) + +ENV LANG C.UTF-8 +RUN { \ + echo '#!/bin/sh'; \ + echo 'set -e'; \ + echo; \ + echo 'dirname "$(dirname "$(readlink -f "$(which javac || which java)")")"'; \ + } > /usr/local/bin/docker-java-home \ + && chmod +x /usr/local/bin/docker-java-home +ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk +ENV PATH $PATH:/usr/lib/jvm/java-1.8-openjdk/jre/bin:/usr/lib/jvm/java-1.8-openjdk/bin + +ENV JAVA_VERSION 8u181 +## Use "fuzzy" version matching to pin the version to a major/minor release +ENV JAVA_ALPINE_VERSION "~8" + +RUN set -x \ + && apk add --no-cache \ + openjdk8="$JAVA_ALPINE_VERSION" \ + && [ "$JAVA_HOME" = "$(docker-java-home)" ] + +RUN apk add --no-cache curl tar bash procps git + +# Section copied from adoptopenjdk:8-jdk-openj9 Dockerfile - (https://github.com/keeganwitt/docker-gradle/blob/c618fa59f4cf872845a6f38bf7cce948fbf8dbc4/openj9/jdk8/Dockerfile) + +ENV GRADLE_HOME /opt/gradle +ENV GRADLE_VERSION 6.8 +ARG GRADLE_DOWNLOAD_SHA256=e2774e6fb77c43657decde25542dea710aafd78c4022d19b196e7e78d79d8c6c +RUN set -o errexit -o nounset \ + && echo "Downloading Gradle" \ + && wget --no-verbose --output-document=gradle.zip "https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip" \ + \ + && echo "Checking download hash" \ + && echo "${GRADLE_DOWNLOAD_SHA256} *gradle.zip" | sha256sum -c - \ + \ + && echo "Installing Gradle" \ + && unzip gradle.zip \ + && rm gradle.zip \ + && mv "gradle-${GRADLE_VERSION}" "${GRADLE_HOME}/" \ + && ln -s "${GRADLE_HOME}/bin/gradle" /usr/bin/gradle \ + \ + && echo "Testing Gradle installation" \ + && gradle --version + +## Fission builder specific section +ADD build.sh /usr/local/bin/build +EXPOSE 8001 diff --git a/java-gradle-spring/builder/build.sh b/java-gradle-spring/builder/build.sh new file mode 100755 index 00000000..ada24e2c --- /dev/null +++ b/java-gradle-spring/builder/build.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +set -eou pipefail + +gradle build + +# TODO: build to specific filename +cp ${SRC_PKG}/build/libs/*-0.0.1-SNAPSHOT.jar ${DEPLOY_PKG} diff --git a/java-gradle-spring/settings.gradle b/java-gradle-spring/settings.gradle new file mode 100644 index 00000000..854f927c --- /dev/null +++ b/java-gradle-spring/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'env-java-gradle-spring' diff --git a/java-gradle-spring/src/main/java/io/fission/FunctionLoadRequest.java b/java-gradle-spring/src/main/java/io/fission/FunctionLoadRequest.java new file mode 100644 index 00000000..f5276840 --- /dev/null +++ b/java-gradle-spring/src/main/java/io/fission/FunctionLoadRequest.java @@ -0,0 +1,32 @@ +package io.fission; + +public class FunctionLoadRequest { + + private String filepath; + private String functionName; + private String url; + + String getFilepath() { + return filepath; + } + + void setFilepath(String filepath) { + this.filepath = filepath; + } + + String getUrl() { + return url; + } + + void setUrl(String url) { + this.url = url; + } + + public String getFunctionName() { + return functionName; + } + + public void setFunctionName(String functionName) { + this.functionName = functionName; + } +} diff --git a/java-gradle-spring/src/main/java/io/fission/Server.java b/java-gradle-spring/src/main/java/io/fission/Server.java new file mode 100644 index 00000000..b9f88d2f --- /dev/null +++ b/java-gradle-spring/src/main/java/io/fission/Server.java @@ -0,0 +1,124 @@ +package io.fission; + +import java.io.File; +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLClassLoader; +import java.util.Enumeration; +import java.util.jar.JarEntry; +import java.util.jar.JarFile; +import java.util.logging.Level; +import java.util.logging.Logger; + +import org.springframework.boot.*; +import org.springframework.boot.autoconfigure.*; +import org.springframework.http.RequestEntity; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; + +import io.fission.Function; + +@RestController +@EnableAutoConfiguration +public class Server { + + private Function fn; + + private static final int CLASS_LENGTH = 6; + + private static Logger logger = Logger.getGlobal(); + + @RequestMapping(value = "/", method = { RequestMethod.GET, RequestMethod.POST, RequestMethod.DELETE, + RequestMethod.PUT }) + ResponseEntity home(RequestEntity req) { + if (fn == null) { + return ResponseEntity.badRequest().body("Container not specialized"); + } else { + return ((ResponseEntity) ((Function) fn).call(req, null)); + } + } + + @PostMapping(path = "/v2/specialize", consumes = "application/json") + ResponseEntity specialize(@RequestBody FunctionLoadRequest req) { + long startTime = System.nanoTime(); + File file = new File(req.getFilepath()); + if (!file.exists()) { + return ResponseEntity.badRequest().body("/userfunc/user not found"); + } + + String entryPoint = req.getFunctionName(); + logger.log(Level.INFO, "Entrypoint class:" + entryPoint); + if (entryPoint == null) { + return ResponseEntity.badRequest().body("Entrypoint class is missing in the function"); + } + + JarFile jarFile = null; + ClassLoader cl = null; + try { + + jarFile = new JarFile(file); + Enumeration e = jarFile.entries(); + URL[] urls = { new URL("jar:file:" + file + "!/") }; + + // TODO Check if the class loading can be improved for ex. use something like: + // Thread.currentThread().setContextClassLoader(cl); + if (this.getClass().getClassLoader() == null) { + cl = URLClassLoader.newInstance(urls); + } else { + cl = URLClassLoader.newInstance(urls, this.getClass().getClassLoader()); + } + + if (cl == null) { + return ResponseEntity.status(500).body("Failed to initialize the class loader"); + } + logger.log(Level.INFO, "75"); + // Load all dependent classes from libraries etc. + while (e.hasMoreElements()) { + JarEntry je = e.nextElement(); + if (je.isDirectory() || !je.getName().endsWith(".class")) { + continue; + } + String className = je.getName().substring(0, je.getName().length() - CLASS_LENGTH); + logger.log(Level.INFO, className); + className = className.replace('/', '.'); + cl.loadClass(className); + } + logger.log(Level.INFO, "87"); + + // Instantiate the function class + fn = (Function) cl.loadClass(entryPoint).newInstance(); + + } catch (MalformedURLException e) { + e.printStackTrace(); + return ResponseEntity.badRequest().body("Error loading the Function class file"); + } catch (ClassNotFoundException e) { + e.printStackTrace(); + return ResponseEntity.badRequest().body("Error loading Function or dependent class"); + } catch (InstantiationException e) { + e.printStackTrace(); + return ResponseEntity.badRequest().body("Error creating a new instance of function class"); + } catch (IllegalAccessException e) { + e.printStackTrace(); + return ResponseEntity.badRequest().body("Error creating a new instance of function class"); + } catch (IOException e) { + e.printStackTrace(); + return ResponseEntity.badRequest().body("Error reading the JAR file"); + } finally { + try { + // cl.close(); + jarFile.close(); + } catch (IOException e) { + e.printStackTrace(); + return ResponseEntity.badRequest().body("Error closing the file while loading the class"); + } + } + long elapsedTime = System.nanoTime() - startTime; + logger.log(Level.INFO, "Specialize call done in: " + elapsedTime / 1000000 + " ms"); + return ResponseEntity.ok("Done"); + } + + public static void main(String[] args) throws Exception { + SpringApplication.run(Server.class, args); + } +} From 4b08812e07c6db5ba883c8eacf0a46f2cc5a9620 Mon Sep 17 00:00:00 2001 From: Tosone Date: Thu, 21 Jan 2021 10:34:20 +0800 Subject: [PATCH 4/5] Add java gradle spring boot example. --- .../examples/hello-world/.gitignore | 3 + .../examples/hello-world/README.md | 59 +++++++++++++++++++ .../examples/hello-world/build.gradle | 17 ++++++ .../examples/hello-world/build.sh | 5 ++ .../examples/hello-world/settings.gradle | 1 + .../examples/hello-world/specs/README | 42 +++++++++++++ .../examples/hello-world/specs/env-java.yaml | 17 ++++++ .../specs/fission-deployment-config.yaml | 7 +++ .../hello-world/specs/function-hello.yaml | 27 +++++++++ .../hello-world/specs/package-hellojava.yaml | 26 ++++++++ .../src/main/java/io/fission/HelloWorld.java | 11 ++++ .../test/java/io/fission/HelloWorldTest.java | 22 +++++++ 12 files changed, 237 insertions(+) create mode 100644 java-gradle-spring/examples/hello-world/.gitignore create mode 100644 java-gradle-spring/examples/hello-world/README.md create mode 100644 java-gradle-spring/examples/hello-world/build.gradle create mode 100755 java-gradle-spring/examples/hello-world/build.sh create mode 100644 java-gradle-spring/examples/hello-world/settings.gradle create mode 100644 java-gradle-spring/examples/hello-world/specs/README create mode 100644 java-gradle-spring/examples/hello-world/specs/env-java.yaml create mode 100644 java-gradle-spring/examples/hello-world/specs/fission-deployment-config.yaml create mode 100644 java-gradle-spring/examples/hello-world/specs/function-hello.yaml create mode 100644 java-gradle-spring/examples/hello-world/specs/package-hellojava.yaml create mode 100644 java-gradle-spring/examples/hello-world/src/main/java/io/fission/HelloWorld.java create mode 100644 java-gradle-spring/examples/hello-world/src/test/java/io/fission/HelloWorldTest.java diff --git a/java-gradle-spring/examples/hello-world/.gitignore b/java-gradle-spring/examples/hello-world/.gitignore new file mode 100644 index 00000000..7717e100 --- /dev/null +++ b/java-gradle-spring/examples/hello-world/.gitignore @@ -0,0 +1,3 @@ +build/ +gradle/ +.gradle/ diff --git a/java-gradle-spring/examples/hello-world/README.md b/java-gradle-spring/examples/hello-world/README.md new file mode 100644 index 00000000..8ad842fd --- /dev/null +++ b/java-gradle-spring/examples/hello-world/README.md @@ -0,0 +1,59 @@ +# Hello World in JVM/Java on Fission + +The `io.fission.HelloWorld.java` class is a very simple fission function that implements `io.fission.Function` and says "Hello, World!" . + +## Building and deploying using Fission + +Fission's builder can be used to create the binary artifact from source code. Create an environment with builder image and then create a package. + +``` txt +$ zip -r java-src-pkg.zip * +$ fission env create --name java --image fission/jvm-env --version 2 --keeparchive --builder fission/jvm-builder +$ fission package create --sourcearchive java-src-pkg.zip --env java +java-src-pkg-zip-tvd0 +$ fission package info --name java-src-pkg-zip-tvd0 +Name: java-src-pkg-zip-tvd0 +Environment: java +Status: succeeded +Build Logs: +[INFO] Scanning for projects... +[INFO] +[INFO] -----------------------< io.fission:hello-world >----------------------- +[INFO] Building hello-world 1.0-SNAPSHOT +[INFO] --------------------------------[ jar ]--------------------------------- +``` + +Once package's status is `succeeded` then that package can be used to create and execute a function. + +``` txt +$ fission fn create --name hello --pkg java-src-pkg-zip-tvd0 --env java --entrypoint io.fission.HelloWorld +$ fission fn test --name hello +Hello World! +``` + +## Building locally and deploying with Fission + +You can build the jar file in one of the two ways below based on your setup: + +- You can use docker without the need to install JDK and Maven to build the jar file from source code: + +``` bash +bash -x ./build.sh +``` + +- If you have JDK and Maven installed, you can directly build the JAR file using command: + +``` bash +gradle build +``` + +Both of above steps will generate a target subdirectory which has the archive `target/hello-world-1.0-SNAPSHOT-jar-with-dependencies.jar` which will be used for creating function. + +- The archive created above will be used as a deploy package when creating the function. + +``` bash +fission env create --name jvm --image fission/jvm-env --version 2 --keeparchive=true +fission fn create --name hello --deploy target/hello-world-1.0-SNAPSHOT-jar-with-dependencies.jar --env jvm --entrypoint io.fission.HelloWorld +fission route create --function hello --url /hellop --method GET +fission fn test --name hello +``` diff --git a/java-gradle-spring/examples/hello-world/build.gradle b/java-gradle-spring/examples/hello-world/build.gradle new file mode 100644 index 00000000..33e79a44 --- /dev/null +++ b/java-gradle-spring/examples/hello-world/build.gradle @@ -0,0 +1,17 @@ +plugins { + id 'java-library' +} + +group = 'io.fission' + +repositories { + mavenCentral() + maven { + url "https://oss.sonatype.org/content/repositories/snapshots/" + } +} + +dependencies { + implementation 'org.springframework.boot:spring-boot-starter-web:2.0.1.RELEASE' + implementation 'io.fission:fission-java-core:0.0.2-SNAPSHOT' +} diff --git a/java-gradle-spring/examples/hello-world/build.sh b/java-gradle-spring/examples/hello-world/build.sh new file mode 100755 index 00000000..298e3f20 --- /dev/null +++ b/java-gradle-spring/examples/hello-world/build.sh @@ -0,0 +1,5 @@ +#!/bin/sh +# This script allows you to build the jar without needing Maven & JDK installed locally. +# You need docker, as it uses a Docker image to build source code +set -eou pipefail +docker run -it --rm -v "$(pwd)":/usr/src/mymaven -w /usr/src/mymaven gradle:6.7-jdk8-openj9 gradle build diff --git a/java-gradle-spring/examples/hello-world/settings.gradle b/java-gradle-spring/examples/hello-world/settings.gradle new file mode 100644 index 00000000..1ca14dc1 --- /dev/null +++ b/java-gradle-spring/examples/hello-world/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'hello-world' diff --git a/java-gradle-spring/examples/hello-world/specs/README b/java-gradle-spring/examples/hello-world/specs/README new file mode 100644 index 00000000..1db3f9a5 --- /dev/null +++ b/java-gradle-spring/examples/hello-world/specs/README @@ -0,0 +1,42 @@ + +Fission Specs +============= + +This is a set of specifications for a Fission app. This includes functions, +environments, and triggers; we collectively call these things "resources". + +How to use these specs +---------------------- + +These specs are handled with the 'fission spec' command. See 'fission spec --help'. + +'fission spec apply' will "apply" all resources specified in this directory to your +cluster. That means it checks what resources exist on your cluster, what resources are +specified in the specs directory, and reconciles the difference by creating, updating or +deleting resources on the cluster. + +'fission spec apply' will also package up your source code (or compiled binaries) and +upload the archives to the cluster if needed. It uses 'ArchiveUploadSpec' resources in +this directory to figure out which files to archive. + +You can use 'fission spec apply --watch' to watch for file changes and continuously keep +the cluster updated. + +You can add YAMLs to this directory by writing them manually, but it's easier to generate +them. Use 'fission function create --spec' to generate a function spec, +'fission environment create --spec' to generate an environment spec, and so on. + +You can edit any of the files in this directory, except 'fission-deployment-config.yaml', +which contains a UID that you should never change. To apply your changes simply use +'fission spec apply'. + +fission-deployment-config.yaml +------------------------------ + +fission-deployment-config.yaml contains a UID. This UID is what fission uses to correlate +resources on the cluster to resources in this directory. + +All resources created by 'fission spec apply' are annotated with this UID. Resources on +the cluster that are _not_ annotated with this UID are never modified or deleted by +fission. + diff --git a/java-gradle-spring/examples/hello-world/specs/env-java.yaml b/java-gradle-spring/examples/hello-world/specs/env-java.yaml new file mode 100644 index 00000000..f3bbb582 --- /dev/null +++ b/java-gradle-spring/examples/hello-world/specs/env-java.yaml @@ -0,0 +1,17 @@ +apiVersion: fission.io/v1 +kind: Environment +metadata: + creationTimestamp: null + name: java + namespace: default +spec: + builder: + command: build + image: fission/jvm-builder:1.7.1 + imagepullsecret: "" + keeparchive: true + poolsize: 3 + resources: {} + runtime: + image: fission/jvm-env:1.7.1 + version: 2 diff --git a/java-gradle-spring/examples/hello-world/specs/fission-deployment-config.yaml b/java-gradle-spring/examples/hello-world/specs/fission-deployment-config.yaml new file mode 100644 index 00000000..753e349d --- /dev/null +++ b/java-gradle-spring/examples/hello-world/specs/fission-deployment-config.yaml @@ -0,0 +1,7 @@ +# This file is generated by the 'fission spec init' command. +# See the README in this directory for background and usage information. +# Do not edit the UID below: that will break 'fission spec apply' +apiVersion: fission.io/v1 +kind: DeploymentConfig +name: java +uid: 908a303a-bf23-4bae-a22c-b1db9a1f71a9 diff --git a/java-gradle-spring/examples/hello-world/specs/function-hello.yaml b/java-gradle-spring/examples/hello-world/specs/function-hello.yaml new file mode 100644 index 00000000..8188e5db --- /dev/null +++ b/java-gradle-spring/examples/hello-world/specs/function-hello.yaml @@ -0,0 +1,27 @@ +apiVersion: fission.io/v1 +kind: Function +metadata: + creationTimestamp: null + name: hello + namespace: default +spec: + InvokeStrategy: + ExecutionStrategy: + ExecutorType: poolmgr + MaxScale: 0 + MinScale: 0 + SpecializationTimeout: 120 + TargetCPUPercent: 0 + StrategyType: execution + configmaps: null + environment: + name: java + namespace: default + functionTimeout: 60 + package: + functionName: io.fission.HelloWorld + packageref: + name: hellojava + namespace: default + resources: {} + secrets: null diff --git a/java-gradle-spring/examples/hello-world/specs/package-hellojava.yaml b/java-gradle-spring/examples/hello-world/specs/package-hellojava.yaml new file mode 100644 index 00000000..0da0366c --- /dev/null +++ b/java-gradle-spring/examples/hello-world/specs/package-hellojava.yaml @@ -0,0 +1,26 @@ +include: +- src +- pom.xml +kind: ArchiveUploadSpec +name: src-URlE + +--- +apiVersion: fission.io/v1 +kind: Package +metadata: + creationTimestamp: null + name: hellojava + namespace: default +spec: + deployment: + checksum: {} + environment: + name: java + namespace: default + source: + checksum: {} + type: url + url: archive://src-URlE +status: + buildstatus: pending + lastUpdateTimestamp: "2020-01-29T09:43:56Z" diff --git a/java-gradle-spring/examples/hello-world/src/main/java/io/fission/HelloWorld.java b/java-gradle-spring/examples/hello-world/src/main/java/io/fission/HelloWorld.java new file mode 100644 index 00000000..8768deb1 --- /dev/null +++ b/java-gradle-spring/examples/hello-world/src/main/java/io/fission/HelloWorld.java @@ -0,0 +1,11 @@ +package io.fission; + +import org.springframework.http.RequestEntity; +import org.springframework.http.ResponseEntity; + +public class HelloWorld implements Function { + @Override + public ResponseEntity call(RequestEntity req, Context context) { + return ResponseEntity.ok("Hello World!"); + } +} diff --git a/java-gradle-spring/examples/hello-world/src/test/java/io/fission/HelloWorldTest.java b/java-gradle-spring/examples/hello-world/src/test/java/io/fission/HelloWorldTest.java new file mode 100644 index 00000000..fe716893 --- /dev/null +++ b/java-gradle-spring/examples/hello-world/src/test/java/io/fission/HelloWorldTest.java @@ -0,0 +1,22 @@ +package io.fission; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.Objects; + +import org.springframework.http.*; +import org.springframework.util.Assert; + +public class HelloWorldTest { + public void testResponse() { + HelloWorld hw = new HelloWorld(); + RequestEntity request = null; + try { + request = RequestEntity.get(new URI("http://baidu.com")).build(); + } catch (URISyntaxException e) { + e.printStackTrace(); + } + ResponseEntity resp = hw.call(request,null); + Assert.hasText(Objects.requireNonNull(resp.getBody()).toString(), "Hello World!"); + } +} From bcac43daf582f88eb014953126d9725375d6ca90 Mon Sep 17 00:00:00 2001 From: Tosone Date: Thu, 21 Jan 2021 10:58:35 +0800 Subject: [PATCH 5/5] Add java gradle spring boot env index. --- .../src/resources/environments.json | 946 ++++++++++-------- 1 file changed, 501 insertions(+), 445 deletions(-) diff --git a/environments-ui/src/resources/environments.json b/environments-ui/src/resources/environments.json index bc884669..72c45720 100644 --- a/environments-ui/src/resources/environments.json +++ b/environments-ui/src/resources/environments.json @@ -1,461 +1,517 @@ [ -[{ - "version": "1.0.0", - "runtimeVersion" : "3.5-alpine", - "kind": "environment", - "status": "Stable", - "name": "Fission Binary Environment", - "shortDescription": "Fission environment to run any binary", - "readme" : "https://github.com/fission/environments/tree/master/binary", - "examples" : "https://github.com/fission/environments/tree/master/binary/examples", - "keywords": [], - "icon": "./logo/full_colored_dark.svg", - "maintainers": [ - { - "name": "life1347", - "link": "https://github.com/life1347" - }, - { - "name": "soamvasani", - "link": "https://github.com/soamvasani" - }, - { - "name": "vishal-biyani", - "link": "https://github.com/vishal-biyani" - } - ] -}], -[{ - "version": "1.0.0", - "runtimeVersion" : "1.1.0-runtime", - "kind": "environment", - "status": "Stable", - "name": "Dotnet Environment", - "shortDescription": "Fission Dotnet 1.1.0 runtime uses Kestrel with Nancy to host the internal web server and uses Roslyn to compile the uploaded code.", - "readme" : "https://github.com/fission/environments/tree/master/dotnet", - "examples" : "https://github.com/fission/environments/tree/master/dotnet/examples", - "keywords": [], - "icon": "./logo/dotnet-logo.svg", - "maintainers": [ - { - "name": "life1347", - "link": "https://github.com/life1347" - }, - { - "name": "soamvasani", - "link": "https://github.com/soamvasani" - }, - { - "name": "vishal-biyani", - "link": "https://github.com/vishal-biyani" - } - ] -}], -[{ - "version": "1.0.0", - "runtimeVersion" : "2.0.0", - "kind": "environment", - "status": "Stable", - "name": "Dotnet 2 Environment", - "shortDescription": "Fission Dotnet 2.0.0 runtime uses Kestrel with Nancy to host the internal web server and uses Roslyn to compile the uploaded code.", - "readme" : "https://github.com/fission/environments/tree/master/dotnet20", - "examples" : "https://github.com/fission/environments/tree/master/dotnet20/examples", - "keywords": [], - "icon": "./logo/logo_NETcore.svg", - "maintainers": [ - { - "name": "life1347", - "link": "https://github.com/life1347" - }, - { - "name": "soamvasani", - "link": "https://github.com/soamvasani" - }, - { - "name": "vishal-biyani", - "link": "https://github.com/vishal-biyani" - } - ] -}] , -[{ - "version": "1.0.0", - "runtimeVersion" : "1.14", - "kind": "environment", - "status": "Stable", - "name": "Go Environment", - "shortDescription": "Fission Go environment, which uses dynamic loader based on Go plugins.", - "readme" : "https://github.com/fission/environments/tree/master/go", - "examples" : "https://github.com/fission/environments/tree/master/go/examples", - "icon": "./logo/go-logo-blue.svg", - "maintainers": [ - { - "name": "life1347", - "link": "https://github.com/life1347" - }, - { - "name": "soamvasani", - "link": "https://github.com/soamvasani" - }, - { - "name": "vishal-biyani", - "link": "https://github.com/vishal-biyani" - } - ] -}, -{ - "version": "1.0.0", - "runtimeVersion" : "1.13", - "kind": "environment", - "status": "Stable", - "name": "Go Environment", - "shortDescription": "Fission Go environment, which uses dynamic loader based on Go plugins.", - "readme" : "https://github.com/fission/environments/tree/master/go", - "examples" : "https://github.com/fission/environments/tree/master/go/examples", - "keywords": [], - "icon": "./logo/go-logo-blue.svg", - "maintainers": [ - { - "name": "life1347", - "link": "https://github.com/life1347" - }, - { - "name": "soamvasani", - "link": "https://github.com/soamvasani" - }, - { - "name": "vishal-biyani", - "link": "https://github.com/vishal-biyani" + [ + { + "version": "1.0.0", + "runtimeVersion": "3.5-alpine", + "kind": "environment", + "status": "Stable", + "name": "Fission Binary Environment", + "shortDescription": "Fission environment to run any binary", + "readme": "https://github.com/fission/environments/tree/master/binary", + "examples": "https://github.com/fission/environments/tree/master/binary/examples", + "keywords": [], + "icon": "./logo/full_colored_dark.svg", + "maintainers": [ + { + "name": "life1347", + "link": "https://github.com/life1347" + }, + { + "name": "soamvasani", + "link": "https://github.com/soamvasani" + }, + { + "name": "vishal-biyani", + "link": "https://github.com/vishal-biyani" + } + ] } - ] -}, -{ - "version": "1.0.0", - "runtimeVersion" : "1.12", - "kind": "environment", - "status": "Stable", - "name": "Go Environment", - "shortDescription": "Fission Go environment, which uses dynamic loader based on Go plugins.", - "readme" : "https://github.com/fission/environments/tree/master/go", - "examples" : "https://github.com/fission/environments/tree/master/go/examples", - "keywords": [], - "icon": "./logo/go-logo-blue.svg", - "maintainers": [ - { - "name": "life1347", - "link": "https://github.com/life1347" - }, - { - "name": "soamvasani", - "link": "https://github.com/soamvasani" - }, - { - "name": "vishal-biyani", - "link": "https://github.com/vishal-biyani" + ], + [ + { + "version": "1.0.0", + "runtimeVersion": "1.1.0-runtime", + "kind": "environment", + "status": "Stable", + "name": "Dotnet Environment", + "shortDescription": "Fission Dotnet 1.1.0 runtime uses Kestrel with Nancy to host the internal web server and uses Roslyn to compile the uploaded code.", + "readme": "https://github.com/fission/environments/tree/master/dotnet", + "examples": "https://github.com/fission/environments/tree/master/dotnet/examples", + "keywords": [], + "icon": "./logo/dotnet-logo.svg", + "maintainers": [ + { + "name": "life1347", + "link": "https://github.com/life1347" + }, + { + "name": "soamvasani", + "link": "https://github.com/soamvasani" + }, + { + "name": "vishal-biyani", + "link": "https://github.com/vishal-biyani" + } + ] } - ] -}, -{ - "version": "1.0.0", - "runtimeVersion" : "1.11.4", - "kind": "environment", - "status": "Stable", - "name": "Go Environment", - "shortDescription": "Fission Go environment, which uses dynamic loader based on Go plugins.", - "readme" : "https://github.com/fission/environments/tree/master/go", - "examples" : "https://github.com/fission/environments/tree/master/go/examples", - "keywords": [], - "icon": "./logo/go-logo-blue.svg", - "maintainers": [ - { - "name": "life1347", - "link": "https://github.com/life1347" - }, - { - "name": "soamvasani", - "link": "https://github.com/soamvasani" - }, - { - "name": "vishal-biyani", - "link": "https://github.com/vishal-biyani" + ], + [ + { + "version": "1.0.0", + "runtimeVersion": "2.0.0", + "kind": "environment", + "status": "Stable", + "name": "Dotnet 2 Environment", + "shortDescription": "Fission Dotnet 2.0.0 runtime uses Kestrel with Nancy to host the internal web server and uses Roslyn to compile the uploaded code.", + "readme": "https://github.com/fission/environments/tree/master/dotnet20", + "examples": "https://github.com/fission/environments/tree/master/dotnet20/examples", + "keywords": [], + "icon": "./logo/logo_NETcore.svg", + "maintainers": [ + { + "name": "life1347", + "link": "https://github.com/life1347" + }, + { + "name": "soamvasani", + "link": "https://github.com/soamvasani" + }, + { + "name": "vishal-biyani", + "link": "https://github.com/vishal-biyani" + } + ] } - ] -}], -[{ - "version": "1.0.0", - "runtimeVersion" : "8", - "kind": "environment", - "status": "Stable", - "name": "JVM Environment", - "shortDescription": "JVM environment based on Spring Boot server", - "readme" : "https://github.com/fission/environments/tree/master/jvm", - "examples" : "https://github.com/fission/environments/tree/master/jvm/examples", - "keywords": [], - "icon": "./logo/Java-Logo.svg", - "maintainers": [ - { - "name": "life1347", - "link": "https://github.com/life1347" - }, - { - "name": "soamvasani", - "link": "https://github.com/soamvasani" - }, - { - "name": "vishal-biyani", - "link": "https://github.com/vishal-biyani" - } - ] -}], -[{ - "version": "1.0.0", - "runtimeVersion" : "8", - "kind": "environment", - "status": "Stable", - "name": "JVM Environment", - "shortDescription": "JVM environment based on Jersey RESTful Web Services framework", - "readme" : "https://github.com/fission/environments/tree/master/jvm-jersey", - "examples" : "https://github.com/fission/environments/tree/master/jvm-jersey/examples", - "keywords": [], - "icon": "./logo/Java-Logo.svg", - "maintainers": [ - { - "name": "sahil-lakhwani", - "link": "https://github.com/sahil-lakhwani" + ], + [ + { + "version": "1.0.0", + "runtimeVersion": "1.14", + "kind": "environment", + "status": "Stable", + "name": "Go Environment", + "shortDescription": "Fission Go environment, which uses dynamic loader based on Go plugins.", + "readme": "https://github.com/fission/environments/tree/master/go", + "examples": "https://github.com/fission/environments/tree/master/go/examples", + "icon": "./logo/go-logo-blue.svg", + "maintainers": [ + { + "name": "life1347", + "link": "https://github.com/life1347" + }, + { + "name": "soamvasani", + "link": "https://github.com/soamvasani" + }, + { + "name": "vishal-biyani", + "link": "https://github.com/vishal-biyani" + } + ] + }, + { + "version": "1.0.0", + "runtimeVersion": "1.13", + "kind": "environment", + "status": "Stable", + "name": "Go Environment", + "shortDescription": "Fission Go environment, which uses dynamic loader based on Go plugins.", + "readme": "https://github.com/fission/environments/tree/master/go", + "examples": "https://github.com/fission/environments/tree/master/go/examples", + "keywords": [], + "icon": "./logo/go-logo-blue.svg", + "maintainers": [ + { + "name": "life1347", + "link": "https://github.com/life1347" + }, + { + "name": "soamvasani", + "link": "https://github.com/soamvasani" + }, + { + "name": "vishal-biyani", + "link": "https://github.com/vishal-biyani" + } + ] + }, + { + "version": "1.0.0", + "runtimeVersion": "1.12", + "kind": "environment", + "status": "Stable", + "name": "Go Environment", + "shortDescription": "Fission Go environment, which uses dynamic loader based on Go plugins.", + "readme": "https://github.com/fission/environments/tree/master/go", + "examples": "https://github.com/fission/environments/tree/master/go/examples", + "keywords": [], + "icon": "./logo/go-logo-blue.svg", + "maintainers": [ + { + "name": "life1347", + "link": "https://github.com/life1347" + }, + { + "name": "soamvasani", + "link": "https://github.com/soamvasani" + }, + { + "name": "vishal-biyani", + "link": "https://github.com/vishal-biyani" + } + ] + }, + { + "version": "1.0.0", + "runtimeVersion": "1.11.4", + "kind": "environment", + "status": "Stable", + "name": "Go Environment", + "shortDescription": "Fission Go environment, which uses dynamic loader based on Go plugins.", + "readme": "https://github.com/fission/environments/tree/master/go", + "examples": "https://github.com/fission/environments/tree/master/go/examples", + "keywords": [], + "icon": "./logo/go-logo-blue.svg", + "maintainers": [ + { + "name": "life1347", + "link": "https://github.com/life1347" + }, + { + "name": "soamvasani", + "link": "https://github.com/soamvasani" + }, + { + "name": "vishal-biyani", + "link": "https://github.com/vishal-biyani" + } + ] } - ] -}, -{ - "version": "1.0.0", - "runtimeVersion" : "11", - "kind": "environment", - "status": "Stable", - "name": "JVM Environment", - "shortDescription": "JVM environment based on Jersey RESTful Web Services framework", - "readme" : "https://github.com/fission/environments/tree/master/jvm-jersey", - "examples" : "https://github.com/fission/environments/tree/master/jvm-jersey/examples", - "keywords": [], - "icon": "", - "maintainers": [ - { - "name": "life1347", - "link": "https://github.com/life1347" - }, - { - "name": "soamvasani", - "link": "https://github.com/soamvasani" - }, - { - "name": "vishal-biyani", - "link": "https://github.com/vishal-biyani" + ], + [ + { + "version": "1.0.0", + "runtimeVersion": "8", + "kind": "environment", + "status": "Stable", + "name": "Java Environment", + "shortDescription": "Java environment based on Spring Boot server with maven", + "readme": "https://github.com/fission/environments/tree/master/java-maven-spring", + "examples": "https://github.com/fission/environments/tree/master/java-maven-spring/examples", + "keywords": [], + "icon": "./logo/Java-Logo.png", + "maintainers": [ + { + "name": "life1347", + "link": "https://github.com/life1347" + }, + { + "name": "soamvasani", + "link": "https://github.com/soamvasani" + }, + { + "name": "vishal-biyani", + "link": "https://github.com/vishal-biyani" + } + ] } - ] -}], -[{ - "version": "1.0.0", - "runtimeVersion" : "8.0.0", - "kind": "environment", - "status": "Stable", - "name": "Nodejs Environment", - "shortDescription": "Fission NodeJS environment based on Express with some basic dependencies added", - "readme" : "https://github.com/fission/environments/tree/master/nodejs", - "examples" : "https://github.com/fission/environments/tree/master/nodejs/examples", - "keywords": [], - "icon": "https://nodejs.org/static/images/logos/nodejs-new-pantone-black.svg", - "maintainers": [ - { - "name": "life1347", - "link": "https://github.com/life1347" - }, - { - "name": "soamvasani", - "link": "https://github.com/soamvasani" - }, - { - "name": "vishal-biyani", - "link": "https://github.com/vishal-biyani" + ], + [ + { + "version": "1.0.0", + "runtimeVersion": "8", + "kind": "environment", + "status": "Stable", + "name": "Java Environment", + "shortDescription": "Java environment based on Spring Boot server with Gradle", + "readme": "https://github.com/fission/environments/tree/master/java-gradle-spring", + "examples": "https://github.com/fission/environments/tree/master/java-gradle-spring/examples", + "keywords": [], + "icon": "./logo/Java-Logo.png", + "maintainers": [ + { + "name": "tosone", + "link": "https://github.com/tosone" + }, + { + "name": "life1347", + "link": "https://github.com/life1347" + }, + { + "name": "soamvasani", + "link": "https://github.com/soamvasani" + }, + { + "name": "vishal-biyani", + "link": "https://github.com/vishal-biyani" + } + ] } - ] -}, -{ - "version": "1.0.0", - "runtimeVersion" : "12.16", - "kind": "environment", - "status": "Stable", - "name": "Nodejs Environment", - "shortDescription": "Fission NodeJS environment based on Express with some basic dependencies added", - "readme" : "https://github.com/fission/environments/tree/master/nodejs", - "examples" : "https://github.com/fission/environments/tree/master/nodejs/examples", - "keywords": [], - "icon": "./logo/nodejs-new-pantone-black.svg", - "maintainers": [ - { - "name": "life1347", - "link": "https://github.com/life1347" - }, - { - "name": "soamvasani", - "link": "https://github.com/soamvasani" - }, - { - "name": "vishal-biyani", - "link": "https://github.com/vishal-biyani" + ], + [ + { + "version": "1.0.0", + "runtimeVersion": "8", + "kind": "environment", + "status": "Stable", + "name": "Java Environment", + "shortDescription": "Java environment based on Jersey RESTful Web Services framework with maven", + "readme": "https://github.com/fission/environments/tree/master/java-maven-jersey", + "examples": "https://github.com/fission/environments/tree/master/java-maven-jersey/examples", + "keywords": [], + "icon": "./logo/Java-Logo.png", + "maintainers": [ + { + "name": "sahil-lakhwani", + "link": "https://github.com/sahil-lakhwani" + } + ] + }, + { + "version": "1.0.0", + "runtimeVersion": "11", + "kind": "environment", + "status": "Stable", + "name": "Java Environment", + "shortDescription": "Java environment based on Jersey RESTful Web Services framework with maven", + "readme": "https://github.com/fission/environments/tree/master/java-maven-jersey", + "examples": "https://github.com/fission/environments/tree/master/java-maven-jersey/examples", + "keywords": [], + "icon": "./logo/Java-Logo.png", + "maintainers": [ + { + "name": "life1347", + "link": "https://github.com/life1347" + }, + { + "name": "soamvasani", + "link": "https://github.com/soamvasani" + }, + { + "name": "vishal-biyani", + "link": "https://github.com/vishal-biyani" + } + ] } - ] -}], -[{ - "version": "1.0.0", - "runtimeVersion" : "5", - "kind": "environment", - "status": "Stable", - "name": "Perl Environment", - "shortDescription": "Perl environment based on the Dancer2 framework", - "readme" : "https://github.com/fission/environments/tree/master/perl", - "examples" : "https://github.com/fission/environments/tree/master/perl/examples", - "keywords": [], - "icon": "./logo/perl-programming-language.svg", - "maintainers": [ - { - "name": "life1347", - "link": "https://github.com/life1347" - }, - { - "name": "soamvasani", - "link": "https://github.com/soamvasani" - }, - { - "name": "vishal-biyani", - "link": "https://github.com/vishal-biyani" + ], + [ + { + "version": "1.0.0", + "runtimeVersion": "8.0.0", + "kind": "environment", + "status": "Stable", + "name": "Nodejs Environment", + "shortDescription": "Fission NodeJS environment based on Express with some basic dependencies added", + "readme": "https://github.com/fission/environments/tree/master/nodejs", + "examples": "https://github.com/fission/environments/tree/master/nodejs/examples", + "keywords": [], + "icon": "https://nodejs.org/static/images/logos/nodejs-new-pantone-black.svg", + "maintainers": [ + { + "name": "life1347", + "link": "https://github.com/life1347" + }, + { + "name": "soamvasani", + "link": "https://github.com/soamvasani" + }, + { + "name": "vishal-biyani", + "link": "https://github.com/vishal-biyani" + } + ] + }, + { + "version": "1.0.0", + "runtimeVersion": "12.16", + "kind": "environment", + "status": "Stable", + "name": "Nodejs Environment", + "shortDescription": "Fission NodeJS environment based on Express with some basic dependencies added", + "readme": "https://github.com/fission/environments/tree/master/nodejs", + "examples": "https://github.com/fission/environments/tree/master/nodejs/examples", + "keywords": [], + "icon": "./logo/nodejs-new-pantone-black.svg", + "maintainers": [ + { + "name": "life1347", + "link": "https://github.com/life1347" + }, + { + "name": "soamvasani", + "link": "https://github.com/soamvasani" + }, + { + "name": "vishal-biyani", + "link": "https://github.com/vishal-biyani" + } + ] } - ] -}], -[{ - "version": "1.0.0", - "runtimeVersion" : "7", - "kind": "environment", - "status": "Stable", - "name": "PHP Environment", - "shortDescription": "PHP environment with built-in server", - "readme" : "https://github.com/fission/environments/tree/master/perl", - "examples" : "https://github.com/fission/environments/tree/master/perl/examples", - "keywords": [], - "icon": "./logo/new-php-logo.svg", - "maintainers": [ - { - "name": "life1347", - "link": "https://github.com/life1347" - }, - { - "name": "soamvasani", - "link": "https://github.com/soamvasani" - }, - { - "name": "vishal-biyani", - "link": "https://github.com/vishal-biyani" + ], + [ + { + "version": "1.0.0", + "runtimeVersion": "5", + "kind": "environment", + "status": "Stable", + "name": "Perl Environment", + "shortDescription": "Perl environment based on the Dancer2 framework", + "readme": "https://github.com/fission/environments/tree/master/perl", + "examples": "https://github.com/fission/environments/tree/master/perl/examples", + "keywords": [], + "icon": "./logo/perl-programming-language.svg", + "maintainers": [ + { + "name": "life1347", + "link": "https://github.com/life1347" + }, + { + "name": "soamvasani", + "link": "https://github.com/soamvasani" + }, + { + "name": "vishal-biyani", + "link": "https://github.com/vishal-biyani" + } + ] } - ] -}], -[{ - "version": "1.0.0", - "runtimeVersion" : "3.0", - "kind": "environment", - "status": "alpha", - "name": "Python Environment", - "shortDescription": "Fission Python environment based on Flask framework.", - "readme" : "https://github.com/fission/environments/tree/master/python", - "examples" : "https://github.com/fission/environments/tree/master/python/examples", - "keywords": [], - "icon": "./logo/Python-logo-notext.svg", - "maintainers": [ - { - "name": "life1347", - "link": "https://github.com/life1347" - }, - { - "name": "soamvasani", - "link": "https://github.com/soamvasani" - }, - { - "name": "vishal-biyani", - "link": "https://github.com/vishal-biyani" + ], + [ + { + "version": "1.0.0", + "runtimeVersion": "7", + "kind": "environment", + "status": "Stable", + "name": "PHP Environment", + "shortDescription": "PHP environment with built-in server", + "readme": "https://github.com/fission/environments/tree/master/perl", + "examples": "https://github.com/fission/environments/tree/master/perl/examples", + "keywords": [], + "icon": "./logo/new-php-logo.svg", + "maintainers": [ + { + "name": "life1347", + "link": "https://github.com/life1347" + }, + { + "name": "soamvasani", + "link": "https://github.com/soamvasani" + }, + { + "name": "vishal-biyani", + "link": "https://github.com/vishal-biyani" + } + ] } - ] -}, -{ - "version": "1.0.0", - "runtimeVersion" : "2.7", - "kind": "environment", - "status": "alpha", - "name": "Python Environment", - "shortDescription": "Fission Python environment based on Flask framework.", - "readme" : "https://github.com/fission/environments/tree/master/python", - "examples" : "https://github.com/fission/environments/tree/master/python/examples", - "keywords": [], - "icon": "./logo/Python-logo-notext.svg", - "maintainers": [ - { - "name": "life1347", - "link": "https://github.com/life1347" - }, - { - "name": "soamvasani", - "link": "https://github.com/soamvasani" - }, - { - "name": "vishal-biyani", - "link": "https://github.com/vishal-biyani" + ], + [ + { + "version": "1.0.0", + "runtimeVersion": "3.0", + "kind": "environment", + "status": "alpha", + "name": "Python Environment", + "shortDescription": "Fission Python environment based on Flask framework.", + "readme": "https://github.com/fission/environments/tree/master/python", + "examples": "https://github.com/fission/environments/tree/master/python/examples", + "keywords": [], + "icon": "./logo/Python-logo-notext.png", + "maintainers": [ + { + "name": "life1347", + "link": "https://github.com/life1347" + }, + { + "name": "soamvasani", + "link": "https://github.com/soamvasani" + }, + { + "name": "vishal-biyani", + "link": "https://github.com/vishal-biyani" + } + ] + }, + { + "version": "1.0.0", + "runtimeVersion": "2.7", + "kind": "environment", + "status": "alpha", + "name": "Python Environment", + "shortDescription": "Fission Python environment based on Flask framework.", + "readme": "https://github.com/fission/environments/tree/master/python", + "examples": "https://github.com/fission/environments/tree/master/python/examples", + "keywords": [], + "icon": "./logo/Python-logo-notext.png", + "maintainers": [ + { + "name": "life1347", + "link": "https://github.com/life1347" + }, + { + "name": "soamvasani", + "link": "https://github.com/soamvasani" + }, + { + "name": "vishal-biyani", + "link": "https://github.com/vishal-biyani" + } + ] } - ] -}], -[{ - "version": "1.0.0", - "runtimeVersion" : "2.6.1", - "kind": "environment", - "status": "Stable", - "name": "Ruby Environment", - "shortDescription": "Ruby environment with WEBrick library", - "readme" : "https://github.com/fission/environments/tree/master/ruby", - "examples" : "https://github.com/fission/environments/tree/master/ruby/examples", - "keywords": [], - "icon": "./logo/Ruby_logo.svg", - "maintainers": [ - { - "name": "life1347", - "link": "https://github.com/life1347" - }, - { - "name": "soamvasani", - "link": "https://github.com/soamvasani" - }, - { - "name": "vishal-biyani", - "link": "https://github.com/vishal-biyani" + ], + [ + { + "version": "1.0.0", + "runtimeVersion": "2.6.1", + "kind": "environment", + "status": "Stable", + "name": "Ruby Environment", + "shortDescription": "Ruby environment with WEBrick library", + "readme": "https://github.com/fission/environments/tree/master/ruby", + "examples": "https://github.com/fission/environments/tree/master/ruby/examples", + "keywords": [], + "icon": "./logo/Ruby_logo.svg", + "maintainers": [ + { + "name": "life1347", + "link": "https://github.com/life1347" + }, + { + "name": "soamvasani", + "link": "https://github.com/soamvasani" + }, + { + "name": "vishal-biyani", + "link": "https://github.com/vishal-biyani" + } + ] } - ] -}], -[{ - "version": "1.0.0", - "runtimeVersion" : "latest", - "kind": "environment", - "status": "Stable", - "name": "Tensorflow Serving Environment", - "shortDescription": "TensorFlow Serving for machine learning models", - "readme" : "https://github.com/fission/environments/tree/master/tensorflow-serving", - "examples" : "https://github.com/fission/environments/tree/master/tensorflow-serving/examples", - "keywords": [], - "icon": "./logo/Tensorflow_logo.svg", - "maintainers": [ - { - "name": "life1347", - "link": "https://github.com/life1347" - }, - { - "name": "soamvasani", - "link": "https://github.com/soamvasani" - }, - { - "name": "vishal-biyani", - "link": "https://github.com/vishal-biyani" + ], + [ + { + "version": "1.0.0", + "runtimeVersion": "latest", + "kind": "environment", + "status": "Stable", + "name": "Tensorflow Serving Environment", + "shortDescription": "TensorFlow Serving for machine learning models", + "readme": "https://github.com/fission/environments/tree/master/tensorflow-serving", + "examples": "https://github.com/fission/environments/tree/master/tensorflow-serving/examples", + "keywords": [], + "icon": "./logo/Tensorflow_logo.svg", + "maintainers": [ + { + "name": "life1347", + "link": "https://github.com/life1347" + }, + { + "name": "soamvasani", + "link": "https://github.com/soamvasani" + }, + { + "name": "vishal-biyani", + "link": "https://github.com/vishal-biyani" + } + ] } ] -}] ]