All Projects → elasticdog → Salt Sandbox

elasticdog / Salt Sandbox

Licence: mit
A Vagrant-based Salt development environment for creating new modules

Labels

Projects that are alternatives of or similar to Salt Sandbox

Deaddropdocs
Installation, configuration and security hardening guidance for DeadDrop
Stars: ✭ 87 (-28.69%)
Mutual labels:  puppet
Puppet Gluster
puppet module for gluster
Stars: ✭ 104 (-14.75%)
Mutual labels:  puppet
Puppet Debugger
A interactive live debugger and REPL for the puppet language
Stars: ✭ 117 (-4.1%)
Mutual labels:  puppet
Drupal Lxc Vagrant Docker
Deploy and develop on Drupal with LXC, Vagrant and Docker. Includes: nginx,php-fpm,apc,xhprof,mysql,phpmyadim,composer
Stars: ✭ 94 (-22.95%)
Mutual labels:  puppet
Vagrant Baseline
Dev sandbox with batteries included
Stars: ✭ 100 (-18.03%)
Mutual labels:  puppet
Simp Core
The base SIMP build repository
Stars: ✭ 111 (-9.02%)
Mutual labels:  puppet
Puppet Php
Generic Puppet module to manage PHP on many platforms
Stars: ✭ 83 (-31.97%)
Mutual labels:  puppet
Puppet Mcollective
MCollective Server and Client Puppet Module
Stars: ✭ 121 (-0.82%)
Mutual labels:  puppet
Vagrant Golang
A very easy to use golang environment for use with vagrant.
Stars: ✭ 104 (-14.75%)
Mutual labels:  puppet
Loom
Elegant deployment with Fabric and Puppet.
Stars: ✭ 115 (-5.74%)
Mutual labels:  puppet
Puppetlabs Openstack
Puppet Labs Reference and Testing Deployment Module for OpenStack (master tracks Kilo)
Stars: ✭ 95 (-22.13%)
Mutual labels:  puppet
Hiera Http
HTTP backend for Hiera
Stars: ✭ 95 (-22.13%)
Mutual labels:  puppet
Jerakia
A pluggable and extendable data lookup system
Stars: ✭ 111 (-9.02%)
Mutual labels:  puppet
Puppet Mongodb
mongodb installation
Stars: ✭ 90 (-26.23%)
Mutual labels:  puppet
Cis Puppet
Center for Internet Security Linux Benchmark implementation for PuppetLabs
Stars: ✭ 117 (-4.1%)
Mutual labels:  puppet
Sandbox Symfony
Experimental Symfony Sandbox on Vagrant
Stars: ✭ 83 (-31.97%)
Mutual labels:  puppet
Govuk Puppet
Puppet manifests used to provision the main GOV.UK web stack
Stars: ✭ 109 (-10.66%)
Mutual labels:  puppet
Serverfarmer
Manage multiple servers with different operating systems, configurations, requirements etc. for many separate customers in an outsourcing model.
Stars: ✭ 122 (+0%)
Mutual labels:  puppet
Puppetlabs spec helper
A set of shared spec helpers specific to Puppetlabs projects
Stars: ✭ 121 (-0.82%)
Mutual labels:  puppet
Puppet Nodejs
Puppet module to install nodejs and global npm packages
Stars: ✭ 111 (-9.02%)
Mutual labels:  puppet

Description

Salt Sandbox is a multi-VM Vagrant-based Salt development environment used for creating and testing new Salt state modules outside of your production environment. It's also a great way to learn firsthand about Salt and its remote execution capabilities.

Salt Sandbox will set up three separate virtual machines:

  • salt.example.com - the Salt master server
  • minion1.example.com - the first Salt minion machine
  • minion2.example.com - the second Salt minion machine

These VMs can be used in conjunction to segregate and test your modules based on node groups, top file environments, grain values, etc. You can even test modules on different Linux distributions or release versions to better match your production infrastructure.

Requirements

To use Salt Sandbox, you must have the following items installed and working:

Salt Sandbox has been designed for and tested with Vagrant base boxes running:

  • CentOS 5.7
  • Ubuntu 10.04 - Lucid Lynx

...although it may work just fine with other distributions/versions.

Usage

Make sure you have a compatible Vagrant base box (if you don't have one already, it will download a 64-bit CentOS 5.7 box for you), and then you should be good to clone this repo and go:

$ vagrant box list
centos57
$ git clone git://github.com/elasticdog/salt-sandbox.git
$ cd salt-sandbox/

Initial Startup

To bring up the Salt Sandbox environment, issue the following command:

$ vagrant up

The following tasks will be handled automatically:

  1. The Salt master daemon will be installed and enabled on the master machine.
  2. The Salt minion daemon will be installed and enabled on all three machines.
  3. A host-only network will be set up with all machines knowing how to communicate with each other.
  4. All minion public keys will be automatically accepted by the master server.
  5. The master server will utilize the top.sls file and base/ directory that exist outside of the VMs (in your salt-sandbox Git working directory) by utilizing VirtualBox's shared folder feature.

All of this is handled using Vagrant's provisioning capabilities and is controlled by the manifests under the provision/ directory. In theory, you should never have to touch any of that code directly unless you're working to improve Salt Sandbox.

If you wish to change the domain name of the VMs (it defaults to example.com), edit the "domain" variable at the top of Vagrantfile and reload the machines:

$ vim Vagrantfile
$ vagrant reload

Developing New Modules

To start developing a new SLS module, just create the standard module structure under base/ in your salt-sandbox Git working directory (an example "helloworld" module should exist there already). This directory is automatically in the Salt master server's file_roots path, and any changes will be picked up immediately.

$ mkdir -p base/mymodule
$ vim base/mymodule/init.sls

To have your module actually applied to one or more of the minions, edit the top.sls file and specify how it should be used during state execution...that's it!

Check Your Handiwork

To log on to the virtual machines and see the result of your Salt modules, just use standard Vagrant Multi-Machine Environment commands, and provide the proper VM name (master, minion1, or minion2):

$ vagrant ssh master

Then instruct all minions to execute a highstate call and apply any applicable modules:

[[email protected] ~]$ sudo salt '*' state.highstate

License

Salt Sandbox is provided under the terms of The MIT License.

Copyright © 2012, Aaron Bull Schaefer.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].