Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/exceedhl/toft
toft is a library currently supporting testing infrastructure code such as chef, shell scripts with cucumber and lxc on linux machine
https://github.com/exceedhl/toft
Last synced: 3 months ago
JSON representation
toft is a library currently supporting testing infrastructure code such as chef, shell scripts with cucumber and lxc on linux machine
- Host: GitHub
- URL: https://github.com/exceedhl/toft
- Owner: exceedhl
- Created: 2011-09-26T04:01:36.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2022-09-21T17:00:52.000Z (about 2 years ago)
- Last Synced: 2024-07-27T19:44:52.219Z (4 months ago)
- Language: Shell
- Homepage: http://exceedhl.github.com/toft
- Size: 211 KB
- Stars: 167
- Watchers: 10
- Forks: 18
- Open Issues: 10
-
Metadata Files:
- Readme: README.textile
- Changelog: Changelog
Awesome Lists containing this project
README
h2. Toft has released a new version.
Toft 0.0.11 has been released, with puppet and chef data bag support. More details can be found in the "changelog":https://github.com/exceedhl/toft/blob/master/Changelog.
h2. What is Toft
Toft provides deb and rpm packages to simplify the usage of lxc; it also provides pre-created linux images(lucid, natty and centos-6) and scripts to create these images so user can play with lxc containers by simply installing a package and download an images file.
Toft also provides a ruby gem, wrapping common tasks such as managing nodes, running chef recipes, running ssh commands and verifying system status in ruby API; therefore you can use it with test framework such as rspec, cucumber to write tests against chef receipes, packages, scripts.
h2. Motivation
Infrastructure code development is not easy. You make some changes on your chef or shell scripts and wait an amount of time to check the results manually. As a developer I want to easily run the scripts I just wrote on a clean environment and check whether some file or directories exist, whether a package is installed, whether a service is started etc., and I want it fast. Also the whole process should be recorded in automatic tests so that I do not have to manually repeat the whole process everytime, and with these tests I do not have to worry that in the future I or other people will not ruin something working.
While vagrant and cloud service provier such as Amazon already enable us to create and destroy arbitrary environment as we need, the creation and provisioning of those VM nodes tend to be slow. "LXC":http://lxc.sourceforge.net/ provides us one more choice. It takes less time to create and still provides a complete VM environment like vagrant or Amazon provide us.
Toft allows you to manage(create, destroy, configure, check...) a lxc node(or container as they called it) and test your infrastructure code in it. Creating a new lxc node take no more than 10 seconds(depends on your machine power) and most of the time is spent on copy rootfs files. Toft provides api to allow you run chef recipes, ssh commands on the node and assort of checkers to help you check the node status, relieving you from manual result verfication.
h2. How to use it
Check this quick "tutorial":https://github.com/exceedhl/toft/wiki/How-to-use-toft-gem-and-cucumber-to-test-chef-cookbooks to see how to use toft and cucumber to BDD your infrastructure code.
h2. License
MIT: http://rem.mit-license.org