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
| namespace :ec2 do | |
| # setup chef config | |
| # assumes this file is sibling to .chef dir, ex: CHEF_REPO/tasks | |
| config = File.join(File.dirname(__FILE__), '..', '.chef', 'knife.rb') | |
| Chef::Config.from_file(config) | |
| require 'active_support' | |
| require 'aws' | |
| desc 'Delete any ec2-based chef nodes that no longer exist' |
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
| bash -c ' | |
| announce() { | |
| echo "" | |
| echo "*** $1 ***" | |
| } | |
| announce "Updating SSL CA's" | |
| curl http://curl.haxx.se/ca/cacert.pem -o /etc/pki/tls/certs/ca-bundle.crt | |
| announce "Installing Yum Repositories" |
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
| ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}" | |
| ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " | |
| ZSH_THEME_GIT_PROMPT_DIRTY="%{$reset_color%} %{$fg[red]%}✗%{$reset_color%}" | |
| ZSH_THEME_GIT_PROMPT_CLEAN="%{$reset_color%} %{$fg[green]%}✔%{$reset_color%}" | |
| setopt prompt_subst | |
| local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" | |
| RPS1="${return_code}" | |
| PROMPT='%(?,%{%F{cyan}%},%{%F{red}%})%m:%{%F{white}%}%~ %{%F{gray}%}$(rvm_prompt_info)%{$reset_color%} $(git_prompt_info)%#%{$reset_color%} ' |
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
| config['mongo'] = EventMachine::Synchrony::ConnectionPool.new(size: 20) do | |
| conn = EM::Mongo::Connection.new('localhost', 27017, 1, {:reconnect_in => 1}) | |
| conn.db('analytics') | |
| 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
| Bluepill.application("graylog2", :log_file => "/var/log/bluepill/graylog2.log") do |app| | |
| app.uid = "root" | |
| app.gid = "root" | |
| app.process("server") do |process| | |
| process.working_dir = "/var/graylog2/server" | |
| process.start_command = "/usr/bin/java -jar graylog2-server.jar -DconfigPath=/etc/graylog2.conf" | |
| process.daemonize = true | |
| process.start_grace_time = 10.seconds |
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
| begin | |
| require 'mongo' | |
| rescue LoadError | |
| Chef::Log.warn("Missing gem 'mongo'") | |
| %w{ mongo bson_ext }.each do |mongo_gem| | |
| gem_install = gem_package mongo_gem do | |
| action :nothing | |
| end | |
| gem_install.run_action(:install) | |
| 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
| provides "gamespy" | |
| require_plugin "kernel" | |
| require_plugin "network" | |
| def get_ip_address(name, eth) | |
| network[:interfaces][eth][:addresses].each do |key, info| | |
| gamespy[name] = key if info['family'] == 'inet' | |
| end | |
| 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
| { | |
| "id": "poweredbygamespy_com", | |
| "server_roles": ["gst-app-web"], | |
| "type": {"gst-app-web": ["php_apache2"]}, | |
| "cookbook": "gst-app", | |
| "repository": "git@github.com:gamespy-tech/site-pbg.git", | |
| "revision": {"production": "v1.2", "staging": "develop", "development": "develop"}, | |
| "deploy_to": "/z/www/poweredbygamespy.com", | |
| "php_modules": ["gd", "curl", "mysql"], | |
| "force": {"production": false}, |
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
| From: Brian Akins < brian@akins.org> | |
| To: chef < chef@lists.opscode.com> | |
| Subject: [chef] Data bag implementation for chef-solo | |
| Date: Tue, 1 Feb 2011 10:42:05 -0500 | |
| We often use chef-solo for quick testing, etc. This is our extremely simple implementation of data bags for chef-solo. Add "data_bag_path /some/dir/data_bags" to your solo.rb and add this into your libraries: | |
| if Chef::Config[:solo] | |
| class Chef | |
| module Mixin | |
| module Language |
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
| require 'irb/completion' | |
| require 'irb/ext/save-history' | |
| require 'map_by_method' | |
| require 'what_methods' | |
| require 'pp' | |
| require 'hirb' | |
| require 'wirble' | |
| require 'ap' | |
| Wirble.init |