service-bot/servicebot

Lifecycle Hook

Closed this issue · 4 comments

I'm looking to tie automation into the lifecycle of each created service where on service creation it will send a REST request to a provisioning server. Where would I start? It seems that I could write some async logic with REST calls into plugins/service-lifecycle but I'm not sure.

We have developed a webhook plugin to facilitate this exact functionality in v0.9.0, not on master branch yet.

If you are looking to complement the server provisioning lifecycle, you can use the webhooks to send to the server, this works well if your provisioning is external from servicebot (for example triggering a Jenkins job which spins up a server and performs automation actions).

If you prefer to build the provisioning functionality into Servicebot as a new plugin, you can build a new plugin utilizing the service-lifecycle plugin, which consumes those events. For an example, see how the webhook plugin did it by defining new lifecycleHook which will be processed by the service-lifecycle plugin.

Oh wow this is exactly what I was needing! I'm testing it out now.
What is the webhook schema?

Here's where you can find the current documentation for the webhooks.

Thank you very much!