
functions/alertmanager: r = requests.get(req, timeout = 1) print(req +" => " + str(r.status_code))
handler.py
$ curl -sSL cli.get-faas.com | sudo sh
Install the faas-cli which is also available on brew
Clone the samples and templates from Github:
$ git clone [***] $ cd faas-cli
Define your functions in YAML - or deploy via the API Gateway's UI.
provider: name: faas gateway: http://localhost:8080 functions: url_ping: lang: python handler: ./sample/url_ping image: alexellis2/faas-urlping
Example function YAML file - urlping.yaml
$ faas-cli -action build -f ./urlping.yaml
Build a Docker image using the Python handler in ./sample/url_ping
$ faas-cli -action deploy -f ./urlping.yaml
Deploy the new image to the gateway defined in the YAML file.
If your gateway is remote or part of a multi-host Swarm - you can also use the CLI to push your image to a remote registry or the Hub with
faas-cli -action push
$ curl -d "[***]" http://localhost:8080/function/url_ping/ [***] => 200
Test out the function with the URL [**] => 200*
Sample functions are available in the Github repository in a range of programming languages.
Functions as a Service or FaaS was a winner in the Cool Hacks contest for Dockercon 2017.
If you'd like to find the functions I used in the demos head over to the faas-dockercon repository.
Background story
This is my original blog post on FaaS from Janurary: Functions as a Service blog post
A one-line script is provided to help you get started quickly. You can test-drive FaaS with a set of sample functions as defined in the provided docker-compose.yml file.
Use your own laptop or the free community-run Docker playground: play-with-docker.com.
Here is a screenshot of the API gateway portal - designed for ease of use.
!Portal
Have you written a blog about FaaS? Send a Pull Request to the community page below.
If you'd like to join FaaS community Slack channel to chat with contributors or get some help - then send a Tweet to @alexellisuk or open a Github issue.
FaaS is written in Golang and is MIT licensed - contributions are welcomed whether that means providing feedback, testing existing and new feature or hacking on the source. To get started you can checkout the roadmap and contribution guide or browse the open issues on Github.
Highlights:
curl and brewExample of a Grafana dashboard linked to FaaS showing auto-scaling live in action:


manifest unknown 错误
TLS 证书验证失败
DNS 解析超时
410 错误:版本过低
402 错误:流量耗尽
身份认证失败错误
429 限流错误
凭证保存错误
来自真实用户的反馈,见证轩辕镜像的优质服务