Giter VIP home page Giter VIP logo

chef_vpc_toolkit's Introduction

Chef VPC Toolkit

Chef Virtual Private Cloud Toolkit

Description

The Chef VPC Toolkit is a set of Rake tasks that provide a framework to help automate the creation and configuration of “identical” VPC server groups in the cloud. The Chef VPC Toolkit provides the ability to create “toolkit projects” that can be used by team members and continuous integration systems to spin up groups of servers for development and testing. Configuration information is stored in JSON and YAML formats which can be easily parsed, edited, and version controlled.

Features

-Supports Rackspace Cloud Servers.

-Uses Cloud Servers VPC to create secure groups of servers in the public cloud.

-Supports Debian, Ubuntu, Fedora, RHEL, and Centos.

-Creates a local Chef Server within the server group.

-Installs and configures a Chef client on each node with the Chef Server.

-Automatically configures Chef Cookbooks, Databags, Roles, and Node attributes.

Installation

Requires Ruby and Rubygems. The app was developed with Ruby 1.8.7 and 1.9.2.

The following gems are required when developing/building the toolkit gem:

rake builder (2.1.2) json (> 1.4.3) uuidtools jeweler

To install the gem:

rake build gem install chef-vpc-toolkit

Examples

Example commands:

- Create a new server group, upload cookbooks, install chef on all the nodes, sync share data and cookbooks.

$ rake create

- List your currently running server groups.

$ rake group:list

- SSH into the current (most recently created) server group

$ rake ssh

- SSH into a server group with an ID of 3

$ rake ssh GROUP_ID=3

- Delete the server group with an ID of 3

$ rake group:delete GROUP_ID=3

- Rebuild/Re-Chef the ‘db1’ server in the most recently created server group

$ rake rechef SERVER_NAME=db1

- Connect to a group as a VPN client. Currently supports and requires

Network Manager Openvpn, nmcli, and nm-applet (Linux only).

$ rake vpn

- Disconnect from group as a VPN client

$ rake vpn:disconnect

- Connect to a Windows machine using rdesktop.

$ rake rdesktop SERVER_NAME=win1

Bash Automation Script

The following is an example bash script to spin up a group and run commands via SSH. Useful for CI automation in Hudson, etc.

#!/bin/bash

chef-vpc-toolkit -v trap “rake group:delete” INT TERM EXIT # cleanup the group on exit

# create a server group and Chef (includes Chef Server, cookbooks, clients) rake create

# wait for Chef clients to finish running rake chef:poll_clients

# Run some scripts on the login server rake ssh bash <<-EOF_BASH echo ‘It works!’ EOF_BASH

Author

Dan Prince <[email protected]>

License

See COPYING for license information. Copyright © 2010-2011, Rackspace US, Inc.

chef_vpc_toolkit's People

Contributors

mheffner avatar emonty avatar

Stargazers

Raghav Palekar avatar

Watchers

Raghav Palekar avatar James Cloos 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.