Proposal: local-run to run multiple functions in a docker network
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 816
- Forks
- 230
- Avg merge
- 6h 4m
- Merged PRs (30d)
- 1
Description
Description
Proposal: local-run to run multiple functions in a docker network
Today, if you have two functions that are inter-related, and may even talk to each other, you will need to deploy that to Kubernetes.
faas-cli local-run is an easy way to test out functions without having a license installed or a Kubernetes cluster - just by using Docker alone.
A docker network, plus some Go routines could enable local-run to run multiple functions at once, and allow them to communicate.
Example YAML file:
version: 1.0
provider:
name: openfaas
gateway: http://127.0.0.1:8080
functions:
test:
lang: golang-middleware
handler: ./test
image: test:latest
test2:
lang: golang-middleware
handler: ./test2
image: test2:latest
For multiple functions - local-run would run all functions in the file.
You could then filter back down with the --filter flag i.e. --filter test2
@welteki suggested a basic / dummy gateway that is also run as a container, which can avoid having to stub out or replace calls from functions to the http://gateway.openfaas:8080 etc
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the faas-cli local-run command and review how it currently starts a single function with Docker. No file or test is named; the proposal's completion criteria are running multiple functions together, supporting --filter, and allowing communication over a Docker network, potentially through a containerized gateway.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- cli, networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100