bitops icon indicating copy to clipboard operation
bitops copied to clipboard

Support The Serverless Framework

Open imaustink opened this issue 4 years ago • 1 comments

We have the need to setup CI/CD pipelines for a Serverless application and we would like to use Bitops for this.

imaustink avatar Dec 15 '20 15:12 imaustink

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:

  1. App Repo: serverless package + Ops Repo: serverless deploy. This works if serverless deploy -p <pacakge> does not require serverless.yaml to work.
  2. App Repo: publish the entire source code under a git tag + Ops Repo: Run all serverless cli 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.

ConnorGraham avatar Dec 16 '20 17:12 ConnorGraham