Faas: Add minimal deploy script and Docker Compose files

Created on 12 Jan 2018  路  16Comments  路  Source: openfaas/faas

As a frequent user of the project, setting up a new instance that includes all of the samples functions is redundant.

Expected Behaviour

A user issues a command such as ./deploy_stack_minimal.sh and only the necessary functions are deployed (gateway, monitoring, etc.)

Current Behaviour

A user can issue a ./deploy_stack.sh but then half a dozen or so sample functions are included.

Possible Solution

Create a minimal script and docker-compose-minimal.yml file for both ARM and non-ARM architectures.

enhancement skilbeginner

Most helpful comment

@rorpage I'd suggest that rather than have multiple .sh scripts for different deployment states we should aim to have one deploy.sh that accepts arguments such as minimal, with_samples, extended. One of the options should be the default - I think there was mention at some point that extended might become that.

All 16 comments

Derek add label: enhancement

Derek add label: skill/beginner

@rorpage I'd suggest that rather than have multiple .sh scripts for different deployment states we should aim to have one deploy.sh that accepts arguments such as minimal, with_samples, extended. One of the options should be the default - I think there was mention at some point that extended might become that.

Hey @rgee0, by minimal you mean no sample functions and by with_sample you mean sample functions included. If I am wrong till here please correct me. Now I couldn't understand what did you mean by extended?

@dungeonmaster18 you'll notice that it was @rorpage introduced the idea of minimal. my interpretation of minimal was an install with the bare minimum required for OpenFaaS to function. With_samples would effectively be what was the standard install which included samples and not the async elements. Extended existed previously as a means to include the async components but now it has become the standard on x86 and so is only available on ARM.

Maybe there would be just the two options

Proposal

  • Let's add a minimal docker-compose file without any sample functions.
  • Then the setup will change from ./deploy-stack.sh to ./deploy-stack.sh minimal and ./deploy-stack.sh with_sample. Same goes to arm64 and armhf as well.

CC / @alexellis @rgee0 for approval. I can work on this if it gets approved by you guys.

Are you thinking you'd have it default to extended then if no args are passed in?

for no arguments I was thinking of let's install all the samples.

Good discussion but bear in mind any changes should be replicated for all the providers. We may just be better to remove all the samples like we do with Kubernetes. The store now provides an easy way to get functions.

Up vote for removing all samples

Same. Consistency sounds good to me.

OK, so it reads to me like we are saying that the default mode of deployment should be standardised with sample functions pulled out of the deployments. To be consistent with the project value of portability this should provide the same experience across hardware types too (currently there are 2 yaml files for armhf). The deploy script should also be merged to correctly deploy based on hardware type #321 can be reopened or used for a steer.

As part of the rationalisation of the armhf compose files please note the functions that are being removed and log them into a new issue so that these can be worked through and added to the store idc.

We need to move this forward, it's been sitting for 4 months. Please can someone on the thread volunteer?

We need to update everywhere that references and mentions these sample functions including:

  • The TestDrive (Markdown + docs.openfaas.com) and any other Markdown files
  • Anything on docs.openfaas.com
  • Suggest which blogs need editing that use the samples

Then:

Create a new YAML file to represent the missing functions (ideally in a stack.yml format if possible)

This should not be a duplication of docker-compose.yml - but something that can be run after the main stack (optionally).

Hi , Is this is issue open . I would like to work on this

Derek close: fixed

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ndarilek picture ndarilek  路  3Comments

edouardkleinhans picture edouardkleinhans  路  8Comments

matthewdolman picture matthewdolman  路  5Comments

alexellis picture alexellis  路  4Comments

alexellis picture alexellis  路  6Comments