Skip to content

[DEPRECATED] Cli tool on top of Serverless framework

License

Notifications You must be signed in to change notification settings

threadheap/serviceless

Repository files navigation

[DEPRECATED]

serverless-components solve the problem

serviceless

Serviceless - cli tool on top of Serverless framework, that simplifies workflow with multiple services.

serverless Build Status codecov npm version License: MIT

Quick start

  1. Install serverless framework
npm install serverless -g
  1. Install serviceless cli
npm install serviceless -g
  1. Deploy
slx deploy all

How to

Deploy

Deploy all services in a folder

slx deploy all

Deploy service with command line prompt

slx deploy

then select service or folder from the list.

Deploy service, matching string

slx deploy <query>

Deploy with cli options

Every serverless option that you set will be propagated to the sls deploy command accordingly:

slx deploy all --stage prod --region eu-central-1

will deploy to prod stage and eu-central-1 region.

Deploy with environment variables

slx will share all enviroment variables with serverless process, so

MY_SECRET=foo slx deploy all

will be injected into serverless config.

Deploy Flags

-b, --runInBand - deploy services one by one (parallel by default)

-e, --exitOnFailure - stop deployment of other services on failure

-r, --rollbackOnFailure - rollback services on deployment failure Makes sense to spar with --exitOnFailure flag to stop on failure and rollback.

-v, --verbose - show serverless output

Help

slx --help
slx deploy --help

What's next

  • add option to rollback to previous state on fail
  • aggregate logs for multiple services
  • add configuration file to deploy in band services that rely on each other
  • save and restore .serverless folders to use as deployment artifacts for CI/CD tools

Contributions

Yes, please!

Clone repo, then

npm install
npm test

LICENCE

MIT @ Pavel Vlasov

Releases

No releases published

Packages

No packages published