From 47c5cee45925f2b8a8e90cf950b74995d30c67ef Mon Sep 17 00:00:00 2001 From: Erwin van Eyk Date: Thu, 25 Apr 2019 17:06:14 +0200 Subject: [PATCH] Add links to examples for each Fission environment (#1090) --- environments/binary/README.md | 7 ++++--- environments/dotnet/README.md | 3 ++- environments/dotnet20/README.md | 3 ++- environments/go/README.md | 6 ++---- environments/jvm/README.md | 4 +++- environments/nodejs/README.md | 2 ++ environments/perl/README.md | 2 ++ environments/php7/README.md | 4 +++- environments/python/README.md | 2 ++ environments/ruby/README.md | 6 ++---- 10 files changed, 24 insertions(+), 15 deletions(-) diff --git a/environments/binary/README.md b/environments/binary/README.md index ac0abc39..9faa0e5b 100644 --- a/environments/binary/README.md +++ b/environments/binary/README.md @@ -7,6 +7,7 @@ Use Cases - Execute arbitrary binaries (such as common sysadmin tools) - Get support in _any_ programming language by executing the generated executable. + ⚠️ **Words of Caution** ⚠️ The environment runs on an alpine image with some additional utility commandline tools installed, such as 'grep'. @@ -16,6 +17,8 @@ Dockerfile and build a new binary environment. See 'Compiling' for instructions. When executing functions using binaries, **ensure that the executable is built for the right architecture**. Using the default binary environment this means that the binary should be build for Linux. +Looking for ready-to-run examples? See the [binary examples directory](../../examples/binary). + ## Usage To get started with the latest binary environment: @@ -43,8 +46,6 @@ HTTP_CONTENT-TYPE The body of HTTP piped over the STDIN to the executable. All output that is provided to the server over the STDOUT will be transformed into the HTTP response. -See the [README](../../examples/binary/README.md) in the binary examples directory for additional usage instructions. - ## Compiling To build the runtime environment: @@ -55,4 +56,4 @@ docker build --tag=${USER}/binary-env . To build the builder environment: ```bash (cd builder/ && docker build --tag=${USER}/binary-builder .) -``` \ No newline at end of file +``` diff --git a/environments/dotnet/README.md b/environments/dotnet/README.md index e122e925..8991474f 100644 --- a/environments/dotnet/README.md +++ b/environments/dotnet/README.md @@ -31,7 +31,8 @@ public class FissionFunction { } ``` -Please see examples below. +Please see examples below, or if you are looking for ready-to-run examples, see +the [DotNet examples directory](../../examples/dotnet). ## Rebuilding and pushing the image diff --git a/environments/dotnet20/README.md b/environments/dotnet20/README.md index 040b9ab5..152ba8a5 100644 --- a/environments/dotnet20/README.md +++ b/environments/dotnet20/README.md @@ -31,7 +31,8 @@ public class FissionFunction { } ``` -Please see examples below. +Please see examples below, or if you are looking for ready-to-run examples, see +the [DotNet20 examples directory](../../examples/dotnet20). ## Rebuilding and pushing the image diff --git a/environments/go/README.md b/environments/go/README.md index 1aacf414..1ab0d7d6 100644 --- a/environments/go/README.md +++ b/environments/go/README.md @@ -4,6 +4,8 @@ This is the Go environment for Fission. It's a Docker image containing a Go runtime, along with a dynamic loader. +Looking for ready-to-run examples? See the [Go examples directory](../../examples/go). + ## Build this image ``` @@ -34,7 +36,3 @@ fission env update --name go --image USER/go-runtime --builder USER/go-builder After this, fission functions that have the env parameter set to the same environment name as this command will use this environment. - -## Creating functions to use this image - -See the [examples README](examples/go/README.md). diff --git a/environments/jvm/README.md b/environments/jvm/README.md index b07a41b3..96b0cdea 100644 --- a/environments/jvm/README.md +++ b/environments/jvm/README.md @@ -6,6 +6,8 @@ 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 @@ -65,4 +67,4 @@ JVM environment uses Tomcat HTTP server by default as it is included in spring w ## 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}. \ No newline at end of file +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/environments/nodejs/README.md b/environments/nodejs/README.md index afbe3bfa..e0ea6840 100644 --- a/environments/nodejs/README.md +++ b/environments/nodejs/README.md @@ -6,6 +6,8 @@ It's a Docker image containing a NodeJS runtime, along with a dynamic loader. A few common dependencies are included in the package.json file. +Looking for ready-to-run examples? See the [NodeJS examples directory](../../examples/nodejs). + ## Customizing this image To add package dependencies, edit package.json to add what you need, diff --git a/environments/perl/README.md b/environments/perl/README.md index 85bdd640..6c6c2768 100644 --- a/environments/perl/README.md +++ b/environments/perl/README.md @@ -9,6 +9,8 @@ It is implemented using the lightweight web application framework Since Twiggy is implemented with [AnyEvent](https://metacpan.org/pod/AnyEvent), you can write async code using AnyEvent in your function. +Looking for ready-to-run examples? See the [Perl examples directory](../../examples/perl). + ## Build this image ``` diff --git a/environments/php7/README.md b/environments/php7/README.md index 4c0e11b9..0257ba89 100644 --- a/environments/php7/README.md +++ b/environments/php7/README.md @@ -4,7 +4,7 @@ This is the PHP environment for Fission. It's a Docker image containing a PHP 7.3 runtime. This image use php:7.3-cli base image with the built-in PHP server -This environment didn't force you to use class or create a main function. +This environment does not force you to use a specific class or create a main function. A few common extensions are included : - curl @@ -22,6 +22,8 @@ A few common extensions are included : - xmlrpc - zip +Looking for ready-to-run examples? See the [PHP examples directory](../../examples/php). + ## Customizing this image To add other extensions or packages(composer.json) you need to edit the Dockerfile and rebuild this image (instructions below). diff --git a/environments/python/README.md b/environments/python/README.md index 4f668c11..708b728c 100644 --- a/environments/python/README.md +++ b/environments/python/README.md @@ -6,6 +6,8 @@ It's a Docker image containing a Python 3.5 runtime, along with a dynamic loader. A few common dependencies are included in the requirements.txt file. +Looking for ready-to-run examples? See the [Python examples directory](../../examples/python). + ## Customizing this image To add package dependencies, edit requirements.txt to add what you diff --git a/environments/ruby/README.md b/environments/ruby/README.md index e5020569..9a605bae 100644 --- a/environments/ruby/README.md +++ b/environments/ruby/README.md @@ -17,6 +17,8 @@ The `Fission::Request` object is a subclass of `Rack::Request` and provides access to parameters and headers. See `fission/request.rb` for the public api. +Looking for ready-to-run examples? See the [Ruby examples directory](../../examples/ruby). + ## Customizing this image To add package dependencies, edit Gemfile to add what you @@ -50,7 +52,3 @@ Or, if you already have an environment, you can update its image: After this, fission functions that have the env parameter set to the same environment name as this command will use this environment. - -## Creating functions to use this image - -See the [examples README](examples/ruby/README.md).