Giter Club home page Giter Club logo

chef_infrataster's Introduction

chef_provisioning example

This repository is a demonstration of how to use chef-provisioning to provision a VM with vagrant and then use infrataster to run a test against it.

server 'server1'
  http 'http://192.168.20.10/' with {:params=>{}, :method=>:get, :headers=>{}}
    responds with 200

server 'server2'
  http 'http://192.168.20.11/' with {:params=>{}, :method=>:get, :headers=>{}}
    responds with 200

server 'testclient'
  can wget from server1
  can wget from server2

Finished in 1.84 seconds (files took 0.54254 seconds to load)
4 examples, 0 failures

Requirements

  • Ruby (tested with 1.9.3)
  • Vagrant

Usage

Common

bundle install
rake generate

One Test VM

rake test

Three Test VMs (two servers, one client)

rake test_cluster

Updating recipes and retesting

If you make an alteration to the recipes in the recipes/ folder or include a new cookbook in the Berksfile you must run rake update to update the cookbooks in the test environment.

What it does

The cookbook will create a virtual machine using Vagrant. Once created it will converge the apache2 cookbook on the VM. Finally it uses infrataster to check that the web server responds.

How it works

  1. Uses chef-provisioning to create the VM defined in provision/provision.rb using the vagrant driver defined in provision/vagrant.rb
  2. chef-provisioning converges the run_list as specified in provision/provision.rb
  3. rspec runs infrataster the server is defined in spec/spec_helper.rb with the example test in spec/infrataster/default_spec.rb

chef_infrataster's People

Contributors

afterglow avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.