Search code examples
spinnaker

How can I script the provisioning Spinnaker resources?


We are evaluating adoption of Spinnaker and would like to understand what API, if any, is available for creating Spinnaker resources? If I want to script/templatize the creation of my App within Spinnaker, what is the best way to do this?

As best as I can see at the moment is script the creation of your infrastructure outside of Spinnaker (e.g. CloudFormation), load that in from your AWS account, and then keep a library of pipeline JSON files that can be copy/pasted into the JSON form for pipelines that will be added afterwords.


Solution

  • All of the items that you can manage via the Spinnaker UI (Server Groups, Load Balancers, Security Groups, Applications, Projects, Pipelines) are scriptable via Spinnaker's REST API. The API documentation is a lacking at the moment (but coming soon, stay tuned). For now you can watch the UI's network interaction with the API via developer tools to get example payloads.

    For other more static cloud infrastructure (VPCs, subnets, etc) we don't really have a story via Spinnaker's API and would recommend looking at Terraform or CloudFormation