Commit Graph

1141 Commits

Author SHA1 Message Date
9512f09d2b Refactor scaling to use existing code
Existing code has been used for scaling up and querying replicas.
This meant the new code was deleted and there is less duplication
now.

The cache store a whole query response rather than just the
available replica count and the tests were updated. This has been
tested with Docker swarm and the image:
 openfaas/gateway:scale-17-07-2018

This feature now needs the env-var of scale_from_zero to be enabled
in order to turn on the scaling behaviour.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-07-20 11:39:36 +01:00
c58af8da56 Disable scaling from zero by default
This disables the scaling proxy by default since it is not the
default user-experience and is still under refinement.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-07-20 11:39:36 +01:00
a1c2c553a5 Add scale_from_zero flag
Added scale_from_zero to config, docs and wrote unit test for the
value.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-07-20 11:39:36 +01:00
e67d45caa1 Add feature: scale from zero to 1 replicas
This change allows functions to be "idled" or scaled to zero
replicas and then be invoked later on. There is a penalty to
scaling up - the API gateway proxy will block until the function
is ready.

A cache is included to off-set the calls to upstream API to check
on readiness along with unit tests.

Testing via scaling to zero replicas and then invoking function.
On Swarm I observed 3 seconds on an Intel Nuc i5 for scaling back
from zero replicas.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-07-20 11:39:36 +01:00
31810a4cf2 Move CI to use openfaas/* ns
This was a miss by refactoring work and is causing a CI failure

https://travis-ci.org/openfaas/faas/builds/404409816

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-07-16 13:32:33 +01:00
50a8e9aa9f Disable auth in ci tests
This should make CI tests pass without having to parse and run in
the login command via the faas-cli.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-07-16 12:57:17 +01:00
8ede8966cd Bump gateway version
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-07-16 12:50:08 +01:00
ff167c8cd4 Bind secrets to stack
Secrets for gateway needed to be bound to stack, but were
commented-out. Tested on Swarm.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-07-16 12:50:08 +01:00
a27fceb7f4 Reinstate basic_auth flag
- basic_auth is now set to true by default unless overriden
in the env-var "BASIC_AUTH"

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-07-16 12:50:08 +01:00
6b7f2fc0a1 Enable basic-auth by default
The deployment script will enable basic-auth by default to help
avoid people deploying to a public IP with no protection from
malicious actors.

- In deploy_stash.sh /dev/random can hang on some systems, so using
  urandom will give a better experience, if less "random" data.
  For the purposes of creating an initial basic auth password this
  is sufficient.
- Alpine Linux does not have the shasum command, but sha256sum.
- Tested on MacOS with and without --no-auth flag.
- Does not apply for armhf or powershell.

BASIC_AUTH env-var added by Vivek Syngh @viveksyngh

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-07-16 12:50:08 +01:00
00c93f2ddf Add ReadOnlyRootFilesystem flag
Adds flag to denote root-filesystem should be made read-only.

Needed for downstream work and re-vendoring in faas-swarm/faas-
netes and openfaas-operator.

Closes #723

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-07-16 12:28:06 +01:00
07f3e8f624 Accept 202 as valid code for /system/scale-function/<function>
Updated gateway to accept 202 as valid response code for
/system/scale-function/<function> along with 200.

Fixes: #faas-netes/245

Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
2018-07-16 11:13:11 +01:00
db465b82a4 Added function url field and copy action to the UI
This change adds a function URL field to the UI and a 'copy to
clipboard' button next to it. If the browser does not support the copy
command, the copy icon will be hidden.

Signed-off-by: Ken Fukuyama <kenfdev@gmail.com>
2018-07-16 11:12:38 +01:00
e6a3658ac3 Edit queue-worker image with openfaas ns
After editing queue-worker to push do openfaas/ ns instead of
functions/ this chage is required to match the image name.
Set to latest version 0.4.8

Signed-off-by: Ivana Yovcheva (VMware) <iyovcheva@vmware.com>
2018-07-13 11:16:23 +01:00
4fe96a9cce Update .DEREK.yml with username
Change `iyovcheva` to `ivanayov` after username has been changed

Signed-off-by: Ivana Yovcheva (VMware) <iyovcheva@vmware.com>
2018-07-13 09:19:09 +01:00
f23d90d441 Remove braces for Python sample
Suggested by community member in an un-merged PR.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-07-10 21:14:45 +01:00
099362b51d Move watchdog from functions/ to openfaas/ ns
This moves watchdog to a better name for images and also gives free
image-scanning and gives more confidence  to users  that components
ship regularly and makes any vulnerabilities  in  components  clear

Signed-off-by: Ivana Yovcheva (VMware) <iyovcheva@vmware.com>
2018-07-10 21:09:30 +01:00
9618bc3f7c Remove brace from Python sample
Suggsted in #756

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-07-10 21:07:36 +01:00
a6ab224a94 Add new blog posts to community.md
Signed-off-by: Burton Rheutan <rheutan7@gmail.com>
2018-07-10 20:57:45 +01:00
2fcfd39922 Move faas-fargate entry above nomad
Signed-off-by: Edward Wilde <ewilde@gmail.com>
2018-07-09 22:18:30 +01:00
87c048914b AWS Fargate provider added as community project
Signed-off-by: Edward Wilde <ewilde@gmail.com>
2018-07-09 22:18:30 +01:00
36ec5b0612 Update typos in CONTRIBUTING.md
Thanks to @rgee0 for proofing.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-07-09 22:06:57 +01:00
cba817c499 Allow copyright verbiage
Allows: OpenFaaS Author(s)

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-07-09 22:06:57 +01:00
95c738c47e Remove typo in heading: afterburn
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-07-09 21:45:26 +01:00
0149bf3aca Remove AfterBurn reference
Afterburn is deprecated in favour of of-watchdog. Removing link
to prevent confusion.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-07-09 21:43:59 +01:00
507d514e74 Add core contributors / update on copyright
- Core contributors are added by name.
- Copyright notice now encourages OpenFaaS Author(s) in place of
OpenFaaS Project to reflect the nature od distributed copyright.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-07-09 21:37:04 +01:00
5f6b6bf953 Update header
From Project to Author(s) for the catch-all. This file has my
copyright which is retained through the catch-all statement.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-07-09 21:25:03 +01:00
822a1d0825 Update community.md
Add four blog posts on deployment and usage scenarios

Signed-off-by: Lucas Alexander <lucas@alexanderdevelopment.net>
2018-07-09 17:45:20 +01:00
00ad00b651 Push gateway image to both Quay.io and Docker Hub
With this change gateway will be pushed to Quay.io on release
as a backup

Signed-off-by: Ivana Yovcheva (VMware) <iyovcheva@vmware.com>
2018-07-06 20:18:23 +01:00
28c9ccd0aa Changes from pull request feedback
1. Use httptest.ResponseRecorder instead of custom implementation
StringResponseWriter.

2. Remove verbose log line in infohandler

Signed-off-by: Edward Wilde <ewilde@gmail.com>
2018-07-06 17:50:48 +01:00
aca2c7fe2a Enhance info endpoint to include gateway version
Extend the health endpoint and add gateway version information

Resolves: #733
Signed-off-by: Edward Wilde <ewilde@gmail.com>
2018-07-06 17:50:48 +01:00
672a6be182 Update community.md
Add Open Source Sharing is Caring Meetup, held in Sofia on 25th June, to the community.md

Signed-off-by: Ivana Yovcheva (VMware) <iyovcheva@vmware.com>
2018-07-03 10:04:09 +01:00
e55c018c17 Update default secret mount path to /run/secrets/
This commit reverts the changes done in #738 to update the default
secret mount path to `/run/secrets/`

Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
2018-07-02 19:22:59 +01:00
49cc6ae727 Move to openfaas Hub NS for gw/swarm
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-07-02 13:38:41 +01:00
f4aab9197d Move from functions ns to openfaas for Hub
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-07-02 12:45:53 +01:00
500b883084 Revert secret path
Secret path submitted in ced39bcda7
was incorrect and is being reverted. Docker Swarm by default
stores its sercrets in /run/secrets.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-06-30 13:50:03 +01:00
9892c6d30f Add Cloud Native Glasgow event
Signed-off-by: John McCabe <john@johnmccabe.net>
2018-06-29 17:30:31 +01:00
ced39bcda7 Updated default secret mount path value
This changes updates the secret mount path default value to
/var/openfaas/secrets at serveral places. It has been changed
from /run/secrets/ to /var/openfaas/secrets after version 0.8.2

Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
2018-06-28 21:37:10 +03:00
e655f28e8d Add shirley meetup details
Signed-off-by: Steven Tsang <tsangste@gmail.com>
2018-06-27 12:40:22 +03:00
461254b4cd Added viveksyngh to maintainers list
This changes to add viveksyngh to .DEREK.yml to manage github issues
using derek.

Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
2018-06-27 10:19:29 +03:00
d8d6349b2b Added bangalore meetup details to community file
Signed-off-by: Vivek Singh <vivekkmr45@yahoo.in>
2018-06-27 10:04:26 +03:00
d3d320dc33 Add Docker Seattle meetup to community.md
Signed-off-by: Eric Stoekl <ems5311@gmail.com>
2018-06-23 09:55:50 +01:00
e39dbd9584 Update nats-queue-worker package to 0.4.7
This package version supports running OpenFaas on hosts the contain `.`
in their hostname i.e. computer-a.acme.com

Signed-off-by: Edward Wilde <ewilde@gmail.com>
2018-06-21 23:00:01 +01:00
08d57de1f6 Add Birmingham DevOps even to community.md
Signed-off-by: rgee0 <richard@technologee.co.uk>
2018-06-20 19:07:50 +01:00
3d468f5667 Add OpenFaaS meetup to community file
Signed-off-by: Burton Rheutan <rheutan7@gmail.com>
2018-06-20 13:46:48 +01:00
79e5487ed2 Add affix to derek maintainers
Signed-off-by: Keiran Smith <contact@keiran.scot>
2018-06-19 22:37:06 +01:00
25aa95534c Bump gateway version to 0.8.3
New gateway version includes updated queue-worker interface.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-06-18 20:11:50 +01:00
9d0800837a Bump queue-worker in compose file
Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-06-18 20:10:46 +01:00
223c561706 Vendor new queue-worker version
Introduces 0.4.6 of queue-worker - see upstream repo for changes.

Signed-off-by: Alex Ellis (VMware) <alexellis2@gmail.com>
2018-06-18 20:10:46 +01:00
41bda568a7 Update secret docs and sample-functions
**What**
- Update the documentation about secret management to note the changed
file location
- Remove the documentation on secret rotation, because this will not
currently work
- Update apikey-secret and ApiKeyProtected-Secrets to read secret values
from both the old and the new locations

**Why**
- Recent updates to faas-swarm and faas-netes changed the mount location
of secrets.  These changes update the docs to reflect this change.

Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
2018-06-17 05:00:52 -07:00