Coder Social home page Coder Social logo

puppet_test's Introduction

puppet_test

Functional testing of Puppet modules

This repository contain puppet demo environment with automation scripts

All scripts located inside ./docker directory

Main automation script is ./docker/puppet_test.py

Current project is used and tested on SLC6 and should work on RHEL6 as well

Installation and configuration

Make sure SELinux is disabled

To disable SELinux:

  1. Change configuration and reboot server

/etc/selinux/config:

SELINUX=disabled
  1. Make sure forwarding is enabled:
sysctl net.ipv4.ip_forward=1
  1. Install necessary components and build basic docker image
cd ./docker
./prepare_docker.sh
  1. Build image using Dockerfile
cd ./docker
docker build -t spil/slc-puppet:6.5 .

Usage

For module testing use script ./docker/puppet_test.py

Create virtualenv and install dependencies:

virtualenv .env
source .env/bin/activate
pip install -r docker/requirements.txt

Check details of script usage:

./docker/puppet_test.py -h

Examples

  • start testing of modules: nginx,mysql,erlang
  • enable 'quick' mode: if base image exist it will be reused
  • run tests in parallel: use 3 workers
./docker/puppet_test.py --quick -m nginx,mysql,erlang -p 3 --puppet-directory /vagrant/puppet_test
  • run all modules with tests
./docker/puppet_test.py --quick -a -p 10 --puppet-directory /vagrant/puppet_test

Reports

Script will generate 'report' folder (by default inside working directory) With two type of reports:

  • 'html' subdirectory contain overview of testing results in html format,
  • set of directories with details about tests in yaml format

Running as a Jenkins job

Make sure jenkins user are belongs to group 'docker'

usermod -a -G docker jenkins

In order to track changes

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.