Skip to content

Instantly share code, notes, and snippets.

@Braunson
Forked from alexellis/pwd-faas.md
Created January 11, 2017 02:55
Show Gist options
  • Save Braunson/6b8e7d6cf826e153e572d16126014ff3 to your computer and use it in GitHub Desktop.
Save Braunson/6b8e7d6cf826e153e572d16126014ff3 to your computer and use it in GitHub Desktop.
pwd-faas-quickstart.md

This is a Quickstart guide for FaaS functions as a Service on Play-with-docker.com

Head over to http://play-with-docker.com/ and start a new session. Add one host to start with.

# docker swarm init # use --advertise-addr here and pick the 10.x IP address range

# git clone https://github.com/alexellis/faas
# cd faas
# ./deploy_stack.sh

Now that everything's deployed take note of the two DNS entries at the top of the screen.

Head over to the README to see how to invoke the sample function for Docker Hub Stats via the curl commands.

The sample functions are:

  • Webhook stasher function - saves webhook body into container's filesystem

  • Docker Hub Stats function - queries the count of images for a user on the Docker Hub

  • Quickstart with docker-stack deploy

Then checkout the gateway_functions_count metrics on your Prometheus endpoint (Port 9090).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment