6 Commits

Author SHA1 Message Date
John McCabe
89878f0c8a Migrate from alexellis org to openfaas
Note, not all `alexellis/github` references should be changed, there are
a number of repos which are not part of the openfaas org, this commit
excludes those.

Signed-off-by: John McCabe <john@johnmccabe.net>
2017-10-04 09:18:06 +01:00
John McCabe
40e1fac1c2 Implement Swarm update handler using PUT
This commit implements an update handler for Docker Swarm, it queries the
current spec, updates values in-situ before calling ServiceUpdate.

The UpdateConfig FailureAction is set to rollback, so in the event of
supplying values to the update that would result in the service failing
then the update will be rolled back.

The UpdateConfig Parallelism param is set to an explicit value of 1 which
will result in functions being updated 1 by 1 rather than all at once.

It also moves the restartDelay declaration out of the create and update
handlers and into the main server function alongside maxRestarts.

And finally this commit uses the PUT HTTP verb for updates rather than
the non-HTTP UPDATE verb which was being used initially (also adding it
to the Swagger definition).

Signed-off-by: John McCabe <john@johnmccabe.net>
2017-09-27 09:58:03 +01:00
Alex Young
031a0bc18c Add tests around error handing done in #196
Signed-off-by: Alex Young <alex@heuris.io>
2017-09-22 14:39:01 +01:00
Eric Stoekl
1622fadd9c Return error when ServiceCreate fails in
gateway/handler/createhandler.go

Signed-off-by: Eric Stoekl <ems5311@gmail.com>
2017-09-19 20:14:05 +01:00
Alex Ellis
3db2064d91 Handle constraints
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2017-09-04 13:42:36 +01:00
Alex Ellis
78daa9cd39 Specify Linux constraints by default
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2017-09-02 20:12:10 +01:00