Proposal: support multi-arch functions
Open
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 816
- Forks
- 230
- Avg merge
- 6h 4m
- Merged PRs (30d)
- 1
Description
Current Behaviour
As for now if I want to have a function, which runs on amd64, and ppc64le, I have to do following:
- Create a new function
$ faas-cli new function --lang golang-http
- Change function.yml to have 2 functions for 2 architectures:
version: 1.0
provider:
name: openfaas
gateway: http://gateway:31112
functions:
function-amd64:
lang: golang-http
handler: ./function
image: id/function:latest-amd64
function-ppc64le:
lang: golang-http-ppc64le
handler: ./function
image: id/function:latest-ppc64le
function:
image: id/function:latest
- Build 2 functions:
$ faas-cli build -f ./function.yml
- Push them to docker
- Create manifest
$ docker manifest create id/function:latest id/function:latest-amd64 id/function:latest-ppc64le
- Push manifest
$ docker manifest push id/function:latest
- deploy the function
$ faas-cli deploy -f ./function.yml --filter function
Expected Behaviour
Something like:
faas-cli up -f ./function.yml -a amd64,pcc64le
Context
I just want to build functions on my mac, test them on mac and on intel, and deploy them into production anywhere.
Your Environment
- FaaS-CLI version ( Full output from:
faas-cli version):
0.8.21 - Docker version ( Full output from:
docker version):
18.06.0-ce - Are you using Docker Swarm (FaaS-swarm ) or Kubernetes (FaaS-netes)?
Kubernetes - Operating System and version (e.g. Linux, Windows, MacOS):
MacOS, Linux
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 by tracing the faas-cli up, build, and deploy commands and how they read function.yml. Compare the current separate-architecture workflow with the proposed -a amd64,ppc64le option. Done means a multi-architecture function can be built, pushed, and deployed through the CLI without manually creating Docker manifests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- cli, devops
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100