This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import os | |
from setuptools import setup, find_packages | |
def parse_requirements(): | |
"""Rudimentary parser for the `requirements.txt` file | |
We just want to separate regular packages from links to pass them to the | |
`install_requires` and `dependency_links` params of the `setup()` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vagrant plugin install vagrant-chef-zero | |
INFO global: Vagrant version: 1.1.2 | |
INFO manager: Registered plugin: box command | |
INFO manager: Registered plugin: destroy command | |
INFO manager: Registered plugin: halt command | |
INFO manager: Registered plugin: init command | |
INFO manager: Registered plugin: package command | |
INFO manager: Registered plugin: plugin command | |
INFO manager: Registered plugin: provision command | |
INFO manager: Registered plugin: reload command |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/local/Cellar/ruby/1.9.3-p385/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/testtask.rb:104:in `block (3 levels) in define' | |
/usr/local/Cellar/ruby/1.9.3-p385/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/file_utils.rb:45:in `call' | |
/usr/local/Cellar/ruby/1.9.3-p385/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/file_utils.rb:45:in `sh' | |
/usr/local/Cellar/ruby/1.9.3-p385/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/file_utils_ext.rb:37:in `sh' | |
/usr/local/Cellar/ruby/1.9.3-p385/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/file_utils.rb:82:in `ruby' | |
/usr/local/Cellar/ruby/1.9.3-p385/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/file_utils_ext.rb:37:in `ruby' | |
/usr/local/Cellar/ruby/1.9.3-p385/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/testtask.rb:100:in `block (2 levels) in define' | |
/usr/local/Cellar/ruby/1.9.3-p385/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/file_utils_ext.rb:58:in `verbose' | |
/usr/local/Cellar/ruby/1.9.3-p385/lib/ruby/gems/1.9.1/gems/rake-10.0.4/lib/rake/testtask.rb:98:in `block in define' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
puts "Starting Bake" | |
puts config[:bake] | |
if config[:bake] | |
image_name = config[:bake] | |
puts image_name | |
image_description = (config[:run_list] || config[:role]).join(', ') | |
puts image_description | |
ami_info = connection.create_image(@server.identity, image_name, image_description) | |
puts ami_info.inspect | |
new_ami_id = ami_info.body['imageId'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: clean install | |
install: | |
bundle install | |
bundle exec berks install | |
test: | |
@bundle exec bash ${CHEF_PATH}/scripts/knife_test.sh | |
@bundle exec bash ${CHEF_PATH}/scripts/foodcritic_test.sh | |
@bundle exec bash ${CHEF_PATH}/scripts/rspec_test.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function download_cookbook() { | |
cookbook=${1} | |
if _check_input ${cookbook} | |
then | |
_clone_cookbook ${cookbook} | |
_link_cookbook_files ${cookbook} | |
cd ${CHEF_PATH}/cookbooks/${cookbook} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def ptbr_laugh; (1..(1 + rand * 10)).map {("h" + ((rand * 4) + 1).to_i.times.map {%w(a e i o u)[rand * 5]}.join )}.join; end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
url = node['redisio']['mirror'] | |
base_name = node['redisio']['base_name'] | |
version = node['redisio']['version'] | |
extension = node['redisio']['artifact_type'] | |
tarball_name = "#{base_name}#{version}" | |
tarball = "#{tarball_name}.#{extension}" | |
download_url = "#{url}/#{tarball}" | |
download_dir = node['redisio']['download_dir'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
url = node['redisio']['mirror'] | |
base_name = node['redisio']['base_name'] | |
version = node['redisio']['version'] | |
extension = node['redisio']['artifact_type'] | |
tarball_name = "#{base_name}#{version}" | |
tarball = "#{tarball_name}.#{extension}" | |
download_url = "#{url}/#{tarball}" | |
download_dir = node['redisio']['download_dir'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_open_point(existing_device_prefix, new_device_range_start, new_device_range_stop) | |
# existing_device_prefix should be something like 'xvd' or 'md' | |
# new_device_range should be similar to '0' and '9' or 'f' and 'p' | |
possible_attach_points = (new_device_range_start..new_device_range_stop).map do |drive_letter| | |
"/dev/#{existing_device_prefix}#{drive_letter}" | |
end | |
Chef::Log.debug("#{@new_resource} Possible Attach Points: #{possible_attach_points}") | |
# Get a list of in use devices (fold numbered partitions together if looking at disk drives) | |
existing_devices = `ls /dev/#{existing_device_prefix}*`.split().each do |existing_device| |