Many of our enterprise customers are using OpenStack for their private or public cloud infrastructure. As part of our recent Dynamic Environments feature, we've also released significant improvements to our OpenStack plugin including support for the cool new Heat project. Heat is the main project in the OpenStack Orchestration program, the rough equivalent of AWS CloudFormation. Heat allows you to describe your intended state using Yaml or Json and behind the scenes it interprets the input and calls the OpenStack APIs for you to create your stack. As part of your automation workflow in CloudBees Flow, you can now include calling Heat to launch or delete stacks, as well as update their configuration.
How to use the CloudBees Flow OpenStack plugin to launch and delete a Heat stackIn the below example, I will walk you through a simple set-up in CloudBees Flow, using our plugin to create and delete a Heat Stack. In my example scenario, we will create a Heat stack, then send an internal notification (such as alerting your QA team that their environment is ready to use), and then delete the stack.
- First, you'll need to create a Heat Orchestration Template, which would be your input for creating the stack using the plugin. For my example, this is the template i'm using:
heat_template_version: 2013-05-23 resources: appserver: type: OS::Nova::Server properties: key_name: appServerKeyPair image: 89dfb01c-830e-421b-8649-124944e0346c flavor: m1.nano db: type: OS::Nova::Server properties: key_name: dbKeyPair image: 89dfb01c-830e-421b-8649-124944e0346c flavor: m1.nano lb: type: OS::Nova::Server properties: key_name: loadbalancerKeyPair image: 89dfb01c-830e-421b-8649-124944e0346c flavor: m1.nano
- In CloudBees Flow, create a workflow with four states: Create Stack > Send Notifications > Delete Stack > Done.
- For the Create Stack state, add an action that calls the EC-OpenStack's CreateStack procedure. Here's how I filled it out: Make sure to edit your tenant ID, Image ID and key_name to match your OpenStack configuration.
- If you want to, set up your "Send Notifications" state appropriately to configure sending alerts to your team.
- Note we've included a pause with a manual step- as if your QA team is now going to be working on the environment. Once they are done, they trigger CloudBees Flow to tear down the VMs.
- For the DeleteStack state, add an Action that calls the EC-OpenStack's DeleteStack procedure
- Run the workflow and watch the magic happens
Stay up to date
We'll never share your email address and you can opt out at any time, we promise.
Your ad blocker may be blocking functionality on this page. Please disable for an improved experience.