Coder Social home page Coder Social logo

workshop-1's Introduction

openfaas-workshop

This is a self-paced workshop for learning how to build, deploy and run OpenFaaS functions.

This workshop starts by deploying OpenFaaS your laptop with Docker for Mac or Windows and then shows how to build, deploy and invoke Serverless functions in Python. Topics will include: managing dependencies with pip, dealing with API tokens through secure secrets, monitoring functions with Prometheus, invoking functions asynchronously and chaining functions together to create applications. We finish by connecting to online event-streams through IFTTT.com - this will enable you to build bots, auto-responders and integrations with social media and IoT devices.

Requirements:

We walk through how to install these requirements in Lab 1, but please do this before you attend an instructor-led workshop.

  • Functions will be written in Python, so prior programming or scripting experience is preferred
  • Install the recommended code-editor / IDE VSCode
  • For Windows install Git Bash
  • Preferred OS: MacOS, Windows 10 Pro/Enterprise, Ubuntu Linux

Docker:

  • Docker CE for Mac/Windows Edge edition
  • Docker CE for Linux

Note: As a last resort if you have an incompatible PC you can run the workshop on https://labs.play-with-docker.com/.

Instructor-led workshops

If you're taking an instructor-led workshops then a link will be shared to join the OpenFaaS Slack community. Use the designated channel for the workshop to discuss comments, questions and suggestions.

  • Install pre-requisites
  • Docker Hub account
  • OpenFaaS CLI
  • Set up a single-node cluster with Docker Swarm
  • Deploy OpenFaaS
  • Use the UI Portal
  • Learn about the CLI
  • Deploy via the Function Store
  • Find metrics with Prometheus
  • Scaffold or generate a new function
  • Build the astronaut-finder function
  • Add dependencies with pip
  • Troubleshooting: verbose output with write_debug
  • Troubleshooting: find the container's logs
  • Use third-party language templates
  • Extend timeouts with read_timeout
  • Inject configuration through environmental variables
  • Use HTTP context - querystring / headers etc
  • Call a function asynchronously vs synchronously
  • View the queue-worker's logs
  • Use an X-Callback-Url with requestbin and ngrok
  • Chaining functions on the client-side
  • Call one function from another

Build issue-bot - an auto-responder for GitHub Issues

  • Get a GitHub account
  • Set up a tunnel with ngrok
  • Create an webhook receiver issue-bot
  • Receive webhooks from GitHub
  • Deploy SentimentAnalysis function
  • Apply labels via the GitHub API
  • Complete the function

You can start with the first lab Lab 1.

Wrapping up

If you're taking an instructor-led workshop, we'll now take Q&A and cover some advanced topics:

  • Auto-scaling
  • Security
    • TLS / Basic Authentication
  • Object storage
  • Customisations for templates

The appendix contains some additional content.

Acknowledgements

Thanks to @iyovcheva, @BurtonR, @johnmccabe, @laurentgrangeau, @stefanprodan for testing and contributing to the labs.

workshop-1's People

Contributors

alexellis avatar burtonr avatar ivanayov avatar laurentgrangeau avatar stefanprodan avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.