Agile DevOps - architecture, technical practices, and culture

Use Cloud and DevOps to build infrastructure by rapid agile iterative development using collaborative open source tools:
-chef cookbooks, puppet modules or ansible playbooks to build servers.
-Test Kitchen to deploy and test them.
-EC2Dream a graphic user interface that provides a 'single pane of glass' to do agile devops primarily on cloud servers.
-Cloud Formation or Terraform using cfndsl Ruby or Troposphere DSL for easy orchestration.
-Amazon AWS, Azure, Google Compute Engine, Softlayer, Openstack, Local and Hosted servers.

Verify AWS Infrastructure with Test Kitchen and awspec

Test-kitchen is a test harness tool that allows integration testing of configuration and infrastructure.

It has a plug-in architecture and has plugins for both Cloud Formation and terraform to create AWS infrastructure. For plugin details see kitchen-terraform and kitchen-cloudformation.

awspec is a tool that allows RSpec tests for AWS resources. For plugin details see kitchen-awspec.

There is a simple example in the kitchen-awspec github repository to demonstrate creating an EC2 instance with cloud formation and then verifying it with awspec. See https://github.com/neillturner/kitchen-verifier-awspec/tree/master/example

1. Install test-kitchen as per http://kitchen.ci/docs/getting-started/installing
  basically install ruby for your platform
  then to install test-kitchen
      gem install test-kitchen
  and the cloud formation plugin:
      gem install kitchen-cloudformation

  and the awspec plugin
      gem install kitchen-verifier-awspec

  Note: terraform support can be installed via:
      gem install kitchen-terraform

2. Use git to clone the github kitchen-awspec repository.
    git clone https://github.com/neillturner/kitchen-verifier-awspec.git

3. Run the example on your workstation:

a. Configuration AWS Settings
    See Configuration Settings and Precedence
For example:
    # configure aws keys via either a profile
    export AWS_DEFAULT_PROFILE=myprofile
    # or set keys directly
    export AWS_ACCESS_KEY_ID=myaccesskey
    export AWS_SECRET_ACCESS_KEY=mysecretkey

    # set aws region
    export AWS_REGION=eu-west-1

b. Go to example directory
    cd kitchen-verifier-awspec/example

c. For windows set the ssl cert file
    set SSL_CERT_FILE=C:/repository/kitchen-verifier-awspec/example/ca-bundle.crt

d. Check that everything installed successfully
    kitchen list
should return the base-aws instance

e. Create the Cloud Formation stack
    kitchen create base-aws -l debug

f. Verify the AWS Resources
    kitchen verify base-aws -l debug

g. Delete the Cloud Formation stack
    kitchen destroy base-aws -l debug

References
http://www.slideshare.net/stelligent/testdriven-infrastructure
http://www.slideshare.net/dkcwd/validating-puppet-managed-resources-in-aws-with-awspec
https://www.newcontext.com/introducing-kitchen-terraform/
https://www.unixdaemon.net/cloud/testing-terraform-projects/
http://koesystems.github.io/terraform-best-practices/