Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


CLI requirements

  • vagrant
  • faas-cli
  • terraform
  • vegeta

Demo steps

Provision local Vagrant environment

vagrant up

Use Terraform to provision Vault and Nomad jobs

# Initialize environment, download plugins
cd terraform
terraform init

# Run the Vault module first
terraform apply -target=module.vault

# Apply the Nomad jobs after
terraform apply -target=module.faas

OpenFaaS and supporting components should be avialable:

Use faas-cli to deploy a function

# Authenticate with OpenFaaS gateway
faas-cli login --gateway http://localhost:8080 --password vagrant

# Deploy a function from the store
faas-cli store deploy figlet

Use vegeta to generate load

cd ../
# Invoke figlet 50/sec for 1 minute
echo "POST http://localhost:8080/function/figlet" | vegeta -cpus 1 attack -rate=50 -duration 1m -body figlet > results.gob

# Print the results
vegeta report results.gob

Deploy a custom function using secrets

# Add the Grafana API secret
faas-cli secret create grafana-api-token --from-literal '' --gateway=http://localhost:8080

# Source repo

# Deploy function from stack.yml
faas-cli deploy --image acornies/grafana-annotate:0.1.2 --name grafana-annotate --env grafana_url= --gateway=http://localhost:8080 --secret grafana-api-token

HashiConf 19 additions

# Add stripe webhook payload secret
faas-cli secret create stripe-webhook-secret --from-literal ''

# Apply the Kafka modules
terraform apply -target=module.kafka
terraform apply -target=module.faas_kafka_connector

# Login to Vagrant VM to create a kafka console consumer
vagrant ssh

# Find kafka broker container
docker ps | grep kafka-brokers
docker exec -it ${name} bash

# Launch console consumer
kafka-console-consumer --bootstrap-server --topic stripe-webhook-charge-dispute-created

Launch a function tied to our Kafka topic:

# Launch a function from store with special topic annotation
faas-cli store deploy cows --annotation topic=stripe-webhook-charge-dispute-created


Tech demos of faas-nomad for various events



No releases published


No packages published