Code Monkey home page Code Monkey logo

kitchen-docs's Introduction

Test Kitchen

Gem Version Build Status

Website https://kitchen.ci/
Source Code https://kitchen.ci/docs/getting-started/introduction/
Slack #test-kitchen channel on Chef Community Slack

Test Kitchen is an integration tool for developing and testing infrastructure code and software on isolated target platforms.

Getting Started Guide

To learn how to install and setup Test Kitchen for developing infrastructure code, check out the Getting Started Guide.

If you want to get going super fast, then try the Quick Start next...

Quick Start

Test Kitchen is a RubyGem and can be installed with:

gem install test-kitchen

If you use Bundler, you can add gem "test-kitchen" to your Gemfile and make sure to run bundle install.

Next add support to your library, Chef cookbook, or empty project with kitchen init:

kitchen init

A kitchen.yml file will be created in your project base directory. This file describes your testing configuration; what you want to test and on which target platforms. Each of these suite and platform combinations are called instances. By default your instances will be converged with Chef Solo and run in Vagrant virtual machines.

Get a listing of your instances with:

kitchen list

Run Chef Infra Client on an instance, in this case default-ubuntu-2004, with:

kitchen converge default-ubuntu-2004

Destroy all instances with:

kitchen destroy

You can clone a Chef Infra cookbook project that contains Test Kitchen support and run through all the instances in serial by running:

kitchen test

Usage

There is help included with the kitchen help subcommand which will list all subcommands and their usage:

kitchen help test

More verbose logging for test-kitchen can be specified when running test-kitchen from the command line using:

kitchen test -l debug

For the provisioner (e.g. chef-solo or chef-infra) add a log_level item to the provisioner section of the .kitchen.yml For more information on setting log_level see the configuration documentation.

Documentation

Documentation is being added on the Test Kitchen website. Please read and contribute to improve them!

Versioning

Test Kitchen aims to adhere to Semantic Versioning 2.0.0.

Community and Ecosystem

If you would like to see a few of the plugins or ecosystem helpers, please look at ECOSYSTEM.md.

Development

Pull requests are very welcome! Make sure your patches are well tested. Ideally create a topic branch for every separate change you make. For example:

  1. Fork the repo
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Authors

Created by Fletcher Nichol ([email protected]).

Maintained by Chef Software and a growing community of contributors.

License

Apache License, Version 2.0 (see LICENSE)

kitchen-docs's People

Contributors

arangamani avatar aspyatkin avatar atalanta avatar calebhailey avatar choongsavvii avatar coderanger avatar czerasz avatar djoos avatar dyson avatar filler avatar fnichol avatar greenmanspirit avatar hwork avatar jsallis avatar markgibbons avatar mattray avatar mkubenka avatar mlafeldt avatar mwrock avatar portertech avatar robbkidd avatar sethvargo avatar sirosen avatar smurawski avatar stephenking avatar svanzoest avatar tas50 avatar tgeerdes avatar tkmarsh avatar webframp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kitchen-docs's Issues

Upgrade Dyno

Currently we are on a Legacy Dyno which prevents us from using the Pipelines feature of Heroku which lets us super easily spin up a version of the app for each PR. Moving to a modern dyno will net us a few other benefits like SSL and better perf to boot.

mention ChefDK

The front page of kitchen.ci still advises you to install Test Kitchen via a gem install -- this is unnecessary since it's bundled with ChefDK, so we should mention that as the preferred option.

Documentation for Shell Provisioner

Moving from test-kitchen/test-kitchen#1440 for @darkn3rd

Shell provisioner has no documentation. I had to look at unit tests and source code to elicit the options for shell provisioner. Currently, there's no documentation that documents the features available for the shell provisioner, other than the source code.

Non-programmer users may likely be intimidated to dive to this level to figure out how to use the program.

Document reboots

Explain all the fun idiosyncrasies of rebooting between Windows and *nix operating systems

provisioner:
  name: chef_zero
  max_retries: 3 # tweak in conjunction with below
  wait_for_retry: 90 # tweak based on machine shutdown speed
  retry_on_exit_code:
    - 35 # chef-client's reboot scheduled exit status
  client_rb:
    exit_status: :enabled # default in 13+
    client_fork: false # don't fork so we get true exit code

Dump git-daemon

It's problematic and since it's meant to be a toy example let's pick something else.

Creating-cookbook: 'kitchen create' - Stuck Waiting for SSH server on 127.0.0.1

Ran into a issue the the instructions following the creating-cookbook kitchen create where upon booting the VM the SSH key couldn't be created. Command just paused at :

==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key

Running on:

  • Chef: 12.16.42
  • Vagrant Version: 1.8.7
  • VirtualBox: 5.0.30
  • Mac OS X: 10.11.6

Fix was found here http://stackoverflow.com/a/40142286/7216518 and involved a edit the .kitchen.yaml to enabled cableconnected1: on

driver:
  name: vagrant
  customize:
    cableconnected1: 'on'

Also while not a issue with kitchen I will include here in case anyone finds it, as I needed to fix to get this far:

Curl broken in macOS vagrant 1.8.7 hashicorp/vagrant#7997
Workaround:

sudo rm -f /opt/vagrant/embedded/bin/curl

Document setting Environments for chef provisioner

provisioner:
  name: chef_zero
  environments_path: test/environments
  client_rb:
    environment: kitchen

For posterity we should note solo_rb vs client_rb even though nobody should need it at this juncture. Also note files in environments_path must be JSON

Move the FAQ

As @cheeseplus suggested, I'm giving you an actionable request to improve the docs. Having the FAQ where it is made it invisible to me. We should be able to navigate to it from the Getting Started Guide as an item below Next Steps.

External links from "Installing Test Kitchen" page is broken

The links from "and the folks over at the #learnchef website have a handy Workstation Setup that we can follow to get us started" are broken.

I forked the docs and added some links to the individual sites (Chef, Vagrant, Git and VirtualBox) because I couldn't find a combined page anymore. I'm happy to create a pull-request, or add the file here, but I read I should discuss on IRC first. Can't find anyone over there to discuss with. Maybe I need to wait longer.

Let me know the best thing to do. Ta

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.