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 ElectricFlow, you can now include calling Heat to launch or delete stacks, as well as update their configuration.
How to use the ElectricFlow OpenStack plugin to launch and delete a Heat stack
In the below example, I will walk you through a simple set-up in ElectricFlow, 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:
1234567891011121314151617181920heat_template_version: 2013-05-23resources:appserver:type: OS::Nova::Serverproperties:key_name: appServerKeyPairimage: 89dfb01c-830e-421b-8649-124944e0346cflavor: m1.nanodb:type: OS::Nova::Serverproperties:key_name: dbKeyPairimage: 89dfb01c-830e-421b-8649-124944e0346cflavor: m1.nanolb:type: OS::Nova::Serverproperties:key_name: loadbalancerKeyPairimage: 89dfb01c-830e-421b-8649-124944e0346cflavor: m1.nano
- In ElectricFlow, 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 ElectricFlow 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
Here is how this looks in your OpenStack console:
The new plugin also allows you to create, attach, delete and extend volumes, creating snapshots, and more.
Learn more about the new capabilities and download the new plugin here.
Got any questions or input- feel free to leave a comment below.
Latest posts by Nikhil Vaze (see all)
- OpenStack for the Enterprise: What CIOs Need to Know - December 2, 2015
- OpenStack Tokyo, Docker, and Moving from Monolith to Microservices - November 11, 2015
- Continuous Discussions (#c9d9): Episode 28 Recap – Docker and Containers in Your CD Pipeline - November 4, 2015