Read this on the main serverless docs site¶
Knative Workflow Tips¶
Quick recommendations and tips for various processes.
Development Workflow¶
- Write your functions
- Use
serverless deploywhen you've made changes toserverless.ymland in CI/CD systems. - Use
serverless invoke -f myFunctionto test your functions on Knative. - Write tests to run locally.
Using stages¶
- At the very least, use a
devandprodstage. - In larger teams, each member should use a separate Knative installation and their own stage for development.
Larger Projects¶
- Break your application / project into multiple Serverless services.
- Model your Serverless services around data models or workflows.
- Keep the functions in your Serverless services to a minimum.
Cheat Sheet¶
A handy list of commands to use when developing with the Serverless Framework.
Create a service:¶
Creates a new service
Install a service¶
This is a convenience method to install a pre-made Serverless service locally by downloading the GitHub repo and unzipping it.
Deploy all¶
Use this when you have made changes to your functions or events in serverless.yml or you simply want to deploy all changes within your service at the same time.
Invoke function¶
Invokes a Knative Serving service returns it's output.
Info¶
See information about your deployed / undeployed functions by running the info command in your service directory.