Code Monkey home page Code Monkey logo

ansible_docker_repo's Introduction

ansible_docker_repo

Ansible Repository for testing ansible using test kitchen with Docker. The tests are stored in the in /test/integration (as in the chef format)

This demonstrates using test-kitchen, ansible and kitchen-verifier-serverspec to build and verify a server.

Workstation Software Installation

The first thing you need to do is install the test-kitchen environment on your workstation. A useful link is: http://misheska.com/blog/2013/12/26/set-up-a-sane-ruby-cookbook-authoring-environment-for-chef/

The follow instructions are for Windows PC (it will be similar for Mac):

  1. Download and install virtualbox from https://www.virtualbox.org/wiki/Downloads.
  2. Download and install Docker
  3. Download and install the Windows RubyInstaller for 64 bit Ruby 2.x from http://rubyinstaller.org/downloads.
    • Check the option to add ruby to your path.
    • Install the devkit
  4. Then install the following gems
  • gem install test-kitchen
  • gem install kitchen-ansible
  • gem install kitchen-docker
  • gem install kitchen-verifier-serverspec
  1. git clone the repository https://github.com/neillturner/ansible_docker_repo

Check everything installed

In a Docker CLI window in the puppet_docker_repo directory run command

kitchen list

NOTE: I used Windows Kitematic and select Docker CLI from the bottom of the screen to get a Docker CLI Powershell Window This will return a list if everyting is correctly installed.

Create Servers in Docker on your Workstation.

kitchen create ansible-centos-8 -l debug

Build the server.

kitchen converge ansible-centos-8 -l debug

Verify the server.

kitchen verify ansible-centos-8 -l debug

Destroy the server.

kitchen destroy ansible-centos-8 -l debug

References

https://michaelheap.com/test-kitchen-docker-and-centos-7/

ansible_docker_repo's People

Contributors

neillturner avatar

Watchers

 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.