Giter Club home page Giter Club logo

packer-serverspec-example's Introduction

Packer Serverspec Example

wercker status

Packer provides a great way of describing the steps for creating a virtual machine image. But it doesn't have a built-in way of verifying those images.

Serverspec provides a nice framework for writing tests against infrastructure, asserting the operation of services or the installation of packages.

This repo demonstrates a simple integration between Packer and Serverspec, using Serverspec tests to validate the instance provisioning before the image is created.

Installation

First you need to install Packer.

Next download the Puppet modules described in the Puppetfile. For this we're using Bundler which you'll need installed.

bundle install
bundle exec librarian-puppet install

Usage

Now you'll need to set a couple of Amazon environment variables:

export AWS_ACCESS_KEY_ID=xxxx
export AWS_SECRET_ACCESS_KEY=xxxx

And finally run Packer:

packer build template.json

This will boot an AWS instance, install Puppet, use Puppet to install various bits of software, then run the test suite. Only if all of that works will it build the AMI.

packer-serverspec-example's People

Contributors

garethr avatar

Watchers

Zack Zondlo avatar  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.