Git Product home page Git Product logo

faas-cli's People

Contributors

abhayvatoo avatar alexellis avatar amirkarimi avatar austinfrey avatar burtonr avatar dependabot[bot] avatar developius avatar doowb avatar ericstoekl avatar ewilde avatar imumesh18 avatar itscaro avatar ivanayov avatar johnmccabe avatar kenfdev avatar leodido avatar lucasroesler avatar martindekov avatar nenadilic84 avatar nicholasjackson avatar nikhilsharmawe avatar nitishkumar71 avatar rgee0 avatar stefanprodan avatar tommysolsen avatar utsavanand2 avatar viveksyngh avatar waterdrips avatar welteki avatar yankeexe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

faas-cli's Issues

Proposal: Improve version command

Expected Behaviour

./faas-cli version
  ___                   _____           ____
 / _ \ _ __   ___ _ __ |  ___|_ _  __ _/ ___|
| | | | '_ \ / _ \ '_ \| |_ / _` |/ _` \___ \
| |_| | |_) |  __/ | | |  _| (_| | (_| |___) |
 \___/| .__/ \___|_| |_|_|  \__,_|\__,_|____/
      |_|

Version: dev-86370e8

./faas-cli version --short-version
dev-86370e8

./faas-cli version
  ___                   _____           ____
 / _ \ _ __   ___ _ __ |  ___|_ _  __ _/ ___|
| | | | '_ \ / _ \ '_ \| |_ / _` |/ _` \___ \
| |_| | |_) |  __/ | | |  _| (_| | (_| |___) |
 \___/| .__/ \___|_| |_|_|  \__,_|\__,_|____/
      |_|

Version: 0.4.14-alpha-8f2ae9c

./faas-cli version --short-version
Version: 0.4.14-alpha-8f2ae9c

Current Behaviour

Version contains only SHA1

Context

Provide a more human-readable version info, easier for people to report their version

Your Environment

go 1.8.3 linux/amd64
docker 17.06.2-ce

build action template download/extraction fails on Windows

Expected Behaviour

Build should "just work"

Current Behaviour

Fails with:

C:\Users\alex\Desktop\faas\sample-functions\ipconfig>.\faas-cli.exe build -f stack.yml
2017/09/12 05:57:49 No templates found in current directory.
2017/09/12 05:57:49 HTTP GET https://github.com/alexellis/faas-cli/archive/master.zip
2017/09/12 05:57:51 Writing 200Kb to master.zip
2017/09/12 05:57:51 Attempting to expand templates from master.zip
Found template/.
Writing 0 bytes to template/.
2017/09/12 05:57:51 Unable to download templates from Github.
2017/09/12 05:57:51 Could not pull templates for OpenFaaS. open template/: is a directory

Note this has been around for a while, reproduced on current release and old 0.4.8

Possible Solution

Steps to Reproduce (for bugs)

  1. Build a sample function on windows

Context

User experience on Windows is compromised

Your Environment

  • Docker version docker version (e.g. Docker 17.0.05 ):
    Docker 17.06.1-ce

  • Are you using Docker Swarm or Kubernetes (FaaS-netes)?
    Swarm

  • Operating System and version (e.g. Linux, Windows, MacOS):
    Windows 10

Proposal: Mock HTTP client for testing

Update - I have found a much better way of doing this, now available at #66

I have created a mock HTTP mode for the faas-cli build command, that swaps out the real http client Do() method for a fake version when it is called in fetch_templates.go, for the purpose of downloading the master.zip file. Please check out this change at my forked branch:

ericstoekl@16585bc

What this change does is creates an interface called HttpClient, which the fetchMasterZip() function will use to get the zip file from github. When the --mock-http flag is passed in, then the ClientMock type will be used for the HttpClient, which implements a fake version of the Do() method. When you run fetchMasterZip(), it will then fetch the fake master.zip file.

The builder.BuildImage() call in commands/build.go will be skipped when the --mock-http flag is set.

This is just a PoC. A potentially better way to do this is to create a mock server with httptest, then use a handler function for both real and fake http calls.

Thanks,
Erich

Cli: open ./template/python: no such file or directory error

I'm trying to build a python example using the tutorial https://blog.alexellis.io/first-faas-python-function/ and the moment I call:

$ faas-cli -action build -f ./stack.yml

I get:

open ./template/python: no such file or directory error

is there anything that I miss?

Expected Behaviour

$ faas-cli -action build -f ./stack.yml
...

Successfully tagged faas-hello-python:latest  
Image: faas-hello-python built.  

Current Behaviour

➜  functions cat stack.yml
provider:
  name: faas
  gateway: http://localhost:8080

functions:
  hello-python:
    lang: python
    handler: ./hello-python
    image: faas-hello-python
➜  functions cat hello-python/handler.py
def handle(req):
    print("Hello! You said: " + req)
    %
➜  functions faas-cli -action build -f ./stack.yml
Building: hello-python.
Clearing temporary build folder: ./build/hello-python/
Preparing ./hello-python/ ./build/hello-python/function
2017/09/14 08:57:26 open ./template/python: no such file or directory

Possible Solution

Steps to Reproduce (for bugs)

Context

I was trying to follow the tutorial steps from here:
https://blog.alexellis.io/first-faas-python-function/

Your Environment

  • Docker version docker version (e.g. Docker 17.0.05 ):
➜  functions docker version
Client:
 Version:      17.06.2-ce
 API version:  1.30
 Go version:   go1.8.3
 Git commit:   cec0b72
 Built:        Tue Sep  5 20:12:06 2017
 OS/Arch:      darwin/amd64

Server:
 Version:      17.06.2-ce
 API version:  1.30 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   cec0b72
 Built:        Tue Sep  5 19:59:19 2017
 OS/Arch:      linux/amd64
 Experimental: true
  • Are you using Docker Swarm or Kubernetes (FaaS-netes)?
    Docker swarm
  • Operating System and version (e.g. Linux, Windows, MacOS):
➜  functions uname -a
Darwin C02SG3FQFVH6 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64
  • Link to your project or a code example to reproduce issue:

Proposal: Support multiple template versions - i.e. Python 2 + 3 separately

I have started to work on providing a PHP template and I'd like to ensure support for PHP 5 and 7 (This proposal is also relevant for Python 2/3)

I'd like to propose that we add an additional parameter, either version or language_version

I considered having a template for each and avoiding additional changes, but as very little would be different across the templates, I think it's better to provide the additional parameter.

As the template library grows, the version parameter would also allow keen developers to benchmark / test / dabble with newer, but potentially breaking, versions of their run-time.

Docker Swarm issue - Address in use (upstream issue)

When re-deploying a function (aka Docker Swarm Service) we can get an error "Address in use - unable to allocate container" or similar.

I've raised the issue upstream but it's been open 30 days already. I don't believe the issue occurs when using Kubernetes as a back-end.

moby/moby#34163

The Docker swarm work-around appears to be to deploy again after a few seconds or to use docker service rm via the Docker CLI first.

I think this might also be fixed with a restart policy of > 1.

https://github.com/alexellis/faas/blob/master/gateway/handlers/functionshandler.go#L189

Bump Golang version to 1.8.x

Expected Behaviour

We need to start moving the FaaS projects to 1.8.x. The CLI has the least complex dependency-set so let's start here.

Current Behaviour

We're using 1.7.x for x86 and ARM.

Possible Solution

  • Update Dockerfiles to best available 1.8.x version
  • Run unit tests
  • Do integration testing with Docker Swarm and K8s

Should have - templates for other platforms like armv7/armv8

Maybe the FaaS CLI should look at the uname on a local machine to decide whether to use the armv7 or armv8 templates.

i.e.

templates/armv6/node
templates/armv8/python

The main part of a template that needs to change is the line that picks up the watchdog binary and the base Docker image.

cli hanging on deploy command

Running through the demo commands in the README. Install seemed to go fine as did build the sample functions with faas-cli -action build -f ./samples.yml

When deploy though, it seems to hang.
faas-cli -action deploy -f ./samples.yml
...hangs with Deploying: url_ping.

This is on x86 architecture and Docker 17.06.0-ce.

Calling function created with `csharp` template results in error

When I try to call a function created with the C# template, I get the following result:

$ curl http://localhost:8080/function/csharp-hello-app -d "stuff"
exit status 145
Did you mean to run dotnet SDK commands? Please install dotnet SDK from: 
  http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409

This error code apparently indicates that the image that is built does not have the SDK installed. (https://stackoverflow.com/questions/42346498/dotnet-aspnetcore-docker-build-fails-with-a-145-error-code)

Are others seeing this issue? I'm deploying by adding the following to ./samples.yml:

  functions:
    csharp-hello-app:
      lang: csharp
      handler: ./sample/csharp-hello
      image: yourname/csharp-hello-app

Expected Behaviour

Csharp app echos input.

Current Behaviour

Returns exit status 145

Possible Solution

Steps to Reproduce (for bugs)

  1. Copy the following into the functions: block of your yaml file:
    csharp-hello-app:
      lang: csharp
      handler: ./sample/csharp-hello
      image: yourname/csharp-hello-app
  1. run faas-cli build -f <yourfile.yaml>
  2. run faas-cli deploy -f <yourfile.yaml>
  3. curl http://localhost:8080/function/csharp-hello-app -d "stuff"

Context

Your Environment

  • Docker version docker version (e.g. Docker 17.0.05 ):
    17.06.1-ce
  • Are you using Docker Swarm or Kubernetes (FaaS-netes)?
    swarm
  • Operating System and version (e.g. Linux, Windows, MacOS):
    ubuntu 16.04
  • Link to your project or a code example to reproduce issue:

Proposal - filter functions in stacks

Expected Behaviour

If a stack has 10 functions but I only want to build one (by name) - then I should be able to do this:

$ faas-cli build -f stack.yml --filter "payroll"

Applies to:

  • delete, build, deploy, push

faas-cli push made it so that I couldn't update my container

I am working on the faas-and-furious/youtube-dl function. My workflow was:

  1. Push docker image to docker hub with faas-cli push -f <yaml>
  2. Update function entry.sh file
  3. Retry faas-cli build -f <yaml>; faas-cli deploy -f <yaml>, and the function is not updated!

My current version of the code: https://github.com/faas-and-furious/youtube-dl

The only way I can get my image to reflect the new state of the youtube-dl function is to name the image something different in the YAML file.

I tried build with --no-cache and it doesn't work either.

Also, If I do faas-cli push -f <YAML>, it will show Layer already exists for every line.

The yaml file is:

provider:
  name: faas
  gateway: http://localhost:8080

functions:
  youtube-dl:
    lang: Dockerfile
    handler: ./youtube-dl
    image: ems5311/youtube-dl:latest

Expected Behaviour

Current Behaviour

Possible Solution

Steps to Reproduce (for bugs)

Context

Your Environment

  • Docker version docker version (e.g. Docker 17.0.05 ):

  • Are you using Docker Swarm or Kubernetes (FaaS-netes)?

  • Operating System and version (e.g. Linux, Windows, MacOS):

  • Link to your project or a code example to reproduce issue:

Proposal: Add support for PHP

Expected Behaviour

Add template for PHP in order to support built-in build for PHP

Your Environment

Docker Version: 17.06.1-ce
Go version: go1.8.3
OS/Arch: linux/amd64

Proposal: Wrap 'docker service' commands for the OpenFaaS CLI

Expected Behaviour

Currently to look at deployed OpenFaaS commands we have to use things like:

  • docker service ls
  • docker service ps <function_name>
  • docker service logs <function_name>

While this is fine if you understand the underlying technologies, it adds another barrier of entry for new users, and another difference in usability between backends.

Wrapping this functionality in a common way into the faas-cli would simplify this, and make it more 'directly discoverable' without having to go and look up additional documentation:

  • faas-cli ls (or faas-cli ls -f stack.yml)
  • faas-cli ps <function_name> (or faas-cli ps -f stack.yml <function_name>)
  • faas-cli logs <function_name> (or faas-cli logs -f stack.yml <function_name>)

Ideally, these commands would largely mirror their docker alternatives, but remove any 'extraneous' stuff that can be hidden away by OpenFaaS (in a similar way to how docker compose hides away extra details that could be manually specified with the raw docker equivalent)

Support overriding function's Dockerfile

Considering the below mxnet.yml file to build and deploy my function (code residing under a sample/mxnet folder):

provider:
  name: faas
  gateway: http://localhost:8080
  network: "func_functions" # this is optional and defaults to func_functions

functions:
  mxnet:
    lang: python
    handler: ./sample/mxnet
    image: jmkhael/faas-mxnet

I would like to have a way to tell faas-cli to use a specific Dockerfile (e.g. under sample/mxnet) instead of the default lang template one.

faas-cli -action build -f ./sample/mxnet/mxnet.yml

CLI can't successfully deploy to 'custom' named stack

Expected Behaviour

When I deploy a command to my custom named stack, it works (or gives me an error saying it can't)

Current Behaviour

The CLI claims to successfully deploy the command, but it doesn't work. There is an error in the logs of the gateway. The CLI appears to have hardcoded the name:

⇒  docker service logs openfaas_gateway
..snip..
openfaas_gateway.1.5v3xwo4u9mvb@moby    | 2017/09/14 00:19:43 Error response from daemon: network func_functions not found

https://github.com/alexellis/faas-cli/blob/3a2e81471c69275571d71f84c158bb787fb1ad7b/proxy/deploy.go#L44

There also seems to be a defaultNetwork defined that may not be used anywhere yet:

https://github.com/alexellis/faas-cli/blob/fa5668b52afea6fc90434d67cfe211572da03cbd/commands/faas.go#L12

Possible Solution

Allow the network to be specified in the CLI. Return a proper error when deploys fail. Investigate whether the gateway can determine the correct network itself, without relying on the CLI telling it.

Steps to Reproduce (for bugs)

  1. Create a new network stack, change the stack name and network name
  2. Try and deploy an image with the CLI
  3. Check the gateway logs

Context

Your Environment

⇒  docker --version
Docker version 17.06.2-ce, build cec0b72
⇒  faas-cli version
Git Commit: 118e3e904aa930cafdb64f0efd4538c76fb27088

Proposal: use Makefile to run shell scripts

Use Makefile instead of shell scripts

Expected Behaviour

Tasks are organized in makefiles folder along with the main Makefile at root.
Current scripts will call the corresponding makefile rule in order to maintain backward compatibility.

build.sh calls make build
build_redist.sh calls make build_redist
test/version.sh calls make test_version
deploy_samples calls make deploy_samples

make test runs go test in docker image to test against a specific version of Go

Proposal: Add template for golang functions

Expected Behaviour

Currently there are templates for: csharp, node, python, ruby. It would be great to have a go template as well.

There is a golang base function in the main FaaS repository that can be used as a base. Though this could be improved even more using Docker multi-stage build syntax, and separating the golang compilation environment from the run environment (eg. static compilation)

The faas-cli new command would also need to be updated to include this new template.

Add Clojure as supported language

Hi, as Clojure is a great functional language (of the lisp family, you know with lot of parenthesis), I was thinking of adding a template for it in OpenFaaS.

Some of the benefits of Clojure:

  • based on Lisp
  • relies on the standard JVM platform
  • use JVM but do not have to write Java code :)
  • real functional language with immutable data structures
  • designed for concurrency
  • more at https://clojure.org/about/rationale

When building an application, the project.clj file defines the dependencies. It contains metadata and deps. For instance:

(defproject clojure-echo "0.1.0-SNAPSHOT"
  :description "echo function"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.7.0"]]
  :main ^:skip-aot clojure-echo.core
  :target-path "target/%s"
  :profiles {:uberjar {:aot :all}})

Those dependencies are installed with 'lein deps'.

To benefit from the cache when building the image, the deps can be downloaded and installed beforehand. The application can then be built and run as a jar.

Swarm - deploy prefers remote registry image over local one

Expected Behaviour

If I edit the sample url-ping python handler in sample/url-ping/handler.py, run faas-cli build -f ./samples.yml I can see a new latest image is created alexellis/faas-url-ping:latest.

I would expect that running faas-cli deploy -f ./samples.yml would use the local alexellis/faas-url-ping:latest image.

Current Behaviour

What appears to happen is that the local images are removed and latest is pulled from Docker hub.

Possible Solution

Steps to Reproduce (for bugs)

  1. Edit sample/url-ping/handler.py, add a new print statement
  2. Remove any existing function faas-cli remove url-ping
  3. Build the samples faas-cli build -f ./samples.yml
  4. Check the image contains your updates docker run -ti --rm alexellis/faas-url-ping sh
  5. Deploy the samples faas-cli build -f ./samples.yml
  6. Hit the url-ping end point and see that your changes aren't applied, check the images and see that the newly build image has been replaced with the latest from the hub docker images | grep ping.

Context

This behaviour is counter-intuitive when developing and complicates dev when updating functions that have been pushed to the hub.

Your Environment

  • Docker version docker version (e.g. Docker 17.0.05 ):
    17.06.1-ce
  • Are you using Docker Swarm or Kubernetes (FaaS-netes)?
    Swarm
  • Operating System and version (e.g. Linux, Windows, MacOS):
    MacOS
  • Link to your project or a code example to reproduce issue:
    Using the samples from faas-cli

Proposal: Default to a 'well-known' named stack file

Expected Behaviour

In a similar vein to docker compose it would be nice if faas-cli defaulted to a well-known, named yaml file (eg openfaas.yml or similar) If it did, it wouldn't be a requirement to specify -f foo.yaml on each CLI command.

Issue - function sub-folders are not copied recursively

Expected Behaviour

All / any assets such as a "src" or "samples" folder should be copied into the final image.

Current Behaviour

Only files in the root directory are copied in

Possible Solution

Seems as simple as setting a flag to "true" in the builder.

Should have - "Custom" template type

Expected Behaviour

It should be possible to "build" a function which isn't using one of the known / supported template types. An example would be the shrink_image example in the repo.

Snippet:

  shrink-image:
    lang: Dockerfile
    handler: ./samples/image-magick
    image: functions/resizer
    fprocess: "convert - -resize 50% fd:1"

The context is whatever is in the handler folder and the Dockerfile in the root of the directory will be used for the build.

Current Behaviour

Build manually and remove the lang element then mark the item as skip_build

Possible Solution

When setting the language to custom then a docker build is invoked in the handler folder directly.

Context

This will add versatility - especially for languages which don't suit dynamic templating like Golang.

Proposal: Add init/new/create commands to the CLI

It would be nice if all of the required 'knowledge' for creating a new function/etc was built into the command line, with something akin to faas-cli init funcName

Expected Behaviour

Be able to create a new function/etc with ease from the command line

Current Behaviour

Need to read through a lot of different places to understand how to create a new function.

Possible Solution

Add init/new/create commands to the CLI that walk a new user through creating a new function, or setting up a stack. Ideally this would allow parameters to be passed directly on the command line, and if they are missing, to 'guide' the user through the process. eg

faas-cli new function

Name []: foo-func
Language [python]: golang 
etc

The available 'templates' would be those currently usable, with optional support for pulling remote repos (such as a 3rd party template on github)

Additionally, it would be good to be able to setup a FaaS gateway stack as easy as we can do docker swarm init.

Steps to Reproduce (for bugs)

N/A

Context

When starting a new OpenFaaS based project, there are numerous steps to getting started, that currently seem to require reading a bunch of README's, samples, and blog posts. Minimising this to as few 'built in' steps would ease the onboarding requirement for new users.

Your Environment

  • Docker version docker version (e.g. Docker 17.0.05 ): 17.06.1-ce

  • Are you using Docker Swarm or Kubernetes (FaaS-netes)? Swarm

  • Operating System and version (e.g. Linux, Windows, MacOS): MacOS

  • Link to your project or a code example to reproduce issue: N/A

GitCommit in commands package not being updated at build time

Expected Behaviour

This results in the following output for a brew installed CLI:

$ ./faas-cli version
Git Commit: thisisavalidsha

Current Behaviour

Following the merge of #50 and the move of the GitCommit variable from the old main package rather than commands package this commit SHA isn't getting populated.

This results in the following output:

$ ./faas-cli version
Git Commit:

Possible Solution

Steps to Reproduce (for bugs)

  1. Download the current 0.4.9 release, or build locally using build_redist.sh and run ./faas-cli version

Context

Your Environment

  • Docker version docker version (e.g. Docker 17.0.05 ):
    n/a

  • Are you using Docker Swarm or Kubernetes (FaaS-netes)?
    n/a

  • Operating System and version (e.g. Linux, Windows, MacOS):
    MacOS

  • Link to your project or a code example to reproduce issue:
    n/a

Enhancement - CLI should support function deletion

Issue

It is not possible to delete functions via the FaaS CLI.

Proposed fix

Extend faas-cli with the ability to delete a specified function.

Suggest we do do after #17 has been implemented and do so via the faas-cli delete <fn> verb based approach.

on faas-cli -action deploy: dial tcp 127.0.0.1:8080: getsockopt: connection refused

When attempting to deploy a function with faas-cli -action deploy -f ./urlping.yaml I get the following error message:

~/github/faas-cli$ sudo ./faas-cli -action deploy -f ./urlping.yaml 
Deploying: url_ping.
Error removing existing function: Delete http://localhost:8080/system/functions: dial tcp 127.0.0.1:8080: getsockopt: connection refused, gateway=http://localhost:8080, functionName=url_ping
Is FaaS deployed? Do you need to specify the -gateway flag?
Post http://localhost:8080/system/functions: dial tcp 127.0.0.1:8080: getsockopt: connection refused

The file, urlping.yaml, is as described in the README.md example file.

This happens with both the faas-cli downloaded from https://cli.openfaas.com, or one which I have compiled from this repo.

Expected Behaviour

Deploys function

Current Behaviour

Produces output pasted above

Possible Solution

Steps to Reproduce (for bugs)

  1. Follow readme until faas-cli -action deploy -f ./urlping.yaml
  2. run faas-cli -action deploy -f ./urlping.yaml

Context

Your Environment

  • Docker version docker version (e.g. Docker 17.0.05 ):
    17.06.1-ce
  • Are you using Docker Swarm or Kubernetes (FaaS-netes)?
    no
  • Operating System and version (e.g. Linux, Windows, MacOS):
    ubuntu 16.04
  • Link to your project or a code example to reproduce issue:

Research item: anonymous usage analytics

Expected Behaviour

Track usage of commands (verbs), parameters (used), build times and other anonymous data that can help us understand usage and improve the CLI.

Remit:

  • This would only cover the CLI usage - this would not instrument the back-end services.

  • Opt-in by default, opt-out of collection via environmental variable in a similar fashion to VSCode and Brew.

.bash_profile

export OPEN_FAAS_TELEMETRY=0
  • We must explain how data is used, how long it is kept for etc and make sure it's in keeping with data protection.

  • Data must be anonymised

Current Behaviour

Relying on unsolicited feedback / word of mouth

Possible Solution

Google Analytics (subject to costing out) - has a Golang library. https://github.com/google/google-api-go-client/blob/master/analytics/v3/analytics-gen.go

Initial work would only be a PoC

Proposal: third-party templates via GitHub

Expected Behaviour

Anyone should be able to download a community-supported 3rd party template for Perl, PHP, Kotlin etc.

Current Behaviour

PRs to main project.

Possible Solution

I'm open to input on this too.

$ faas-cli add-template https://github.com/alexellis/kotlin-template

Downloading https://github.com/alexellis/kotlin-template/master/blob/master.zip
Expanding kotlin/Dockerfile to template/kotlin/Dockerfile
...

Repo structure:

./template/kotlin/Dockerfile
./template/kotlin/handler.java
./README.md

Initial version of this can be a "dumb" shortcut to download a zip file and unzip into a directory.

Out of scope for v1:

  • Listing templates installed locally
  • Online directory of templates

Mentions: @johnmccabe and others for the suggestion. @nicholasjackson how does Hashicorp do this?

Other files which need changes:
#82 (comment)

fprocess needs to come out of the Golang code and sit in a template.yml file within i.e. ./template/kotlin/template.yml

language: kotlin
fprocess: kotlin handler.kotlin

Docs using ./faas-cli instead of faas-cli

Simple documentation fix in Readme.md to change it from ./faas-cli to faas-cli so it doesn't confuse beginners.

Context

Your Environment

  • Docker version docker version (e.g. Docker 17.0.05 ):

  • Are you using Docker Swarm or Kubernetes (FaaS-netes)?

  • Operating System and version (e.g. Linux, Windows, MacOS):

  • Link to your project or a code example to reproduce issue:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.