Serverless computing is a model which aims to abstract server management without concerns for implementing, tweaking, or scaling a server (at least, to the perspective of a user). The following sections will provide examples on how to deploy your application to service that will run on-demand as a Function as a Service(FaaS).
To learn more about other FaaS offerings and the concept of serverless, check out the comparisons and case studies created by the Serverless Framework.
note: Deploying to FaaS provider will require you to first create a GitHub App
To deploy an app to any cloud provider, you will need 3 environment variables:
APP_ID: the ID of the app, which you can get from the app settings page.
WEBHOOK_SECRET: the Webhook Secret that you generated when you created the app.
PRIVATE_KEY_PATH: the path to a private key file
These environment variables will need to be passed through to your FaaS solution. Each solution is different; please consult their documentation on how to use variables in the deployed environment.
Choosing a FaaS provider is mostly dependent on developer preference. Each Probot plugin interacts similarly, but the plugins implementation is dealing with different requests and responses specific to the provider. If you do not have a preference for a provider, choose the solution you have the most familiarity.
AWS Lambda is an event-driven, serverless computing platform provided by Amazon as a part of the Amazon Web Services. AWS Lamba additionally manages the computing resources required for the code and adjusts those resources in conjunction with incoming events.
handler.jsfile in the root of you probot application
// handler.js const serverless = require('@probot/serverless-lambda') const appFn = require('./') module.exports.probot = serverless(appFn)
note: The Serverless framework provides a more straightforward approach to setting up your AWS environment. It requires the creation of a serverless.yml in the root of your application.
Google Cloud Platform, is a suite of cloud computing services that run on the same infrastructure that Google uses internally for its end-user products. Cloud Functions are the Platform's FaaS offering.
handler.jsfile in the route of you probot application
// handler.js const serverless = require('@probot/serverless-gcf') const appFn = require('./') module.exports.probot = serverless(appFn)
Found a mistake or want to help improve this documentation? Suggest changes on GitHub