bitops
bitops copied to clipboard
Support The Serverless Framework
We have the need to setup CI/CD pipelines for a Serverless application and we would like to use Bitops for this.
The Serverless framework has a serverless.yml file. This file parallels a lot of IAC concepts in that it defines the AWS target, load balancer(s), etc. Essentially everything required to run and deploy a function.
serverless.yml typically resides in the application repo to allow developers to invoke and iterate locally with serverless invoke cli commands.
A Serverless function is deployed by producing an local artifact with serverless package (docs) and serverless deploy -p <package_dir> (docs).
To keep app repos focused on CI and BitOps/Ops repos focused on CD, two possible strategies exist:
- App Repo:
serverless package+ Ops Repo:serverless deploy. This works ifserverless deploy -p <pacakge>does not requireserverless.yamlto work. - App Repo: publish the entire source code under a git tag + Ops Repo: Run all
serverlesscli commands.
Both of these solutions would fit under BitOps, but the deciding factor is understanding how different environment configs (dev, test, prod) fit in to the serverless framework.