Behavior Driven Infrastructure (BDI) with OpenStack to support devOPS

Behavior Driven Infrastructure (BDI) with OpenStack to support devOPS

Our industry is quickly moving to store everything in Source Code Repositories like Git, CloudForge, Sourceforge, Bitbucket and GitHub.  Whether it be application code, meta-data documentation, test cases, test data or even infrastructure manifest definitions.  This practice allows teams to version control and replicate environments identically with little room for error in configuration and automated for speed and faster time to consumption.

The advent of XP (Extreme Programming) and then later Agile practices like Scrum really helped to shape and persuade developers to become more interested in test cases as 'code'.  This saw the emergence of practices like TDD (Test Driven Development) and ATDD (Acceptance Test Driven Development) which have been taken further in devOPS.

 The essence of TDD and ATDD can really be broken up into some simple hygiene steps such as writing a "single" unit test at a time and then run this test.  (The test will fail as you have not written the application code) Finally, remember to write "only" the code to make the test pass and "refactor" where necessary.

Further refinement of TDD and ATDD led to the incarnation of Behavior Driven Development or BDD where developers are encouraged to apply the "Five Why's" principle, implement only features to support a business outcome, develop features in a common language readable by all and apply the techniques all the way down the abstraction layers.

So how does this relate to infrastructure I hear you ask ?

Well, in order to apply BDD to 'all the abstraction layers down the stack' you will have to use an infrastructure-as-code approach.  Behavior Driven Infrastructure (BDI) ensures that we use a common language to describe and configure infrastructure, be readable by all and only define what is absolutely necessary to fulfill the behaviors of the feature.

 Behavior Driven Infrastructure works well in an IaaS environment where you can define your infrastructure as code.  For example, in OpenStack we use Heat Orchestration Templates and in AWS CloudFormation Templates.  Standing up cloud based infrastructure via code is both repeatable and allows you to take advantage of the 'behavior driven' framework.

BDI requires the same hygiene rules as BDD, TDD and ATDD therefore developers should look to ensure the following are applied:

  • create only the infrastructure required to satisfy the feature of the behavior
  • use a TDD approach and ensure your infrastructure is tested before deploying applications
  • leverage 'as-a-Service' components like LoadBalancer-as-a-Service to scale your infrastructure dynamically and ensure you have automated test cases to check for redundancy
  • refactor infrastructure manifests and review the configurations regularly
  • ensure your infrastructure manifests are common and readable by all team members.  Apply your techniques at all abstraction layers including the instance, IaaS, hypervisor, etc.

Infrastructure is the core foundation of every application.  A strong core can be achieved by applying application development techniques in infrastructure scenarios. 

 

 

About the Author

Anthony Rees is an industry-respected HPE Helion Cloud Technical Consultant, working with enterprise clients to ensure they are making the most of their Continuous Delivery strategy and converging their Cloud solutions to deliver faster to the market place for a lower cost. With over fifteen years’ experience in software design, architecture, cloud solutions and development activities, Anthony is a regular public speaker at conferences on the topics of Hybrid Cloud, OpenStack, devOPS with Cloud and Cloud in an Agile Environment and has offered support to major organisations such as NAB, CBA, Telstra, WorkSafe Victoria, Transport Accident Commission (TAC), Dun & Bradstreet (D&B), Hoover’s, BHP, Rio Tinto, Infosys, CSC and HP.

You can follow Anthony on Twitter: @anthonyrees

Do you have some examples of this?

Like
Reply

To view or add a comment, sign in

More articles by Anthony Rees

Others also viewed

Explore content categories