Showing preview only (753K chars total). Download the full file or copy to clipboard to get everything.
Repository: auser/poolparty
Branch: master
Commit: 8b4af051833a
Files: 341
Total size: 659.8 KB
Directory structure:
gitextract_s60rxf8b/
├── .gitignore
├── .gitmodules
├── .rdebugrc
├── .rvmrc
├── Gemfile
├── License.txt
├── Makefile
├── Manifest.txt
├── README.rdoc
├── Rakefile
├── Vagrantfile
├── bin/
│ ├── cloud
│ ├── cloud-bootstrap
│ ├── cloud-compile
│ ├── cloud-configure
│ ├── cloud-console
│ ├── cloud-contract
│ ├── cloud-cssh
│ ├── cloud-expand
│ ├── cloud-list
│ ├── cloud-reboot
│ ├── cloud-rsync
│ ├── cloud-run
│ ├── cloud-show
│ ├── cloud-ssh
│ ├── cloud-start
│ ├── cloud-terminate
│ └── cloud-vnc
├── config/
│ └── requirements.rb
├── examples/
│ ├── README.md
│ ├── chef_cloud/
│ │ ├── chef_repo/
│ │ │ ├── .gitignore
│ │ │ ├── README
│ │ │ ├── Rakefile
│ │ │ ├── certificates/
│ │ │ │ └── README
│ │ │ ├── config/
│ │ │ │ ├── client.rb.example
│ │ │ │ ├── rake.rb
│ │ │ │ ├── server.rb.example
│ │ │ │ └── solo.rb.example
│ │ │ ├── cookbooks/
│ │ │ │ ├── README
│ │ │ │ ├── apache2/
│ │ │ │ │ ├── README.rdoc
│ │ │ │ │ ├── attributes/
│ │ │ │ │ │ └── apache.rb
│ │ │ │ │ ├── definitions/
│ │ │ │ │ │ ├── apache_conf.rb
│ │ │ │ │ │ ├── apache_module.rb
│ │ │ │ │ │ ├── apache_site.rb
│ │ │ │ │ │ └── web_app.rb
│ │ │ │ │ ├── files/
│ │ │ │ │ │ └── default/
│ │ │ │ │ │ └── apache2_module_conf_generate.pl
│ │ │ │ │ ├── metadata.json
│ │ │ │ │ ├── metadata.rb
│ │ │ │ │ ├── recipes/
│ │ │ │ │ │ ├── default.rb
│ │ │ │ │ │ ├── god_monitor.rb
│ │ │ │ │ │ ├── mod_alias.rb
│ │ │ │ │ │ ├── mod_auth_basic.rb
│ │ │ │ │ │ ├── mod_auth_digest.rb
│ │ │ │ │ │ ├── mod_authn_file.rb
│ │ │ │ │ │ ├── mod_authnz_ldap.rb
│ │ │ │ │ │ ├── mod_authz_default.rb
│ │ │ │ │ │ ├── mod_authz_groupfile.rb
│ │ │ │ │ │ ├── mod_authz_host.rb
│ │ │ │ │ │ ├── mod_authz_user.rb
│ │ │ │ │ │ ├── mod_autoindex.rb
│ │ │ │ │ │ ├── mod_cgi.rb
│ │ │ │ │ │ ├── mod_dav.rb
│ │ │ │ │ │ ├── mod_dav_svn.rb
│ │ │ │ │ │ ├── mod_deflate.rb
│ │ │ │ │ │ ├── mod_dir.rb
│ │ │ │ │ │ ├── mod_env.rb
│ │ │ │ │ │ ├── mod_expires.rb
│ │ │ │ │ │ ├── mod_fcgid.rb
│ │ │ │ │ │ ├── mod_headers.rb
│ │ │ │ │ │ ├── mod_ldap.rb
│ │ │ │ │ │ ├── mod_log_config.rb
│ │ │ │ │ │ ├── mod_mime.rb
│ │ │ │ │ │ ├── mod_negotiation.rb
│ │ │ │ │ │ ├── mod_php5.rb
│ │ │ │ │ │ ├── mod_proxy.rb
│ │ │ │ │ │ ├── mod_proxy_ajp.rb
│ │ │ │ │ │ ├── mod_proxy_balancer.rb
│ │ │ │ │ │ ├── mod_proxy_connect.rb
│ │ │ │ │ │ ├── mod_proxy_http.rb
│ │ │ │ │ │ ├── mod_python.rb
│ │ │ │ │ │ ├── mod_rails.rb
│ │ │ │ │ │ ├── mod_rewrite.rb
│ │ │ │ │ │ ├── mod_setenvif.rb
│ │ │ │ │ │ ├── mod_ssl.rb
│ │ │ │ │ │ └── mod_status.rb
│ │ │ │ │ └── templates/
│ │ │ │ │ └── default/
│ │ │ │ │ ├── a2dismod.erb
│ │ │ │ │ ├── a2dissite.erb
│ │ │ │ │ ├── a2enmod.erb
│ │ │ │ │ ├── a2ensite.erb
│ │ │ │ │ ├── apache2.conf.erb
│ │ │ │ │ ├── apache2.god.erb
│ │ │ │ │ ├── charset.erb
│ │ │ │ │ ├── default-site.erb
│ │ │ │ │ ├── mods/
│ │ │ │ │ │ ├── README
│ │ │ │ │ │ ├── alias.conf.erb
│ │ │ │ │ │ ├── autoindex.conf.erb
│ │ │ │ │ │ ├── deflate.conf.erb
│ │ │ │ │ │ ├── dir.conf.erb
│ │ │ │ │ │ ├── fcgid.conf.erb
│ │ │ │ │ │ ├── mime.conf.erb
│ │ │ │ │ │ ├── negotiation.conf.erb
│ │ │ │ │ │ ├── proxy.conf.erb
│ │ │ │ │ │ ├── setenvif.conf.erb
│ │ │ │ │ │ ├── ssl.conf.erb
│ │ │ │ │ │ └── status.conf.erb
│ │ │ │ │ ├── port_apache.erb
│ │ │ │ │ ├── ports.conf.erb
│ │ │ │ │ ├── security.erb
│ │ │ │ │ └── web_app.conf.erb
│ │ │ │ ├── apt/
│ │ │ │ │ ├── files/
│ │ │ │ │ │ └── default/
│ │ │ │ │ │ ├── apt-cacher
│ │ │ │ │ │ ├── apt-cacher.conf
│ │ │ │ │ │ └── apt-proxy-v2.conf
│ │ │ │ │ ├── metadata.json
│ │ │ │ │ ├── metadata.rb
│ │ │ │ │ └── recipes/
│ │ │ │ │ ├── cacher.rb
│ │ │ │ │ ├── default.rb
│ │ │ │ │ └── proxy.rb
│ │ │ │ ├── bootstrap/
│ │ │ │ │ ├── README.rdoc
│ │ │ │ │ ├── attributes/
│ │ │ │ │ │ └── bootstrap.rb
│ │ │ │ │ ├── metadata.json
│ │ │ │ │ ├── metadata.rb
│ │ │ │ │ ├── recipes/
│ │ │ │ │ │ ├── client.rb
│ │ │ │ │ │ ├── default.rb
│ │ │ │ │ │ └── server.rb
│ │ │ │ │ └── templates/
│ │ │ │ │ └── default/
│ │ │ │ │ ├── client.rb.erb
│ │ │ │ │ ├── server.rb.erb
│ │ │ │ │ ├── sv-chef-client-log-run.erb
│ │ │ │ │ ├── sv-chef-client-run.erb
│ │ │ │ │ ├── sv-chef-indexer-log-run.erb
│ │ │ │ │ ├── sv-chef-indexer-run.erb
│ │ │ │ │ ├── sv-chef-server-log-run.erb
│ │ │ │ │ └── sv-chef-server-run.erb
│ │ │ │ ├── chef/
│ │ │ │ │ ├── README.rdoc
│ │ │ │ │ ├── attributes/
│ │ │ │ │ │ └── chef.rb
│ │ │ │ │ ├── metadata.json
│ │ │ │ │ ├── metadata.rb
│ │ │ │ │ ├── recipes/
│ │ │ │ │ │ ├── client.rb
│ │ │ │ │ │ ├── default.rb
│ │ │ │ │ │ ├── server.rb
│ │ │ │ │ │ └── server_proxy.rb
│ │ │ │ │ └── templates/
│ │ │ │ │ └── default/
│ │ │ │ │ ├── chef_server.conf.erb
│ │ │ │ │ ├── client.rb.erb
│ │ │ │ │ └── server.rb.erb
│ │ │ │ ├── ec2/
│ │ │ │ │ ├── attributes/
│ │ │ │ │ │ ├── ec2_metadata.rb
│ │ │ │ │ │ └── ec2_recipe_options.rb
│ │ │ │ │ ├── metadata.rb
│ │ │ │ │ └── recipes/
│ │ │ │ │ └── default.rb
│ │ │ │ ├── ganglia/
│ │ │ │ │ ├── README.rdoc
│ │ │ │ │ ├── attributes/
│ │ │ │ │ │ └── default.rb
│ │ │ │ │ ├── metadata.rb
│ │ │ │ │ ├── recipes/
│ │ │ │ │ │ ├── default.rb
│ │ │ │ │ │ ├── gmetad.rb
│ │ │ │ │ │ ├── monitor_sshd.rb
│ │ │ │ │ │ ├── monitor_watson.rb
│ │ │ │ │ │ └── web.rb
│ │ │ │ │ └── templates/
│ │ │ │ │ └── default/
│ │ │ │ │ ├── bin/
│ │ │ │ │ │ ├── gmetad.erb
│ │ │ │ │ │ ├── gmond.erb
│ │ │ │ │ │ └── monitors/
│ │ │ │ │ │ ├── sshd_ganglia.sh.erb
│ │ │ │ │ │ └── watson_channels.sh.erb
│ │ │ │ │ ├── ganglia-web-conf.php.erb
│ │ │ │ │ ├── gmetad.conf.erb
│ │ │ │ │ ├── gmond.conf.erb
│ │ │ │ │ └── jaunty.sources.list.erb
│ │ │ │ ├── ntp/
│ │ │ │ │ ├── attributes/
│ │ │ │ │ │ └── ntp.rb
│ │ │ │ │ ├── metadata.json
│ │ │ │ │ ├── metadata.rb
│ │ │ │ │ ├── recipes/
│ │ │ │ │ │ └── default.rb
│ │ │ │ │ └── templates/
│ │ │ │ │ └── default/
│ │ │ │ │ └── ntp.conf.erb
│ │ │ │ ├── rsyslog/
│ │ │ │ │ ├── README.rdoc
│ │ │ │ │ ├── attributes/
│ │ │ │ │ │ └── rsyslog.rb
│ │ │ │ │ ├── files/
│ │ │ │ │ │ ├── default/
│ │ │ │ │ │ │ └── rsyslog.default
│ │ │ │ │ │ ├── ubuntu-8.04/
│ │ │ │ │ │ │ └── rsyslog.default
│ │ │ │ │ │ └── ubuntu-9.10/
│ │ │ │ │ │ └── rsyslog.default
│ │ │ │ │ ├── metadata.json
│ │ │ │ │ ├── metadata.rb
│ │ │ │ │ ├── recipes/
│ │ │ │ │ │ ├── client.rb
│ │ │ │ │ │ ├── default.rb
│ │ │ │ │ │ └── server.rb
│ │ │ │ │ └── templates/
│ │ │ │ │ ├── default/
│ │ │ │ │ │ ├── remote.conf.erb
│ │ │ │ │ │ ├── rsyslog.conf.erb
│ │ │ │ │ │ └── server.conf.erb
│ │ │ │ │ └── ubuntu-9.10/
│ │ │ │ │ ├── 50-default.conf.erb
│ │ │ │ │ ├── remote.conf.erb
│ │ │ │ │ └── server.conf.erb
│ │ │ │ └── runit/
│ │ │ │ ├── attributes/
│ │ │ │ │ └── sv_bin.rb
│ │ │ │ ├── definitions/
│ │ │ │ │ └── runit_service.rb
│ │ │ │ ├── files/
│ │ │ │ │ ├── ubuntu-6.10/
│ │ │ │ │ │ └── runsvdir
│ │ │ │ │ ├── ubuntu-7.04/
│ │ │ │ │ │ └── runsvdir
│ │ │ │ │ ├── ubuntu-7.10/
│ │ │ │ │ │ └── runsvdir
│ │ │ │ │ └── ubuntu-8.04/
│ │ │ │ │ └── runsvdir
│ │ │ │ ├── metadata.json
│ │ │ │ ├── metadata.rb
│ │ │ │ └── recipes/
│ │ │ │ └── default.rb
│ │ │ ├── roles/
│ │ │ │ ├── README
│ │ │ │ └── chef-upgrade.rb
│ │ │ └── site-cookbooks/
│ │ │ ├── README
│ │ │ ├── hosts/
│ │ │ │ ├── attributes/
│ │ │ │ │ └── hosts.rb
│ │ │ │ ├── metadata.rb
│ │ │ │ ├── recipes/
│ │ │ │ │ └── default.rb
│ │ │ │ └── templates/
│ │ │ │ └── default/
│ │ │ │ └── hosts.erb
│ │ │ ├── sysadmin/
│ │ │ │ └── recipes/
│ │ │ │ └── default.rb
│ │ │ └── ubuntu/
│ │ │ ├── metadata.json
│ │ │ ├── metadata.rb
│ │ │ ├── recipes/
│ │ │ │ └── default.rb
│ │ │ └── templates/
│ │ │ └── default/
│ │ │ └── sources.list.erb
│ │ └── user_data
│ ├── chef_cloud.rb
│ ├── ec2_infrastructure_only.rb
│ ├── knock.sh
│ ├── rds_cloud.rb
│ └── simple.rb
├── lib/
│ ├── cloud_providers/
│ │ ├── cloud_provider.rb
│ │ ├── connections.rb
│ │ ├── default/
│ │ │ ├── base.rb
│ │ │ └── helpers/
│ │ │ └── base_helper.rb
│ │ ├── ec2/
│ │ │ ├── ec2.rb
│ │ │ ├── ec2_instance.rb
│ │ │ └── helpers/
│ │ │ ├── authorize.rb
│ │ │ ├── ec2_helper.rb
│ │ │ ├── elastic_auto_scaler.rb
│ │ │ ├── elastic_block_device_mapping.rb
│ │ │ ├── elastic_block_store.rb
│ │ │ ├── elastic_block_store_group.rb
│ │ │ ├── elastic_ip.rb
│ │ │ ├── elastic_load_balancer.rb
│ │ │ ├── rds_instance.rb
│ │ │ ├── revoke.rb
│ │ │ └── security_group.rb
│ │ └── remote_instance.rb
│ ├── cloud_providers.rb
│ ├── core/
│ │ ├── array.rb
│ │ ├── hash.rb
│ │ ├── object.rb
│ │ ├── string.rb
│ │ └── symbol.rb
│ ├── keypair.rb
│ ├── poolparty/
│ │ ├── base.rb
│ │ ├── chef.rb
│ │ ├── chef_attribute.rb
│ │ ├── chef_client.rb
│ │ ├── chef_solo.rb
│ │ ├── cloud.rb
│ │ ├── pool.rb
│ │ ├── pool_party_error.rb
│ │ └── version.rb
│ └── poolparty.rb
├── poolparty.gemspec
├── setup.rb
├── test/
│ ├── fixtures/
│ │ ├── bad_perms_test_key
│ │ ├── chef/
│ │ │ └── recipes/
│ │ │ └── sudo/
│ │ │ ├── attributes/
│ │ │ │ └── sudoers.rb
│ │ │ ├── recipes/
│ │ │ │ └── default.rb
│ │ │ └── templates/
│ │ │ └── default/
│ │ │ └── sudoers.erb
│ │ ├── clouds/
│ │ │ ├── rds_cloud.rb
│ │ │ ├── rds_missing_params.rb
│ │ │ ├── simple_cloud.rb
│ │ │ ├── ssh_cloud.rb
│ │ │ └── vmware_cloud.rb
│ │ ├── ec2/
│ │ │ ├── ec2-describe-instances_response_body.xml
│ │ │ ├── ec2-describe-security-groups_response_body.xml
│ │ │ ├── ec2-run-instances_response_body.xml
│ │ │ ├── ec2-terminate-instances_response_body.xml
│ │ │ ├── elb-describe-load-balancers.xml
│ │ │ └── rds-describe-db-instances-empty_response_body.xml
│ │ ├── keys/
│ │ │ ├── pem_key.pem
│ │ │ ├── pem_pub_key.pem
│ │ │ ├── test_key
│ │ │ └── test_pub_key
│ │ ├── resources/
│ │ │ ├── fake_plugin.rb
│ │ │ ├── fake_resource.rb
│ │ │ ├── fake_subclassed_plugin.rb
│ │ │ └── random_proc_file.rb
│ │ ├── templates/
│ │ │ └── apache_conf.erb
│ │ └── test_template.erb
│ ├── lib/
│ │ ├── core/
│ │ │ ├── array_test.rb
│ │ │ ├── hash_test.rb
│ │ │ ├── object_test.rb
│ │ │ ├── string_test.rb
│ │ │ └── symbol_test.rb
│ │ └── poolparty/
│ │ ├── cloud_test.rb
│ │ ├── keypair_test.rb
│ │ ├── pool_party_error_test.rb
│ │ ├── pool_test.rb
│ │ └── rds_test.rb
│ ├── test_helper.rb
│ └── test_methods.rb
└── vendor/
└── gems/
├── dslify/
│ ├── .gitignore
│ ├── LICENSE
│ ├── README.rdoc
│ ├── Rakefile
│ ├── VERSION.yml
│ ├── dslify.gemspec
│ ├── lib/
│ │ └── dslify.rb
│ └── test/
│ ├── dslify_test.rb
│ └── test_helper.rb
├── git-style-binaries/
│ ├── .document
│ ├── .gitignore
│ ├── .gitmodules
│ ├── README.markdown
│ ├── Rakefile
│ ├── VERSION.yml
│ ├── doc/
│ │ ├── EXAMPLES
│ │ └── poolparty-binaries.screenplay
│ ├── git-style-binaries.gemspec
│ ├── lib/
│ │ ├── ext/
│ │ │ ├── colorize.rb
│ │ │ └── core.rb
│ │ ├── git-style-binary/
│ │ │ ├── autorunner.rb
│ │ │ ├── command.rb
│ │ │ ├── commands/
│ │ │ │ └── help.rb
│ │ │ ├── helpers/
│ │ │ │ ├── name_resolver.rb
│ │ │ │ └── pager.rb
│ │ │ └── parser.rb
│ │ └── git-style-binary.rb
│ └── test/
│ ├── fixtures/
│ │ ├── flickr
│ │ ├── flickr-download
│ │ ├── wordpress
│ │ ├── wordpress-categories
│ │ ├── wordpress-list
│ │ └── wordpress-post
│ ├── git-style-binary/
│ │ └── command_test.rb
│ ├── git_style_binary_test.rb
│ ├── running_binaries_test.rb
│ ├── shoulda_macros/
│ │ └── matching_stdio.rb
│ └── test_helper.rb
├── searchable_paths/
│ ├── .document
│ ├── .gitignore
│ ├── LICENSE
│ ├── README.rdoc
│ ├── Rakefile
│ ├── lib/
│ │ └── searchable_paths.rb
│ └── test/
│ ├── searchable_paths_test.rb
│ └── test_helper.rb
├── trollop/
│ ├── FAQ.txt
│ ├── History.txt
│ ├── Manifest.txt
│ ├── README.txt
│ ├── Rakefile
│ ├── lib/
│ │ └── trollop.rb
│ ├── release-script.txt
│ ├── test/
│ │ └── test_trollop.rb
│ └── www/
│ └── index.html
└── xml-simple/
└── lib/
└── xmlsimple.rb
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
examples-private/
.vagrant
vendor/cache
/trash/
rdoc/*
.com.apple.timemachine.supported
.DS_Store
*tmp*
pkg/*.tgz
pkg/*.gem
pkg/poolparty*/*
.git/
log/*
test_manifest.pp
**/*/erl_crash.dump
log
*.beam
ri/
.autosession.vim
tags
.session
clouds.rb
test/test_dir/
examples/thrift/erlang/deps/thrift/ebin/*.beam
examples/thrift/erlang/ebin/*.beam
*.swp
*~
\#*\#
================================================
FILE: .gitmodules
================================================
[submodule "vendor/gems/amazon-ec2"]
path = vendor/gems/amazon-ec2
url = git://github.com/grempe/amazon-ec2.git
================================================
FILE: .rdebugrc
================================================
set autoeval on
================================================
FILE: .rvmrc
================================================
rvm use ruby-1.9.2@poolparty --create
================================================
FILE: Gemfile
================================================
source "http://rubygems.org"
gemspec
gem 'amazon-ec2', '~>0.9.17'
gem 'xml-simple'
gem 'json'
gem 'git-style-binaries'
group :test do
gem 'fakeweb'
gem 'webmock'
gem 'shoulda'
gem 'rcov'
gem 'mocha'
gem 'right_http_connection'
gem "jnunemaker-matchy", "~> 0.4.0"
gem 'vagrant'
end
group :development do
gem "rdoc"
end
================================================
FILE: License.txt
================================================
Copyright (c) 2009 Ari Lerner
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
================================================
FILE: Makefile
================================================
RUBY = `which ruby`
RUBYGEMS = `which gem`
GEMENV = `gem env`
all: run_tests
check_install:
$(RUBY) -v
$(RUBYGEMS) -v
show_env:
echo $(GEMENV)
test: run_tests
run_tests:
rake test
================================================
FILE: Manifest.txt
================================================
================================================
FILE: README.rdoc
================================================
= PoolParty
http://poolpartyrb.com
== DESCRIPTION:
PoolParty makes cloud provisioning and management easy. PoolParty provides a unified interface for defining and managing cloud infrasturcure on different cloud providers (just Ec2 for now).
Code your cloud!
== SYNOPSIS:
PoolParty is written with the intention of being as application-agnostic as possible. It installs only the basic
required software to glue the cloud together on the instances as listed below.
== Quickstart
For instance, to start a basic cloud, let's write one:
pool "demo" do
cloud "app" do
instances 2..10
using :ec2
autoscale do
trigger :lower_threshold => 0.3, :upper_threshold => 1.0, :measure => :cpu
end
security_group do
authorize :from_port => 22, :to_port => 22
end
load_balancer do
listener :external_port => 8080, :internal_port => 8080, :protocol => 'tcp'
end
end
end
Simply by issuing the command:
cloud start
This will create an ec2 auto scaling group that will launch the minimum_instances (2 in this case,) inside a security group. The default naming of most objects, such as security_groups, auto scaling groups, launch_configurations, load_balancers and keypairs follow the poolname-cloudname convention.
There are a number of commands PoolParty offers to interact with your cloud. They include:
* <tt>cloud start</tt>
* <tt>cloud terminate</tt>
* <tt>cloud reboot</tt>
* <tt>cloud configure</tt>
* <tt>cloud compile</tt>
* <tt>cloud console</tt>
* <tt>cloud expand</tt>
* <tt>cloud contract</tt>
* <tt>cloud list</tt>
* <tt>cloud show</tt>
* <tt>cloud ssh</tt>
* <tt>cloud run</tt>
Clouds are distinguished by security groups. If a security group is not specified in your cloud block, one will be created based on the naming convention poolname-cloudname.
== Extending
To add a cloud_provider, there are four methods that need to be implemented. Simply sublcass the CloudProviders module and require it in your clouds.rb (or commit it back to PoolParty). Those four methods are:
* <tt>run_instance</tt>
* <tt>terminate_instance</tt>
* <tt>describe_instances</tt>
* <tt>describe_instance</tt>
== Examples
Checkout the [examples](examples/) directory and its README for some more ideas and examples.
That's it!
More documentation can be found at the site: <a href="http://poolpartyrb.com">http://poolpartyrb.com</a>.
== REQUIREMENTS:
* Ruby
== INSTALL:
from gemcutter.org;
sudo gem install poolparty
== LICENSE:
(The MIT License)
Copyright (c) 2009 Ari Lerner, CloudTeam
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
================================================
FILE: Rakefile
================================================
$:.unshift(File.join(File.dirname(__FILE__), "."))
require 'rake'
require "bundler/gem_tasks"
require 'rake/testtask'
require 'rdoc/task'
require 'config/requirements'
task :default => [:test, :cleanup_test]
desc "Update vendor directory and run tests"
namespace :poolparty do
namespace :vendor do
desc "Fetch all the submodules"
task :submodules do
`git submodule update`
end
end
end
task :vendor => ["poolparty:vendor:submodules"]
task :cleanup_test do
::FileUtils.rm_rf "/tmp/poolparty"
end
# task :test do
# sh "ruby -Ilib:test #{Dir["#{File.dirname(__FILE__)}/../test/poolparty/*/*.rb"].join(" ")}"
# end
Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test'
test.pattern = 'test/**/*_test.rb'
test.verbose = true
end
begin
require 'rcov/rcovtask'
Rcov::RcovTask.new(:rcov) do |t|
t.libs << FileList['lib/**/*.rb']
t.rcov_opts = [
'-xRakefile', '-xrakefile',
'-xlib/erlang',
'--text-report',
'--sort coverage'
] + FileList['tasks/*.rake'].pathmap("-x%p")
t.test_files = FileList['test/lib/**/*_test.rb']
t.output_dir = 'coverage'
t.verbose = true
end
rescue LoadError
puts "RCov is not available"
end
desc "Clean tmp directory"
task :clean_tmp do |t|
FileUtils.rm_rf("#{File.dirname(__FILE__)}/Manifest.txt") if ::File.exists?("#{File.dirname(__FILE__)}/Manifest.txt")
FileUtils.touch("#{File.dirname(__FILE__)}/Manifest.txt")
%w(logs tmp).each do |dir|
FileUtils.rm_rf("#{File.dirname(__FILE__)}/#{dir}") if ::File.exists?("#{File.dirname(__FILE__)}/#{dir}")
end
end
desc "Remove the pkg directory"
task :clean_pkg do |t|
%w(pkg).each do |dir|
FileUtils.rm_rf("#{File.dirname(__FILE__)}/#{dir}") if ::File.exists?("#{File.dirname(__FILE__)}/#{dir}")
end
end
namespace :gem do
desc "Build the gem only if the tests pass"
task :test_then_build => [:test, :build]
desc "Build and install the gem only if the tests pass"
task :test_then_install => [:test, :install]
end
# Generate documentation
Rake::RDocTask.new do |rd|
rd.main = "README.rdoc"
rd.rdoc_files.include("README.rdoc", "lib/**/*.rb")
rd.rdoc_dir = "rdoc"
# rd.template = "hanaa"
end
================================================
FILE: Vagrantfile
================================================
Vagrant::Config.run do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "base"
# The url from where the 'config.vm.box' box will be fetched if it
# doesn't already exist on the user's system.
# config.vm.box_url = "http://domain.com/path/to/above.box"
# Boot with a GUI so you can see the screen. (Default is headless)
# config.vm.boot_mode = :gui
# Assign this VM to a host only network IP, allowing you to access it
# via the IP.
config.vm.network "33.33.33.10"
# Forward a port from the guest to the host, which allows for outside
# computers to access the VM, whereas host only networking does not.
# config.vm.forward_port "http", 80, 8080
# Share an additional folder to the guest VM. The first argument is
# an identifier, the second is the path on the guest to mount the
# folder, and the third is the path on the host to the actual folder.
config.vm.share_folder "v-data", "/vagrant_data", ".", :nfs => true
# Enable provisioning with Puppet stand alone. Puppet manifests
# are contained in a directory path relative to this Vagrantfile.
# You will need to create the manifests directory and a manifest in
# the file base.pp in the manifests_path directory.
#
# An example Puppet manifest to provision the message of the day:
#
# # group { "puppet":
# # ensure => "present",
# # }
# #
# # File { owner => 0, group => 0, mode => 0644 }
# #
# # file { '/etc/motd':
# # content => "Welcome to your Vagrant-built virtual machine!
# # Managed by Puppet.\n"
# # }
#
# config.vm.provision :puppet do |puppet|
# puppet.manifests_path = "manifests"
# puppet.manifest_file = "base.pp"
# end
# Enable provisioning with chef solo, specifying a cookbooks path (relative
# to this Vagrantfile), and adding some recipes and/or roles.
#
# config.vm.provision :chef_solo do |chef|
# chef.cookbooks_path = "cookbooks"
# chef.add_recipe "mysql"
# chef.add_role "web"
#
# # You may also specify custom JSON attributes:
# chef.json = { :mysql_password => "foo" }
# end
# Enable provisioning with chef server, specifying the chef server URL,
# and the path to the validation key (relative to this Vagrantfile).
#
# The Opscode Platform uses HTTPS. Substitute your organization for
# ORGNAME in the URL and validation key.
#
# If you have your own Chef Server, use the appropriate URL, which may be
# HTTP instead of HTTPS depending on your configuration. Also change the
# validation key to validation.pem.
#
# config.vm.provision :chef_client do |chef|
# chef.chef_server_url = "https://api.opscode.com/organizations/ORGNAME"
# chef.validation_key_path = "ORGNAME-validator.pem"
# end
#
# If you're using the Opscode platform, your validator client is
# ORGNAME-validator, replacing ORGNAME with your organization name.
#
# IF you have your own Chef Server, the default validation client name is
# chef-validator, unless you changed the configuration.
#
# chef.validation_client_name = "ORGNAME-validator"
end
================================================
FILE: bin/cloud
================================================
#!/usr/bin/env ruby
$:.unshift(File.dirname(__FILE__) + "/../lib")
require "poolparty"
require 'git-style-binary/command'
GitStyleBinary.primary do
# self.class.send :include, Printing
@theme = :short
version "PoolParty release: #{PoolParty.version}"
banner <<-EOS
Usage: #{$0} #{all_options_string} COMMAND [ARGS]
The cloud subcommands commands are:
\#{GitStyleBinary.pretty_known_subcommands(:short).join(" ")}
See 'cloud help COMMAND' for more information on a specific command.
EOS
opt :clouds_dot_rb, "Set the clouds.rb file", :type => String, :default => "clouds.rb"
opt :very_verbose, "Set very verbose mode on", :type => :boolean, :default => false
opt :debug, "Debug the output", :type => :boolean, :default => false
opt :very_debug, "Set very debug mode on", :type => :boolean, :default => false
opt :name, "Name of the working cloud", :type => String, :default => nil
opt :chef_task, "Name of chef task to execute", :type => String, :default => 'default'
before_run do |command|
# Setup testing/debugging
$PP_VERBOSE = true if command[:verbose]
$VERY_VERBOSE = true if command[:very_verbose]
$DEBUGGING = true if command[:debug]
$VERY_DEBUGGING = true if command[:very_debug]
begin
require command[:clouds_dot_rb]
rescue LoadError => e
puts e
puts e.backtrace
puts "Failed loading #{command[:clouds_dot_rb]}, try using -c to specify the location of your clouds.rb"
exit
end
pool.chef_step command[:chef_task].to_sym
@loaded_pool = pool
@loaded_clouds = command[:name] ? [pool.clouds[command[:name]]] : pool.clouds.map {|name,cld|cld}
if @loaded_clouds.size == 0
puts "No clouds loaded. Check your clouds.rb or -n option"
exit
end
end
run do |command|
subcommands = GitStyleBinary.list_subcommands
puts "cloud %s" % PoolParty.version
puts "Usage: cloud COMMAND [ARGS]
The cloud subcommands commands are:
#{subcommands}
See 'cloud help COMMAND' for more information on a specific command"
end
end
================================================
FILE: bin/cloud-bootstrap
================================================
#!/usr/bin/env ruby
$:.unshift(File.dirname(__FILE__) + "/../lib")
require "poolparty"
require 'git-style-binary/command'
GitStyleBinary.command do
banner <<-EOS
Usage: #{$0} #{all_options_string}
Bootstrap a cloud instance
EOS
short_desc "Bootstrap a cloud instance"
opt :inst_num, "The number of the instance to run bootstrap on", :type => :int
opt :force, "Force rebootstrapping (useful for upgrading)", :default => false
run do |command|
@loaded_clouds.each do |cld|
cld.compile!
cld.bootstrap!
end
end
end
================================================
FILE: bin/cloud-compile
================================================
#!/usr/bin/env ruby
$:.unshift(File.dirname(__FILE__) + "/../lib")
require "poolparty"
require 'git-style-binary/command'
GitStyleBinary.command do
banner <<-EOS
Usage: #{$0} #{all_options_string}
Configure a cloud instance
EOS
short_desc "Configure a cloud instance"
opt :inst_num, "The number of the instance to run bootstrap on", :type => :int
run do |command|
@loaded_clouds.each do |cld|
ENV["POOLPARTY_NO_VALIDATION"] = "true"
cld.compile!
end
end
end
================================================
FILE: bin/cloud-configure
================================================
#!/usr/bin/env ruby
$:.unshift(File.dirname(__FILE__) + "/../lib")
require "poolparty"
require 'git-style-binary/command'
GitStyleBinary.command do
banner <<-EOS
Usage: #{$0} #{all_options_string}
Configure a cloud instance
EOS
short_desc "Configure a cloud instance"
opt :inst_num, "The number of the instance to run bootstrap on", :type => :int
opt :generate_graph, "Generate the dependency tree graph", :type => :string, :default => nil
run do |command|
@loaded_clouds.each do |cld|
cld.configure!
end
end
end
================================================
FILE: bin/cloud-console
================================================
#!/usr/bin/env ruby
$:.unshift(File.dirname(__FILE__) + "/../lib")
require "poolparty"
require 'git-style-binary/command'
GitStyleBinary.command do
banner <<-EOS
Usage: #{$0} #{all_options_string}
Open an irb session with the clouds.rb loaded
EOS
short_desc "Open an irb session with clouds.rb loaded"
opt :inst_num, "The number of the instance to run bootstrap on", :type => :int
run do |command|
puts "Loading PoolParty console..."
#exec "#{irb} #{libs} --simple-prompt"
require 'irb/completion'
require command[:clouds_dot_rb]
require "#{File.dirname(__FILE__) + '/../lib/poolparty.rb'}"
require 'irb'
pool.auto_execute = false
IRB.setup(nil)
IRB.conf[:IRB_NAME]="cloud"
IRB.conf[:PROMPT_MODE]=:CLOUD
IRB.conf[:PROMPT][:CLOUD]={
:PROMPT_I => "%N> ",
:PROMPT_S => "%l> ",
:PROMPT_C => "* ",
:PROMPT_N => ">> ",
:RETURN => "=>%s\n" }
irb=IRB::Irb.new
IRB.conf[:IRB_RC].call(irb.context) if IRB.conf[:IRB_RC]
IRB.conf[:MAIN_CONTEXT] = irb.context
trap("SIGINT") do
irb.signal_handle
end
catch(:IRB_EXIT) do
irb.eval_input
end
end
end
================================================
FILE: bin/cloud-contract
================================================
#!/usr/bin/env ruby
$:.unshift(File.dirname(__FILE__) + "/../lib")
require "poolparty"
require 'git-style-binary/command'
GitStyleBinary.command do
banner <<-EOS
Usage: #{$0} #{all_options_string}
contracts the cloud by a single instance
EOS
short_desc "contracts the cloud by a single instance"
run do |command|
@loaded_clouds.each do |cld|
node_to_terminate = cld.nodes.last
# node_to_terminate.cloud = cld
puts cld.nodes.size
if cld.nodes.size - 1 < cld.minimum_instances
puts "Contracting instances by 1 in cloud #{cld.name} will lower the number of instances below specified minimum (#{cld.minimum_instances})"
next
end
msg = [
"Contracting cloud #{cld.name} (#{cld.keypair}) by 1",
"#{cld.nodes.size} running instances (#{cld.minimum_instances} - #{cld.maximum_instances})",
" node: #{node_to_terminate.public_ip}"
]
puts msg.join("\n")
node_to_terminate.terminate!
puts "#{node_to_terminate.public_ip} has been terminated"
end
end
end
================================================
FILE: bin/cloud-cssh
================================================
#!/usr/bin/env ruby
$:.unshift(File.dirname(__FILE__) + "/../lib")
require "poolparty"
require 'git-style-binary/command'
GitStyleBinary.command do
banner <<-EOS
Usage: #{$0} #{all_options_string}
cssh into the cloud
EOS
short_desc "cssh into the cloud"
opt :user, "the user name", :type => :string, :default => nil
opt :use_keypair, "whether or not to use the default keypair", :type => :integer, :default => 0
run do |command|
cloud = @loaded_clouds.first
user = command[:user]
keyp = command[:use_keypair]
cloud.cssh( user, keyp != 0 )
end
end
================================================
FILE: bin/cloud-expand
================================================
#!/usr/bin/env ruby
$:.unshift(File.dirname(__FILE__) + "/../lib")
require "poolparty"
require 'git-style-binary/command'
GitStyleBinary.command do
banner <<-EOS
Usage: #{$0} #{all_options_string}
expands the cloud by a single instance
EOS
short_desc "expands the cloud by a single instance"
run do |command|
@loaded_clouds.each do |cld|
msg = [
"Expanding cloud #{cld.name} (#{cld.keypair})",
"#{cld.nodes.size} running instances (#{cld.minimum_instances} - #{cld.maximum_instances})"
]
print_msg(msg)
inst = cld.expand_by(1)
msg = [
"Your cloud has expanded by node: #{inst.public_ip}"
]
print_msg(msg)
end
end
end
================================================
FILE: bin/cloud-list
================================================
#!/usr/bin/env ruby
$:.unshift(File.dirname(__FILE__) + "/../lib")
require "poolparty"
require 'git-style-binary/command'
GitStyleBinary.command do
banner <<-EOS
Usage: #{$0} #{all_options_string}
List the clouds and their nodes
e.g. show a list of the current instances on the cloud
EOS
opt :instance_id, "Describe a specific instance", :type => String, :default => nil
short_desc "show a list of the current instances on the clouds"
run do |command|
puts "#{pool.name}"
puts "==="
@loaded_clouds.each do |cld|
if command[:instance_id]
require 'pp'
pp result = cld.nodes(:instance_id=>command[:instance_id])
else
msg = ["* #{cld.name} cloud, #{cld.image_id}, #{cld.instance_type}"]
hsh = {}
cld.all_nodes.each do |n|
(hsh[n.status] ||= []) << n
end
hsh.each do |k,v|
msg << " - #{k} nodes"
v.each do |a|
msg << " - #{a.instance_id}\t#{a.status}\t#{a.public_ip}\t#{a.private_ip}\t#{a.zone}"
end
msg << ""
end
puts msg
end
end
end
end
================================================
FILE: bin/cloud-reboot
================================================
#!/usr/bin/env ruby
$:.unshift(File.dirname(__FILE__) + "/../lib")
require "poolparty"
require 'git-style-binary/command'
GitStyleBinary.command do
banner <<-EOS
Usage: #{$0} #{all_options_string}
Cycle through nodes in the cloud and wait for the autoscaler to reboot
EOS
short_desc "Cycle the instances"
run do |command|
@loaded_clouds.each do |cld|
cld.reboot!
end
end
end
================================================
FILE: bin/cloud-rsync
================================================
#!/usr/bin/env ruby
$:.unshift(File.dirname(__FILE__) + "/../lib")
require "poolparty"
require 'git-style-binary/command'
GitStyleBinary.command do
banner <<-EOS
Usage: #{$0} #{all_options_string}
ssh into an instance of the cloud
EOS
short_desc "ssh into an instance of the cloud"
opt :to, "To this directory", :default => "~"
run do |command|
cloud = @loaded_clouds.first
dir = command.argv.pop
if !cloud.nodes.empty?
cloud.rsync(dir, command[:to])
else
puts "No running instances can be found"
end
end
end
================================================
FILE: bin/cloud-run
================================================
#!/usr/bin/env ruby
$:.unshift(File.dirname(__FILE__) + "/../lib")
require "poolparty"
require 'git-style-binary/command'
GitStyleBinary.command do
banner <<-EOS
Usage: #{$0} #{all_options_string}
Run a command on all running instances
EOS
opt :instance_id, "Run only on a specific instance", :type => String, :default => nil
opt :command, "Command to run", :type => String, :default => nil
short_desc "Run a command on all running instances"
run do |command|
puts "Running command #{command[:command]} on all nodes"
@loaded_clouds.each do |cld|
output = cld.nodes.map do |n|
n.ssh(command[:command])
end
#p output
end
end
end
================================================
FILE: bin/cloud-show
================================================
#!/usr/bin/env ruby
$:.unshift(File.dirname(__FILE__) + "/../lib")
require "poolparty"
require 'git-style-binary/command'
GitStyleBinary.command do
@theme = :short
version "PoolParty #{$0} command"
banner <<-EOS
Usage: #{$0} #{all_options_string}
shows output about the clouds.rb
EOS
short_desc "shows output about the clouds.rb"
run do |command|
@loaded_clouds.each do |cld|
msg = [
"Cloud: #{cld.name}",
"----------------------------",
"Running Instances: #{cld.nodes.size}",
"Minimum instances: #{cld.minimum_instances}",
"Maximum instances: #{cld.maximum_instances}",
"Running on: #{cld.cloud_provider.name}",
"Keypair: #{cld.keypair.basename}",
"Security group: #{cld.cloud_provider.security_group_names.join(', ')}",
"Availability zones: #{cld.cloud_provider.availability_zones.join(', ')}",
"User: #{cld.user}",
"Active recipes: #{cld.chef._recipes(cld.pool.chef_step).join ", " }"
]
if cld.load_balancers.size > 0
load_balancers = cld.cloud_provider.load_balancers.first.running_load_balancers.map {|a| a[:dns_name]}
msg << "Load balancers: #{load_balancers.join("\n\t\t\t")}"
end
if cld.rds_instances.size > 0
available = cld.cloud_provider.available_rds_instances.map{|r| "#{r.instance_id}\t#{r.current_status.Endpoint.Address}" }
available.unshift 'RDS Instances:'
msg << available.join("\n\t\t\t")
end
puts msg.flatten
end
end
end
================================================
FILE: bin/cloud-ssh
================================================
#!/usr/bin/env ruby
$:.unshift(File.dirname(__FILE__) + "/../lib")
require "poolparty"
require 'git-style-binary/command'
GitStyleBinary.command do
banner <<-EOS
Usage: #{$0} #{all_options_string}
ssh into an instance of the cloud
EOS
short_desc "ssh into an instance of the cloud"
opt :instance_number, "Ssh into the instance number", :type => :integer, :default => 0
run do |command|
cloud = @loaded_clouds.first
if !cloud.nodes.empty?
inst = cloud.nodes[command[:instance_number]]
inst ? inst.ssh : puts("Error: The instance number (#{command[:instance_number]}) is too high for the current number of instances")
else
puts "No running instances can be found"
end
end
end
================================================
FILE: bin/cloud-start
================================================
#!/usr/bin/env ruby
$:.unshift(File.dirname(__FILE__) + "/../lib")
require "poolparty"
require 'git-style-binary/command'
GitStyleBinary.command do
banner <<-EOS
Usage: #{$0} #{all_options_string}
starts a single instance in your cloud.
EOS
short_desc "starts a single instance in your cloud"
run do |command|
@loaded_clouds.each do |cld|
cld.run
end
end
end
================================================
FILE: bin/cloud-terminate
================================================
#!/usr/bin/env ruby
$:.unshift(File.dirname(__FILE__) + "/../lib")
require "poolparty"
require 'git-style-binary/command'
GitStyleBinary.command do
banner <<-EOS
Usage: #{$0} #{all_options_string} COMMAND [ARGS]
terminate the cloud
EOS
short_desc "terminate the cloud"
opt :yes, "Answer yes to the are you sure question", :type => :boolean, :default => false
run do |command|
@loaded_clouds.each do |cld|
msg = [
"Shutting down #{cld.name} cloud",
"Are you sure? (Y/N)"
]
o = command[:yes] || true
if o
puts "Shutting down cloud"
cld.teardown
else
end
end
end
end
================================================
FILE: bin/cloud-vnc
================================================
#!/usr/bin/env ruby
$:.unshift(File.dirname(__FILE__) + "/../lib")
require "poolparty"
require 'git-style-binary/command'
GitStyleBinary.command do
banner <<-EOS
Usage: #{$0} #{all_options_string}
start a vnc server and create an ssh tunnel
EOS
short_desc "ssh into an instance of the cloud"
opt :instance_number, "Start VNC server on this instance number", :type => :integer, :default => 0
opt :local_port, "The local port to tunnel to", :type => :integer, :default => 5900
opt :display, "The remote display number to start the VNC Server on", :type => :integer, :default => 0
run do |command|
cloud = @loaded_clouds.first
if !cloud.nodes.empty?
inst = cloud.nodes[command[:instance_number]]
if inst
inst.ssh(["x11vnc -localhost -nopw -display :#{command[:display]}"],
{'-X' => nil,
'-C' => nil,
' -o' => 'UserKnownHostsFile=/dev/null',
'-L' => "#{command[:local_port]}:localhost:5900"})
else
puts("Error: The instance number (#{command[:instance_number]}) is too high for the current number of instances")
end
else
puts "No running instances can be found"
end
end
end
================================================
FILE: config/requirements.rb
================================================
require 'fileutils'
include FileUtils
require 'rubygems'
require 'rake'
$:.unshift(File.join(File.dirname(__FILE__), %w[.. lib]))
================================================
FILE: examples/README.md
================================================
simple.rb
===
The simple.rb configuration will create an ec2 auto scaling group that will launch the minimum_instances (1 in this case,) inside a security group. The default naming of most objects, such as security_groups, auto scaling groups, launch_configurations and load_balancers and keypairs follow the poolname-cloudname convention. For example, the cloud below will create a security-group named 'pooolparty-simple'. The names can be overridden, important if you want more than one. If a keypair does not exist, it will be created.
Since auto scaling is specified in this cloud, poolparty will not start the instance directly. Instead, poolparty will create an ec2_launch_configuration and auto scaling group.
Some important notes: Some of the methods used inside the cloud block are specific to the cloud provider being used, ec2 in this example. The cloud_provider methods are added when the cloud_provider is specified, therefore you must be sure to specify the cloud_provider before any cloud_provider specific methods.
User_data. While not a specific feature of poolparty, we often use user_data scripts to configure instance in the cloud. This allows for separation of concerns:
- PoolParty takes care of setting up an infrastructure of firewalled autoscaling, load balanced instances across multiple data centers.
- Userdata scripts configure the instances, optionally pulling in from a repository of additional tasks. Userdata script can be used in conjunction with [runrul](http://alestic.com/2009/08/runurl) to run scripts form a shared repository, even installing and run chef if desired.
A benefit of userdata scripted instance configuration is that it does not require active management and monitoring. You just define your infrastructure with poolparty and let the autoscaling take care of the rest.
chef_cloud.rb
===
The chef_cloud.rb does not define an autoscaling group. Since there is no autoscaling group, poolparty will launch the instances (ec2_run_instance.) and wait for ssh to be available on all the launched hosts.
Next, if a chef-repo was specified:
1. The repo will be uploaded the /etc/chef on the instances.
2. Ssh to the instances and call chef -c /etc/chef/solo.rb -j /etc/chef/dna.json
The dna.json can be populated either by simply editing the file dna.json in your chef-repo, or you can specify chef_attributes in your cloud block. for example:
chef_attributes :apache2 => {:listen_ports => ["80", "8080"]} "8080"]}
If you specify chef_attributes they will be compiled into a a role namded for the cloud at /etc/chef/roles/cloudname.json, and a dna.json file that will execute the clouds role on the instance.
Notes, Tips and Comments:
===
The goal of having an completely idempotent declarative configuration system is particularly valuable when you need to manage and update running servers. In the cloud we have found that often, it is easier to simply throw away the server and start a new one from a fresh state.
1. Update userdata scripts and launch configs
2. Terminate the instances (1 at a time for a rolling restart, or all at once)
3. Let the autoscaling (or client side poolparty) start new instances with the new userdata
Since the instances are always starting from a known state (a base ami) the configuration scripts can be much simpler, simple shell scripts, possibly executed as runurls.
If runurls are being called from the userdata script, another way to update the cloud instances configuration is to update the runurl (if you are hosting it, which is recommended) you can terminate instances and the newly launched instances will use the updated runurl/
We try and keep private data out of the runurl scripts, opting to supply this data either as environment variables (possibly set by the userdata script,) as command line arguments to runrul (i.e. $1, $2 etc), or variables contained in a separate file our userdata script can download.
When the runurl cannot be public, and we do not want to embed all the runurl scripts in the userdata, we have used an authenticate only aws user. That is create an aws user, but do not provide a credit card or sign up for any services. Even tho the user can not create any resources, it can authenticate. We put the authenticate only user credentials in the userdata file, and a small bit of code at the top of our userdata file to fetch and install an s3 utility, such as s3cmd. Then the s3cmd can download private readonly s3 urls.
chef
---
If you want to use chef, one way to do so is to put code like the following in your userdata
# OPTIONAL: install chef-solo
export CLOUD=${1:-'poolparty'}
sudo gem install ohai chef --source http://gems.opscode.com --no-rdoc --no-ri
mkdir -p /etc/chef/cookpooks
s3sync -r https://mybucket.s3.amazonaws.com/chef-repo /etc/chef/chef
s3sync https://cloudteam.s3.amazonaws.com/chef-repo/$CLOUD.json /etc/chef/dna.json
chef-solo -c /etc/chef/chef/solo.rb -j /etc/chef/chef/dna.json
================================================
FILE: examples/chef_cloud/chef_repo/.gitignore
================================================
.rake_test_cache
================================================
FILE: examples/chef_cloud/chef_repo/README
================================================
Began as a clone of the Opscode base repo
http://wiki.opscode.com/display/chef/Chef+Repository
================================================
FILE: examples/chef_cloud/chef_repo/Rakefile
================================================
#
# Rakefile for Chef Server Repository
#
# Author:: Adam Jacob (<adam@opscode.com>)
# Copyright:: Copyright (c) 2008 Opscode, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
require 'rubygems'
require 'chef'
require 'json'
# Make sure you have loaded constants first
require File.join(File.dirname(__FILE__), 'config', 'rake')
# And choosen a VCS
if File.directory?(File.join(TOPDIR, ".svn"))
$vcs = :svn
elsif File.directory?(File.join(TOPDIR, ".git"))
$vcs = :git
end
load 'chef/tasks/chef_repo.rake'
================================================
FILE: examples/chef_cloud/chef_repo/certificates/README
================================================
This directory contains certificates created by the Rakefile.
================================================
FILE: examples/chef_cloud/chef_repo/config/client.rb.example
================================================
#
# Example Chef Client Config File
#
# We recommend using Opscode's chef cookbook for managing chef itself,
# instead of using this file. It is provided as an example.
log_level :info
log_location STDOUT
ssl_verify_mode :verify_none
registration_url "https://chef.localdomain"
openid_url "https://chef.localdomain"
template_url "https://chef.localdomain"
remotefile_url "https://chef.localdomain"
search_url "https://chef.localdomain"
role_url "https://chef.localdomain"
file_store_path "/srv/chef/file_store"
file_cache_path "/srv/chef/cache"
pid_file "/var/run/chef/chef-client.pid"
Chef::Log::Formatter.show_time = true
================================================
FILE: examples/chef_cloud/chef_repo/config/rake.rb
================================================
###
# Company and SSL Details
###
# The company name - used for SSL certificates, and in srvious other places
COMPANY_NAME = "AT&T Interactive"
# The Country Name to use for SSL Certificates
SSL_COUNTRY_NAME = "US"
# The State Name to use for SSL Certificates
SSL_STATE_NAME = "CA"
# The Locality Name for SSL - typically, the city
SSL_LOCALITY_NAME = "Glendale"
# What department?
SSL_ORGANIZATIONAL_UNIT_NAME = "Applied Research"
# The SSL contact email address
SSL_EMAIL_ADDRESS = "cloudcomputing@attinteractive.com"
# License for new Cookbooks
# Can be :apachev2 or :none
NEW_COOKBOOK_LICENSE = :apachev2
##########################
# Chef Repository Layout #
##########################
# Where to install upstream cookbooks for serving
COOKBOOK_PATH = "/srv/chef/cookbooks"
# Where to install site-local modifications to upstream cookbooks
SITE_COOKBOOK_PATH = "/srv/chef/site-cookbooks"
# Where to install roles
ROLE_PATH = "/srv/chef/roles"
# Chef Config Path
CHEF_CONFIG_PATH = "/etc/chef"
# The location of the Chef Server Config file (on the server)
CHEF_SERVER_CONFIG = File.join(CHEF_CONFIG_PATH, "server.rb")
# The location of the Chef Client Config file (on the client)
CHEF_CLIENT_CONFIG = File.join(CHEF_CONFIG_PATH, "client.rb")
###
# Useful Extras (which you probably don't need to change)
###
# The top of the repository checkout
TOPDIR = File.expand_path(File.join(File.dirname(__FILE__), ".."))
# Where to store certificates generated with ssl_cert
CADIR = File.expand_path(File.join(TOPDIR, "certificates"))
# Where to store the mtime cache for the recipe/template syntax check
TEST_CACHE = File.expand_path(File.join(TOPDIR, ".rake_test_cache"))
================================================
FILE: examples/chef_cloud/chef_repo/config/server.rb.example
================================================
#
# Example Chef Server Config File
#
# We recommend using Opscode's chef cookbook for managing chef itself,
# instead of using this file. It is provided as an example.
log_level :info
log_location "/var/log/chef/server.log"
ssl_verify_mode :verify_none
registration_url "https://localhost"
openid_url "https://localhost"
template_url "https://localhost"
remotefile_url "https://localhost"
search_url "https://localhost"
role_url "https://localhost"
#validation_token "change_this_token"
cookbook_path [ "/srv/chef/site-cookbooks", "/srv/chef/cookbooks" ]
file_store_path "/srv/chef/file_store"
file_cache_path "/srv/chef/cache"
node_path "/srv/chef/nodes"
openid_store_path "/srv/chef/openid/store"
openid_cstore_path "/srv/chef/openid/cstore"
search_index_path "/srv/chef/search_index"
# uncomment and modify to allow specific openid providers
#openid_providers [ "https://localhost", "https://chef" ]
# uncomment and modify to lock down openid identifiers, ie 'some_user.myopenid.com'
#authorized_openid_identifiers [ "" ]
Chef::Log::Formatter.show_time = true
================================================
FILE: examples/chef_cloud/chef_repo/config/solo.rb.example
================================================
#
# Chef Solo Config File
#
log_level :info
log_location STDOUT
file_cache_path "/srv/chef/cookbooks"
ssl_verify_mode :verify_none
Chef::Log::Formatter.show_time = false
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/README
================================================
This directory contains upstream or shared cookbooks.
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/README.rdoc
================================================
= DESCRIPTION:
Complete Debian/Ubuntu style Apache2 configuration.
= REQUIREMENTS:
Debian or Ubuntu preferred.
Red Hat/CentOS and Fedora can be used but will be converted to a Debian/Ubuntu style Apache as it's far easier to manage with chef.
= ATTRIBUTES:
The file attributes/apache.rb contains the following attribute types:
* platform specific locations and settings.
* general settings
* prefork attributes
* worker attributes
General settings and prefork/worker attributes are tunable.
= USAGE:
Include the apache2 recipe to install Apache2 and get 'sane' default settings. Configuration is modularized through Apache vhost sites a la Debian style configuration.
For Red Hat, CentOS and Fedora you should first disable selinux as it's not supported (yet), then remove the stock httpd and all it's dependencies prior to attempting to use this recipe. Many packages in these distributions drop conflicting configs into conf.d, all of which haven't been accounted for yet. Starting from scratch will also make it far easier to debug.
== Defines:
* apache_module: sets up an Apache module.
* apache_conf: sets up a config file for an apache module.
* apache_site: sets up a vhost site. The conf file must be available.
* web_app: copies the template for a web app and enables it as a site via apache_site.
== Web Apps:
Various applications that can be set up with Apache as the front end, such as PHP, Django, Rails and others can use the web_app define to set up the template and the Apache site. The define is kind of dumb, so the template needs have the application implementation settings, since we don't know what your app is or what is needed from Apache.
We only prototype one parameter for the web_app define, "template". This is used to specify the name of the template to use in the current cookbook. When you use web_app, you can set up any parameters you want to use in your template. They will get passed to the template through the params hash. For example, the sample web_app.conf.erb template in this cookbook makes use of these.
* docroot
* server_name
* server_aliases
These are available as @params[:docroot], @params[:server_name], @params[:server_aliases] within the template.
If 'cookbook' and 'template' are not specified, the current cookbook's templates/default/web_app.conf.erb will be used. If this template is not suitable for your application, copy it to your cookbook and customize as needed.
== God Monitor:
There's a new recipe, apache2::god_monitor. You will need to make sure to include the 'god' recipe before using the apache2::god_monitor recipe in your cookbook.
= LICENSE & AUTHOR:
Author:: Joshua Timberman (<joshua@opscode.com>)
Copyright:: 2009, Opscode, Inc
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/attributes/apache.rb
================================================
#
# Cookbook Name:: apache2
# Attributes:: apache
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Where the various parts of apache are
case platform
when "redhat","centos","fedora","suse"
set[:apache][:dir] = "/etc/httpd"
set[:apache][:log_dir] = "/var/log/httpd"
set[:apache][:user] = "apache"
set[:apache][:binary] = "/usr/sbin/httpd"
set[:apache][:icondir] = "/var/www/icons/"
when "debian","ubuntu"
set[:apache][:dir] = "/etc/apache2"
set[:apache][:log_dir] = "/var/log/apache2"
set[:apache][:user] = "www-data"
set[:apache][:binary] = "/usr/sbin/apache2"
set[:apache][:icondir] = "/usr/share/apache2/icons"
else
set[:apache][:dir] = "/etc/apache2"
set[:apache][:log_dir] = "/var/log/apache2"
set[:apache][:user] = "www-data"
set[:apache][:binary] = "/usr/sbin/apache2"
set[:apache][:icondir] = "/usr/share/apache2/icons"
end
###
# These settings need the unless, since we want them to be tunable,
# and we don't want to override the tunings.
###
# General settings
set_unless[:apache][:listen_ports] = [ "80","443" ]
set_unless[:apache][:contact] = "ops@example.com"
set_unless[:apache][:timeout] = 300
set_unless[:apache][:keepalive] = "On"
set_unless[:apache][:keepaliverequests] = 100
set_unless[:apache][:keepalivetimeout] = 5
# Security
set_unless[:apache][:servertokens] = "Prod"
set_unless[:apache][:serversignature] = "On"
set_unless[:apache][:traceenable] = "On"
# Prefork Attributes
set_unless[:apache][:prefork][:startservers] = 16
set_unless[:apache][:prefork][:minspareservers] = 16
set_unless[:apache][:prefork][:maxspareservers] = 32
set_unless[:apache][:prefork][:serverlimit] = 400
set_unless[:apache][:prefork][:maxclients] = 400
set_unless[:apache][:prefork][:maxrequestsperchild] = 10000
# Worker Attributes
set_unless[:apache][:worker][:startservers] = 4
set_unless[:apache][:worker][:maxclients] = 1024
set_unless[:apache][:worker][:minsparethreads] = 64
set_unless[:apache][:worker][:maxsparethreads] = 192
set_unless[:apache][:worker][:threadsperchild] = 64
set_unless[:apache][:worker][:maxrequestsperchild] = 0
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/definitions/apache_conf.rb
================================================
#
# Cookbook Name:: apache2
# Definition:: apache_conf
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
define :apache_conf do
template "#{node[:apache][:dir]}/mods-available/#{params[:name]}.conf" do
source "mods/#{params[:name]}.conf.erb"
notifies :restart, resources(:service => "apache2")
end
end
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/definitions/apache_module.rb
================================================
#
# Cookbook Name:: apache2
# Definition:: apache_module
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
define :apache_module, :enable => true, :conf => false do
include_recipe "apache2"
if params[:conf]
apache_conf params[:name]
end
if params[:enable]
execute "a2enmod #{params[:name]}" do
command "/usr/sbin/a2enmod #{params[:name]}"
notifies :restart, resources(:service => "apache2")
not_if do (File.symlink?("#{node[:apache][:dir]}/mods-enabled/#{params[:name]}.load") and
((File.exists?("#{node[:apache][:dir]}/mods-available/#{params[:name]}.conf"))?
(File.symlink?("#{node[:apache][:dir]}/mods-enabled/#{params[:name]}.conf")):(true)))
end
end
else
execute "a2dismod #{params[:name]}" do
command "/usr/sbin/a2dismod #{params[:name]}"
notifies :restart, resources(:service => "apache2")
only_if do File.symlink?("#{node[:apache][:dir]}/mods-enabled/#{params[:name]}.load") end
end
end
end
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/definitions/apache_site.rb
================================================
#
# Cookbook Name:: apache2
# Definition:: apache_site
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
define :apache_site, :enable => true do
include_recipe "apache2"
if params[:enable]
execute "a2ensite #{params[:name]}" do
command "/usr/sbin/a2ensite #{params[:name]}"
notifies :restart, resources(:service => "apache2")
not_if do
File.symlink?("#{node[:apache][:dir]}/sites-enabled/#{params[:name]}") or
File.symlink?("#{node[:apache][:dir]}/sites-enabled/000-#{params[:name]}")
end
only_if do File.exists?("#{node[:apache][:dir]}/sites-available/#{params[:name]}") end
end
else
execute "a2dissite #{params[:name]}" do
command "/usr/sbin/a2dissite #{params[:name]}"
notifies :restart, resources(:service => "apache2")
only_if do File.symlink?("#{node[:apache][:dir]}/sites-enabled/#{params[:name]}") end
end
end
end
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/definitions/web_app.rb
================================================
#
# Cookbook Name:: apache2
# Definition:: web_app
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
define :web_app, :template => "web_app.conf.erb" do
application_name = params[:name]
include_recipe "apache2"
include_recipe "apache2::mod_rewrite"
include_recipe "apache2::mod_deflate"
include_recipe "apache2::mod_headers"
template "#{node[:apache][:dir]}/sites-available/#{application_name}.conf" do
source params[:template]
owner "root"
group "root"
mode 0644
if params[:cookbook]
cookbook params[:cookbook]
end
variables(
:application_name => application_name,
:params => params
)
if File.exists?("#{node[:apache][:dir]}/sites-enabled/#{application_name}.conf")
notifies :reload, resources(:service => "apache2"), :delayed
end
end
apache_site "#{params[:name]}.conf" do
enable enable_setting
end
end
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/files/default/apache2_module_conf_generate.pl
================================================
#!/usr/bin/perl
=begin
Generates Ubuntu style module.load files.
./apache2_module_conf_generate.pl /usr/lib64/httpd/modules /etc/httpd/mods-available
ARGV[0] is the apache modules directory, ARGV[1] is where you want 'em.
=cut
use File::Find;
use strict;
use warnings;
die "Must have '/path/to/modules' and '/path/to/modules.load'"
unless $ARGV[0] && $ARGV[1];
find(
{
wanted => sub {
return 1 if $File::Find::name !~ /\.so$/;
my $modfile = $_;
$modfile =~ /(lib|mod_)(.+)\.so$/;
my $modname = $2;
my $filename = "$ARGV[1]/$modname.load";
unless ( -f $filename ) {
open( FILE, ">", $filename ) or die "Cannot open $filename";
print FILE "LoadModule " . $modname . "_module $File::Find::name\n";
close(FILE);
}
},
follow => 1,
},
$ARGV[0]
);
exit 0;
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/metadata.json
================================================
{
"description": "Installs and configures all aspects of apache2 using Debian style symlinks with helper definitions",
"replacing": {
},
"recipes": {
"apache2::mod_python": "Apache module 'python'",
"apache2::mod_authn_file": "Apache module 'authn_file'",
"apache2::mod_dir": "Apache module 'dir' with config file",
"apache2::mod_php5": "Apache module 'php5'",
"apache2::mod_proxy_balancer": "Apache module 'proxy_balancer'",
"apache2::mod_authz_groupfile": "Apache module 'authz_groupfile'",
"apache2::mod_dav": "Apache module 'dav'",
"apache2::mod_auth_basic": "Apache module 'auth_basic'",
"apache2::mod_setenvif": "Apache module 'setenvif' with config file",
"apache2": "",
"apache2::mod_authz_user": "Apache module 'authz_user'",
"apache2::mod_deflate": "Apache module 'deflate' with config file",
"apache2::mod_dav_svn": "Apache module 'dav_svn'",
"apache2::mod_negotiation": "Apache module 'negotiation' with config file",
"apache2::mod_ssl": "Apache module 'ssl' with config file, adds port 443 to listen_ports",
"apache2::mod_authz_host": "Apache module 'authz_host'",
"apache2::mod_rewrite": "Apache module 'rewrite'",
"apache2::mod_auth_digest": "Apache module 'auth_digest'",
"apache2::mod_cgi": "Apache module 'cgi'",
"apache2::mod_fcgid": "Apache module 'fcgid', package on ubuntu\/debian, rhel\/centos, compile source on suse; with config file",
"apache2::mod_env": "Apache module 'env'",
"apache2::mod_headers": "Apache module 'headers'",
"apache2::mod_authnz_ldap": "Apache module 'authnz_ldap'",
"apache2::mod_autoindex": "Apache module 'autoindex' with config file",
"apache2::mod_proxy": "Apache module 'proxy' with config file",
"apache2::mod_proxy_connect": "Apache module 'proxy_connect'",
"apache2": "Main Apache configuration",
"apache2::mod_alias": "Apache module 'alias' with config file",
"apache2::mod_ldap": "Apache module 'ldap'",
"apache2::mod_status": "Apache module 'status' with config file",
"apache2::mod_authz_default": "Apache module 'authz_default'",
"apache2::mod_log_config": "Apache module 'log_config'",
"apache2::god_monitor": "",
"apache2::mod_expires": "Apache module 'expires'",
"apache2::mod_proxy_http": "Apache module 'proxy_http'",
"apache2::mod_mime": "Apache module 'mime' with config file",
"apache2::mod_proxy_ajp": "Apache module 'proxy_ajp'"
},
"platforms": {
"ubuntu": [
],
"centos": [
],
"debian": [
],
"redhat": [
]
},
"maintainer": "Opscode, Inc.",
"version": "0.9.1",
"recommendations": {
},
"name": "apache2",
"maintainer_email": "cookbooks@opscode.com",
"attributes": {
"apache\/traceenable": {
"default": "On",
"type": "string",
"multiple_values": false,
"description": "Determine behavior of TRACE requests",
"display_name": "Apache Trace Enable",
"required": false,
"recipes": [
]
},
"apache\/timeout": {
"default": "300",
"type": "string",
"multiple_values": false,
"description": "Connection timeout value",
"display_name": "Apache Timeout",
"required": false,
"recipes": [
]
},
"apache\/icondir": {
"default": "\/usr\/share\/apache2\/icons",
"type": "string",
"multiple_values": false,
"description": "Directory location for icons",
"display_name": "Apache Icondir",
"required": false,
"recipes": [
]
},
"apache\/user": {
"default": "www-data",
"type": "string",
"multiple_values": false,
"description": "User Apache runs as",
"display_name": "Apache User",
"required": false,
"recipes": [
]
},
"apache\/worker\/threadsperchild": {
"default": "64",
"type": "string",
"multiple_values": false,
"description": "Constant number of worker threads in each server process",
"display_name": "Apache Worker MPM ThreadsPerChild",
"required": false,
"recipes": [
]
},
"apache\/worker\/maxclients": {
"default": "1024",
"type": "string",
"multiple_values": false,
"description": "Maximum number of simultaneous connections",
"display_name": "Apache Worker MPM MaxClients",
"required": false,
"recipes": [
]
},
"apache\/worker": {
"type": "hash",
"multiple_values": false,
"description": "Hash of Apache prefork tuning attributes.",
"display_name": "Apache Worker",
"required": false,
"recipes": [
]
},
"apache\/contact": {
"default": "ops@example.com",
"type": "string",
"multiple_values": false,
"description": "Email address of webmaster",
"display_name": "Apache Contact",
"required": false,
"recipes": [
]
},
"apache\/prefork\/startservers": {
"default": "16",
"type": "string",
"multiple_values": false,
"description": "Number of MPM servers to start",
"display_name": "Apache Prefork MPM StartServers",
"required": false,
"recipes": [
]
},
"apache\/prefork\/minspareservers": {
"default": "16",
"type": "string",
"multiple_values": false,
"description": "Minimum number of spare server processes",
"display_name": "Apache Prefork MPM MinSpareServers",
"required": false,
"recipes": [
]
},
"apache\/keepalivetimeout": {
"default": "5",
"type": "string",
"multiple_values": false,
"description": "Time to wait for requests on persistent connection",
"display_name": "Apache Keepalive Timeout",
"required": false,
"recipes": [
]
},
"apache\/keepaliverequests": {
"default": "100",
"type": "string",
"multiple_values": false,
"description": "Number of requests allowed on a persistent connection",
"display_name": "Apache Keepalive Requests",
"required": false,
"recipes": [
]
},
"apache\/worker\/maxrequestsperchild": {
"default": "0",
"type": "string",
"multiple_values": false,
"description": "Maximum number of request a child process will handle",
"display_name": "Apache Worker MPM MaxRequestsPerChild",
"required": false,
"recipes": [
]
},
"apache\/listen_ports": {
"default": [
"80",
"443"
],
"type": "array",
"multiple_values": false,
"description": "Ports that Apache should listen on",
"display_name": "Apache Listen Ports",
"required": false,
"recipes": [
]
},
"apache\/dir": {
"default": "\/etc\/apache2",
"type": "string",
"multiple_values": false,
"description": "Location for Apache configuration",
"display_name": "Apache Directory",
"required": false,
"recipes": [
]
},
"apache\/worker\/maxsparethreads": {
"default": "192",
"type": "string",
"multiple_values": false,
"description": "Maximum number of spare worker threads",
"display_name": "Apache Worker MPM MaxSpareThreads",
"required": false,
"recipes": [
]
},
"apache\/prefork\/maxrequestsperchild": {
"default": "10000",
"type": "string",
"multiple_values": false,
"description": "Maximum number of request a child process will handle",
"display_name": "Apache Prefork MPM MaxRequestsPerChild",
"required": false,
"recipes": [
]
},
"apache\/prefork\/serverlimit": {
"default": "400",
"type": "string",
"multiple_values": false,
"description": "Upper limit on configurable server processes",
"display_name": "Apache Prefork MPM ServerLimit",
"required": false,
"recipes": [
]
},
"apache\/binary": {
"default": "\/usr\/sbin\/apache2",
"type": "string",
"multiple_values": false,
"description": "Apache server daemon program",
"display_name": "Apache Binary",
"required": false,
"recipes": [
]
},
"apache\/prefork\/maxspareservers": {
"default": "32",
"type": "string",
"multiple_values": false,
"description": "Maximum number of spare server processes",
"display_name": "Apache Prefork MPM MaxSpareServers",
"required": false,
"recipes": [
]
},
"apache\/keepalive": {
"default": "On",
"type": "string",
"multiple_values": false,
"description": "HTTP persistent connections",
"display_name": "Apache Keepalive",
"required": false,
"recipes": [
]
},
"apache": {
"type": "hash",
"multiple_values": false,
"description": "Hash of Apache attributes",
"display_name": "Apache Hash",
"required": false,
"recipes": [
]
},
"apache\/worker\/startservers": {
"default": "4",
"type": "string",
"multiple_values": false,
"description": "Initial number of server processes to start",
"display_name": "Apache Worker MPM StartServers",
"required": false,
"recipes": [
]
},
"apache\/prefork\/maxclients": {
"default": "400",
"type": "string",
"multiple_values": false,
"description": "Maximum number of simultaneous connections",
"display_name": "Apache Prefork MPM MaxClients",
"required": false,
"recipes": [
]
},
"apache\/prefork": {
"type": "hash",
"multiple_values": false,
"description": "Hash of Apache prefork tuning attributes.",
"display_name": "Apache Prefork",
"required": false,
"recipes": [
]
},
"apache\/servertokens": {
"default": "Prod",
"type": "string",
"multiple_values": false,
"description": "Server response header",
"display_name": "Apache Server Tokens",
"required": false,
"recipes": [
]
},
"apache\/worker\/minsparethreads": {
"default": "64",
"type": "string",
"multiple_values": false,
"description": "Minimum number of spare worker threads",
"display_name": "Apache Worker MPM MinSpareThreads",
"required": false,
"recipes": [
]
},
"apache\/serversignature": {
"default": "On",
"type": "string",
"multiple_values": false,
"description": "Configure footer on server-generated documents",
"display_name": "Apache Server Signature",
"required": false,
"recipes": [
]
},
"apache\/log_dir": {
"default": "\/etc\/apache2",
"type": "string",
"multiple_values": false,
"description": "Location for Apache logs",
"display_name": "Apache Log Directory",
"required": false,
"recipes": [
]
}
},
"suggestions": {
},
"license": "Apache 2.0",
"conflicting": {
},
"dependencies": {
},
"providing": {
"apache2::mod_python": [
],
"apache2::mod_authn_file": [
],
"apache2::mod_dir": [
],
"apache2::mod_php5": [
],
"apache2::mod_proxy_balancer": [
],
"apache2::mod_authz_groupfile": [
],
"apache2::mod_dav": [
],
"apache2::mod_auth_basic": [
],
"apache2::mod_setenvif": [
],
"apache2::mod_authz_user": [
],
"apache2::mod_deflate": [
],
"apache2::mod_dav_svn": [
],
"apache2::mod_negotiation": [
],
"apache2::mod_ssl": [
],
"apache2::mod_authz_host": [
],
"apache2::mod_rewrite": [
],
"apache2::mod_auth_digest": [
],
"apache2::mod_cgi": [
],
"apache2::mod_fcgid": [
],
"apache2::mod_env": [
],
"apache2::mod_headers": [
],
"apache2::mod_authnz_ldap": [
],
"apache2::mod_autoindex": [
],
"apache2::mod_proxy": [
],
"apache2::mod_proxy_connect": [
],
"apache2::mod_alias": [
],
"apache2::mod_ldap": [
],
"apache2::mod_status": [
],
"apache2::mod_authz_default": [
],
"apache2::mod_log_config": [
],
"apache2": [
],
"apache2::god_monitor": [
],
"apache2::mod_expires": [
],
"apache2::mod_proxy_http": [
],
"apache2::mod_mime": [
],
"apache2::mod_proxy_ajp": [
]
},
"long_description": "= DESCRIPTION:\n\nComplete Debian\/Ubuntu style Apache2 configuration.\n\n= REQUIREMENTS:\n\nDebian or Ubuntu preferred.\n\nRed Hat\/CentOS and Fedora can be used but will be converted to a Debian\/Ubuntu style Apache as it's far easier to manage with chef. \n\n= ATTRIBUTES:\n\nThe file attributes\/apache.rb contains the following attribute types:\n\n* platform specific locations and settings.\n* general settings\n* prefork attributes\n* worker attributes\n\nGeneral settings and prefork\/worker attributes are tunable.\n\n= USAGE:\n\nInclude the apache2 recipe to install Apache2 and get 'sane' default settings. Configuration is modularized through Apache vhost sites a la Debian style configuration.\n\nFor Red Hat, CentOS and Fedora you should first disable selinux as it's not supported (yet), then remove the stock httpd and all it's dependencies prior to attempting to use this recipe. Many packages in these distributions drop conflicting configs into conf.d, all of which haven't been accounted for yet. Starting from scratch will also make it far easier to debug.\n\n== Defines:\n\n* apache_module: sets up an Apache module.\n* apache_conf: sets up a config file for an apache module.\n* apache_site: sets up a vhost site. The conf file must be available.\n* web_app: copies the template for a web app and enables it as a site via apache_site.\n\n== Web Apps:\n\nVarious applications that can be set up with Apache as the front end, such as PHP, Django, Rails and others can use the web_app define to set up the template and the Apache site. The define is kind of dumb, so the template needs have the application implementation settings, since we don't know what your app is or what is needed from Apache.\n\nWe only prototype one parameter for the web_app define, \"template\". This is used to specify the name of the template to use in the current cookbook. When you use web_app, you can set up any parameters you want to use in your template. They will get passed to the template through the params hash. For example, the sample web_app.conf.erb template in this cookbook makes use of these.\n\n* docroot\n* server_name\n* server_aliases\n\nThese are available as @params[:docroot], @params[:server_name], @params[:server_aliases] within the template. \n\nIf 'cookbook' and 'template' are not specified, the current cookbook's templates\/default\/web_app.conf.erb will be used. If this template is not suitable for your application, copy it to your cookbook and customize as needed.\n\n== God Monitor:\n\nThere's a new recipe, apache2::god_monitor. You will need to make sure to include the 'god' recipe before using the apache2::god_monitor recipe in your cookbook.\n\n= LICENSE & AUTHOR:\n\nAuthor:: Joshua Timberman (<joshua@opscode.com>)\nCopyright:: 2009, Opscode, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:\/\/www.apache.org\/licenses\/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n"
}
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/metadata.rb
================================================
maintainer "Opscode, Inc."
maintainer_email "cookbooks@opscode.com"
license "Apache 2.0"
description "Installs and configures all aspects of apache2 using Debian style symlinks with helper definitions"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
version "0.9.1"
recipe "apache2", "Main Apache configuration"
recipe "apache2::mod_alias", "Apache module 'alias' with config file"
recipe "apache2::mod_auth_basic", "Apache module 'auth_basic'"
recipe "apache2::mod_auth_digest", "Apache module 'auth_digest'"
recipe "apache2::mod_authn_file", "Apache module 'authn_file'"
recipe "apache2::mod_authnz_ldap", "Apache module 'authnz_ldap'"
recipe "apache2::mod_authz_default", "Apache module 'authz_default'"
recipe "apache2::mod_authz_groupfile", "Apache module 'authz_groupfile'"
recipe "apache2::mod_authz_host", "Apache module 'authz_host'"
recipe "apache2::mod_authz_user", "Apache module 'authz_user'"
recipe "apache2::mod_autoindex", "Apache module 'autoindex' with config file"
recipe "apache2::mod_cgi", "Apache module 'cgi'"
recipe "apache2::mod_dav", "Apache module 'dav'"
recipe "apache2::mod_dav_svn", "Apache module 'dav_svn'"
recipe "apache2::mod_deflate", "Apache module 'deflate' with config file"
recipe "apache2::mod_dir", "Apache module 'dir' with config file"
recipe "apache2::mod_env", "Apache module 'env'"
recipe "apache2::mod_expires", "Apache module 'expires'"
recipe "apache2::mod_fcgid", "Apache module 'fcgid', package on ubuntu/debian, rhel/centos, compile source on suse; with config file"
recipe "apache2::mod_headers", "Apache module 'headers'"
recipe "apache2::mod_ldap", "Apache module 'ldap'"
recipe "apache2::mod_log_config", "Apache module 'log_config'"
recipe "apache2::mod_mime", "Apache module 'mime' with config file"
recipe "apache2::mod_negotiation", "Apache module 'negotiation' with config file"
recipe "apache2::mod_php5", "Apache module 'php5'"
recipe "apache2::mod_proxy", "Apache module 'proxy' with config file"
recipe "apache2::mod_proxy_ajp", "Apache module 'proxy_ajp'"
recipe "apache2::mod_proxy_balancer", "Apache module 'proxy_balancer'"
recipe "apache2::mod_proxy_connect", "Apache module 'proxy_connect'"
recipe "apache2::mod_proxy_http", "Apache module 'proxy_http'"
recipe "apache2::mod_python", "Apache module 'python'"
recipe "apache2::mod_rewrite", "Apache module 'rewrite'"
recipe "apache2::mod_setenvif", "Apache module 'setenvif' with config file"
recipe "apache2::mod_ssl", "Apache module 'ssl' with config file, adds port 443 to listen_ports"
recipe "apache2::mod_status", "Apache module 'status' with config file"
%w{redhat centos debian ubuntu}.each do |os|
supports os
end
attribute "apache",
:display_name => "Apache Hash",
:description => "Hash of Apache attributes",
:type => "hash"
attribute "apache/dir",
:display_name => "Apache Directory",
:description => "Location for Apache configuration",
:default => "/etc/apache2"
attribute "apache/log_dir",
:display_name => "Apache Log Directory",
:description => "Location for Apache logs",
:default => "/etc/apache2"
attribute "apache/user",
:display_name => "Apache User",
:description => "User Apache runs as",
:default => "www-data"
attribute "apache/binary",
:display_name => "Apache Binary",
:description => "Apache server daemon program",
:default => "/usr/sbin/apache2"
attribute "apache/icondir",
:display_name => "Apache Icondir",
:description => "Directory location for icons",
:default => "/usr/share/apache2/icons"
attribute "apache/listen_ports",
:display_name => "Apache Listen Ports",
:description => "Ports that Apache should listen on",
:type => "array",
:default => [ "80", "443" ]
attribute "apache/contact",
:display_name => "Apache Contact",
:description => "Email address of webmaster",
:default => "ops@example.com"
attribute "apache/timeout",
:display_name => "Apache Timeout",
:description => "Connection timeout value",
:default => "300"
attribute "apache/keepalive",
:display_name => "Apache Keepalive",
:description => "HTTP persistent connections",
:default => "On"
attribute "apache/keepaliverequests",
:display_name => "Apache Keepalive Requests",
:description => "Number of requests allowed on a persistent connection",
:default => "100"
attribute "apache/keepalivetimeout",
:display_name => "Apache Keepalive Timeout",
:description => "Time to wait for requests on persistent connection",
:default => "5"
attribute "apache/servertokens",
:display_name => "Apache Server Tokens",
:description => "Server response header",
:default => "Prod"
attribute "apache/serversignature",
:display_name => "Apache Server Signature",
:description => "Configure footer on server-generated documents",
:default => "On"
attribute "apache/traceenable",
:display_name => "Apache Trace Enable",
:description => "Determine behavior of TRACE requests",
:default => "On"
attribute "apache/prefork",
:display_name => "Apache Prefork",
:description => "Hash of Apache prefork tuning attributes.",
:type => "hash"
attribute "apache/prefork/startservers",
:display_name => "Apache Prefork MPM StartServers",
:description => "Number of MPM servers to start",
:default => "16"
attribute "apache/prefork/minspareservers",
:display_name => "Apache Prefork MPM MinSpareServers",
:description => "Minimum number of spare server processes",
:default => "16"
attribute "apache/prefork/maxspareservers",
:display_name => "Apache Prefork MPM MaxSpareServers",
:description => "Maximum number of spare server processes",
:default => "32"
attribute "apache/prefork/serverlimit",
:display_name => "Apache Prefork MPM ServerLimit",
:description => "Upper limit on configurable server processes",
:default => "400"
attribute "apache/prefork/maxclients",
:display_name => "Apache Prefork MPM MaxClients",
:description => "Maximum number of simultaneous connections",
:default => "400"
attribute "apache/prefork/maxrequestsperchild",
:display_name => "Apache Prefork MPM MaxRequestsPerChild",
:description => "Maximum number of request a child process will handle",
:default => "10000"
attribute "apache/worker",
:display_name => "Apache Worker",
:description => "Hash of Apache prefork tuning attributes.",
:type => "hash"
attribute "apache/worker/startservers",
:display_name => "Apache Worker MPM StartServers",
:description => "Initial number of server processes to start",
:default => "4"
attribute "apache/worker/maxclients",
:display_name => "Apache Worker MPM MaxClients",
:description => "Maximum number of simultaneous connections",
:default => "1024"
attribute "apache/worker/minsparethreads",
:display_name => "Apache Worker MPM MinSpareThreads",
:description => "Minimum number of spare worker threads",
:default => "64"
attribute "apache/worker/maxsparethreads",
:display_name => "Apache Worker MPM MaxSpareThreads",
:description => "Maximum number of spare worker threads",
:default => "192"
attribute "apache/worker/threadsperchild",
:display_name => "Apache Worker MPM ThreadsPerChild",
:description => "Constant number of worker threads in each server process",
:default => "64"
attribute "apache/worker/maxrequestsperchild",
:display_name => "Apache Worker MPM MaxRequestsPerChild",
:description => "Maximum number of request a child process will handle",
:default => "0"
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/default.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: default
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
package "apache2" do
case node[:platform]
when "centos","redhat","fedora","suse"
package_name "httpd"
when "debian","ubuntu"
package_name "apache2"
end
action :install
end
service "apache2" do
case node[:platform]
when "centos","redhat","fedora","suse"
service_name "httpd"
# If restarted/reloaded too quickly httpd has a habit of failing.
# This may happen with multiple recipes notifying apache to restart - like
# during the initial bootstrap.
restart_command "/sbin/service httpd restart && sleep 1"
reload_command "/sbin/service httpd reload && sleep 1"
when "debian","ubuntu"
service_name "apache2"
end
supports value_for_platform(
"debian" => { "4.0" => [ :restart, :reload ], "default" => [ :restart, :reload, :status ] },
"ubuntu" => { "default" => [ :restart, :reload, :status ] },
"centos" => { "default" => [ :restart, :reload, :status ] },
"redhat" => { "default" => [ :restart, :reload, :status ] },
"fedora" => { "default" => [ :restart, :reload, :status ] },
"default" => { "default" => [:restart, :reload ] }
)
action :enable
end
if platform?("centos", "redhat", "fedora", "suse")
directory node[:apache][:log_dir] do
mode 0755
action :create
end
remote_file "/usr/local/bin/apache2_module_conf_generate.pl" do
source "apache2_module_conf_generate.pl"
mode 0755
owner "root"
group "root"
end
%w{sites-available sites-enabled mods-available mods-enabled}.each do |dir|
directory "#{node[:apache][:dir]}/#{dir}" do
mode 0755
owner "root"
group "root"
action :create
end
end
execute "generate-module-list" do
if node[:kernel][:machine] == "x86_64"
libdir = "lib64"
else
libdir = "lib"
end
command "/usr/local/bin/apache2_module_conf_generate.pl /usr/#{libdir}/httpd/modules /etc/httpd/mods-available"
action :run
end
%w{a2ensite a2dissite a2enmod a2dismod}.each do |modscript|
template "/usr/sbin/#{modscript}" do
source "#{modscript}.erb"
mode 0755
owner "root"
group "root"
end
end
# installed by default on centos/rhel, remove in favour of mods-enabled
file "#{node[:apache][:dir]}/conf.d/proxy_ajp.conf" do
action :delete
backup false
end
file "#{node[:apache][:dir]}/conf.d/README" do
action :delete
backup false
end
# welcome page moved to the default-site.rb temlate
file "#{node[:apache][:dir]}/conf.d/welcome.conf" do
action :delete
backup false
end
end
directory "#{node[:apache][:dir]}/ssl" do
action :create
mode 0755
owner "root"
group "root"
end
template "apache2.conf" do
case node[:platform]
when "centos","redhat","fedora"
path "#{node[:apache][:dir]}/conf/httpd.conf"
when "debian","ubuntu"
path "#{node[:apache][:dir]}/apache2.conf"
end
source "apache2.conf.erb"
owner "root"
group "root"
mode 0644
notifies :restart, resources(:service => "apache2")
end
template "security" do
path "#{node[:apache][:dir]}/conf.d/security"
source "security.erb"
owner "root"
group "root"
mode 0644
backup false
notifies :restart, resources(:service => "apache2")
end
template "charset" do
path "#{node[:apache][:dir]}/conf.d/charset"
source "charset.erb"
owner "root"
group "root"
mode 0644
backup false
notifies :restart, resources(:service => "apache2")
end
template "#{node[:apache][:dir]}/ports.conf" do
source "ports.conf.erb"
group "root"
owner "root"
variables :apache_listen_ports => node[:apache][:listen_ports]
mode 0644
notifies :restart, resources(:service => "apache2")
end
template "#{node[:apache][:dir]}/sites-available/default" do
source "default-site.erb"
owner "root"
group "root"
mode 0644
notifies :restart, resources(:service => "apache2")
end
include_recipe "apache2::mod_status"
include_recipe "apache2::mod_alias"
include_recipe "apache2::mod_auth_basic"
include_recipe "apache2::mod_authn_file"
include_recipe "apache2::mod_authz_default"
include_recipe "apache2::mod_authz_groupfile"
include_recipe "apache2::mod_authz_host"
include_recipe "apache2::mod_authz_user"
include_recipe "apache2::mod_autoindex"
include_recipe "apache2::mod_dir"
include_recipe "apache2::mod_env"
include_recipe "apache2::mod_mime"
include_recipe "apache2::mod_negotiation"
include_recipe "apache2::mod_setenvif"
include_recipe "apache2::mod_log_config" if platform?("centos", "redhat", "suse")
# uncomment to get working example site on centos/redhat/fedora
#apache_site "default"
service "apache2" do
action :start
end
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/god_monitor.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: god_monitor
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_service = service "apache2" do
action :nothing
end
start_command = apache_service.start_command
stop_command = apache_service.stop_command
restart_command = apache_service.restart_command
god_monitor "apache2" do
config "apache2.god.erb"
start (start_command)?start_command : "/etc/init.d/#{apache_service.service_name} start"
restart (restart_command)?restart_command : "/etc/init.d/#{apache_service.service_name} restart"
stop (stop_command)?stop_command : "/etc/init.d/#{apache_service.service_name} stop"
end
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_alias.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: alias
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module "alias" do
conf true
end
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_auth_basic.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: auth_basic
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module "auth_basic"
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_auth_digest.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: auth_digest
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module "auth_digest"
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_authn_file.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: authn_file
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module "authn_file"
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_authnz_ldap.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: authnz_ldap
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module "authnz_ldap"
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_authz_default.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: authz_default
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module "authz_default"
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_authz_groupfile.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: authz_groupfile
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module "authz_groupfile"
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_authz_host.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: authz_host
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module "authz_host"
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_authz_user.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: authz_user
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module "authz_user"
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_autoindex.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: autoindex
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module "autoindex" do
conf true
end
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_cgi.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: cgi
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module "cgi"
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_dav.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: dav
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module "dav"
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_dav_svn.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: dav_svn
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
package "libapache2-svn"
apache_module "dav_svn"
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_deflate.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: deflate
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module "deflate" do
conf true
end
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_dir.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: dir
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module "dir" do
conf true
end
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_env.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: env
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module "env"
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_expires.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: expires
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module "expires"
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_fcgid.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: fcgid
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
if platform?("debian", "ubuntu")
package "libapache2-mod-fcgid"
elsif platform?("centos", "redhat", "fedora")
package "mod_fcgid" do
notifies :run, resources(:execute => "generate-module-list"), :immediately
end
file "#{node[:apache][:dir]}/conf.d/fcgid.conf" do
action :delete
backup false
end
elsif platform?("suse")
apache_lib_path = node[:architecture] == "i386" ? "/usr/lib/httpd" : "/usr/lib64/httpd"
package "httpd-devel"
bash "install-fcgid" do
code <<-EOH
(cd /tmp; wget http://superb-east.dl.sourceforge.net/sourceforge/mod-fcgid/mod_fcgid.2.2.tgz)
(cd /tmp; tar zxvf mod_fcgid.2.2.tgz)
(cd /tmp; perl -pi -e 's!/usr/local/apache2!#{apache_lib_path}!g' ./mod_fcgid.2.2/Makefile)
(cd /tmp/mod_fcgid.2.2; make install)
EOH
end
end
apache_module "fcgid" do
conf true
end
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_headers.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: headers
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module "headers"
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_ldap.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: ldap
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module "ldap"
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_log_config.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: log_config
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
if platform?("centos", "redhat", "fedora", "suse")
apache_module "log_config"
else
include_recipe "apache2"
end
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_mime.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: mime
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module "mime" do
conf true
end
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_negotiation.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: negotiation
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module "negotiation" do
conf true
end
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_php5.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: php5
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
case node[:platform]
when "debian", "ubuntu"
package "libapache2-mod-php5" do
action :install
end
when "centos", "redhat", "fedora"
package "php" do
action :install
notifies :run, resources(:execute => "generate-module-list"), :immediately
end
end
apache_module "php5"
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_proxy.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: proxy
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module "proxy" do
conf true
end
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_proxy_ajp.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: proxy
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module "proxy_ajp"
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_proxy_balancer.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: proxy
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module "proxy_balancer"
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_proxy_connect.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: proxy
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module "proxy_connect"
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_proxy_http.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: proxy_http
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module "proxy_http"
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_python.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: python
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
package "libapache2-mod-python"
apache_module "python"
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_rails.rb
================================================
#
# Cookbook Name:: passenger
# Recipe:: default
#
# Author:: Joshua Timberman (<joshua@opscode.com>)
# Author:: Joshua Sierles (<joshua@37signals.com>)
# Author:: Michael Hale (<mikehale@gmail.com>)
#
# Copyright:: 2009, Opscode, Inc
# Copyright:: 2009, 37signals
# Coprighty:: 2009, Michael Hale
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
include_recipe "passenger"
template "#{node[:apache][:dir]}/mods-available/passenger.load" do
cookbook "passenger"
source "passenger.load.erb"
owner "root"
group "root"
mode 0755
end
template "#{node[:apache][:dir]}/mods-available/passenger.conf" do
cookbook "passenger"
source "passenger.conf.erb"
owner "root"
group "root"
mode 0755
end
apache_module "passenger"
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_rewrite.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: rewrite
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module "rewrite"
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_setenvif.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: setenvif
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module "setenvif" do
conf true
end
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_ssl.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: ssl
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
if platform?("centos", "redhat", "fedora")
package "mod_ssl" do
action :install
notifies :run, resources(:execute => "generate-module-list"), :immediately
end
file "#{node[:apache][:dir]}/conf.d/ssl.conf" do
action :delete
backup false
end
end
ports = node[:apache][:listen_ports].include?("443") ? node[:apache][:listen_ports] : [node[:apache][:listen_ports], "443"].flatten
template "#{node[:apache][:dir]}/ports.conf" do
source "ports.conf.erb"
variables :apache_listen_ports => ports
notifies :restart, resources(:service => "apache2")
end
apache_module "ssl" do
conf true
end
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_status.rb
================================================
#
# Cookbook Name:: apache2
# Recipe:: status
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module "status" do
conf true
end
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/a2dismod.erb
================================================
#!/bin/sh -e
SYSCONFDIR='<%= @node[:apache][:dir] %>'
if [ -z $1 ]; then
echo "Which module would you like to disable?"
echo -n "Your choices are: "
ls $SYSCONFDIR/mods-enabled/*.load | \
sed -e "s,$SYSCONFDIR/mods-enabled/,,g" | sed -e 's/\.load$//g;' | xargs echo
echo -n "Module name? "
read MODNAME
else
MODNAME=$1
fi
if ! [ -e $SYSCONFDIR/mods-enabled/$MODNAME.load ]; then
echo "This module is already disabled, or does not exist!"
exit 1
fi
rm -f $SYSCONFDIR/mods-enabled/$MODNAME.*
echo "Module $MODNAME disabled; reload apache to fully disable."
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/a2dissite.erb
================================================
#!/bin/sh -e
SYSCONFDIR='<%= @node[:apache][:dir] %>'
if [ -z $1 ]; then
echo "Which site would you like to disable?"
echo -n "Your choices are: "
ls $@node[:apache][:dir]/sites-enabled/* | \
sed -e "s,$SYSCONFDIR/sites-enabled/,,g" | xargs echo
echo -n "Site name? "
read SITENAME
else
SITENAME=$1
fi
if [ $SITENAME = "default" ]; then
PRIORITY="000"
fi
if ! [ -e $SYSCONFDIR/sites-enabled/$SITENAME -o \
-e $SYSCONFDIR/sites-enabled/"$PRIORITY"-"$SITENAME" ]; then
echo "This site is already disabled, or does not exist!"
exit 1
fi
if ! rm $SYSCONFDIR/sites-enabled/$SITENAME 2>/dev/null; then
rm -f $SYSCONFDIR/sites-enabled/"$PRIORITY"-"$SITENAME"
fi
echo "Site $SITENAME disabled; reload apache to disable."
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/a2enmod.erb
================================================
#!/bin/sh -e
SYSCONFDIR='<%= @node[:apache][:dir] %>'
if [ -z $1 ]; then
echo "Which module would you like to enable?"
echo -n "Your choices are: "
ls $SYSCONFDIR/mods-available/*.load | \
sed -e "s,$SYSCONFDIR/mods-available/,,g" | sed -e 's/\.load$//g;' | xargs echo
echo -n "Module name? "
read MODNAME
else
MODNAME=$1
fi
#figure out if we're on a prefork or threaded mpm
if [ -x /usr/sbin/apache2 ]; then
PREFORK=`/usr/sbin/apache2 -l | grep prefork || true`
fi
if [ -e $SYSCONFDIR/mods-enabled/$MODNAME.load && -e $SYSCONFDIR/mods-enabled/$MODNAME.conf ]; then
echo "This module is already enabled!"
exit 0
fi
if ! [ -e $SYSCONFDIR/mods-available/$MODNAME.load ]; then
echo "This module does not exist!"
exit 1
fi
for i in conf load; do
if [ -e $SYSCONFDIR/mods-available/$MODNAME.$i -a ! -e $SYSCONFDIR/mods-enabled/$MODNAME.$i ]; then
ln -sf $SYSCONFDIR/mods-available/$MODNAME.$i $SYSCONFDIR/mods-enabled/$MODNAME.$i;
fi
done
echo "Module $MODNAME installed; reload apache to enable."
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/a2ensite.erb
================================================
#!/bin/sh -e
SYSCONFDIR='<%= @node[:apache][:dir] %>'
if [ -z $1 ]; then
echo "Which site would you like to enable?"
echo -n "Your choices are: "
ls $SYSCONFDIR/sites-available/* | \
sed -e "s,$SYSCONFDIR/sites-available/,,g" | xargs echo
echo -n "Site name? "
read SITENAME
else
SITENAME=$1
fi
if [ $SITENAME = "default" ]; then
PRIORITY="000"
fi
if [ -e $SYSCONFDIR/sites-enabled/$SITENAME -o \
-e $SYSCONFDIR/sites-enabled/"$PRIORITY"-"$SITENAME" ]; then
echo "This site is already enabled!"
exit 0
fi
if ! [ -e $SYSCONFDIR/sites-available/$SITENAME ]; then
echo "This site does not exist!"
exit 1
fi
if [ $SITENAME = "default" ]; then
ln -sf $SYSCONFDIR/sites-available/$SITENAME \
$SYSCONFDIR/sites-enabled/"$PRIORITY"-"$SITENAME"
else
ln -sf $SYSCONFDIR/sites-available/$SITENAME $SYSCONFDIR/sites-enabled/$SITENAME
fi
echo "Site $SITENAME installed; reload apache to enable."
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/apache2.conf.erb
================================================
#
# Generated by Chef
#
# Based on the Ubuntu apache2.conf
ServerRoot "<%= @node[:apache][:dir] %>"
#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
<% if @node[:platform] == "debian" || @node[:platform] == "ubuntu" -%>
LockFile /var/lock/apache2/accept.lock
<% else %>
LockFile logs/accept.lock
<% end -%>
#
# PidFile: The file in which the server should record its process
# identification number when it starts.
#
<% if @node[:platform] == "debian" || @node[:platform] == "ubuntu" -%>
PidFile /var/run/apache2.pid
<% elsif @node[:platform] == "centos" -%>
PidFile /var/run/httpd.pid
<% else -%>
PidFile logs/httpd.pid
<% end -%>
#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout <%= @node[:apache][:timeout] %>
#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive <%= @node[:apache][:keepalive] %>
#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests <%= @node[:apache][:keepaliverequests] %>
#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout <%= @node[:apache][:keepalivetimeout] %>
##
## Server-Pool Size Regulation (MPM specific)
##
# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_prefork_module>
StartServers <%= @node[:apache][:prefork][:startservers] %>
MinSpareServers <%= @node[:apache][:prefork][:minspareservers] %>
MaxSpareServers <%= @node[:apache][:prefork][:maxspareservers] %>
ServerLimit <%= @node[:apache][:prefork][:serverlimit] %>
MaxClients <%= @node[:apache][:prefork][:maxclients] %>
MaxRequestsPerChild <%= @node[:apache][:prefork][:maxrequestsperchild] %>
</IfModule>
# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_worker_module>
StartServers <%= @node[:apache][:worker][:startservers] %>
MaxClients <%= @node[:apache][:worker][:maxclients] %>
MinSpareThreads <%= @node[:apache][:worker][:minsparethreads] %>
MaxSpareThreads <%= @node[:apache][:worker][:maxsparethreads] %>
ThreadsPerChild <%= @node[:apache][:worker][:threadsperchild] %>
MaxRequestsPerChild <%= @node[:apache][:worker][:maxrequestsperchild] %>
</IfModule>
User <%= @node[:apache][:user] %>
Group <%= @node[:apache][:user] %>
#
# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives. See also the AllowOverride
# directive.
#
AccessFileName .htaccess
#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
#
# DefaultType is the default MIME type the server will use for a document
# if it cannot otherwise determine one, such as from filename extensions.
# If your server contains mostly text or HTML documents, "text/plain" is
# a good value. If most of your content is binary, such as applications
# or images, you may want to use "application/octet-stream" instead to
# keep browsers from trying to display binary files as though they are
# text.
#
DefaultType text/plain
#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog <%= @node[:apache][:log_dir] %>/error.log
#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn
# Include module configuration:
Include <%= @node[:apache][:dir] %>/mods-enabled/*.load
Include <%= @node[:apache][:dir] %>/mods-enabled/*.conf
# Include ports listing
Include <%= @node[:apache][:dir] %>/ports.conf
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
#
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
#
#
# Putting this all together, we can internationalize error responses.
#
# We use Alias to redirect any /error/HTTP_<error>.html.var response to
# our collection of by-error message multi-language collections. We use
# includes to substitute the appropriate text.
#
# You can modify the messages' appearance without changing any of the
# default HTTP_<error>.html.var files by adding the line:
#
# Alias /error/include/ "/your/include/path/"
#
# which allows you to create your own set of files by starting with the
# /usr/share/apache2/error/include/ files and copying them to /your/include/path/,
# even on a per-VirtualHost basis. The default include files will display
# your Apache version number and your ServerAdmin email address regardless
# of the setting of ServerSignature.
#
# The internationalized error documents require mod_alias, mod_include
# and mod_negotiation. To activate them, uncomment the following 30 lines.
# Alias /error/ "/usr/share/apache2/error/"
#
# <Directory "/usr/share/apache2/error">
# AllowOverride None
# Options IncludesNoExec
# AddOutputFilter Includes html
# AddHandler type-map var
# Order allow,deny
# Allow from all
# LanguagePriority en cs de es fr it nl sv pt-br ro
# ForceLanguagePriority Prefer Fallback
# </Directory>
#
# ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
# ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
# ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
# ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
# ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
# ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
# ErrorDocument 410 /error/HTTP_GONE.html.var
# ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
# ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
# ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
# ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
# ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
# ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
# ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
# ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
# ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
# ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
# Include generic snippets of statements
Include <%= @node[:apache][:dir] %>/conf.d/
# Include the virtual host configurations:
Include <%= @node[:apache][:dir] %>/sites-enabled/
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/apache2.god.erb
================================================
God.watch do |w|
w.name = "apache2"
w.interval = 30.seconds # default
w.start = "<%= @params[:start] %>"
w.stop = "/etc/init.d/httpd stop"
w.restart = "<%= @params[:restart] %>"
w.start_grace = 10.seconds
w.restart_grace = 10.seconds
w.pid_file = "/var/run/httpd.pid"
w.behavior(:clean_pid_file)
w.start_if do |start|
start.condition(:process_running) do |c|
c.interval = 5.seconds
c.running = false
c.notify = 'admin'
end
end
end
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/charset.erb
================================================
# Read the documentation before enabling AddDefaultCharset.
# In general, it is only a good idea if you know that all your files
# have this encoding. It will override any encoding given in the files
# in meta http-equiv or xml encoding tags.
#AddDefaultCharset UTF-8
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/default-site.erb
================================================
<VirtualHost *:80>
ServerAdmin <%= @node[:apache][:contact] %>
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
#RedirectMatch ^/$ /apache2-default/
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog <%= @node[:apache][:log_dir] %>/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog <%= @node[:apache][:log_dir] %>/access.log combined
ServerSignature On
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
<% if @node[:platform] == "centos" || @node[:platform] == "redhat" || @node[:platform] == "fedora" -%>
#
# This configuration file enables the default "Welcome"
# page if there is no default index page present for
# the root URL. To disable the Welcome page, comment
# out all the lines below.
#
<LocationMatch "^/+$">
Options -Indexes
ErrorDocument 403 /error/noindex.html
</LocationMatch>
<% end -%>
</VirtualHost>
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/mods/README
================================================
These configs are taken from a Debian apache2.2-common 2.2.11-3 install. They
work on CentOS 5.3 with a few conditions using erb.
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/mods/alias.conf.erb
================================================
<IfModule alias_module>
#
# Aliases: Add here as many aliases as you need (with no limit). The format is
# Alias fakename realname
#
# Note that if you include a trailing / on fakename then the server will
# require it to be present in the URL. So "/icons" isn't aliased in this
# example, only "/icons/". If the fakename is slash-terminated, then the
# realname must also be slash terminated, and if the fakename omits the
# trailing slash, the realname must also omit it.
#
# We include the /icons/ alias for FancyIndexed directory listings. If
# you do not use FancyIndexing, you may comment this out.
#
Alias /icons/ "<%= @node[:apache][:icondir] %>"
<Directory "<%= @node[:apache][:icondir] %>">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</IfModule>
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/mods/autoindex.conf.erb
================================================
<IfModule mod_autoindex.c>
#
# Directives controlling the display of server-generated directory listings.
#
#
# IndexOptions: Controls the appearance of server-generated directory
# listings.
# Remove/replace the "Charset=UTF-8" if you don't use UTF-8 for your filenames.
#
IndexOptions FancyIndexing VersionSort HTMLTable NameWidth=* DescriptionWidth=* Charset=UTF-8
#
# AddIcon* directives tell the server which icon to show for different
# files or filename extensions. These are only displayed for
# FancyIndexed directories.
#
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip x-bzip2
AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*
AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
# It's a suffix rule, so simply matching "core" matches "score" as well !
AddIcon /icons/bomb.gif /core
AddIcon (SND,/icons/sound2.gif) .ogg
AddIcon (VID,/icons/movie.gif) .ogm
AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^
# Default icons for OpenDocument format
AddIcon /icons/odf6odt-20x22.png .odt
AddIcon /icons/odf6ods-20x22.png .ods
AddIcon /icons/odf6odp-20x22.png .odp
AddIcon /icons/odf6odg-20x22.png .odg
AddIcon /icons/odf6odc-20x22.png .odc
AddIcon /icons/odf6odf-20x22.png .odf
AddIcon /icons/odf6odb-20x22.png .odb
AddIcon /icons/odf6odi-20x22.png .odi
AddIcon /icons/odf6odm-20x22.png .odm
AddIcon /icons/odf6ott-20x22.png .ott
AddIcon /icons/odf6ots-20x22.png .ots
AddIcon /icons/odf6otp-20x22.png .otp
AddIcon /icons/odf6otg-20x22.png .otg
AddIcon /icons/odf6otc-20x22.png .otc
AddIcon /icons/odf6otf-20x22.png .otf
AddIcon /icons/odf6oti-20x22.png .oti
AddIcon /icons/odf6oth-20x22.png .oth
#
# DefaultIcon is which icon to show for files which do not have an icon
# explicitly set.
#
DefaultIcon /icons/unknown.gif
#
# AddDescription allows you to place a short description after a file in
# server-generated indexes. These are only displayed for FancyIndexed
# directories.
# Format: AddDescription "description" filename
#
#AddDescription "GZIP compressed document" .gz
#AddDescription "tar archive" .tar
#AddDescription "GZIP compressed tar archive" .tgz
#
# ReadmeName is the name of the README file the server will look for by
# default, and append to directory listings.
#
# HeaderName is the name of a file which should be prepended to
# directory indexes.
ReadmeName README.html
HeaderName HEADER.html
#
# IndexIgnore is a set of filenames which directory indexing should ignore
# and not include in the listing. Shell-style wildcarding is permitted.
#
IndexIgnore .??* *~ *# RCS CVS *,v *,t
</IfModule>
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/mods/deflate.conf.erb
================================================
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml
</IfModule>
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/mods/dir.conf.erb
================================================
<IfModule mod_dir.c>
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
</IfModule>
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/mods/fcgid.conf.erb
================================================
<IfModule mod_fcgid.c>
AddHandler fcgid-script .fcgi
IPCConnectTimeout 20
</IfModule>
<% if @node[:platform] == "centos" || @node[:platform] == "redhat" || @node[:platform] == "fedora" -%>
# Sane place to put sockets and shared memory file
SocketPath run/mod_fcgid
SharememPath run/mod_fcgid/fcgid_shm
<% end -%>
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/mods/mime.conf.erb
================================================
<IfModule mod_mime.c>
#
# TypesConfig points to the file containing the list of mappings from
# filename extension to MIME-type.
#
TypesConfig /etc/mime.types
#
# AddType allows you to add to or override the MIME configuration
# file mime.types for specific file types.
#
#AddType application/x-gzip .tgz
#
# AddEncoding allows you to have certain browsers uncompress
# information on the fly. Note: Not all browsers support this.
# Despite the name similarity, the following Add* directives have
# nothing to do with the FancyIndexing customization directives above.
#
#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz
#AddEncoding x-bzip2 .bz2
#
# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
#
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-bzip2 .bz2
#
# DefaultLanguage and AddLanguage allows you to specify the language of
# a document. You can then use content negotiation to give a browser a
# file in a language the user can understand.
#
# Specify a default language. This means that all data
# going out without a specific language tag (see below) will
# be marked with this one. You probably do NOT want to set
# this unless you are sure it is correct for all cases.
#
# * It is generally better to not mark a page as
# * being a certain language than marking it with the wrong
# * language!
#
# DefaultLanguage nl
#
# Note 1: The suffix does not have to be the same as the language
# keyword --- those with documents in Polish (whose net-standard
# language code is pl) may wish to use "AddLanguage pl .po" to
# avoid the ambiguity with the common suffix for perl scripts.
#
# Note 2: The example entries below illustrate that in some cases
# the two character 'Language' abbreviation is not identical to
# the two character 'Country' code for its country,
# E.g. 'Danmark/dk' versus 'Danish/da'.
#
# Note 3: In the case of 'ltz' we violate the RFC by using a three char
# specifier. There is 'work in progress' to fix this and get
# the reference data for rfc1766 cleaned up.
#
# Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl)
# English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de)
# Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja)
# Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn)
# Norwegian (no) - Polish (pl) - Portugese (pt)
# Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv)
# Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW)
#
AddLanguage ca .ca
AddLanguage cs .cz .cs
AddLanguage da .dk
AddLanguage de .de
AddLanguage el .el
AddLanguage en .en
AddLanguage eo .eo
# See README.Debian for Spanish
AddLanguage es .es
AddLanguage et .et
AddLanguage fr .fr
AddLanguage he .he
AddLanguage hr .hr
AddLanguage it .it
AddLanguage ja .ja
AddLanguage ko .ko
AddLanguage ltz .ltz
AddLanguage nl .nl
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddLanguage pt .pt
AddLanguage pt-BR .pt-br
AddLanguage ru .ru
AddLanguage sv .sv
# See README.Debian for Turkish
AddLanguage tr .tr
AddLanguage zh-CN .zh-cn
AddLanguage zh-TW .zh-tw
#
# Commonly used filename extensions to character sets. You probably
# want to avoid clashes with the language extensions, unless you
# are good at carefully testing your setup after each change.
# See http://www.iana.org/assignments/character-sets for the
# official list of charset names and their respective RFCs.
#
AddCharset us-ascii .ascii .us-ascii
AddCharset ISO-8859-1 .iso8859-1 .latin1
AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen
AddCharset ISO-8859-3 .iso8859-3 .latin3
AddCharset ISO-8859-4 .iso8859-4 .latin4
AddCharset ISO-8859-5 .iso8859-5 .cyr .iso-ru
AddCharset ISO-8859-6 .iso8859-6 .arb .arabic
AddCharset ISO-8859-7 .iso8859-7 .grk .greek
AddCharset ISO-8859-8 .iso8859-8 .heb .hebrew
AddCharset ISO-8859-9 .iso8859-9 .latin5 .trk
AddCharset ISO-8859-10 .iso8859-10 .latin6
AddCharset ISO-8859-13 .iso8859-13
AddCharset ISO-8859-14 .iso8859-14 .latin8
AddCharset ISO-8859-15 .iso8859-15 .latin9
AddCharset ISO-8859-16 .iso8859-16 .latin10
AddCharset ISO-2022-JP .iso2022-jp .jis
AddCharset ISO-2022-KR .iso2022-kr .kis
AddCharset ISO-2022-CN .iso2022-cn .cis
AddCharset Big5 .Big5 .big5 .b5
AddCharset cn-Big5 .cn-big5
# For russian, more than one charset is used (depends on client, mostly):
AddCharset WINDOWS-1251 .cp-1251 .win-1251
AddCharset CP866 .cp866
AddCharset KOI8 .koi8
AddCharset KOI8-E .koi8-e
AddCharset KOI8-r .koi8-r .koi8-ru
AddCharset KOI8-U .koi8-u
AddCharset KOI8-ru .koi8-uk .ua
AddCharset ISO-10646-UCS-2 .ucs2
AddCharset ISO-10646-UCS-4 .ucs4
AddCharset UTF-7 .utf7
AddCharset UTF-8 .utf8
AddCharset UTF-16 .utf16
AddCharset UTF-16BE .utf16be
AddCharset UTF-16LE .utf16le
AddCharset UTF-32 .utf32
AddCharset UTF-32BE .utf32be
AddCharset UTF-32LE .utf32le
AddCharset euc-cn .euc-cn
AddCharset euc-gb .euc-gb
AddCharset euc-jp .euc-jp
AddCharset euc-kr .euc-kr
#Not sure how euc-tw got in - IANA doesn't list it???
AddCharset EUC-TW .euc-tw
AddCharset gb2312 .gb2312 .gb
AddCharset iso-10646-ucs-2 .ucs-2 .iso-10646-ucs-2
AddCharset iso-10646-ucs-4 .ucs-4 .iso-10646-ucs-4
AddCharset shift_jis .shift_jis .sjis
#
# AddHandler allows you to map certain file extensions to "handlers":
# actions unrelated to filetype. These can be either built into the server
# or added with the Action directive (see below)
#
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
#AddHandler cgi-script .cgi
#
# For files that include their own HTTP headers:
#
#AddHandler send-as-is asis
#
# For server-parsed imagemap files:
#
#AddHandler imap-file map
#
# For type maps (negotiated resources):
# (This is enabled by default to allow the Apache "It Worked" page
# to be distributed in multiple languages.)
#
AddHandler type-map var
#
# Filters allow you to process content before it is sent to the client.
#
# To parse .shtml files for server-side includes (SSI):
# (You will also need to add "Includes" to the "Options" directive.)
#
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
</IfModule>
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/mods/negotiation.conf.erb
================================================
<IfModule mod_negotiation.c>
#
# LanguagePriority allows you to give precedence to some languages
# in case of a tie during content negotiation.
#
# Just list the languages in decreasing order of preference. We have
# more or less alphabetized them here. You probably want to change this.
#
LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv tr zh-CN zh-TW
#
# ForceLanguagePriority allows you to serve a result page rather than
# MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)
# [in case no accepted languages matched the available variants]
#
ForceLanguagePriority Prefer Fallback
</IfModule>
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/mods/proxy.conf.erb
================================================
<IfModule mod_proxy.c>
#turning ProxyRequests on and allowing proxying from all may allow
#spammers to use your proxy to send email.
ProxyRequests Off
<Proxy *>
AddDefaultCharset off
Order deny,allow
Deny from all
#Allow from .example.com
</Proxy>
# Enable/disable the handling of HTTP/1.1 "Via:" headers.
# ("Full" adds the server version; "Block" removes all outgoing Via: headers)
# Set to one of: Off | On | Full | Block
ProxyVia On
</IfModule>
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/mods/setenvif.conf.erb
================================================
<IfModule mod_setenvif.c>
#
# The following directives modify normal HTTP response behavior to
# handle known problems with browser implementations.
#
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
#
# The following directive disables redirects on non-GET requests for
# a directory that does not include the trailing slash. This fixes a
# problem with Microsoft WebFolders which does not appropriately handle
# redirects for folders with DAV methods.
# Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
#
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "MS FrontPage" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
BrowserMatch "^gnome-vfs/1.0" redirect-carefully
BrowserMatch "^XML Spy" redirect-carefully
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
</IfModule>
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/mods/ssl.conf.erb
================================================
<IfModule mod_ssl.c>
#
# Pseudo Random Number Generator (PRNG):
# Configure one or more sources to seed the PRNG of the SSL library.
# The seed data should be of good random quality.
# WARNING! On some platforms /dev/random blocks if not enough entropy
# is available. This means you then cannot use the /dev/random device
# because it would lead to very long connection times (as long as
# it requires to make more entropy available). But usually those
# platforms additionally provide a /dev/urandom device which doesn't
# block. So, if available, use this one instead. Read the mod_ssl User
# Manual for more details.
#
SSLRandomSeed startup builtin
SSLRandomSeed startup file:/dev/urandom 512
SSLRandomSeed connect builtin
SSLRandomSeed connect file:/dev/urandom 512
##
## SSL Global Context
##
## All SSL configuration in this context applies both to
## the main server and all SSL-enabled virtual hosts.
##
#
# Some MIME-types for downloading Certificates and CRLs
#
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl
# Pass Phrase Dialog:
# Configure the pass phrase gathering process.
# The filtering dialog program (`builtin' is a internal
# terminal dialog) has to provide the pass phrase on stdout.
SSLPassPhraseDialog builtin
# Inter-Process Session Cache:
# Configure the SSL Session Cache: First the mechanism
# to use and second the expiring timeout (in seconds).
#SSLSessionCache dbm:/var/run/apache2/ssl_scache
<% if @node[:platform] == "centos" || @node[:platform] == "redhat" || @node[:platform] == "fedora" -%>
SSLSessionCache shmcb:/var/cache/mod_ssl/scache(512000)
<% else -%>
SSLSessionCache shmcb:/var/run/apache2/ssl_scache
<% end -%>
SSLSessionCacheTimeout 300
# Semaphore:
# Configure the path to the mutual exclusion semaphore the
# SSL engine uses internally for inter-process synchronization.
<% if @node[:platform] == "centos" || @node[:platform] == "redhat" || @node[:platform] == "fedora" -%>
SSLMutex default
<% else -%>
SSLMutex file:/var/run/apache2/ssl_mutex
<% end -%>
# SSL Cipher Suite:
# List the ciphers that the client is permitted to negotiate.
# See the mod_ssl documentation for a complete list.
# enable only secure ciphers:
SSLCipherSuite HIGH:MEDIUM:!ADH
# Use this instead if you want to allow cipher upgrades via SGC facility.
# In this case you also have to use something like
# SSLRequire %{SSL_CIPHER_USEKEYSIZE} >= 128
# see http://httpd.apache.org/docs/2.2/ssl/ssl_howto.html.en#upgradeenc
#SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
# enable only secure protocols: SSLv3 and TLSv1, but not SSLv2
SSLProtocol all -SSLv2
</IfModule>
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/mods/status.conf.erb
================================================
<IfModule mod_status.c>
#
# Allow server status reports generated by mod_status,
# with the URL of http://servername/server-status
# Uncomment and change the ".example.com" to allow
# access from other hosts.
#
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from localhost ip6-localhost
# Allow from .example.com
</Location>
</IfModule>
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/port_apache.erb
================================================
# Port <%= @port %>
-A FWR -p tcp -m tcp --dport <%= @port %> -j ACCEPT
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/ports.conf.erb
================================================
#This file generated via template by Chef.
<% @apache_listen_ports.each do |port| -%>
Listen <%= port %>
NameVirtualHost *:<%= port %>
<% end -%>
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/security.erb
================================================
#
# Disable access to the entire file system except for the directories that
# are explicitly allowed later.
#
# This currently breaks the configurations that come with some web application
# Debian packages. It will be made the default for the release after lenny.
#
#<Directory />
# AllowOverride None
# Order Deny,Allow
# Deny from all
#</Directory>
# Changing the following options will not really affect the security of the
# server, but might make attacks slightly more difficult in some cases.
#
# ServerTokens
# This directive configures what you return as the Server HTTP response
# Header. The default is 'Full' which sends information about the OS-Type
# and compiled in modules.
# Set to one of: Full | OS | Minimal | Minor | Major | Prod
# where Full conveys the most information, and Prod the least.
#
#ServerTokens Minimal
ServerTokens <%= @node[:apache][:servertokens] %>
#
# Optionally add a line containing the server version and virtual host
# name to server-generated pages (internal error documents, FTP directory
# listings, mod_status and mod_info output etc., but not CGI generated
# documents or custom error documents).
# Set to "EMail" to also include a mailto: link to the ServerAdmin.
# Set to one of: On | Off | EMail
#
#ServerSignature Off
ServerSignature <%= @node[:apache][:serversignature] %>
#
# Allow TRACE method
#
# Set to "extended" to also reflect the request body (only for testing and
# diagnostic purposes).
#
# Set to one of: On | Off | extended
#
#TraceEnable Off
TraceEnable <%= @node[:apache][:traceenable] %>
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/web_app.conf.erb
================================================
<VirtualHost *:80>
ServerName <%= @params[:server_name] %>
ServerAlias <% @params[:server_aliases].each do |a| %><%= "#{a}" %> <% end %>
DocumentRoot <%= @params[:docroot] %>
RewriteEngine On
<Directory <%= @params[:docroot] %>>
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Location /server-status>
SetHandler server-status
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Location>
LogLevel info
ErrorLog <%= @node[:apache][:log_dir] %>/<%= @params[:name] %>-error.log
CustomLog <%= @node[:apache][:log_dir] %>/<%= @params[:name] %>-access.log combined
RewriteEngine On
RewriteLog <%= @node[:apache][:log_dir] %>/<%= @application_name %>-rewrite.log
RewriteLogLevel 0
# Canonical host, <%= @params[:server_name] %>
RewriteCond %{HTTP_HOST} !^<%= @params[:server_name] %> [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.*)$ http://<%= @params[:server_name] %>/$1 [L,R=301]
RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
RewriteRule ^.*$ /system/maintenance.html [L]
</VirtualHost>
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apt/files/default/apt-cacher
================================================
# apt-cacher startup configuration file
# IMPORTANT: check the apt-cacher.conf file before using apt-cacher as daemon.
# set to 1 to start the daemon at boot time
AUTOSTART=1
# extra settings to override the ones in apt-cacher.conf
# EXTRAOPT=" daemon_port=3142 limit=30 "
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apt/files/default/apt-cacher.conf
================================================
# This file has been modified by ./apt-proxy-to-apt-cacher
# Some lines may have been appended at the bottom of this file
# This file has been modified by /usr/share/apt-cacher/apt-proxy-to-apt-cacher
# Some lines may have been appended at the bottom of this file
#################################################################
# This is the config file for apt-cacher. On most Debian systems
# you can safely leave the defaults alone.
#################################################################
# cache_dir is used to set the location of the local cache. This can
# become quite large, so make sure it is somewhere with plenty of space.
cache_dir=/var/cache/apt-cacher
# The email address of the administrator is displayed in the info page
# and traffic reports.
admin_email=root@localhost
# For the daemon startup settings please edit the file /etc/default/apt-cacher.
# Daemon port setting, only useful in stand-alone mode. You need to run the
# daemon as root to use privileged ports (<1024).
daemon_port = 3142
# optional settings, user and group to run the daemon as. Make sure they have
# sufficient permissions on the cache and log directories. Comment the settings
# to run apt-cacher as the native user.
group=www-data
user=www-data
# optional setting, binds the listening daemon to one specified IP. Use IP
# ranges for more advanced configuration, see below.
# daemon_addr=localhost
# If your apt-cacher machine is directly exposed to the Internet and you are
# worried about unauthorised machines fetching packages through it, you can
# specify a list of IPv4 addresses which are allowed to use it and another
# list of IPv4 addresses which aren't.
# Localhost (127.0.0.1) is always allowed. Other addresses must be matched
# by allowed_hosts and not by denied_hosts to be permitted to use the cache.
# Setting allowed_hosts to "*" means "allow all".
# Otherwise the format is a comma-separated list containing addresses,
# optionally with masks (like 10.0.0.0/22), or ranges of addresses (two
# addresses separated by a hyphen, no masks, like '192.168.0.3-192.168.0.56').
allowed_hosts=*
denied_hosts=
# And similiarly for IPv6 with allowed_hosts_6 and denied_hosts_6.
# Note that IPv4-mapped IPv6 addresses (::ffff:w.x.y.z) are truncated to
# w.x.y.z and are handled as IPv4.
allowed_hosts_6=fec0::/16
denied_hosts_6=
# This thing can be done by Apache but is much simplier here - limit access to
# Debian mirrors based on server names in the URLs
#allowed_locations=ftp.uni-kl.de,ftp.nerim.net,debian.tu-bs.de
# Apt-cacher can generate usage reports every 24 hours if you set this
# directive to 1. You can view the reports in a web browser by pointing
# to your cache machine with '/apt-cacher/report' on the end, like this:
# http://yourcache.example.com/apt-cacher/report
# Generating reports is very fast even with many thousands of logfile
# lines, so you can safely turn this on without creating much
# additional system load.
generate_reports=1
# Apt-cacher can clean up its cache directory every 24 hours if you set
# this directive to 1. Cleaning the cache can take some time to run
# (generally in the order of a few minutes) and removes all package
# files that are not mentioned in any existing 'Packages' lists. This
# has the effect of deleting packages that have been superseded by an
# updated 'Packages' list.
clean_cache=1
# The directory to use for apt-cacher access and error logs.
# The access log records every request in the format:
# date-time|client ip address|HIT/MISS/EXPIRED|object size|object name
# The error log is slightly more free-form, and is also used for debug
# messages if debug mode is turned on.
# Note that the old 'logfile' and 'errorfile' directives are
# deprecated: if you set them explicitly they will be honoured, but it's
# better to just get rid of them from old config files.
logdir=/var/log/apt-cacher
# apt-cacher can use different methods to decide whether package lists need to
# be updated,
# A) looking at the age of the cached files
# B) getting HTTP header from server and comparing that with cached data. This
# method is more reliable and avoids desynchronisation of data and index files
# but needs to transfer few bytes from the server every time somebody requests
# the files ("apt-get update")
# Set the following value to the maximum age (in hours) for method A or to 0
# for method B
expire_hours=0
# Apt-cacher can pass all its requests to an external http proxy like
# Squid, which could be very useful if you are using an ISP that blocks
# port 80 and requires all web traffic to go through its proxy. The
# format is 'hostname:port', eg: 'proxy.example.com:8080'.
http_proxy=proxy.example.com:8080
# Use of an external proxy can be turned on or off with this flag.
# Value should be either 0 (off) or 1 (on).
use_proxy=0
# External http proxy sometimes need authentication to get full access. The
# format is 'username:password'.
http_proxy_auth=proxyuser:proxypass
# Use of external proxy authentication can be turned on or off with this flag.
# Value should be either 0 (off) or 1 (on).
use_proxy_auth=0
# Rate limiting sets the maximum bandwidth in bytes per second to use
# for fetching packages. Syntax is fully defined in 'man wget'.
# Use 'k' or 'm' to use kilobits or megabits / second: eg, 'limit=25k'.
# Use 0 or a negative value for no rate limiting.
limit=0
# Debug mode makes apt-cacher spew a lot of extra debug junk to the
# error log (whose location is defined with the 'logdir' directive).
# Leave this off unless you need it, or your error log will get very
# big. Acceptable values are 0 or 1.
debug=0
# Adapt the line in the usage info web page to match your server configuration
# example_sources_line=deb http://<b>my.cacher.server:3142/</b>ftp.au.debian.org/debian unstable main contrib non-free
# Print a 410 (Gone) HTTP message with the specified text when accessed via
# CGI. Useful to tell users to adapt their sources.list files when the
# apt-cacher server is beeing relocated (via apt-get's error messages while
# running "update")
#cgi_advise_to_use = Please use http://cacheserver:3142/ as apt-cacher access URL
#cgi_advise_to_use = Server relocated. To change sources.list, run perl -pe "s,/apt-cacher\??,:3142," -i /etc/apt/sources.list
# Server mapping - this allows to hide real server names behind virtual paths
# that appear in the access URL. This method is known from apt-proxy. This is
# also the only method to use FTP access to the target hosts. The syntax is simple, the part of the beginning to replace, followed by a list of mirror urls, all space separated. Multiple profile are separated by semicolons
# path_map = debian ftp.uni-kl.de/pub/linux/debian ftp2.de.debian.org/debian ; ubuntu archive.ubuntu.com/ubuntu ; security security.debian.org/debian-security ftp2.de.debian.org/debian-security
# Note that you need to specify all target servers in the allowed_locations
# options if you make use of it. Also note that the paths should not overlap
# each other. FTP access method not supported yet, maybe in the future.
# extra setting from apt-proxy configuration
path_map = ubuntu us.archive.ubuntu.com/ubuntu ; ubuntu-security security.ubuntu.com/ubuntu ; debian debian.osuosl.org/debian/ ; security security.debian.org/debian-security
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apt/files/default/apt-proxy-v2.conf
================================================
[DEFAULT]
;; All times are in seconds, but you can add a suffix
;; for minutes(m), hours(h) or days(d)
;; commented out address so apt-proxy will listen on all IPs
;; address = 127.0.0.1
port = 9999
cache_dir = /var/cache/apt-proxy
;; Control files (Packages/Sources/Contents) refresh rate
min_refresh_delay = 1s
complete_clientless_downloads = 1
;; Debugging settings.
debug = all:4 db:0
time = 30
passive_ftp = on
;;--------------------------------------------------------------
;; Cache housekeeping
cleanup_freq = 1d
max_age = 120d
max_versions = 3
;;---------------------------------------------------------------
;; Backend servers
;;
;; Place each server in its own [section]
[ubuntu]
; Ubuntu archive
backends =
http://us.archive.ubuntu.com/ubuntu
[ubuntu-security]
; Ubuntu security updates
backends = http://security.ubuntu.com/ubuntu
[debian]
;; Backend servers, in order of preference
backends =
http://debian.osuosl.org/debian/
[security]
;; Debian security archive
backends =
http://security.debian.org/debian-security
http://ftp2.de.debian.org/debian-security
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apt/metadata.json
================================================
{
"description": "Configures apt and apt services",
"replacing": {
},
"recipes": {
"apt::proxy": "Set up an APT proxy",
"apt": "",
"apt::cacher": "Set up an APT cache"
},
"platforms": {
"ubuntu": [
],
"debian": [
]
},
"maintainer": "Opscode, Inc.",
"version": "0.7.0",
"recommendations": {
},
"name": "apt",
"maintainer_email": "cookbooks@opscode.com",
"attributes": {
},
"suggestions": {
},
"license": "Apache 2.0",
"conflicting": {
},
"dependencies": {
},
"providing": {
"apt::proxy": [
],
"apt": [
],
"apt::cacher": [
]
},
"long_description": ""
}
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apt/metadata.rb
================================================
maintainer "Opscode, Inc."
maintainer_email "cookbooks@opscode.com"
license "Apache 2.0"
description "Configures apt and apt services"
version "0.7"
recipe "apt::cacher", "Set up an APT cache"
recipe "apt::proxy", "Set up an APT proxy"
%w{ ubuntu debian }.each do |os|
supports os
end
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apt/recipes/cacher.rb
================================================
#
# Cookbook Name:: apt
# Recipe:: cacher
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
package "apt-cacher" do
action :install
end
service "apt-cacher" do
supports :restart => true, :status => false
action [ :enable, :start ]
end
remote_file "/etc/apt-cacher/apt-cacher.conf" do
source "apt-cacher.conf"
owner "root"
group "root"
mode 0644
notifies :restart, resources(:service => "apt-cacher")
end
remote_file "/etc/default/apt-cacher" do
source "apt-cacher"
owner "root"
group "root"
mode 0644
notifies :restart, resources(:service => "apt-cacher")
end
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apt/recipes/default.rb
================================================
#
# Cookbook Name:: apt
# Recipe:: default
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
execute "apt-get-update" do
command "apt-get update"
end
%w{/var/cache/local /var/cache/local/preseeding}.each do |dirname|
directory dirname do
owner "root"
group "root"
mode 0644
action :create
end
end
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/apt/recipes/proxy.rb
================================================
#
# Cookbook Name:: apt
# Recipe:: proxy
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
package "apt-proxy" do
action :install
end
service "apt-proxy" do
supports :restart => true, :status => false
action [ :enable, :start ]
end
remote_file "/etc/apt-proxy/apt-proxy-v2.conf" do
source "apt-proxy-v2.conf"
owner "root"
group "root"
mode 0644
notifies :restart, resources(:service => "apt-proxy")
end
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/bootstrap/README.rdoc
================================================
= DESCRIPTION:
This cookbook bootstraps a Chef client or server when Chef is installed via RubyGems. If installing Chef from OS distribution packages, please see the 'chef' cookbook.
= REQUIREMENTS:
This cookbook requires Chef installed from RubyGems. Chef v0.7.10, for attribute syntax.
== Platform:
Server bootstrap is tested on Ubuntu 9.10, 9.04, 8.10 and 8.04, Debian 5.0.
Client bootstrap is tested on the above, plus CentOS 5.3, Fedora 10, OpenBSD 4.6, FreeBSD 7.1 and Gentoo. OpenSolaris 11 is also tested, but there's a bug in Ohai that requires some manual intervention (OHAI-122).
== Cookbooks:
Opscode cookbooks, http://github.com/opscode/cookbooks:
Both clients and servers:
* runit
Servers only:
* couchdb
* stompserver
The couchdb and stompserver recipes may be somewhat naive depending on the platform. You should view them online at the github repository to see if your platform is supported. If not, you'll need to manually install them, and remove the "include_recipe" statements from the bootstrap::server recipe.
= ATTRIBUTES:
Attributes are under 'bootstrap[:chef]' - eg: 'bootstrap[:chef][:client_version]'. You may wish to change some of these locations to customize for your environment. For the bootstrap process this is done with a JSON data file passed to chef-solo.
== url_type
Set up the URLs the client should connect to with this. Default is 'http', which tells the client to connect to 'http://server:4000'. If you set up your chef-server to use an SSL front-end, set this to 'https' and the URLs will be 'https://server/'.
== init_style
Specifies the init style to use. Default 'runit'. Other possible values 'init', 'bsd', any other string will be treated as unknown.
If your platform doesn't have a 'runit' package or if the cookbook doesn't detect it, but you stil want to use runit, set init_style to 'none' and install runit separately.
== path
This is the base location where chef will store its associated data. Default '/srv/chef' for RubyGems installed systems. The location preference varies by platform. The default is a filesystem hiearchy standard suggestion[1]. Some other locations you may consider, by platform:
Debian and Red Hat based Linux distros (Ubuntu, CentOS, Fedora, etc):
* /var/lib/chef
Any BSD and Gentoo:
* /var/chef
== run_path
Location for pidfiles on systems using init scripts. Default '/var/run/chef'.
If init_style is 'init', this is used, and should match what the init script itself uses for the PID files.
== cache_path
Location where the client will cache cookbooks and other data. Default is 'cache' underneath the bootstrap[:chef][:path] location. Some Linux distributions might prefer /var/cache/chef instead.
== serve_path
Used by the Chef server as the base location to "serve" cookbooks, roles and other assets. Default is /srv/chef.
== server_version, client_version
Set the version of the Gems to install. This can be used to upgrade Chef automatically[0]. The chef gems are not managed by the Opscode Chef cookbook, however.
== client_interval
Number of seconds to run chef-client periodically. Default '1800' (30 minutes).
== client_splay
Splay interval to randomly add to interval. Default '20'.
== log_dir
Directory where logs are stored if logs are not sent to STDOUT. Systems using runit should send logs to STDOUT as runit manages log output. Default '/var/log/chef'.
== client_log, indexer_log, server_log
Location of the client, indexer and server logs, respectively. Default 'STDOUT' on systems with runit, '/var/log/chef/{client,indexer,server}.log' on other systems.
== server_fqdn
Fully qualified domain name of the server. Default is the current node's fqdn as detected by Ohai. For clients, set this to the hostname of your environment's Chef Server.
== server_token
The validation_token used to automatically authorize chef-clients. Default is a random string generated every time chef-solo runs. Use chef-client -t 'validation_token' to automatically validate the client.
[0] http://blog.opscode.com/2009/08/cool-chef-tricks-upgrade-chef-with-chef.html
[1] http://www.pathname.com/fhs/
= USAGE:
Opscode stores this cookbook and some others (see the requirements above) on S3. Use chef-solo:
sudo chef-solo -j chef.json -c solo.rb -r http://s3.amazonaws.com/chef-repo/bootstrap.tar.gz
You set the attributes through the chef.json file, and tell Solo where to put them with solo.rb.
== Clients:
Common attributes you may wish to adjust for the client:
{
"bootstrap": {
"chef": {
"url_type": "http",
"init_style": "runit",
"path": "/srv/chef",
"server_fqdn": "localhost.localdomain",
}
},
"recipes": "bootstrap::client"
}
== Servers:
Common attributes you may wish to adjust for the server:
{
"bootstrap": {
"chef": {
"url_type": "http",
"init_style": "runit",
"path": "/srv/chef",
"serve_path": "/srv/chef",
"server_fqdn": "localhost.localdomain",
}
},
"recipes": "bootstrap::server"
}
Note that the server recipe includes the client recipe as well, since we recommend managing the chef-server with Chef.
For more information on usage and next steps, please see the Chef wiki.
http://wiki.opscode.com/display/chef/Home
= LICENSE and AUTHOR:
Author:: Joshua Timberman <joshua@opscode.com>
Author:: Joshua Sierles <joshua@37signals.com>
Copyright 2008-2009, Opscode, Inc
Copyright 2009, 37signals
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/bootstrap/attributes/bootstrap.rb
================================================
#
# Cookbook Name:: bootstrap
# Attributes:: bootstrap
#
# Copyright 2008-2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
validation_token = ""
chars = ("a".."z").to_a + ("A".."Z").to_a + ("0".."9").to_a
20.times { |i| validation_token << chars[rand(chars.size-1)] }
default[:bootstrap][:chef][:url_type] = "http"
default[:bootstrap][:chef][:init_style] = "runit"
default[:bootstrap][:chef][:path] = "/srv/chef"
default[:bootstrap][:chef][:run_path] = "/var/run/chef"
default[:bootstrap][:chef][:cache_path] = "/#{bootstrap[:chef][:path]}/cache"
default[:bootstrap][:chef][:serve_path] = "/srv/chef"
default[:bootstrap][:chef][:server_version] = "0.7.10"
default[:bootstrap][:chef][:client_version] = "0.7.10"
default[:bootstrap][:chef][:client_interval] = "1800"
default[:bootstrap][:chef][:client_splay] = "20"
default[:bootstrap][:chef][:log_dir] = "/var/log/chef"
case bootstrap[:chef][:init_style]
when "runit"
default[:bootstrap][:chef][:client_log] = "STDOUT"
default[:bootstrap][:chef][:server_log] = "STDOUT"
default[:bootstrap][:chef][:indexer_log] = "STDOUT"
else
default[:bootstrap][:chef][:client_log] = "#{bootstrap[:chef][:log_dir]}/client.log"
default[:bootstrap][:chef][:server_log] = "#{bootstrap[:chef][:log_dir]}/server.log"
default[:bootstrap][:chef][:indexer_log] = "#{bootstrap[:chef][:log_dir]}/indexer.log"
end
default[:bootstrap][:chef][:server_fqdn] = domain ? "chef.#{domain}" : "chef"
default[:bootstrap][:chef][:server_token] = validation_token
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/bootstrap/metadata.json
================================================
{
"description": "Configures RubyGems-installed Chef",
"replacing": {
},
"recipes": {
"bootstrap::client": "",
"bootstrap::server": "",
"bootstrap": ""
},
"platforms": {
},
"maintainer": "Opscode, Inc.",
"version": "0.1.0",
"recommendations": {
},
"name": "bootstrap",
"maintainer_email": "cookbooks@opscode.com",
"attributes": {
},
"suggestions": {
},
"license": "Apache 2.0",
"conflicting": {
},
"dependencies": {
"stompserver": [
],
"runit": [
],
"couchdb": [
],
"apache2": [
]
},
"providing": {
"bootstrap": [
],
"bootstrap::client": [
],
"bootstrap::server": [
]
},
"long_description": "= DESCRIPTION:\n\nThis cookbook bootstraps a Chef client or server when Chef is installed via RubyGems. If installing Chef from OS distribution packages, please see the 'chef' cookbook. \n\n= REQUIREMENTS:\n\nThis cookbook requires Chef installed from RubyGems. Chef v0.7.10, for attribute syntax.\n\n== Platform:\n\nServer bootstrap is tested on Ubuntu 9.10, 9.04, 8.10 and 8.04, Debian 5.0.\n\nClient bootstrap is tested on the above, plus CentOS 5.3, Fedora 10, OpenBSD 4.6, FreeBSD 7.1 and Gentoo. OpenSolaris 11 is also tested, but there's a bug in Ohai that requires some manual intervention (OHAI-122).\n\n== Cookbooks:\n\nOpscode cookbooks, http:\/\/github.com\/opscode\/cookbooks:\n\nBoth clients and servers:\n\n* runit\n\nServers only:\n\n* couchdb\n* stompserver\n\nThe couchdb and stompserver recipes may be somewhat naive depending on the platform. You should view them online at the github repository to see if your platform is supported. If not, you'll need to manually install them, and remove the \"include_recipe\" statements from the bootstrap::server recipe.\n\n= ATTRIBUTES:\n\nAttributes are under 'bootstrap[:chef]' - eg: 'bootstrap[:chef][:client_version]'. You may wish to change some of these locations to customize for your environment. For the bootstrap process this is done with a JSON data file passed to chef-solo.\n\n== url_type\n\nSet up the URLs the client should connect to with this. Default is 'http', which tells the client to connect to 'http:\/\/server:4000'. If you set up your chef-server to use an SSL front-end, set this to 'https' and the URLs will be 'https:\/\/server\/'. \n\n== init_style\n\nSpecifies the init style to use. Default 'runit'. Other possible values 'init', 'bsd', any other string will be treated as unknown.\n\nIf your platform doesn't have a 'runit' package or if the cookbook doesn't detect it, but you stil want to use runit, set init_style to 'none' and install runit separately.\n\n== path\n\nThis is the base location where chef will store its associated data. Default '\/srv\/chef' for RubyGems installed systems. The location preference varies by platform. The default is a filesystem hiearchy standard suggestion[1]. Some other locations you may consider, by platform:\n\nDebian and Red Hat based Linux distros (Ubuntu, CentOS, Fedora, etc):\n\n* \/var\/lib\/chef\n\nAny BSD and Gentoo:\n\n* \/var\/chef\n\n== run_path\n\nLocation for pidfiles on systems using init scripts. Default '\/var\/run\/chef'.\n\nIf init_style is 'init', this is used, and should match what the init script itself uses for the PID files.\n\n== cache_path\n\nLocation where the client will cache cookbooks and other data. Default is 'cache' underneath the bootstrap[:chef][:path] location. Some Linux distributions might prefer \/var\/cache\/chef instead.\n\n== serve_path\n\nUsed by the Chef server as the base location to \"serve\" cookbooks, roles and other assets. Default is \/srv\/chef.\n\n== server_version, client_version\n\nSet the version of the Gems to install. This can be used to upgrade Chef automatically[0]. The chef gems are not managed by the Opscode Chef cookbook, however.\n\n== client_interval\n\nNumber of seconds to run chef-client periodically. Default '1800' (30 minutes).\n\n== client_splay\n\nSplay interval to randomly add to interval. Default '20'.\n\n== log_dir\n\nDirectory where logs are stored if logs are not sent to STDOUT. Systems using runit should send logs to STDOUT as runit manages log output. Default '\/var\/log\/chef'.\n\n== client_log, indexer_log, server_log\n\nLocation of the client, indexer and server logs, respectively. Default 'STDOUT' on systems with runit, '\/var\/log\/chef\/{client,indexer,server}.log' on other systems.\n\n== server_fqdn\n\nFully qualified domain name of the server. Default is the current node's fqdn as detected by Ohai. For clients, set this to the hostname of your environment's Chef Server.\n\n== server_token\n\nThe validation_token used to automatically authorize chef-clients. Default is a random string generated every time chef-solo runs. Use chef-client -t 'validation_token' to automatically validate the client.\n\n[0] http:\/\/blog.opscode.com\/2009\/08\/cool-chef-tricks-upgrade-chef-with-chef.html\n[1] http:\/\/www.pathname.com\/fhs\/\n\n= USAGE:\n\nOpscode stores this cookbook and some others (see the requirements above) on S3. Use chef-solo:\n\n sudo chef-solo -j chef.json -c solo.rb -r http:\/\/s3.amazonaws.com\/chef-repo\/bootstrap.tar.gz\n\nYou set the attributes through the chef.json file, and tell Solo where to put them with solo.rb.\n\n== Clients:\n\nCommon attributes you may wish to adjust for the client:\n\n{\n \"bootstrap\": {\n \"chef\": {\n \"url_type\": \"http\",\n \"init_style\": \"runit\",\n \"path\": \"\/srv\/chef\",\n \"server_fqdn\": \"localhost.localdomain\",\n }\n },\n \"recipes\": \"bootstrap::client\"\n}\n\n== Servers:\n\nCommon attributes you may wish to adjust for the server:\n\n{\n \"bootstrap\": {\n \"chef\": {\n \"url_type\": \"http\",\n \"init_style\": \"runit\",\n \"path\": \"\/srv\/chef\",\n \"serve_path\": \"\/srv\/chef\",\n \"server_fqdn\": \"localhost.localdomain\",\n }\n },\n \"recipes\": \"bootstrap::server\"\n}\n\nNote that the server recipe includes the client recipe as well, since we recommend managing the chef-server with Chef.\n\nFor more information on usage and next steps, please see the Chef wiki.\n\n http:\/\/wiki.opscode.com\/display\/chef\/Home\n\n= LICENSE and AUTHOR:\n\nAuthor:: Joshua Timberman <joshua@opscode.com>\nAuthor:: Joshua Sierles <joshua@37signals.com>\n\nCopyright 2008-2009, Opscode, Inc\nCopyright 2009, 37signals\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:\/\/www.apache.org\/licenses\/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\n"
}
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/bootstrap/metadata.rb
================================================
maintainer "Opscode, Inc."
maintainer_email "cookbooks@opscode.com"
license "Apache 2.0"
description "Configures RubyGems-installed Chef"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
version "0.1"
%w{ runit couchdb stompserver apache2 }.each do |cb|
depends cb
end
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/bootstrap/recipes/client.rb
================================================
#
# Cookbook Name:: bootstrap
# Recipe:: default
#
# Copyright 2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
root_group = value_for_platform(
"openbsd" => { "default" => "wheel" },
"freebsd" => { "default" => "wheel" },
"default" => "root"
)
# case node[:platform]
# when "debian", "ubuntu"
# package 'chef'
# require_recipe "ubuntu"
# else
# puts "not ubuntu"
# end
gem_package "chef" do
version node[:bootstrap][:chef][:client_version]
end
case node[:bootstrap][:chef][:init_style]
when "runit"
client_log = node[:bootstrap][:chef][:client_log]
show_time = "false"
include_recipe "runit"
runit_service "chef-client"
when "init"
client_log = "\"#{node[:bootstrap][:chef][:client_log]}\""
show_time = "true"
directory node[:bootstrap][:chef][:run_path] do
action :create
owner "root"
group root_group
mode "755"
end
service "chef-client" do
action :nothing
end
Chef::Log.info("You specified service style 'init'.")
Chef::Log.info("'init' scripts available in #{node[:languages][:ruby][:gems_dir]}/gems/chef-#{node[:bootstrap][:chef][:client_version]}/distro")
when "bsd"
client_log = node[:bootstrap][:chef][:client_log]
show_time = "false"
Chef::Log.info("You specified service style 'bsd'. You will need to set up your rc.local file.")
Chef::Log.info("Hint: chef-client -i #{node[:bootstrap][:chef][:client_interval]} -s #{node[:bootstrap][:chef][:client_splay]}")
else
client_log = node[:bootstrap][:chef][:client_log]
show_time = "false"
Chef::Log.info("Could not determine service init style, manual intervention required to start up the client service.")
end
chef_dirs = [
node[:bootstrap][:chef][:log_dir],
node[:bootstrap][:chef][:path],
"/etc/chef"
]
chef_dirs.each do |dir|
directory dir do
owner "root"
group root_group
mode "755"
end
end
template "/etc/chef/client.rb" do
source "client.rb.erb"
owner "root"
group root_group
mode "644"
variables(
:client_log => client_log,
:show_time => show_time
)
end
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/bootstrap/recipes/default.rb
================================================
#
# Cookbook Name:: bootstrap
# Recipe:: client
#
# Copyright 2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/bootstrap/recipes/server.rb
================================================
#
# Author:: Joshua Timberman <joshua@opscode.com>
# Author:: Joshua Sierles <joshua@37signals.com>
#
# Cookbook Name:: bootstrap
# Recipe:: server
#
# Copyright 2009, Opscode, Inc.
# Copyright 2009, 37signals
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
root_group = value_for_platform(
"openbsd" => { "default" => "wheel" },
"freebsd" => { "default" => "wheel" },
"default" => "root"
)
include_recipe "bootstrap::client"
include_recipe "stompserver"
case node[:platform]
when "ubuntu"
if node[:platform_version].to_f >= 8.10
include_recipe "couchdb"
end
when "debian"
if node[:platform_version].to_f >= 5.0 || node[:platform_version] =~ /.*sid/
include_recipe "couchdb"
end
when "centos","redhat","fedora"
include_recipe "couchdb"
else
Chef::Log.info("Unknown platform for CouchDB. Manual installation of CouchDB required.")
end
%w{ chef-server chef-server-slice }.each do |gem|
gem_package gem do
version node[:bootstrap][:chef][:server_version]
end
end
if node[:bootstrap][:chef][:server_log] == "STDOUT"
server_log = node[:bootstrap][:chef][:server_log]
show_time = "false"
else
server_log = "\"#{node[:bootstrap][:chef][:server_log]}\""
indexer_log = "\"#{node[:bootstrap][:chef][:indexer_log]}\""
show_time = "true"
end
template "/etc/chef/server.rb" do
source "server.rb.erb"
owner "root"
group root_group
mode "600"
variables(
:server_log => server_log,
:show_time => show_time
)
end
%w{ openid cache search_index openid/cstore openid/store }.each do |dir|
directory "#{node[:bootstrap][:chef][:path]}/#{dir}" do
owner "root"
group root_group
mode "755"
end
end
directory "/etc/chef/certificates" do
owner "root"
group root_group
mode "700"
end
directory node[:bootstrap][:chef][:run_path] do
owner "root"
group root_group
mode "755"
end
case node[:bootstrap][:chef][:init_style]
when "runit"
include_recipe "runit"
runit_service "chef-indexer"
runit_service "chef-server"
service "chef-server" do
restart_command "sv int chef-server"
end
when "init"
show_time = "true"
service "chef-indexer" do
action :nothing
end
service "chef-server" do
action :nothing
end
Chef::Log.info("You specified service style 'init'.")
Chef::Log.info("'init' scripts available in #{node[:languages][:ruby][:gems_dir]}/gems/chef-#{node[:bootstrap][:chef][:client_version]}/distro")
when "bsd"
Chef::Log.info("You specified service style 'bsd'. You will need to set up your rc.local file for chef-indexer and chef-server.")
Chef::Log.info("Server startup command: chef-server -c2 -d")
else
Chef::Log.info("Could not determine service init style, manual intervention required to set up indexer and server services.")
end
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/bootstrap/templates/default/client.rb.erb
================================================
#
# Chef Client Config File
#
# Dynamically generated by Chef - local modifications will be replaced
#
log_level :info
log_location <%= @client_log %>
ssl_verify_mode :verify_none
<% if @node[:bootstrap][:chef][:url_type] == "https" -%>
registration_url "https://<%= @node[:bootstrap][:chef][:server_fqdn] %>"
openid_url "https://<%= @node[:bootstrap][:chef][:server_fqdn] %>:444"
template_url "https://<%= @node[:bootstrap][:chef][:server_fqdn] %>"
remotefile_url "https://<%= @node[:bootstrap][:chef][:server_fqdn] %>"
search_url "https://<%= @node[:bootstrap][:chef][:server_fqdn] %>"
role_url "https://<%= @node[:bootstrap][:chef][:server_fqdn] %>"
<% else -%>
registration_url "http://<%= @node[:bootstrap][:chef][:server_fqdn] %>:4000"
openid_url "http://<%= @node[:bootstrap][:chef][:server_fqdn] %>:4001"
template_url "http://<%= @node[:bootstrap][:chef][:server_fqdn] %>:4000"
remotefile_url "http://<%= @node[:bootstrap][:chef][:server_fqdn] %>:4000"
search_url "http://<%= @node[:bootstrap][:chef][:server_fqdn] %>:4000"
role_url "http://<%= @node[:bootstrap][:chef][:server_fqdn] %>:4000"
<% end -%>
file_cache_path "<%= @node[:bootstrap][:chef][:cache_path] %>"
pid_file "<%= @node[:bootstrap][:chef][:run_path] %>/chef-client.pid"
Chef::Log::Formatter.show_time = <%= @show_time %>
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/bootstrap/templates/default/server.rb.erb
================================================
#
# Chef Server Config File
#
# Dynamically generated by Chef - local modifications will be replaced
log_level :info
log_location <%= @server_log %>
ssl_verify_mode :verify_none
registration_url "http://<%= @node[:bootstrap][:chef][:server_fqdn] %>:4000"
openid_url "http://<%= @node[:bootstrap][:chef][:server_fqdn] %>:4001"
template_url "http://<%= @node[:bootstrap][:chef][:server_fqdn] %>:4000"
remotefile_url "http://<%= @node[:bootstrap][:chef][:server_fqdn] %>:4000"
search_url "http://<%= @node[:bootstrap][:chef][:server_fqdn] %>:4000"
role_url "http://<%= @node[:bootstrap][:chef][:server_fqdn] %>:4000"
validation_token "<%= @node[:bootstrap][:chef][:server_token] %>"
cookbook_path [ "<%= @node[:bootstrap][:chef][:serve_path] %>/site-cookbooks", "<%= @node[:bootstrap][:chef][:serve_path] %>/cookbooks" ]
file_cache_path "<%= @node[:bootstrap][:chef][:cache_path] %>"
node_path "<%= @node[:bootstrap][:chef][:serve_path] %>/nodes"
openid_store_path "<%= @node[:bootstrap][:chef][:path] %>/openid/store"
openid_cstore_path "<%= @node[:bootstrap][:chef][:path] %>/openid/cstore"
search_index_path "<%= @node[:bootstrap][:chef][:path] %>/search_index"
role_path "<%= @node[:bootstrap][:chef][:serve_path] %>/roles"
# See http://wiki.opscode.com/display/chef/Securing+Chef+Server
# For more information on these settings.
#authorized_openid_providers [ "https://<%= @node[:bootstrap][:chef][:server_fqdn]%>", "https://chef", "myopenid.com" ]
#authorized_openid_identifiers [ "" ]
Chef::Log::Formatter.show_time = <%= @show_time %>
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/bootstrap/templates/default/sv-chef-client-log-run.erb
================================================
#!/bin/sh
exec svlogd -tt ./main
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/bootstrap/templates/default/sv-chef-client-run.erb
================================================
#!/bin/sh
PATH=/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin<% if @node[:languages][:ruby][:gems_dir] %>:<%= @node[:languages][:ruby][:gems_dir] %>/bin<% end -%>
exec 2>&1
exec /usr/bin/env chef-client -i <%= @node[:bootstrap][:chef][:client_interval] %> -s <%= @node[:bootstrap][:chef][:client_splay] %> <% if @node[:bootstrap][:chef][:client_log] != "STDOUT" then -%>-L <%= @node[:bootstrap][:chef][:client_log] %><% end -%>
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/bootstrap/templates/default/sv-chef-indexer-log-run.erb
================================================
#!/bin/sh
exec svlogd -tt ./main
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/bootstrap/templates/default/sv-chef-indexer-run.erb
================================================
#!/bin/sh
PATH=/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin<% if @node[:languages][:ruby][:gems_dir] %>:<%= @node[:languages][:ruby][:gems_dir] %>/bin<% end -%>
exec 2>&1
exec /usr/bin/env chef-indexer
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/bootstrap/templates/default/sv-chef-server-log-run.erb
================================================
#!/bin/sh
exec svlogd -tt ./main
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/bootstrap/templates/default/sv-chef-server-run.erb
================================================
#!/bin/sh
PATH=/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin<% if @node[:languages][:ruby][:gems_dir] %>:<%= @node[:languages][:ruby][:gems_dir] %>/bin<% end -%>
exec 2>&1
exec /usr/bin/env chef-server -N -c2 -P <%= @node[:bootstrap][:chef][:run_path] %>/server.%s.pid
================================================
FILE: examples/chef_cloud/chef_repo/cookbooks/chef/README.rdoc
================================================
= IMPORTANT CHANGES:
First be aware of important changes in this version from previous versions.
== General:
The attributes have been consolidated into one file, chef.rb, rather than split amongst chef.rb, client.rb, indexer.rb and server.rb.
== Client:
This cookbook no longer manages the chef package version, it manages /etc/chef/client.rb, reloads the configuration using the new ruby_block resource if the template changes.
The client service is not managed at all. It is assumed to be set up via init script or runit from package installation or bootstrap.
== Server:
*This cookbook no longer configures a Chef Server under Passenger by default.*
The stompserver and couchdb cookbooks are not included by default. See below under
gitextract_s60rxf8b/
├── .gitignore
├── .gitmodules
├── .rdebugrc
├── .rvmrc
├── Gemfile
├── License.txt
├── Makefile
├── Manifest.txt
├── README.rdoc
├── Rakefile
├── Vagrantfile
├── bin/
│ ├── cloud
│ ├── cloud-bootstrap
│ ├── cloud-compile
│ ├── cloud-configure
│ ├── cloud-console
│ ├── cloud-contract
│ ├── cloud-cssh
│ ├── cloud-expand
│ ├── cloud-list
│ ├── cloud-reboot
│ ├── cloud-rsync
│ ├── cloud-run
│ ├── cloud-show
│ ├── cloud-ssh
│ ├── cloud-start
│ ├── cloud-terminate
│ └── cloud-vnc
├── config/
│ └── requirements.rb
├── examples/
│ ├── README.md
│ ├── chef_cloud/
│ │ ├── chef_repo/
│ │ │ ├── .gitignore
│ │ │ ├── README
│ │ │ ├── Rakefile
│ │ │ ├── certificates/
│ │ │ │ └── README
│ │ │ ├── config/
│ │ │ │ ├── client.rb.example
│ │ │ │ ├── rake.rb
│ │ │ │ ├── server.rb.example
│ │ │ │ └── solo.rb.example
│ │ │ ├── cookbooks/
│ │ │ │ ├── README
│ │ │ │ ├── apache2/
│ │ │ │ │ ├── README.rdoc
│ │ │ │ │ ├── attributes/
│ │ │ │ │ │ └── apache.rb
│ │ │ │ │ ├── definitions/
│ │ │ │ │ │ ├── apache_conf.rb
│ │ │ │ │ │ ├── apache_module.rb
│ │ │ │ │ │ ├── apache_site.rb
│ │ │ │ │ │ └── web_app.rb
│ │ │ │ │ ├── files/
│ │ │ │ │ │ └── default/
│ │ │ │ │ │ └── apache2_module_conf_generate.pl
│ │ │ │ │ ├── metadata.json
│ │ │ │ │ ├── metadata.rb
│ │ │ │ │ ├── recipes/
│ │ │ │ │ │ ├── default.rb
│ │ │ │ │ │ ├── god_monitor.rb
│ │ │ │ │ │ ├── mod_alias.rb
│ │ │ │ │ │ ├── mod_auth_basic.rb
│ │ │ │ │ │ ├── mod_auth_digest.rb
│ │ │ │ │ │ ├── mod_authn_file.rb
│ │ │ │ │ │ ├── mod_authnz_ldap.rb
│ │ │ │ │ │ ├── mod_authz_default.rb
│ │ │ │ │ │ ├── mod_authz_groupfile.rb
│ │ │ │ │ │ ├── mod_authz_host.rb
│ │ │ │ │ │ ├── mod_authz_user.rb
│ │ │ │ │ │ ├── mod_autoindex.rb
│ │ │ │ │ │ ├── mod_cgi.rb
│ │ │ │ │ │ ├── mod_dav.rb
│ │ │ │ │ │ ├── mod_dav_svn.rb
│ │ │ │ │ │ ├── mod_deflate.rb
│ │ │ │ │ │ ├── mod_dir.rb
│ │ │ │ │ │ ├── mod_env.rb
│ │ │ │ │ │ ├── mod_expires.rb
│ │ │ │ │ │ ├── mod_fcgid.rb
│ │ │ │ │ │ ├── mod_headers.rb
│ │ │ │ │ │ ├── mod_ldap.rb
│ │ │ │ │ │ ├── mod_log_config.rb
│ │ │ │ │ │ ├── mod_mime.rb
│ │ │ │ │ │ ├── mod_negotiation.rb
│ │ │ │ │ │ ├── mod_php5.rb
│ │ │ │ │ │ ├── mod_proxy.rb
│ │ │ │ │ │ ├── mod_proxy_ajp.rb
│ │ │ │ │ │ ├── mod_proxy_balancer.rb
│ │ │ │ │ │ ├── mod_proxy_connect.rb
│ │ │ │ │ │ ├── mod_proxy_http.rb
│ │ │ │ │ │ ├── mod_python.rb
│ │ │ │ │ │ ├── mod_rails.rb
│ │ │ │ │ │ ├── mod_rewrite.rb
│ │ │ │ │ │ ├── mod_setenvif.rb
│ │ │ │ │ │ ├── mod_ssl.rb
│ │ │ │ │ │ └── mod_status.rb
│ │ │ │ │ └── templates/
│ │ │ │ │ └── default/
│ │ │ │ │ ├── a2dismod.erb
│ │ │ │ │ ├── a2dissite.erb
│ │ │ │ │ ├── a2enmod.erb
│ │ │ │ │ ├── a2ensite.erb
│ │ │ │ │ ├── apache2.conf.erb
│ │ │ │ │ ├── apache2.god.erb
│ │ │ │ │ ├── charset.erb
│ │ │ │ │ ├── default-site.erb
│ │ │ │ │ ├── mods/
│ │ │ │ │ │ ├── README
│ │ │ │ │ │ ├── alias.conf.erb
│ │ │ │ │ │ ├── autoindex.conf.erb
│ │ │ │ │ │ ├── deflate.conf.erb
│ │ │ │ │ │ ├── dir.conf.erb
│ │ │ │ │ │ ├── fcgid.conf.erb
│ │ │ │ │ │ ├── mime.conf.erb
│ │ │ │ │ │ ├── negotiation.conf.erb
│ │ │ │ │ │ ├── proxy.conf.erb
│ │ │ │ │ │ ├── setenvif.conf.erb
│ │ │ │ │ │ ├── ssl.conf.erb
│ │ │ │ │ │ └── status.conf.erb
│ │ │ │ │ ├── port_apache.erb
│ │ │ │ │ ├── ports.conf.erb
│ │ │ │ │ ├── security.erb
│ │ │ │ │ └── web_app.conf.erb
│ │ │ │ ├── apt/
│ │ │ │ │ ├── files/
│ │ │ │ │ │ └── default/
│ │ │ │ │ │ ├── apt-cacher
│ │ │ │ │ │ ├── apt-cacher.conf
│ │ │ │ │ │ └── apt-proxy-v2.conf
│ │ │ │ │ ├── metadata.json
│ │ │ │ │ ├── metadata.rb
│ │ │ │ │ └── recipes/
│ │ │ │ │ ├── cacher.rb
│ │ │ │ │ ├── default.rb
│ │ │ │ │ └── proxy.rb
│ │ │ │ ├── bootstrap/
│ │ │ │ │ ├── README.rdoc
│ │ │ │ │ ├── attributes/
│ │ │ │ │ │ └── bootstrap.rb
│ │ │ │ │ ├── metadata.json
│ │ │ │ │ ├── metadata.rb
│ │ │ │ │ ├── recipes/
│ │ │ │ │ │ ├── client.rb
│ │ │ │ │ │ ├── default.rb
│ │ │ │ │ │ └── server.rb
│ │ │ │ │ └── templates/
│ │ │ │ │ └── default/
│ │ │ │ │ ├── client.rb.erb
│ │ │ │ │ ├── server.rb.erb
│ │ │ │ │ ├── sv-chef-client-log-run.erb
│ │ │ │ │ ├── sv-chef-client-run.erb
│ │ │ │ │ ├── sv-chef-indexer-log-run.erb
│ │ │ │ │ ├── sv-chef-indexer-run.erb
│ │ │ │ │ ├── sv-chef-server-log-run.erb
│ │ │ │ │ └── sv-chef-server-run.erb
│ │ │ │ ├── chef/
│ │ │ │ │ ├── README.rdoc
│ │ │ │ │ ├── attributes/
│ │ │ │ │ │ └── chef.rb
│ │ │ │ │ ├── metadata.json
│ │ │ │ │ ├── metadata.rb
│ │ │ │ │ ├── recipes/
│ │ │ │ │ │ ├── client.rb
│ │ │ │ │ │ ├── default.rb
│ │ │ │ │ │ ├── server.rb
│ │ │ │ │ │ └── server_proxy.rb
│ │ │ │ │ └── templates/
│ │ │ │ │ └── default/
│ │ │ │ │ ├── chef_server.conf.erb
│ │ │ │ │ ├── client.rb.erb
│ │ │ │ │ └── server.rb.erb
│ │ │ │ ├── ec2/
│ │ │ │ │ ├── attributes/
│ │ │ │ │ │ ├── ec2_metadata.rb
│ │ │ │ │ │ └── ec2_recipe_options.rb
│ │ │ │ │ ├── metadata.rb
│ │ │ │ │ └── recipes/
│ │ │ │ │ └── default.rb
│ │ │ │ ├── ganglia/
│ │ │ │ │ ├── README.rdoc
│ │ │ │ │ ├── attributes/
│ │ │ │ │ │ └── default.rb
│ │ │ │ │ ├── metadata.rb
│ │ │ │ │ ├── recipes/
│ │ │ │ │ │ ├── default.rb
│ │ │ │ │ │ ├── gmetad.rb
│ │ │ │ │ │ ├── monitor_sshd.rb
│ │ │ │ │ │ ├── monitor_watson.rb
│ │ │ │ │ │ └── web.rb
│ │ │ │ │ └── templates/
│ │ │ │ │ └── default/
│ │ │ │ │ ├── bin/
│ │ │ │ │ │ ├── gmetad.erb
│ │ │ │ │ │ ├── gmond.erb
│ │ │ │ │ │ └── monitors/
│ │ │ │ │ │ ├── sshd_ganglia.sh.erb
│ │ │ │ │ │ └── watson_channels.sh.erb
│ │ │ │ │ ├── ganglia-web-conf.php.erb
│ │ │ │ │ ├── gmetad.conf.erb
│ │ │ │ │ ├── gmond.conf.erb
│ │ │ │ │ └── jaunty.sources.list.erb
│ │ │ │ ├── ntp/
│ │ │ │ │ ├── attributes/
│ │ │ │ │ │ └── ntp.rb
│ │ │ │ │ ├── metadata.json
│ │ │ │ │ ├── metadata.rb
│ │ │ │ │ ├── recipes/
│ │ │ │ │ │ └── default.rb
│ │ │ │ │ └── templates/
│ │ │ │ │ └── default/
│ │ │ │ │ └── ntp.conf.erb
│ │ │ │ ├── rsyslog/
│ │ │ │ │ ├── README.rdoc
│ │ │ │ │ ├── attributes/
│ │ │ │ │ │ └── rsyslog.rb
│ │ │ │ │ ├── files/
│ │ │ │ │ │ ├── default/
│ │ │ │ │ │ │ └── rsyslog.default
│ │ │ │ │ │ ├── ubuntu-8.04/
│ │ │ │ │ │ │ └── rsyslog.default
│ │ │ │ │ │ └── ubuntu-9.10/
│ │ │ │ │ │ └── rsyslog.default
│ │ │ │ │ ├── metadata.json
│ │ │ │ │ ├── metadata.rb
│ │ │ │ │ ├── recipes/
│ │ │ │ │ │ ├── client.rb
│ │ │ │ │ │ ├── default.rb
│ │ │ │ │ │ └── server.rb
│ │ │ │ │ └── templates/
│ │ │ │ │ ├── default/
│ │ │ │ │ │ ├── remote.conf.erb
│ │ │ │ │ │ ├── rsyslog.conf.erb
│ │ │ │ │ │ └── server.conf.erb
│ │ │ │ │ └── ubuntu-9.10/
│ │ │ │ │ ├── 50-default.conf.erb
│ │ │ │ │ ├── remote.conf.erb
│ │ │ │ │ └── server.conf.erb
│ │ │ │ └── runit/
│ │ │ │ ├── attributes/
│ │ │ │ │ └── sv_bin.rb
│ │ │ │ ├── definitions/
│ │ │ │ │ └── runit_service.rb
│ │ │ │ ├── files/
│ │ │ │ │ ├── ubuntu-6.10/
│ │ │ │ │ │ └── runsvdir
│ │ │ │ │ ├── ubuntu-7.04/
│ │ │ │ │ │ └── runsvdir
│ │ │ │ │ ├── ubuntu-7.10/
│ │ │ │ │ │ └── runsvdir
│ │ │ │ │ └── ubuntu-8.04/
│ │ │ │ │ └── runsvdir
│ │ │ │ ├── metadata.json
│ │ │ │ ├── metadata.rb
│ │ │ │ └── recipes/
│ │ │ │ └── default.rb
│ │ │ ├── roles/
│ │ │ │ ├── README
│ │ │ │ └── chef-upgrade.rb
│ │ │ └── site-cookbooks/
│ │ │ ├── README
│ │ │ ├── hosts/
│ │ │ │ ├── attributes/
│ │ │ │ │ └── hosts.rb
│ │ │ │ ├── metadata.rb
│ │ │ │ ├── recipes/
│ │ │ │ │ └── default.rb
│ │ │ │ └── templates/
│ │ │ │ └── default/
│ │ │ │ └── hosts.erb
│ │ │ ├── sysadmin/
│ │ │ │ └── recipes/
│ │ │ │ └── default.rb
│ │ │ └── ubuntu/
│ │ │ ├── metadata.json
│ │ │ ├── metadata.rb
│ │ │ ├── recipes/
│ │ │ │ └── default.rb
│ │ │ └── templates/
│ │ │ └── default/
│ │ │ └── sources.list.erb
│ │ └── user_data
│ ├── chef_cloud.rb
│ ├── ec2_infrastructure_only.rb
│ ├── knock.sh
│ ├── rds_cloud.rb
│ └── simple.rb
├── lib/
│ ├── cloud_providers/
│ │ ├── cloud_provider.rb
│ │ ├── connections.rb
│ │ ├── default/
│ │ │ ├── base.rb
│ │ │ └── helpers/
│ │ │ └── base_helper.rb
│ │ ├── ec2/
│ │ │ ├── ec2.rb
│ │ │ ├── ec2_instance.rb
│ │ │ └── helpers/
│ │ │ ├── authorize.rb
│ │ │ ├── ec2_helper.rb
│ │ │ ├── elastic_auto_scaler.rb
│ │ │ ├── elastic_block_device_mapping.rb
│ │ │ ├── elastic_block_store.rb
│ │ │ ├── elastic_block_store_group.rb
│ │ │ ├── elastic_ip.rb
│ │ │ ├── elastic_load_balancer.rb
│ │ │ ├── rds_instance.rb
│ │ │ ├── revoke.rb
│ │ │ └── security_group.rb
│ │ └── remote_instance.rb
│ ├── cloud_providers.rb
│ ├── core/
│ │ ├── array.rb
│ │ ├── hash.rb
│ │ ├── object.rb
│ │ ├── string.rb
│ │ └── symbol.rb
│ ├── keypair.rb
│ ├── poolparty/
│ │ ├── base.rb
│ │ ├── chef.rb
│ │ ├── chef_attribute.rb
│ │ ├── chef_client.rb
│ │ ├── chef_solo.rb
│ │ ├── cloud.rb
│ │ ├── pool.rb
│ │ ├── pool_party_error.rb
│ │ └── version.rb
│ └── poolparty.rb
├── poolparty.gemspec
├── setup.rb
├── test/
│ ├── fixtures/
│ │ ├── bad_perms_test_key
│ │ ├── chef/
│ │ │ └── recipes/
│ │ │ └── sudo/
│ │ │ ├── attributes/
│ │ │ │ └── sudoers.rb
│ │ │ ├── recipes/
│ │ │ │ └── default.rb
│ │ │ └── templates/
│ │ │ └── default/
│ │ │ └── sudoers.erb
│ │ ├── clouds/
│ │ │ ├── rds_cloud.rb
│ │ │ ├── rds_missing_params.rb
│ │ │ ├── simple_cloud.rb
│ │ │ ├── ssh_cloud.rb
│ │ │ └── vmware_cloud.rb
│ │ ├── ec2/
│ │ │ ├── ec2-describe-instances_response_body.xml
│ │ │ ├── ec2-describe-security-groups_response_body.xml
│ │ │ ├── ec2-run-instances_response_body.xml
│ │ │ ├── ec2-terminate-instances_response_body.xml
│ │ │ ├── elb-describe-load-balancers.xml
│ │ │ └── rds-describe-db-instances-empty_response_body.xml
│ │ ├── keys/
│ │ │ ├── pem_key.pem
│ │ │ ├── pem_pub_key.pem
│ │ │ ├── test_key
│ │ │ └── test_pub_key
│ │ ├── resources/
│ │ │ ├── fake_plugin.rb
│ │ │ ├── fake_resource.rb
│ │ │ ├── fake_subclassed_plugin.rb
│ │ │ └── random_proc_file.rb
│ │ ├── templates/
│ │ │ └── apache_conf.erb
│ │ └── test_template.erb
│ ├── lib/
│ │ ├── core/
│ │ │ ├── array_test.rb
│ │ │ ├── hash_test.rb
│ │ │ ├── object_test.rb
│ │ │ ├── string_test.rb
│ │ │ └── symbol_test.rb
│ │ └── poolparty/
│ │ ├── cloud_test.rb
│ │ ├── keypair_test.rb
│ │ ├── pool_party_error_test.rb
│ │ ├── pool_test.rb
│ │ └── rds_test.rb
│ ├── test_helper.rb
│ └── test_methods.rb
└── vendor/
└── gems/
├── dslify/
│ ├── .gitignore
│ ├── LICENSE
│ ├── README.rdoc
│ ├── Rakefile
│ ├── VERSION.yml
│ ├── dslify.gemspec
│ ├── lib/
│ │ └── dslify.rb
│ └── test/
│ ├── dslify_test.rb
│ └── test_helper.rb
├── git-style-binaries/
│ ├── .document
│ ├── .gitignore
│ ├── .gitmodules
│ ├── README.markdown
│ ├── Rakefile
│ ├── VERSION.yml
│ ├── doc/
│ │ ├── EXAMPLES
│ │ └── poolparty-binaries.screenplay
│ ├── git-style-binaries.gemspec
│ ├── lib/
│ │ ├── ext/
│ │ │ ├── colorize.rb
│ │ │ └── core.rb
│ │ ├── git-style-binary/
│ │ │ ├── autorunner.rb
│ │ │ ├── command.rb
│ │ │ ├── commands/
│ │ │ │ └── help.rb
│ │ │ ├── helpers/
│ │ │ │ ├── name_resolver.rb
│ │ │ │ └── pager.rb
│ │ │ └── parser.rb
│ │ └── git-style-binary.rb
│ └── test/
│ ├── fixtures/
│ │ ├── flickr
│ │ ├── flickr-download
│ │ ├── wordpress
│ │ ├── wordpress-categories
│ │ ├── wordpress-list
│ │ └── wordpress-post
│ ├── git-style-binary/
│ │ └── command_test.rb
│ ├── git_style_binary_test.rb
│ ├── running_binaries_test.rb
│ ├── shoulda_macros/
│ │ └── matching_stdio.rb
│ └── test_helper.rb
├── searchable_paths/
│ ├── .document
│ ├── .gitignore
│ ├── LICENSE
│ ├── README.rdoc
│ ├── Rakefile
│ ├── lib/
│ │ └── searchable_paths.rb
│ └── test/
│ ├── searchable_paths_test.rb
│ └── test_helper.rb
├── trollop/
│ ├── FAQ.txt
│ ├── History.txt
│ ├── Manifest.txt
│ ├── README.txt
│ ├── Rakefile
│ ├── lib/
│ │ └── trollop.rb
│ ├── release-script.txt
│ ├── test/
│ │ └── test_trollop.rb
│ └── www/
│ └── index.html
└── xml-simple/
└── lib/
└── xmlsimple.rb
SYMBOL INDEX (972 symbols across 72 files)
FILE: examples/chef_cloud/chef_repo/cookbooks/ec2/attributes/ec2_metadata.rb
function get_from_ec2 (line 22) | def get_from_ec2(thing="/")
FILE: lib/cloud_providers.rb
type CloudProviders (line 4) | module CloudProviders
function all (line 7) | def self.all
FILE: lib/cloud_providers/cloud_provider.rb
type CloudProviders (line 4) | module CloudProviders
class CloudProvider (line 5) | class CloudProvider
method initialize (line 16) | def initialize(name, init_opts={}, &block)
method after_initialized (line 28) | def after_initialized
method run (line 31) | def run
method default_keypair_path (line 35) | def default_keypair_path
method default_keypair_path (line 39) | def self.default_keypair_path
method bootstrap_nodes! (line 43) | def bootstrap_nodes!
method method_missing (line 46) | def method_missing(m,*a,&block)
method proper_name (line 56) | def proper_name
method cloud (line 60) | def cloud
method maybe (line 64) | def maybe(action_description, default='Y', &block)
FILE: lib/cloud_providers/connections.rb
type CloudProviders (line 3) | module CloudProviders
type Connections (line 4) | module Connections
function host (line 7) | def host(n=nil)
function ping_port (line 15) | def ping_port(host, port=22, retry_times=400)
function run (line 27) | def run(commands, o={})
function shell_escape (line 31) | def shell_escape(str)
function ssh (line 37) | def ssh( commands=[], extra_ssh_ops={})
function ssh_cleanup_known_hosts! (line 83) | def ssh_cleanup_known_hosts!(hosts=[host, public_ip])
function ssh_options (line 94) | def ssh_options(opts={})
function rsync (line 102) | def rsync( opts={} )
function scp (line 115) | def scp(opts={})
function system_run (line 131) | def system_run(cmd, o={})
FILE: lib/cloud_providers/default/base.rb
type CloudProviders (line 1) | module CloudProviders
class Base (line 2) | class Base < CloudProvider
FILE: lib/cloud_providers/ec2/ec2.rb
type CloudProviders (line 6) | module CloudProviders
class Ec2 (line 7) | class Ec2 < CloudProvider
method default_access_key (line 9) | def self.default_access_key
method default_secret_access_key (line 13) | def self.default_secret_access_key
method default_private_key (line 17) | def self.default_private_key
method default_cert (line 21) | def self.default_cert
method default_user_id (line 25) | def self.default_user_id
method default_ec2_url (line 29) | def self.default_ec2_url
method default_s3_url (line 33) | def self.default_s3_url
method default_cloud_cert (line 37) | def self.default_cloud_cert
method default_credential_file (line 41) | def self.default_credential_file
method load_keys_from_file (line 46) | def self.load_keys_from_file(filename=POOLPARTY_CONFIG_FILE, caching...
method load_keys_from_credential_file (line 54) | def self.load_keys_from_credential_file(filename=default_credential_...
method create! (line 95) | def create!
method run (line 101) | def run
method teardown (line 184) | def teardown
method expand_by (line 191) | def expand_by(num=1)
method decoded_user_data (line 218) | def decoded_user_data
method wait_for_node (line 228) | def wait_for_node(instance)
method contract_by (line 234) | def contract_by(num=1)
method bootstrap_nodes! (line 245) | def bootstrap_nodes!(tmp_path=nil)
method configure_nodes! (line 260) | def configure_nodes!(tmp_path=nil)
method assign_elastic_ips (line 271) | def assign_elastic_ips
method cleanup_ssh_known_hosts! (line 295) | def cleanup_ssh_known_hosts!(nodes_to_cleanup=nodes,
method nodes (line 305) | def nodes
method tags (line 317) | def tags(instance)
method all_nodes (line 322) | def all_nodes
method describe_instances (line 335) | def describe_instances(id=nil)
method block_device_mapping (line 353) | def block_device_mapping(o=[], given_name=cloud.proper_name )
method load_balancer (line 357) | def load_balancer(given_name=cloud.proper_name, o={}, &block)
method autoscale (line 360) | def autoscale(given_name=cloud.proper_name, o={}, &block)
method security_group (line 363) | def security_group(given_name=cloud.proper_name, o={}, &block)
method elastic_ip (line 371) | def elastic_ip(*ips)
method rds (line 375) | def rds(given_name=cloud.proper_name, o={}, &block)
method available_rds_instances (line 379) | def available_rds_instances
method aws_options (line 384) | def aws_options(opts={})
method ec2 (line 397) | def ec2
method as (line 409) | def as
method elb (line 414) | def elb
method awsrds (line 418) | def awsrds
method security_group_names (line 422) | def security_group_names
method security_groups (line 425) | def security_groups
method load_balancers (line 428) | def load_balancers
method autoscalers (line 431) | def autoscalers
method elastic_ips (line 434) | def elastic_ips
method ebs_volume_groups (line 438) | def ebs_volume_groups
method ebs_volumes (line 449) | def ebs_volumes(name=nil, &block)
method assign_ebs_volumes (line 453) | def assign_ebs_volumes
method rds_instances (line 457) | def rds_instances
method reset! (line 462) | def reset!
method list_ec2_volumes (line 468) | def list_ec2_volumes(filters=nil)
method credential_file (line 489) | def credential_file(file=nil)
method sub_opts (line 500) | def sub_opts
method generate_keypair (line 503) | def generate_keypair(n=nil)
FILE: lib/cloud_providers/ec2/ec2_instance.rb
type CloudProviders (line 1) | module CloudProviders
class Ec2Instance (line 2) | class Ec2Instance < RemoteInstance
method initialize (line 22) | def initialize(raw_response={})
method keypair (line 44) | def keypair(n=nil)
method security_group_names (line 49) | def security_group_names
method zone (line 53) | def zone
method reachable? (line 57) | def reachable?
method ssh_available? (line 61) | def ssh_available?
method in_service? (line 70) | def in_service?
method run! (line 74) | def run!
method run! (line 81) | def self.run!(hsh); new(hsh).run!; end
method launch_instances! (line 83) | def launch_instances!
method request_spot_instances! (line 103) | def request_spot_instances!
method terminate! (line 123) | def terminate!
method terminate! (line 127) | def self.terminate!(hsh={}); new(hsh).terminate!; end
method rsync_excludes (line 130) | def rsync_excludes(array_of_abs_paths_to_exclude=nil)
method make_image (line 149) | def make_image(opts={})
method bundle_and_register (line 171) | def bundle_and_register(img=nil, opts={})
FILE: lib/cloud_providers/ec2/helpers/authorize.rb
type CloudProviders (line 1) | module CloudProviders
class Authorize (line 2) | class Authorize < Ec2Helper
method run (line 11) | def run
method to_hash (line 28) | def to_hash
FILE: lib/cloud_providers/ec2/helpers/ec2_helper.rb
type CloudProviders (line 1) | module CloudProviders
class Ec2Helper (line 2) | class Ec2Helper < CloudProvider
method initialize (line 4) | def initialize(name=cloud.proper_name, init_opts={}, &block)
method elb (line 17) | def elb
method ec2 (line 21) | def ec2
method as (line 25) | def as
method rds (line 29) | def rds
method pool (line 33) | def pool
method property (line 37) | def self.property(*names)
FILE: lib/cloud_providers/ec2/helpers/elastic_auto_scaler.rb
type CloudProviders (line 1) | module CloudProviders
class ElasticAutoScaler (line 2) | class ElasticAutoScaler < Ec2Helper
method run (line 7) | def run
method teardown (line 32) | def teardown
method delete_autoscaling_group! (line 54) | def delete_autoscaling_group!
method delete_launch_configuration! (line 67) | def delete_launch_configuration!(n=new_launch_configuration_name)
method ensure_no_scaling_activities (line 71) | def ensure_no_scaling_activities
method should_create_autoscaling_group? (line 93) | def should_create_autoscaling_group?
method should_create_launch_configuration? (line 102) | def should_create_launch_configuration?
method should_update_launch_configuration? (line 110) | def should_update_launch_configuration?
method update_launch_configuration! (line 132) | def update_launch_configuration!
method create_launch_configuration! (line 135) | def create_launch_configuration!(lc=new_launch_configuration_name)
method launch_configurations (line 158) | def launch_configurations
method create_autoscaling_group! (line 176) | def create_autoscaling_group!
method should_update_autoscaling_group? (line 188) | def should_update_autoscaling_group?
method update_autoscaling_group! (line 217) | def update_autoscaling_group!
method autoscaling_groups (line 229) | def autoscaling_groups
method scaling_activities (line 249) | def scaling_activities
method new_launch_configuration_name (line 263) | def new_launch_configuration_name
method old_launch_configuration_name (line 266) | def old_launch_configuration_name
method used_launched_config_id (line 271) | def used_launched_config_id
method new_auto_scaling_group_name (line 279) | def new_auto_scaling_group_name
method old_auto_scaling_group_name (line 283) | def old_auto_scaling_group_name
method used_autoscaling_group_id (line 287) | def used_autoscaling_group_id
method list (line 297) | def list
method trigger (line 301) | def trigger(*trigger_hashes)
method triggers (line 308) | def triggers
method reset! (line 311) | def reset!
class ElasticTrigger (line 319) | class ElasticTrigger < Ec2Helper
method measure_names (line 334) | def measure_names
method statistic_names (line 338) | def statistic_names
method run (line 342) | def run
method teardown (line 356) | def teardown
method diff (line 363) | def diff(hsh={})
method autoscaling_triggers (line 379) | def autoscaling_triggers
method create_autoscaling_trigger! (line 404) | def create_autoscaling_trigger!
method measure_name (line 422) | def measure_name
method trigger_name (line 426) | def trigger_name
FILE: lib/cloud_providers/ec2/helpers/elastic_block_device_mapping.rb
type CloudProviders (line 1) | module CloudProviders
class ElasticBlockDeviceMapping (line 2) | class ElasticBlockDeviceMapping < Ec2Helper
method initialize (line 3) | def initialize(name, init_opts={}, &block)
FILE: lib/cloud_providers/ec2/helpers/elastic_block_store.rb
type CloudProviders (line 1) | module CloudProviders
class ElasticBlockStore (line 2) | class ElasticBlockStore < Ec2Helper
method createTime (line 14) | def createTime(create_time)
method initialize (line 21) | def initialize(raw_response,init_opts={},&block)
method parse_raw_response (line 26) | def parse_raw_response(raw_response)
method attached? (line 39) | def attached?(fn_instance_id=nil)
method available? (line 46) | def available?
method attach (line 50) | def attach(ec2_instance,device)
method detach (line 58) | def detach
method detach! (line 66) | def detach!
method delete! (line 70) | def delete!
method update! (line 74) | def update!
FILE: lib/cloud_providers/ec2/helpers/elastic_block_store_group.rb
function initialize (line 14) | def initialize(name=cloud.proper_name, init_opts={}, &block)
function after_initialized (line 18) | def after_initialized
function volumes (line 25) | def volumes(*volume_ids)
function volumes_attached_to (line 29) | def volumes_attached_to(instanceId)
function free_volumes (line 34) | def free_volumes(availability_zone)
function get_free_volume (line 38) | def get_free_volume(availability_zone)
FILE: lib/cloud_providers/ec2/helpers/elastic_ip.rb
type CloudProviders (line 1) | module CloudProviders
class ElasticIp (line 3) | class ElasticIp < Ec2Helper
method initialize (line 7) | def initialize(raw_response={})
method assign_to (line 13) | def assign_to(node)
method unused_elastic_ips (line 17) | def self.unused_elastic_ips(ec2_instance)
method elastic_ips (line 21) | def self.elastic_ips(ec2_instance)
method reset! (line 31) | def self.reset!
FILE: lib/cloud_providers/ec2/helpers/elastic_load_balancer.rb
type CloudProviders (line 1) | module CloudProviders
class ElasticLoadBalancer (line 2) | class ElasticLoadBalancer < Ec2Helper
method create! (line 6) | def create!
method run (line 13) | def run
method teardown (line 36) | def teardown
method listener (line 41) | def listener(*listener_hashes)
method health_check (line 47) | def health_check(*health_check_hashes)
method _listeners (line 54) | def _listeners
method _health_checks (line 57) | def _health_checks
method real_name (line 60) | def real_name
method attach_instances_if_necessary (line 64) | def attach_instances_if_necessary
method detach_instances_if_necessary (line 69) | def detach_instances_if_necessary
method should_create_load_balancer? (line 77) | def should_create_load_balancer?
method create_load_balancer! (line 80) | def create_load_balancer!
method configure_health_check! (line 88) | def configure_health_check!(hc)
method should_update_load_balancer? (line 92) | def should_update_load_balancer?
method running_load_balancers (line 112) | def running_load_balancers
method elastic_load_balancers (line 115) | def elastic_load_balancers
method instance_healths (line 146) | def instance_healths
class HealthCheck (line 162) | class HealthCheck < Ec2Helper
method initialize (line 170) | def initialize(name, init_opts={}, &block)
method to_hash (line 175) | def to_hash
class ElasticListener (line 183) | class ElasticListener < Ec2Helper
method initialize (line 189) | def initialize(name, init_opts={}, &block)
method to_hash (line 194) | def to_hash
method diff (line 198) | def diff(hsh={})
FILE: lib/cloud_providers/ec2/helpers/rds_instance.rb
type CloudProviders (line 1) | module CloudProviders
class RdsInstance (line 2) | class RdsInstance < Ec2Helper
method authorize (line 5) | def authorize(options)
method database (line 11) | def database(*db_names)
method create! (line 18) | def create!
method run (line 25) | def run
method teardown (line 31) | def teardown
method current_status (line 36) | def current_status
method exists? (line 40) | def exists?
method available? (line 44) | def available?
method instance_id (line 48) | def instance_id
method authorizations (line 54) | def authorizations
method after_initialized (line 58) | def after_initialized
method rds_instances (line 65) | def rds_instances
method should_create_rds_instance? (line 71) | def should_create_rds_instance?
method create_rds_instance! (line 75) | def create_rds_instance!
method delete_rds_instance! (line 93) | def delete_rds_instance!
method authorize_access (line 97) | def authorize_access
FILE: lib/cloud_providers/ec2/helpers/revoke.rb
type CloudProviders (line 1) | module CloudProviders
class Revoke (line 3) | class Revoke < Ec2Helper
method run (line 9) | def run
FILE: lib/cloud_providers/ec2/helpers/security_group.rb
type CloudProviders (line 1) | module CloudProviders
class SecurityGroup (line 2) | class SecurityGroup < Ec2Helper
method merge! (line 4) | def merge! init_opts, &block
method run (line 9) | def run
method authorize (line 69) | def authorize(o={}, &block)
method revoke (line 72) | def revoke(o={}, &block)
method create_security_group! (line 75) | def create_security_group!
method should_create_security_group? (line 79) | def should_create_security_group?
method security_groups (line 82) | def security_groups
method all_security_groups (line 85) | def all_security_groups
method all_security_groups (line 88) | def self.all_security_groups(ec2)
method to_s (line 115) | def to_s
method authorizes (line 118) | def authorizes
method revokes (line 121) | def revokes
FILE: lib/cloud_providers/remote_instance.rb
type CloudProviders (line 4) | module CloudProviders
class RemoteInstance (line 5) | class RemoteInstance
method initialize (line 17) | def initialize(init_opts={}, &block)
method keypair (line 24) | def keypair(n=nil)
method after_initialized (line 28) | def after_initialized
method accessible? (line 31) | def accessible?
method rsync_dir (line 35) | def rsync_dir(dir)
method chef_bootstrapped? (line 39) | def chef_bootstrapped?
method bootstrap_chef! (line 45) | def bootstrap_chef!
method run_chef! (line 49) | def run_chef!
method run (line 53) | def run
method default_keypair_path (line 57) | def default_keypair_path
method each (line 62) | def each
method [] (line 66) | def [](k)
method []= (line 74) | def []=(k,v)
method has_key? (line 78) | def has_key?(key)
method keys (line 82) | def keys
method values (line 86) | def values
method to_hash (line 90) | def to_hash
method running? (line 96) | def running?
method pending? (line 100) | def pending?
method terminating? (line 104) | def terminating?
method terminated? (line 108) | def terminated?
method elapsed_runtime (line 113) | def elapsed_runtime
method ssh_available? (line 117) | def ssh_available?
method cloud (line 125) | def cloud
method cloud_provider (line 129) | def cloud_provider
FILE: lib/core/array.rb
class Array (line 5) | class Array
method select_with_hash (line 8) | def select_with_hash(conditions={})
FILE: lib/core/hash.rb
class Hash (line 4) | class Hash
method choose (line 7) | def choose(&block)
method diff (line 12) | def diff(other, *hsh)
method merge_if! (line 22) | def merge_if!(k, v)
method symbolize_keys! (line 32) | def symbolize_keys!(key_modifier=nil)
method method_missing (line 45) | def method_missing(sym, *args, &block)
FILE: lib/core/object.rb
class Object (line 1) | class Object
method pool (line 3) | def pool(name=nil, &block)
method reset! (line 7) | def reset!
method print_msg (line 11) | def print_msg(msg_arr)
method blank? (line 18) | def blank?
method change_attr (line 30) | def change_attr attr, val, &block
method progress_bar_until (line 40) | def progress_bar_until(msg=nil, &block)
FILE: lib/core/string.rb
class String (line 1) | class String
method camelcase (line 5) | def camelcase
method snake_case (line 10) | def snake_case
method dasherize (line 15) | def dasherize
method classify (line 25) | def classify
method constantize (line 35) | def constantize(mod=Object)
method / (line 44) | def /(o)
FILE: lib/core/symbol.rb
class Symbol (line 1) | class Symbol
method sanitize (line 8) | def sanitize
method <=> (line 11) | def <=>(b)
method / (line 21) | def /(o)
method classify (line 26) | def classify
FILE: lib/keypair.rb
class Keypair (line 4) | class Keypair
method initialize (line 17) | def initialize(fpath, extra_paths=[], opts={})
method exists? (line 25) | def exists?
method content (line 30) | def content
method full_filepath (line 36) | def full_filepath
method to_s (line 42) | def to_s
method public_key (line 49) | def public_key
method public_key= (line 58) | def public_key=(str)
method basename (line 63) | def basename
method filename (line 68) | def filename
method each (line 73) | def each
method valid? (line 80) | def valid?
method validations (line 87) | def validations
method has_proper_permissions? (line 92) | def has_proper_permissions?
method keypair_found? (line 96) | def keypair_found?
method find_file_in_path_with_suffix (line 106) | def find_file_in_path_with_suffix(file, extra_paths, suffixes=[],
FILE: lib/poolparty.rb
type PoolParty (line 31) | module PoolParty
function version (line 32) | def self.version
function lib_dir (line 36) | def self.lib_dir
FILE: lib/poolparty/base.rb
type PoolParty (line 4) | module PoolParty
class Base (line 6) | class Base
method initialize (line 9) | def initialize(name, o={}, &block)
method after_initialized (line 16) | def after_initialized
method run (line 18) | def run
method method_missing (line 21) | def method_missing(m,*a,&block)
FILE: lib/poolparty/chef.rb
type PoolParty (line 1) | module PoolParty
class Chef (line 2) | class Chef < Base
method compile! (line 15) | def compile!
method types (line 19) | def self.types
method get_chef (line 23) | def self.get_chef(type,cloud,&block)
method attributes (line 28) | def attributes(hsh={}, &block)
method override_attributes (line 32) | def override_attributes(hsh={}, &block)
method on_step (line 66) | def on_step action, &block
method recipe (line 93) | def recipe(recipe_name, hsh={})
method recipes (line 110) | def recipes(*recipes)
method node_run! (line 116) | def node_run!(remote_instance)
method node_stop! (line 129) | def node_stop!(remote_instance)
method node_configure! (line 133) | def node_configure!(remote_instance)
method node_bootstrapped? (line 137) | def node_bootstrapped?(remote_instance, quiet=true)
method node_bootstrap! (line 157) | def node_bootstrap!(remote_instance, force=false)
method _recipes (line 181) | def _recipes action = nil
method _current_action (line 190) | def _current_action
method chef_cmd (line 194) | def chef_cmd
method method_missing (line 207) | def method_missing(m,*args,&block)
FILE: lib/poolparty/chef_attribute.rb
type PoolParty (line 1) | module PoolParty
class ChefAttribute (line 2) | class ChefAttribute < Base
method initialize (line 4) | def initialize(opts={}, &block)
method merge! (line 11) | def merge!(h={})
method to_dna (line 15) | def to_dna(recipes, filepath, opts=init_opts)
method method_missing (line 27) | def method_missing(m,*a,&block)
FILE: lib/poolparty/chef_client.rb
type PoolParty (line 3) | module PoolParty
class ChefClient (line 5) | class ChefClient < Chef
method openid_url (line 13) | def openid_url(url=nil)
method roles (line 23) | def roles(*roles)
method after_initialized (line 29) | def after_initialized
method chef_bin (line 32) | def chef_bin
method chef_cmd (line 36) | def chef_cmd
method node_configure! (line 43) | def node_configure!(remote_instance)
method build_tmp_dir (line 55) | def build_tmp_dir
method write_client_dot_rb (line 72) | def write_client_dot_rb(to=tmp_path/"etc"/"chef"/"client.rb")
method write_bootstrap_files (line 93) | def write_bootstrap_files(solo_rb, chef_json)
FILE: lib/poolparty/chef_solo.rb
type PoolParty (line 3) | module PoolParty
class ChefSolo (line 4) | class ChefSolo < Chef
method chef_bin (line 8) | def chef_bin
method chef_cmd (line 12) | def chef_cmd
method build_tmp_dir (line 27) | def build_tmp_dir
method write_solo_dot_rb (line 54) | def write_solo_dot_rb(to=tmp_path/"etc"/"chef"/"solo.rb")
method write_chef_role_json (line 66) | def write_chef_role_json(to=tmp_path/"etc"/"chef"/"dna.json")
FILE: lib/poolparty/cloud.rb
type PoolParty (line 1) | module PoolParty
class Cloud (line 2) | class Cloud < Base
method keypair (line 12) | def keypair(n=nil, extra_paths=[])
method generate_keypair (line 26) | def generate_keypair(extra_paths=[])
method after_initialized (line 32) | def after_initialized
method instances (line 43) | def instances(arg)
method upload (line 61) | def upload source, dest
method pool (line 68) | def pool
method tmp_path (line 72) | def tmp_path
method using (line 79) | def using(provider_name, &block)
method chef (line 96) | def chef(chef_type=:solo, &block)
method run (line 101) | def run
method teardown (line 114) | def teardown
method reboot! (line 150) | def reboot!
method compile! (line 187) | def compile!
method bootstrap! (line 197) | def bootstrap!
method configure! (line 201) | def configure!
method reset! (line 206) | def reset!
method ssh (line 210) | def ssh(num=0)
method rsync (line 214) | def rsync(source, dest)
method nodes (line 221) | def nodes
method cmd (line 227) | def cmd(commands, opts={})
method cssh (line 238) | def cssh(user = nil, use_keypair = nil)
method run_instance (line 248) | def run_instance(o={}); cloud_provider.run_instance(o);end
method terminate_instance! (line 249) | def terminate_instance!(o={}); cloud_provider.terminate_instance!(o)...
method describe_instances (line 250) | def describe_instances(o={}); cloud_provider.describe_instances(o);end
method describe_instance (line 251) | def describe_instance(o={}); cloud_provider.describe_instance(o);end
method proper_name (line 253) | def proper_name
FILE: lib/poolparty/pool.rb
type PoolParty (line 1) | module PoolParty
class Pool (line 3) | class Pool < Base
method cloud (line 6) | def cloud(name, &block)
method clouds (line 14) | def clouds
method cmd (line 20) | def cmd(commands, opts={})
method chef_step (line 42) | def chef_step name = nil
method run (line 50) | def run
method to_hash (line 57) | def to_hash
FILE: lib/poolparty/pool_party_error.rb
type PoolParty (line 6) | module PoolParty
class PoolPartyError (line 7) | class PoolPartyError
method create (line 13) | def self.create(class_name="StandardError", msg="Error")
FILE: lib/poolparty/version.rb
type PoolParty (line 1) | module PoolParty
FILE: setup.rb
type Enumerable (line 12) | module Enumerable
function read (line 18) | def File.read(fname)
type Errno (line 26) | module Errno
class ENOTEMPTY (line 27) | class ENOTEMPTY
function binread (line 33) | def File.binread(fname)
function dir? (line 40) | def File.dir?(path)
class ConfigTable (line 45) | class ConfigTable
method initialize (line 49) | def initialize(rbconfig)
method verbose? (line 65) | def verbose?
method no_harm? (line 71) | def no_harm?
method [] (line 75) | def [](key)
method []= (line 79) | def []=(key, val)
method names (line 83) | def names
method each (line 87) | def each(&block)
method key? (line 91) | def key?(name)
method lookup (line 95) | def lookup(name)
method add (line 99) | def add(item)
method remove (line 104) | def remove(name)
method load_script (line 111) | def load_script(path, inst = nil)
method savefile (line 117) | def savefile
method load_savefile (line 121) | def load_savefile
method save (line 132) | def save
method load_standard_entries (line 141) | def load_standard_entries
method standard_entries (line 147) | def standard_entries(rbconfig)
method load_multipackage_entries (line 260) | def load_multipackage_entries
method multipackage_entries (line 266) | def multipackage_entries
method fixup (line 295) | def fixup
method parse_opt (line 304) | def parse_opt(opt)
method dllext (line 309) | def dllext
method value_config? (line 313) | def value_config?(name)
class Item (line 317) | class Item
method initialize (line 318) | def initialize(name, template, default, desc)
method help_opt (line 332) | def help_opt
method value? (line 336) | def value?
method value (line 340) | def value
method resolve (line 344) | def resolve(table)
method set (line 348) | def set(val)
method check (line 354) | def check(val)
class BoolItem (line 360) | class BoolItem < Item
method config_type (line 361) | def config_type
method help_opt (line 365) | def help_opt
method check (line 371) | def check(val)
class PathItem (line 382) | class PathItem < Item
method config_type (line 383) | def config_type
method check (line 389) | def check(path)
class ProgramItem (line 395) | class ProgramItem < Item
method config_type (line 396) | def config_type
class SelectItem (line 401) | class SelectItem < Item
method initialize (line 402) | def initialize(name, selection, default, desc)
method config_type (line 407) | def config_type
method check (line 413) | def check(val)
class ExecItem (line 421) | class ExecItem < Item
method initialize (line 422) | def initialize(name, selection, desc, &block)
method config_type (line 428) | def config_type
method value? (line 432) | def value?
method resolve (line 436) | def resolve(table)
method evaluate (line 442) | def evaluate(val, table)
class PackageSelectionItem (line 451) | class PackageSelectionItem < Item
method initialize (line 452) | def initialize(name, template, default, help_default, desc)
method config_type (line 459) | def config_type
method check (line 465) | def check(val)
class MetaConfigEnvironment (line 473) | class MetaConfigEnvironment
method initialize (line 474) | def initialize(config, installer)
method config_names (line 479) | def config_names
method config? (line 483) | def config?(name)
method bool_config? (line 487) | def bool_config?(name)
method path_config? (line 491) | def path_config?(name)
method value_config? (line 495) | def value_config?(name)
method add_config (line 499) | def add_config(item)
method add_bool_config (line 503) | def add_bool_config(name, default, desc)
method add_path_config (line 507) | def add_path_config(name, default, desc)
method set_config_default (line 511) | def set_config_default(name, default)
method remove_config (line 515) | def remove_config(name)
method packages (line 520) | def packages
method declare_packages (line 526) | def declare_packages(list)
type FileOperations (line 536) | module FileOperations
function mkdir_p (line 538) | def mkdir_p(dirname, prefix = nil)
function rm_f (line 555) | def rm_f(path)
function rm_rf (line 561) | def rm_rf(path)
function remove_tree (line 567) | def remove_tree(path)
function remove_tree0 (line 577) | def remove_tree0(path)
function move_file (line 597) | def move_file(src, dest)
function force_remove_file (line 610) | def force_remove_file(path)
function remove_file (line 617) | def remove_file(path)
function install (line 622) | def install(from, dest, mode, prefix = nil)
function diff? (line 648) | def diff?(new_content, path)
function command (line 653) | def command(*args)
function ruby (line 659) | def ruby(*args)
function make (line 663) | def make(task = nil)
function extdir? (line 667) | def extdir?(dir)
function files_of (line 671) | def files_of(dir)
function directories_of (line 679) | def directories_of(dir)
type HookScriptAPI (line 689) | module HookScriptAPI
function get_config (line 691) | def get_config(key)
function set_config (line 698) | def set_config(key, val)
function curr_srcdir (line 706) | def curr_srcdir
function curr_objdir (line 710) | def curr_objdir
function srcfile (line 714) | def srcfile(path)
function srcexist? (line 718) | def srcexist?(path)
function srcdirectory? (line 722) | def srcdirectory?(path)
function srcfile? (line 726) | def srcfile?(path)
function srcentries (line 730) | def srcentries(path = '.')
function srcfiles (line 736) | def srcfiles(path = '.')
function srcdirectories (line 742) | def srcdirectories(path = '.')
class ToplevelInstaller (line 751) | class ToplevelInstaller
method invoke (line 767) | def ToplevelInstaller.invoke
method multipackage? (line 776) | def ToplevelInstaller.multipackage?
method load_rbconfig (line 780) | def ToplevelInstaller.load_rbconfig
method initialize (line 791) | def initialize(ardir_root, config)
method config (line 798) | def config(key)
method inspect (line 802) | def inspect
method invoke (line 806) | def invoke
method run_metaconfigs (line 830) | def run_metaconfigs
method init_installers (line 834) | def init_installers
method srcdir_root (line 842) | def srcdir_root
method objdir_root (line 846) | def objdir_root
method relpath (line 850) | def relpath
method parsearg_global (line 858) | def parsearg_global
method valid_task? (line 884) | def valid_task?(t)
method valid_task_re (line 888) | def valid_task_re
method parsearg_no_options (line 892) | def parsearg_no_options
method parsearg_config (line 905) | def parsearg_config
method parsearg_install (line 931) | def parsearg_install
method print_usage (line 948) | def print_usage(out)
method exec_config (line 990) | def exec_config
method exec_setup (line 995) | def exec_setup
method exec_install (line 999) | def exec_install
method exec_test (line 1003) | def exec_test
method exec_show (line 1007) | def exec_show
method exec_clean (line 1013) | def exec_clean
method exec_distclean (line 1017) | def exec_distclean
class ToplevelInstallerMulti (line 1024) | class ToplevelInstallerMulti < ToplevelInstaller
method initialize (line 1028) | def initialize(ardir_root, config)
method run_metaconfigs (line 1035) | def run_metaconfigs
method packages= (line 1044) | def packages=(list)
method init_installers (line 1053) | def init_installers
method extract_selection (line 1068) | def extract_selection(list)
method print_usage (line 1076) | def print_usage(f)
method exec_config (line 1087) | def exec_config
method exec_setup (line 1094) | def exec_setup
method exec_install (line 1100) | def exec_install
method exec_test (line 1106) | def exec_test
method exec_clean (line 1112) | def exec_clean
method exec_distclean (line 1119) | def exec_distclean
method each_selected_installers (line 1130) | def each_selected_installers
method run_hook (line 1141) | def run_hook(id)
method verbose? (line 1146) | def verbose?
method no_harm? (line 1151) | def no_harm?
class Installer (line 1158) | class Installer
method initialize (line 1165) | def initialize(config, srcroot, objroot)
method inspect (line 1172) | def inspect
method noop (line 1176) | def noop(rel)
method srcdir_root (line 1183) | def srcdir_root
method objdir_root (line 1187) | def objdir_root
method relpath (line 1191) | def relpath
method verbose? (line 1200) | def verbose?
method no_harm? (line 1205) | def no_harm?
method verbose_off (line 1209) | def verbose_off
method exec_config (line 1222) | def exec_config
method config_dir_ext (line 1229) | def config_dir_ext(rel)
method extconf (line 1237) | def extconf
method exec_setup (line 1245) | def exec_setup
method setup_dir_bin (line 1249) | def setup_dir_bin(rel)
method setup_dir_ext (line 1257) | def setup_dir_ext(rel)
method update_shebang_line (line 1265) | def update_shebang_line(path)
method new_shebang (line 1287) | def new_shebang(old)
method open_atomic_writer (line 1298) | def open_atomic_writer(path, &block)
class Shebang (line 1308) | class Shebang
method load (line 1309) | def Shebang.load(path)
method parse (line 1318) | def Shebang.parse(line)
method initialize (line 1323) | def initialize(cmd, args = [])
method to_s (line 1331) | def to_s
method exec_install (line 1340) | def exec_install
method install_dir_bin (line 1345) | def install_dir_bin(rel)
method install_dir_lib (line 1349) | def install_dir_lib(rel)
method install_dir_ext (line 1353) | def install_dir_ext(rel)
method install_dir_data (line 1360) | def install_dir_data(rel)
method install_dir_conf (line 1364) | def install_dir_conf(rel)
method install_dir_man (line 1370) | def install_dir_man(rel)
method install_files (line 1374) | def install_files(list, dest, mode)
method libfiles (line 1381) | def libfiles
method rubyextentions (line 1385) | def rubyextentions(dir)
method targetfiles (line 1393) | def targetfiles
method mapdir (line 1397) | def mapdir(ents)
method existfiles (line 1415) | def existfiles
method hookfiles (line 1419) | def hookfiles
method glob_select (line 1425) | def glob_select(pat, ents)
method glob_reject (line 1430) | def glob_reject(pats, ents)
method globs2re (line 1442) | def globs2re(pats)
method exec_test (line 1454) | def exec_test
method exec_clean (line 1474) | def exec_clean
method clean_dir_ext (line 1486) | def clean_dir_ext(rel)
method exec_distclean (line 1495) | def exec_distclean
method distclean_dir_ext (line 1504) | def distclean_dir_ext(rel)
method exec_task_traverse (line 1517) | def exec_task_traverse(task)
method traverse (line 1529) | def traverse(task, rel, mid)
method dive_into (line 1540) | def dive_into(rel)
method run_hook (line 1555) | def run_hook(id)
class SetupError (line 1570) | class SetupError < StandardError; end
function setup_rb_error (line 1572) | def setup_rb_error(msg)
FILE: test/fixtures/resources/fake_plugin.rb
type PoolParty (line 1) | module PoolParty
type Resources (line 2) | module Resources
class FakePlugin (line 4) | class FakePlugin < Resource
method has_method_name (line 6) | def self.has_method_name
method name (line 10) | def name
method after_loaded (line 14) | def after_loaded
FILE: test/fixtures/resources/fake_resource.rb
class FakeResource (line 1) | class FakeResource < PoolParty::Resource
method has_method_name (line 6) | def self.has_method_name
method print_to_chef (line 10) | def print_to_chef
FILE: test/fixtures/resources/fake_subclassed_plugin.rb
type PoolParty (line 1) | module PoolParty
type Resources (line 2) | module Resources
class FakeSubclassedPlugin (line 4) | class FakeSubclassedPlugin < Resource
method has_method_name (line 6) | def self.has_method_name
method after_loaded (line 10) | def after_loaded
FILE: test/lib/core/array_test.rb
class ArrayTest (line 3) | class ArrayTest < Test::Unit::TestCase
method setup (line 4) | def setup
method test_be_able_to_select_with_hash (line 14) | def test_be_able_to_select_with_hash
FILE: test/lib/core/hash_test.rb
class HashTest (line 3) | class HashTest < Test::Unit::TestCase
FILE: test/lib/core/object_test.rb
class ObjectTest (line 3) | class ObjectTest < Test::Unit::TestCase
FILE: test/lib/core/string_test.rb
class StringTest (line 3) | class StringTest < Test::Unit::TestCase
FILE: test/lib/core/symbol_test.rb
class SymbolTest (line 3) | class SymbolTest < Test::Unit::TestCase
FILE: test/lib/poolparty/cloud_test.rb
class CloudTest (line 4) | class CloudTest < Test::Unit::TestCase
method setup (line 6) | def setup
method test_have_a_pool_name (line 14) | def test_have_a_pool_name
method test_have_a_keypair (line 18) | def test_have_a_keypair
method test_be_using_ec2_cloud_provider_by_default (line 23) | def test_be_using_ec2_cloud_provider_by_default
method test_set_the_cloud_provider_cloud_and_keypair_with_cloud_provider (line 28) | def test_set_the_cloud_provider_cloud_and_keypair_with_cloud_provider
method test_set_the_cloud_provider_with_a_using_block (line 33) | def test_set_the_cloud_provider_with_a_using_block
method test_nodes (line 44) | def test_nodes
method test_run (line 50) | def test_run
method test_expansion (line 56) | def test_expansion
method test_contract! (line 63) | def test_contract!
method test_change_ssh_port (line 71) | def test_change_ssh_port
method test_change_ssh_port (line 83) | def test_change_ssh_port
FILE: test/lib/poolparty/keypair_test.rb
class KeypairTest (line 3) | class KeypairTest < Test::Unit::TestCase
FILE: test/lib/poolparty/pool_party_error_test.rb
class PoolPartyErrorTest (line 3) | class PoolPartyErrorTest < Test::Unit::TestCase
FILE: test/lib/poolparty/pool_test.rb
class PoolTest (line 3) | class PoolTest < Test::Unit::TestCase
method setup (line 4) | def setup
method test_set_up_pool_object (line 8) | def test_set_up_pool_object
FILE: test/lib/poolparty/rds_test.rb
class RdsTest (line 3) | class RdsTest < Test::Unit::TestCase
method setup (line 4) | def setup
method test_basic (line 12) | def test_basic
method test_required_properties (line 16) | def test_required_properties
method scenario (line 22) | def scenario(filename)
method stub_response (line 32) | def stub_response(klass, method, fixture_filename)
FILE: test/test_methods.rb
class Test::Unit::TestCase (line 1) | class Test::Unit::TestCase
method FIXTURES_PATH (line 3) | def FIXTURES_PATH
method test_dir (line 7) | def test_dir
method clear! (line 11) | def clear!
method modify_env_with_hash (line 15) | def modify_env_with_hash(h={})
method capture_stdout (line 37) | def capture_stdout(&block)
method stub_keypair_searchable_paths (line 52) | def stub_keypair_searchable_paths
method read_fixture (line 56) | def read_fixture(path)
method stub_ec2_calls (line 60) | def stub_ec2_calls(&block)
FILE: vendor/gems/dslify/lib/dslify.rb
type Dslify (line 1) | module Dslify
function included (line 2) | def self.included(base)
type ClassMethods (line 7) | module ClassMethods
function default_options (line 8) | def default_options(hsh={})
function dsl_options (line 13) | def dsl_options
function options (line 16) | def options
function dsl_methods (line 20) | def dsl_methods(*syms)
function set_default_options (line 24) | def set_default_options(new_options)
function define_dsl_method_str (line 31) | def define_dsl_method_str(k)
function inherited (line 49) | def inherited(subclass)
type InstanceMethods (line 53) | module InstanceMethods
function dsl_options (line 54) | def dsl_options
function default_options (line 57) | def default_options
function set_vars_from_options (line 60) | def set_vars_from_options(hsh={})
function set_default_options (line 67) | def set_default_options(hsh={})
function method_missing (line 71) | def method_missing(m,*a,&block)
FILE: vendor/gems/dslify/test/dslify_test.rb
class Quickie (line 3) | class Quickie
method initialize (line 5) | def initialize(&block)
class QuickieTest (line 10) | class QuickieTest < Test::Unit::TestCase
class Detective (line 52) | class Detective
method snoop (line 55) | def snoop(*n)
class Bang (line 69) | class Bang
method initialize (line 74) | def initialize(opts={}, &block)
class Pop (line 93) | class Pop
method initialize (line 96) | def initialize(o={})
method real_method (line 100) | def real_method
class Foo (line 105) | class Foo < Pop
class Bar (line 109) | class Bar < Pop
class Dad (line 113) | class Dad < Pop
class Grandad (line 116) | class Grandad < Dad
class Defaults (line 119) | class Defaults < Pop
class MrDanger (line 177) | class MrDanger
method initialize (line 180) | def initialize(o={})
method where_to (line 183) | def where_to(*a)
class ToddTheSquare (line 199) | class ToddTheSquare
method provider (line 203) | def provider(&block)
class VarrrrrrrrMatey (line 225) | class VarrrrrrrrMatey
method initialize (line 229) | def initialize(o={}, &block)
method to_s (line 234) | def to_s
class PluginMoopieMoop (line 256) | class PluginMoopieMoop
method inherited (line 260) | def self.inherited(s)
class DoopyDoop (line 265) | class DoopyDoop < PluginMoopieMoop
method stars (line 266) | def stars
FILE: vendor/gems/git-style-binaries/lib/ext/colorize.rb
class String (line 4) | class String
method set_color_parameters (line 52) | def set_color_parameters( params )
method colorize (line 81) | def colorize( params )
method uncolorize (line 122) | def uncolorize
method colorized? (line 129) | def colorized?
method modes (line 163) | def modes
method colors (line 174) | def colors
method color_matrix (line 185) | def color_matrix( txt = "[X]" )
FILE: vendor/gems/git-style-binaries/lib/ext/core.rb
class Object (line 1) | class Object
method returning (line 2) | def returning(value)
class Symbol (line 8) | class Symbol
method to_proc (line 9) | def to_proc
class IO (line 14) | class IO
FILE: vendor/gems/git-style-binaries/lib/git-style-binary.rb
type GitStyleBinary (line 23) | module GitStyleBinary
function run? (line 35) | def run?
function parser (line 39) | def parser
function known_commands (line 43) | def known_commands
function load_primary (line 47) | def load_primary
function load_subcommand (line 63) | def load_subcommand
function load_command_file (line 71) | def load_command_file(name, file)
FILE: vendor/gems/git-style-binaries/lib/git-style-binary/autorunner.rb
type GitStyleBinary (line 3) | module GitStyleBinary
class AutoRunner (line 4) | class AutoRunner
method run (line 6) | def self.run(argv=ARGV)
method run (line 11) | def run
FILE: vendor/gems/git-style-binaries/lib/git-style-binary/command.rb
type GitStyleBinary (line 3) | module GitStyleBinary
function command (line 4) | def self.command(&block)
function primary (line 15) | def self.primary(&block)
class Command (line 25) | class Command
method defaults (line 27) | def defaults
method initialize (line 51) | def initialize(o={})
method parser (line 57) | def parser
method constraints (line 65) | def constraints
method run (line 69) | def run
method running_subcommand? (line 78) | def running_subcommand?
method load_all_parser_constraints (line 82) | def load_all_parser_constraints
method load_parser_default_constraints (line 91) | def load_parser_default_constraints
method load_parser_primary_constraints (line 95) | def load_parser_primary_constraints
method load_parser_local_constraints (line 99) | def load_parser_local_constraints
method call_parser_run_block (line 110) | def call_parser_run_block
method process_args_with_subcmd (line 118) | def process_args_with_subcmd(args = ARGV, *a, &b)
method process_parser! (line 129) | def process_parser!
method process_args (line 145) | def process_args(args = ARGV, *a, &b)
method is_primary? (line 165) | def is_primary?
method argv (line 169) | def argv
method short_desc (line 173) | def short_desc
method full_name (line 177) | def full_name
method die (line 182) | def die arg, msg=nil
method [] (line 189) | def [](k)
class Primary (line 195) | class Primary < Command
method is_primary? (line 196) | def is_primary?
method primary (line 199) | def primary
FILE: vendor/gems/git-style-binaries/lib/git-style-binary/commands/help.rb
type GitStyleBinary (line 1) | module GitStyleBinary
type Commands (line 2) | module Commands
class Help (line 3) | class Help
method educate_about_command (line 12) | def educate_about_command(name)
FILE: vendor/gems/git-style-binaries/lib/git-style-binary/helpers/name_resolver.rb
type GitStyleBinary (line 1) | module GitStyleBinary
type Helpers (line 2) | module Helpers
type NameResolver (line 3) | module NameResolver
function basename (line 5) | def basename(filename=zero)
function subcommand_names (line 12) | def subcommand_names(filename=zero)
function binary_directory (line 19) | def binary_directory(filename=zero)
function built_in_commands_directory (line 23) | def built_in_commands_directory
function built_in_command_names (line 27) | def built_in_command_names
function list_subcommands (line 31) | def list_subcommands(filename=zero)
function binary_filename_for (line 37) | def binary_filename_for(name)
function current_command_name (line 45) | def current_command_name(filename=zero,argv=ARGV)
function full_current_command_name (line 54) | def full_current_command_name(filename=zero,argv=ARGV)
function valid_subcommand? (line 60) | def valid_subcommand?(name)
function zero (line 64) | def zero
function pretty_known_subcommands (line 68) | def pretty_known_subcommands(theme=:long)
FILE: vendor/gems/git-style-binaries/lib/git-style-binary/helpers/pager.rb
type GitStyleBinary (line 1) | module GitStyleBinary
type Helpers (line 2) | module Helpers
type Pager (line 3) | module Pager
function run_pager (line 6) | def run_pager
FILE: vendor/gems/git-style-binaries/lib/git-style-binary/parser.rb
type GitStyleBinary (line 1) | module GitStyleBinary
class Parser (line 2) | class Parser < Trollop::Parser
method initialize (line 7) | def initialize *a, &b
method setup_callbacks (line 13) | def setup_callbacks
method run_callbacks (line 23) | def run_callbacks(at, from)
method banner (line 27) | def banner s=nil; @banner = s if s; @banner end
method short_desc (line 28) | def short_desc s=nil; @short_desc = s if s; @short_desc end
method name_desc (line 29) | def name_desc s=nil; @name_desc = s if s; @name_desc end
method theme (line 34) | def theme
method text (line 39) | def text s; @order << [:text, s] end
method spec_names (line 41) | def spec_names
method load_all_commands (line 46) | def load_all_commands
method educate (line 54) | def educate(stream=$stdout)
method educate_long (line 62) | def educate_long(stream=$stdout)
method educate_short (line 134) | def educate_short(stream=$stdout)
method colorize_known_words_array (line 187) | def colorize_known_words_array(txts)
method colorize_known_words (line 191) | def colorize_known_words(txt)
method consume (line 197) | def consume(&block)
method consume_all (line 201) | def consume_all(blocks)
method bin_name (line 205) | def bin_name
method all_options_string (line 209) | def all_options_string
method run (line 214) | def run(&block)
method action (line 218) | def action(name = :action, &block)
FILE: vendor/gems/git-style-binaries/test/git-style-binary/command_test.rb
class CommandTest (line 4) | class CommandTest < Test::Unit::TestCase
FILE: vendor/gems/git-style-binaries/test/git_style_binary_test.rb
class GitStyleBinariesTest (line 3) | class GitStyleBinariesTest < Test::Unit::TestCase
FILE: vendor/gems/git-style-binaries/test/running_binaries_test.rb
class RunningBinariesTest (line 5) | class RunningBinariesTest < Test::Unit::TestCase
FILE: vendor/gems/git-style-binaries/test/shoulda_macros/matching_stdio.rb
class Test::Unit::TestCase (line 1) | class Test::Unit::TestCase
method output_should_match (line 2) | def output_should_match(regexp)
method stdout_should_match (line 7) | def stdout_should_match(regexp)
method stderr_should_match (line 10) | def stderr_should_match(regexp)
FILE: vendor/gems/git-style-binaries/test/test_helper.rb
class Test::Unit::TestCase (line 15) | class Test::Unit::TestCase
method FIXTURES_PATH (line 16) | def FIXTURES_PATH
type RunsBinaryFixtures (line 21) | module RunsBinaryFixtures
function bin (line 23) | def bin(cmd)
FILE: vendor/gems/searchable_paths/lib/searchable_paths.rb
type SearchablePaths (line 4) | module SearchablePaths
function included (line 5) | def self.included(mod)
type ClassMethods (line 9) | module ClassMethods
function has_searchable_paths (line 18) | def has_searchable_paths(opts={})
function searchable_paths_dir (line 30) | def searchable_paths_dir; @searchable_paths_dirs.first; end
function searchable_paths_dirs (line 31) | def searchable_paths_dirs
function default_paths (line 38) | def default_paths
function searchable_paths (line 45) | def searchable_paths
type SingletonMethods (line 51) | module SingletonMethods
type InstanceMethods (line 54) | module InstanceMethods
function search_in_known_locations (line 62) | def search_in_known_locations(filepath, additional_search_paths=[])
FILE: vendor/gems/searchable_paths/test/searchable_paths_test.rb
class TestFile (line 7) | class TestFile
class TestFile2 (line 12) | class TestFile2
function write_to_file (line 17) | def File.write_to_file(name, content="")
class SearchablePathsTest (line 21) | class SearchablePathsTest < Test::Unit::TestCase
method setup (line 22) | def setup
method teardown (line 39) | def teardown
method test_should_have_class_options_set (line 43) | def test_should_have_class_options_set
method test_should_be_able_to_find_a_template (line 49) | def test_should_be_able_to_find_a_template
method test_shouldnt_find_a_template_that_doesnt_exist (line 55) | def test_shouldnt_find_a_template_that_doesnt_exist
method test_should_find_something_with_prepended_paths (line 59) | def test_should_find_something_with_prepended_paths
method test_should_find_things_in_the_right_order (line 64) | def test_should_find_things_in_the_right_order
method test_should_look_in_the_additional_search_paths_first (line 68) | def test_should_look_in_the_additional_search_paths_first
FILE: vendor/gems/searchable_paths/test/test_helper.rb
class Test::Unit::TestCase (line 9) | class Test::Unit::TestCase
class String (line 12) | class String
method / (line 13) | def /(o)
FILE: vendor/gems/trollop/lib/trollop.rb
type Trollop (line 8) | module Trollop
class CommandlineError (line 14) | class CommandlineError < StandardError; end
class HelpNeeded (line 18) | class HelpNeeded < StandardError; end
class VersionNeeded (line 22) | class VersionNeeded < StandardError; end
class Parser (line 38) | class Parser
method initialize (line 69) | def initialize *a, &b
method opt (line 124) | def opt name, desc="", opts={}
method version (line 238) | def version s=nil; @version = s if s; @version end
method banner (line 242) | def banner s; @order << [:text, s] end
method depends (line 248) | def depends *syms
method conflicts (line 254) | def conflicts *syms
method stop_on (line 268) | def stop_on *words
method stop_on_unknown (line 276) | def stop_on_unknown
method parse (line 281) | def parse cmdline=ARGV
method parse_date_parameter (line 401) | def parse_date_parameter param, arg #:nodoc:
method educate (line 415) | def educate stream=$stdout
method width (line 479) | def width #:nodoc:
method wrap (line 495) | def wrap str, opts={} # :nodoc:
method each_arg (line 506) | def each_arg args
method parse_integer_parameter (line 577) | def parse_integer_parameter param, arg
method parse_float_parameter (line 582) | def parse_float_parameter param, arg
method parse_io_parameter (line 587) | def parse_io_parameter param, arg
method collect_argument_parameters (line 600) | def collect_argument_parameters args, start_at
method resolve_default_short_options (line 610) | def resolve_default_short_options
method wrap_line (line 624) | def wrap_line str, opts={}
method cloaker (line 646) | def cloaker &b
function options (line 689) | def options args = ARGV, *a, &b
function die (line 727) | def die arg, msg=nil
FILE: vendor/gems/trollop/test/test_trollop.rb
type Trollop (line 10) | module Trollop
type Test (line 11) | module Test
class Trollop (line 13) | class Trollop < ::Test::Unit::TestCase
method setup (line 14) | def setup
method test_unknown_arguments (line 18) | def test_unknown_arguments
method test_syntax_check (line 25) | def test_syntax_check
method test_required_flags_are_required (line 34) | def test_required_flags_are_required
method test_argflags_demand_args (line 46) | def test_argflags_demand_args
method test_arglessflags_refuse_args (line 56) | def test_arglessflags_refuse_args
method test_typed_args_refuse_args_of_other_types (line 68) | def test_typed_args_refuse_args_of_other_types
method test_type_correctly_derived_from_default (line 78) | def test_type_correctly_derived_from_default
method test_type_and_default_must_match (line 159) | def test_type_and_default_must_match
method test_long_detects_bad_names (line 175) | def test_long_detects_bad_names
method test_short_detects_bad_names (line 184) | def test_short_detects_bad_names
method test_short_names_created_automatically (line 192) | def test_short_names_created_automatically
method test_short_autocreation_skips_dashes_and_numbers (line 202) | def test_short_autocreation_skips_dashes_and_numbers
method test_short_autocreation_detects_running_out (line 217) | def test_short_autocreation_detects_running_out
method test_short_can_be_nothing (line 225) | def test_short_can_be_nothing
method test_conflicting_names_are_detected (line 239) | def test_conflicting_names_are_detected
method test_conflicting_longs_detected (line 245) | def test_conflicting_longs_detected
method test_conflicting_shorts_detected (line 251) | def test_conflicting_shorts_detected
method test_flag_defaults (line 256) | def test_flag_defaults
method test_special_flags_work (line 268) | def test_special_flags_work
method test_short_options_combine (line 274) | def test_short_options_combine
method test_version_only_appears_if_set (line 299) | def test_version_only_appears_if_set
method test_doubledash_ends_option_processing (line 306) | def test_doubledash_ends_option_processing
method test_wrap (line 324) | def test_wrap
method test_floating_point_formatting (line 345) | def test_floating_point_formatting
method test_date_formatting (line 375) | def test_date_formatting
method test_short_options_cant_be_numeric (line 389) | def test_short_options_cant_be_numeric
method test_short_options_can_be_weird (line 396) | def test_short_options_can_be_weird
method test_options_cant_be_set_multiple_times_if_not_specified (line 402) | def test_options_cant_be_set_multiple_times_if_not_specified
method test_options_can_be_set_multiple_times_if_specified (line 409) | def test_options_can_be_set_multiple_times_if_specified
method test_short_options_with_multiple_options (line 418) | def test_short_options_with_multiple_options
method short_options_with_multiple_options_does_not_affect_flags_type (line 429) | def short_options_with_multiple_options_does_not_affect_flags_type
method test_short_options_with_multiple_arguments (line 449) | def test_short_options_with_multiple_arguments
method test_short_options_with_multiple_options_and_arguments (line 468) | def test_short_options_with_multiple_options_and_arguments
method test_combined_short_options_with_multiple_arguments (line 487) | def test_combined_short_options_with_multiple_arguments
method test_long_options_with_multiple_options (line 509) | def test_long_options_with_multiple_options
method test_long_options_with_multiple_arguments (line 520) | def test_long_options_with_multiple_arguments
method test_long_options_with_multiple_options_and_arguments (line 548) | def test_long_options_with_multiple_options_and_arguments
method test_long_options_also_take_equals (line 576) | def test_long_options_also_take_equals
method test_auto_generated_long_names_convert_underscores_to_hyphens (line 590) | def test_auto_generated_long_names_convert_underscores_to_hyphens
method test_arguments_passed_through_block (line 595) | def test_arguments_passed_through_block
method test_help_has_default_banner (line 604) | def test_help_has_default_banner
method test_help_preserves_positions (line 632) | def test_help_preserves_positions
method test_version_and_help_short_args_can_be_overridden (line 643) | def test_version_and_help_short_args_can_be_overridden
method test_version_and_help_long_args_can_be_overridden (line 654) | def test_version_and_help_long_args_can_be_overridden
method test_version_and_help_override_errors (line 664) | def test_version_and_help_override_errors
method test_conflicts (line 673) | def test_conflicts
method test_conflict_error_messages (line 703) | def test_conflict_error_messages
method test_depends (line 717) | def test_depends
method test_depend_error_messages (line 744) | def test_depend_error_messages
method test_two_required_one_missing_accuses_correctly (line 769) | def test_two_required_one_missing_accuses_correctly
method test_stopwords_mixed (line 790) | def test_stopwords_mixed
method test_stopwords_no_stopwords (line 806) | def test_stopwords_no_stopwords
method test_stopwords_multiple_stopwords (line 822) | def test_stopwords_multiple_stopwords
method test_stopwords_with_short_args (line 844) | def test_stopwords_with_short_args
method assert_parses_correctly (line 865) | def assert_parses_correctly(parser, commandline, expected_opts,
method test_unknown_subcommand (line 872) | def test_unknown_subcommand
method test_alternate_args (line 894) | def test_alternate_args
method test_io_arg_type (line 909) | def test_io_arg_type
method test_openstruct_style_access (line 932) | def test_openstruct_style_access
method test_multi_args_autobox_defaults (line 944) | def test_multi_args_autobox_defaults
method test_ambigious_multi_plus_array_default_resolved_as_specified_by_documentation (line 960) | def test_ambigious_multi_plus_array_default_resolved_as_specified_...
method test_given_keys (line 990) | def test_given_keys
method test_default_shorts_assigned_only_after_user_shorts (line 1011) | def test_default_shorts_assigned_only_after_user_shorts
method test_accepts_arguments_with_spaces (line 1030) | def test_accepts_arguments_with_spaces
method test_multi_args_default_to_empty_array (line 1040) | def test_multi_args_default_to_empty_array
FILE: vendor/gems/xml-simple/lib/xmlsimple.rb
class XmlSimple (line 11) | class XmlSimple
class Cache (line 18) | class Cache
method initialize (line 20) | def initialize
method save_storable (line 31) | def save_storable(data, filename)
method restore_storable (line 41) | def restore_storable(filename)
method save_mem_share (line 56) | def save_mem_share(data, filename)
method restore_mem_share (line 67) | def restore_mem_share(filename)
method save_mem_copy (line 77) | def save_mem_copy(data, filename)
method restore_mem_copy (line 87) | def restore_mem_copy(filename)
method get_cache_filename (line 102) | def get_cache_filename(filename)
method get_from_memory_cache (line 114) | def get_from_memory_cache(filename, cache)
method initialize (line 128) | def initialize(defaults = nil)
method xml_in (line 149) | def xml_in(string = nil, options = nil)
method xml_in (line 201) | def XmlSimple.xml_in(string = nil, options = nil)
method xml_out (line 212) | def xml_out(ref, options = nil)
method xml_out (line 257) | def XmlSimple.xml_out(hash, options = nil)
method normalize_option_names (line 298) | def normalize_option_names(options, known_options)
method handle_options (line 319) | def handle_options(direction, options)
method collapse (line 461) | def collapse(element)
method collapse_text_node (line 523) | def collapse_text_node(hash, element)
method fold_arrays (line 544) | def fold_arrays(hash)
method fold_array (line 568) | def fold_array(array)
method fold_array_by_name (line 598) | def fold_array_by_name(name, array)
method collapse_content (line 624) | def collapse_content(hash)
method merge (line 644) | def merge(hash, key, value)
method force_array? (line 689) | def force_array?(key)
method get_attributes (line 706) | def get_attributes(node)
method has_mixed_content? (line 720) | def has_mixed_content?(element)
method set_var (line 731) | def set_var(name, value)
method get_var (line 737) | def get_var(name)
method value_to_xml (line 754) | def value_to_xml(ref, name, indent)
method scalar (line 868) | def scalar(value)
method hash_to_array (line 881) | def hash_to_array(parent, hashref)
method escape_value (line 900) | def escape_value(data)
method normalise_space (line 909) | def normalise_space(text)
method empty (line 918) | def empty(value)
method node_to_text (line 937) | def node_to_text(node, default = nil)
method parse (line 958) | def parse(xml_string)
method find_xml_file (line 970) | def find_xml_file(file, searchpath)
method load_xml_file (line 1000) | def load_xml_file(filename)
method put_into_cache (line 1010) | def put_into_cache(data, filename)
Condensed preview — 341 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (737K chars).
[
{
"path": ".gitignore",
"chars": 358,
"preview": "examples-private/\n.vagrant\nvendor/cache\n/trash/\nrdoc/*\n.com.apple.timemachine.supported\n.DS_Store\n*tmp*\npkg/*.tgz\npkg/*."
},
{
"path": ".gitmodules",
"chars": 114,
"preview": "[submodule \"vendor/gems/amazon-ec2\"]\n\tpath = vendor/gems/amazon-ec2\n\turl = git://github.com/grempe/amazon-ec2.git\n"
},
{
"path": ".rdebugrc",
"chars": 16,
"preview": "set autoeval on\n"
},
{
"path": ".rvmrc",
"chars": 38,
"preview": "rvm use ruby-1.9.2@poolparty --create\n"
},
{
"path": "Gemfile",
"chars": 339,
"preview": "source \"http://rubygems.org\"\ngemspec\n\ngem 'amazon-ec2', '~>0.9.17'\ngem 'xml-simple'\ngem 'json'\ngem 'git-style-binaries'\n"
},
{
"path": "License.txt",
"chars": 1053,
"preview": "Copyright (c) 2009 Ari Lerner\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this soft"
},
{
"path": "Makefile",
"chars": 205,
"preview": "RUBY\t\t\t\t\t\t\t= `which ruby`\nRUBYGEMS\t\t\t\t\t= `which gem`\nGEMENV\t\t\t\t\t\t= `gem env`\n\nall: run_tests\n\ncheck_install:\n\t$(RUBY) -v"
},
{
"path": "Manifest.txt",
"chars": 0,
"preview": ""
},
{
"path": "README.rdoc",
"chars": 3613,
"preview": "= PoolParty\n\nhttp://poolpartyrb.com\n\n== DESCRIPTION:\n\nPoolParty makes cloud provisioning and management easy. PoolParty "
},
{
"path": "Rakefile",
"chars": 2225,
"preview": "$:.unshift(File.join(File.dirname(__FILE__), \".\"))\nrequire 'rake'\nrequire \"bundler/gem_tasks\"\nrequire 'rake/testtask'\nre"
},
{
"path": "Vagrantfile",
"chars": 3341,
"preview": "Vagrant::Config.run do |config|\n # All Vagrant configuration is done here. The most common configuration\n # options ar"
},
{
"path": "bin/cloud",
"chars": 2082,
"preview": "#!/usr/bin/env ruby\n$:.unshift(File.dirname(__FILE__) + \"/../lib\")\nrequire \"poolparty\"\nrequire 'git-style-binary/command"
},
{
"path": "bin/cloud-bootstrap",
"chars": 576,
"preview": "#!/usr/bin/env ruby\n$:.unshift(File.dirname(__FILE__) + \"/../lib\")\nrequire \"poolparty\"\n\nrequire 'git-style-binary/comman"
},
{
"path": "bin/cloud-compile",
"chars": 521,
"preview": "#!/usr/bin/env ruby\n$:.unshift(File.dirname(__FILE__) + \"/../lib\")\nrequire \"poolparty\"\n\nrequire 'git-style-binary/comman"
},
{
"path": "bin/cloud-configure",
"chars": 572,
"preview": "#!/usr/bin/env ruby\n$:.unshift(File.dirname(__FILE__) + \"/../lib\")\nrequire \"poolparty\"\n\nrequire 'git-style-binary/comman"
},
{
"path": "bin/cloud-console",
"chars": 1181,
"preview": "#!/usr/bin/env ruby\n$:.unshift(File.dirname(__FILE__) + \"/../lib\")\nrequire \"poolparty\"\nrequire 'git-style-binary/command"
},
{
"path": "bin/cloud-contract",
"chars": 1096,
"preview": "#!/usr/bin/env ruby\n$:.unshift(File.dirname(__FILE__) + \"/../lib\")\nrequire \"poolparty\"\n\nrequire 'git-style-binary/comman"
},
{
"path": "bin/cloud-cssh",
"chars": 598,
"preview": "#!/usr/bin/env ruby\n$:.unshift(File.dirname(__FILE__) + \"/../lib\")\nrequire \"poolparty\"\n\nrequire 'git-style-binary/comman"
},
{
"path": "bin/cloud-expand",
"chars": 752,
"preview": "#!/usr/bin/env ruby\n$:.unshift(File.dirname(__FILE__) + \"/../lib\")\nrequire \"poolparty\"\n\nrequire 'git-style-binary/comman"
},
{
"path": "bin/cloud-list",
"chars": 1155,
"preview": "#!/usr/bin/env ruby\n$:.unshift(File.dirname(__FILE__) + \"/../lib\")\n\nrequire \"poolparty\"\nrequire 'git-style-binary/comman"
},
{
"path": "bin/cloud-reboot",
"chars": 416,
"preview": "#!/usr/bin/env ruby\n$:.unshift(File.dirname(__FILE__) + \"/../lib\")\nrequire \"poolparty\"\n\nrequire 'git-style-binary/comman"
},
{
"path": "bin/cloud-rsync",
"chars": 571,
"preview": "#!/usr/bin/env ruby\n$:.unshift(File.dirname(__FILE__) + \"/../lib\")\nrequire \"poolparty\"\n\nrequire 'git-style-binary/comman"
},
{
"path": "bin/cloud-run",
"chars": 701,
"preview": "#!/usr/bin/env ruby\n$:.unshift(File.dirname(__FILE__) + \"/../lib\")\n\nrequire \"poolparty\"\nrequire 'git-style-binary/comman"
},
{
"path": "bin/cloud-show",
"chars": 1606,
"preview": "#!/usr/bin/env ruby\n$:.unshift(File.dirname(__FILE__) + \"/../lib\")\nrequire \"poolparty\"\n\nrequire 'git-style-binary/comman"
},
{
"path": "bin/cloud-ssh",
"chars": 739,
"preview": "#!/usr/bin/env ruby\n$:.unshift(File.dirname(__FILE__) + \"/../lib\")\nrequire \"poolparty\"\n\nrequire 'git-style-binary/comman"
},
{
"path": "bin/cloud-start",
"chars": 409,
"preview": "#!/usr/bin/env ruby\n$:.unshift(File.dirname(__FILE__) + \"/../lib\")\nrequire \"poolparty\"\n\nrequire 'git-style-binary/comman"
},
{
"path": "bin/cloud-terminate",
"chars": 686,
"preview": "#!/usr/bin/env ruby\n$:.unshift(File.dirname(__FILE__) + \"/../lib\")\nrequire \"poolparty\"\n\nrequire 'git-style-binary/comman"
},
{
"path": "bin/cloud-vnc",
"chars": 1238,
"preview": "#!/usr/bin/env ruby\n$:.unshift(File.dirname(__FILE__) + \"/../lib\")\nrequire \"poolparty\"\n\nrequire 'git-style-binary/comman"
},
{
"path": "config/requirements.rb",
"chars": 132,
"preview": "require 'fileutils'\ninclude FileUtils\n\nrequire 'rubygems'\nrequire 'rake'\n\n$:.unshift(File.join(File.dirname(__FILE__), %"
},
{
"path": "examples/README.md",
"chars": 5017,
"preview": "\nsimple.rb\n===\nThe simple.rb configuration will create an ec2 auto scaling group that will launch the minimum_instances "
},
{
"path": "examples/chef_cloud/chef_repo/.gitignore",
"chars": 18,
"preview": ".rake_test_cache\n\n"
},
{
"path": "examples/chef_cloud/chef_repo/README",
"chars": 96,
"preview": "Began as a clone of the Opscode base repo\nhttp://wiki.opscode.com/display/chef/Chef+Repository\n\n"
},
{
"path": "examples/chef_cloud/chef_repo/Rakefile",
"chars": 1059,
"preview": "#\n# Rakefile for Chef Server Repository\n#\n# Author:: Adam Jacob (<adam@opscode.com>)\n# Copyright:: Copyright (c) 2008 Op"
},
{
"path": "examples/chef_cloud/chef_repo/certificates/README",
"chars": 62,
"preview": "This directory contains certificates created by the Rakefile.\n"
},
{
"path": "examples/chef_cloud/chef_repo/config/client.rb.example",
"chars": 700,
"preview": "#\n# Example Chef Client Config File\n#\n# We recommend using Opscode's chef cookbook for managing chef itself,\n# instead o"
},
{
"path": "examples/chef_cloud/chef_repo/config/rake.rb",
"chars": 1685,
"preview": "###\n# Company and SSL Details\n###\n\n# The company name - used for SSL certificates, and in srvious other places\nCOMPANY_N"
},
{
"path": "examples/chef_cloud/chef_repo/config/server.rb.example",
"chars": 1152,
"preview": "#\n# Example Chef Server Config File\n#\n# We recommend using Opscode's chef cookbook for managing chef itself,\n# instead o"
},
{
"path": "examples/chef_cloud/chef_repo/config/solo.rb.example",
"chars": 192,
"preview": "#\n# Chef Solo Config File\n#\n\nlog_level :info\nlog_location STDOUT\nfile_cache_path \"/srv/chef/cookbooks\""
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/README",
"chars": 54,
"preview": "This directory contains upstream or shared cookbooks.\n"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/README.rdoc",
"chars": 3252,
"preview": "= DESCRIPTION:\n\nComplete Debian/Ubuntu style Apache2 configuration.\n\n= REQUIREMENTS:\n\nDebian or Ubuntu preferred.\n\nRed H"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/attributes/apache.rb",
"chars": 2644,
"preview": "#\n# Cookbook Name:: apache2\n# Attributes:: apache\n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache L"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/definitions/apache_conf.rb",
"chars": 852,
"preview": "#\n# Cookbook Name:: apache2\n# Definition:: apache_conf\n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apa"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/definitions/apache_module.rb",
"chars": 1545,
"preview": "#\n# Cookbook Name:: apache2\n# Definition:: apache_module\n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the A"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/definitions/apache_site.rb",
"chars": 1454,
"preview": "#\n# Cookbook Name:: apache2\n# Definition:: apache_site\n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apa"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/definitions/web_app.rb",
"chars": 1439,
"preview": "#\n# Cookbook Name:: apache2\n# Definition:: web_app\n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache "
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/files/default/apache2_module_conf_generate.pl",
"chars": 848,
"preview": "#!/usr/bin/perl\n\n=begin\n\nGenerates Ubuntu style module.load files.\n \n./apache2_module_conf_generate.pl /usr/lib64/httpd/"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/metadata.json",
"chars": 15871,
"preview": "{\n \"description\": \"Installs and configures all aspects of apache2 using Debian style symlinks with helper definitions\","
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/metadata.rb",
"chars": 7856,
"preview": "maintainer \"Opscode, Inc.\"\nmaintainer_email \"cookbooks@opscode.com\"\nlicense \"Apache 2.0\"\ndescription "
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/default.rb",
"chars": 5263,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: default\n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache Lice"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/god_monitor.rb",
"chars": 1171,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: god_monitor\n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache "
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_alias.rb",
"chars": 675,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: alias \n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache Licen"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_auth_basic.rb",
"chars": 666,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: auth_basic \n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache "
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_auth_digest.rb",
"chars": 668,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: auth_digest \n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_authn_file.rb",
"chars": 666,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: authn_file \n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache "
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_authnz_ldap.rb",
"chars": 668,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: authnz_ldap \n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_authz_default.rb",
"chars": 672,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: authz_default \n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apac"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_authz_groupfile.rb",
"chars": 676,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: authz_groupfile \n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Ap"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_authz_host.rb",
"chars": 666,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: authz_host \n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache "
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_authz_user.rb",
"chars": 666,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: authz_user \n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache "
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_autoindex.rb",
"chars": 683,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: autoindex \n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache L"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_cgi.rb",
"chars": 652,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: cgi \n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache License"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_dav.rb",
"chars": 652,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: dav \n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache License"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_dav_svn.rb",
"chars": 686,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: dav_svn \n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache Lic"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_deflate.rb",
"chars": 679,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: deflate \n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache Lic"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_dir.rb",
"chars": 672,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: dir \n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache License"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_env.rb",
"chars": 652,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: env \n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache License"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_expires.rb",
"chars": 660,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: expires \n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache Lic"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_fcgid.rb",
"chars": 1451,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: fcgid \n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache Licen"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_headers.rb",
"chars": 660,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: headers \n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache Lic"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_ldap.rb",
"chars": 654,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: ldap \n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache Licens"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_log_config.rb",
"chars": 755,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: log_config \n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache "
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_mime.rb",
"chars": 673,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: mime \n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache Licens"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_negotiation.rb",
"chars": 687,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: negotiation \n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_php5.rb",
"chars": 925,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: php5 \n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache Licens"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_proxy.rb",
"chars": 675,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: proxy \n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache Licen"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_proxy_ajp.rb",
"chars": 660,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: proxy \n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache Licen"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_proxy_balancer.rb",
"chars": 665,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: proxy \n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache Licen"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_proxy_connect.rb",
"chars": 664,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: proxy \n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache Licen"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_proxy_http.rb",
"chars": 666,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: proxy_http \n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache "
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_python.rb",
"chars": 691,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: python \n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache Lice"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_rails.rb",
"chars": 1236,
"preview": "#\n# Cookbook Name:: passenger\n# Recipe:: default\n#\n# Author:: Joshua Timberman (<joshua@opscode.com>)\n# Author:: Joshua "
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_rewrite.rb",
"chars": 660,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: rewrite \n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache Lic"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_setenvif.rb",
"chars": 681,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: setenvif \n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache Li"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_ssl.rb",
"chars": 1250,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: ssl \n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache License"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/recipes/mod_status.rb",
"chars": 677,
"preview": "#\n# Cookbook Name:: apache2\n# Recipe:: status \n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache Lice"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/a2dismod.erb",
"chars": 630,
"preview": "#!/bin/sh -e\n\nSYSCONFDIR='<%= @node[:apache][:dir] %>'\n\nif [ -z $1 ]; then\n echo \"Which module would you like to "
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/a2dissite.erb",
"chars": 812,
"preview": "#!/bin/sh -e\n\nSYSCONFDIR='<%= @node[:apache][:dir] %>'\n\nif [ -z $1 ]; then\n echo \"Which site would you like to di"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/a2enmod.erb",
"chars": 1121,
"preview": "#!/bin/sh -e\n\nSYSCONFDIR='<%= @node[:apache][:dir] %>'\n\nif [ -z $1 ]; then\n echo \"Which module would you like to "
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/a2ensite.erb",
"chars": 1021,
"preview": "#!/bin/sh -e\n\nSYSCONFDIR='<%= @node[:apache][:dir] %>'\n\nif [ -z $1 ]; then\n echo \"Which site would you like to en"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/apache2.conf.erb",
"chars": 8459,
"preview": "#\n# Generated by Chef\n#\n# Based on the Ubuntu apache2.conf\n\nServerRoot \"<%= @node[:apache][:dir] %>\"\n\n#\n# The accept ser"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/apache2.god.erb",
"chars": 486,
"preview": "God.watch do |w|\n w.name = \"apache2\"\n w.interval = 30.seconds # default\n w.start = \"<%= @params[:start] %>\"\n w.stop "
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/charset.erb",
"chars": 269,
"preview": "# Read the documentation before enabling AddDefaultCharset.\n# In general, it is only a good idea if you know that all yo"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/default-site.erb",
"chars": 2007,
"preview": "<VirtualHost *:80>\n ServerAdmin <%= @node[:apache][:contact] %>\n\n DocumentRoot /var/www/\n <Director"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/mods/README",
"chars": 132,
"preview": "These configs are taken from a Debian apache2.2-common 2.2.11-3 install. They \nwork on CentOS 5.3 with a few conditions "
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/mods/alias.conf.erb",
"chars": 828,
"preview": "<IfModule alias_module>\n#\n# Aliases: Add here as many aliases as you need (with no limit). The format is \n# Alias fakena"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/mods/autoindex.conf.erb",
"chars": 3265,
"preview": "<IfModule mod_autoindex.c>\n#\n# Directives controlling the display of server-generated directory listings.\n#\n\n#\n# IndexOp"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/mods/deflate.conf.erb",
"chars": 107,
"preview": "<IfModule mod_deflate.c>\n AddOutputFilterByType DEFLATE text/html text/plain text/xml\n</IfModule>\n"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/mods/dir.conf.erb",
"chars": 122,
"preview": "<IfModule mod_dir.c>\n\n DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm\n\n</IfModule"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/mods/fcgid.conf.erb",
"chars": 321,
"preview": "<IfModule mod_fcgid.c>\n AddHandler fcgid-script .fcgi\n IPCConnectTimeout 20\n</IfModule>\n\n<% if @node[:platform] == "
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/mods/mime.conf.erb",
"chars": 6362,
"preview": "<IfModule mod_mime.c>\n\n#\n# TypesConfig points to the file containing the list of mappings from\n# filename extension to M"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/mods/negotiation.conf.erb",
"chars": 666,
"preview": "<IfModule mod_negotiation.c>\n#\n# LanguagePriority allows you to give precedence to some languages\n# in case of a tie dur"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/mods/proxy.conf.erb",
"chars": 589,
"preview": "<IfModule mod_proxy.c>\n #turning ProxyRequests on and allowing proxying from all may allow\n #spammers to u"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/mods/setenvif.conf.erb",
"chars": 1122,
"preview": "<IfModule mod_setenvif.c>\n\n#\n# The following directives modify normal HTTP response behavior to\n# handle known problems "
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/mods/ssl.conf.erb",
"chars": 2738,
"preview": "<IfModule mod_ssl.c>\n#\n# Pseudo Random Number Generator (PRNG):\n# Configure one or more sources to seed the PRNG of the "
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/mods/status.conf.erb",
"chars": 398,
"preview": "<IfModule mod_status.c>\n#\n# Allow server status reports generated by mod_status,\n# with the URL of http://servername/ser"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/port_apache.erb",
"chars": 72,
"preview": "# Port <%= @port %> \n-A FWR -p tcp -m tcp --dport <%= @port %> -j ACCEPT"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/ports.conf.erb",
"chars": 147,
"preview": "#This file generated via template by Chef.\n<% @apache_listen_ports.each do |port| -%>\nListen <%= port %>\nNameVirtualHost"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/security.erb",
"chars": 1569,
"preview": "#\n# Disable access to the entire file system except for the directories that\n# are explicitly allowed later.\n#\n# This cu"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apache2/templates/default/web_app.conf.erb",
"chars": 1266,
"preview": "<VirtualHost *:80>\n ServerName <%= @params[:server_name] %>\n ServerAlias <% @params[:server_aliases].each do |a| %><%="
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apt/files/default/apt-cacher",
"chars": 276,
"preview": "# apt-cacher startup configuration file\n\n# IMPORTANT: check the apt-cacher.conf file before using apt-cacher as daemon.\n"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apt/files/default/apt-cacher.conf",
"chars": 7338,
"preview": "# This file has been modified by ./apt-proxy-to-apt-cacher\n# Some lines may have been appended at the bottom of this fil"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apt/files/default/apt-proxy-v2.conf",
"chars": 1120,
"preview": "[DEFAULT]\n;; All times are in seconds, but you can add a suffix\n;; for minutes(m), hours(h) or days(d)\n\n;; commented out"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apt/metadata.json",
"chars": 663,
"preview": "{\n \"description\": \"Configures apt and apt services\",\n \"replacing\": {\n\n },\n \"recipes\": {\n \"apt::proxy\": \"Set up an"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apt/metadata.rb",
"chars": 344,
"preview": "maintainer \"Opscode, Inc.\"\nmaintainer_email \"cookbooks@opscode.com\"\nlicense \"Apache 2.0\"\ndescription "
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apt/recipes/cacher.rb",
"chars": 1126,
"preview": "#\n# Cookbook Name:: apt\n# Recipe:: cacher\n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache License, "
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apt/recipes/default.rb",
"chars": 859,
"preview": "#\n# Cookbook Name:: apt\n# Recipe:: default\n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache License,"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/apt/recipes/proxy.rb",
"chars": 959,
"preview": "#\n# Cookbook Name:: apt\n# Recipe:: proxy\n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache License, V"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/bootstrap/README.rdoc",
"chars": 5940,
"preview": "= DESCRIPTION:\n\nThis cookbook bootstraps a Chef client or server when Chef is installed via RubyGems. If installing Chef"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/bootstrap/attributes/bootstrap.rb",
"chars": 2040,
"preview": "#\n# Cookbook Name:: bootstrap\n# Attributes:: bootstrap\n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apa"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/bootstrap/metadata.json",
"chars": 6950,
"preview": "{\n \"description\": \"Configures RubyGems-installed Chef\",\n \"replacing\": {\n\n },\n \"recipes\": {\n \"bootstrap::client\": "
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/bootstrap/metadata.rb",
"chars": 327,
"preview": "maintainer \"Opscode, Inc.\"\nmaintainer_email \"cookbooks@opscode.com\"\nlicense \"Apache 2.0\"\ndescription "
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/bootstrap/recipes/client.rb",
"chars": 2567,
"preview": "#\n# Cookbook Name:: bootstrap\n# Recipe:: default\n#\n# Copyright 2009, Opscode, Inc.\n#\n# Licensed under the Apache License"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/bootstrap/recipes/default.rb",
"chars": 630,
"preview": "#\n# Cookbook Name:: bootstrap\n# Recipe:: client\n#\n# Copyright 2009, Opscode, Inc.\n#\n# Licensed under the Apache License,"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/bootstrap/recipes/server.rb",
"chars": 3260,
"preview": "#\n# Author:: Joshua Timberman <joshua@opscode.com>\n# Author:: Joshua Sierles <joshua@37signals.com>\n#\n# Cookbook Name:: "
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/bootstrap/templates/default/client.rb.erb",
"chars": 1407,
"preview": "#\n# Chef Client Config File\n#\n# Dynamically generated by Chef - local modifications will be replaced\n#\n\nlog_level "
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/bootstrap/templates/default/server.rb.erb",
"chars": 1634,
"preview": "#\n# Chef Server Config File\n#\n# Dynamically generated by Chef - local modifications will be replaced\n\nlog_level "
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/bootstrap/templates/default/sv-chef-client-log-run.erb",
"chars": 33,
"preview": "#!/bin/sh\nexec svlogd -tt ./main\n"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/bootstrap/templates/default/sv-chef-client-run.erb",
"chars": 442,
"preview": "#!/bin/sh\nPATH=/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin<% if @node[:languages][:ruby][:gems_dir] %>:"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/bootstrap/templates/default/sv-chef-indexer-log-run.erb",
"chars": 33,
"preview": "#!/bin/sh\nexec svlogd -tt ./main\n"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/bootstrap/templates/default/sv-chef-indexer-run.erb",
"chars": 218,
"preview": "#!/bin/sh\nPATH=/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin<% if @node[:languages][:ruby][:gems_dir] %>:"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/bootstrap/templates/default/sv-chef-server-log-run.erb",
"chars": 33,
"preview": "#!/bin/sh\nexec svlogd -tt ./main\n"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/bootstrap/templates/default/sv-chef-server-run.erb",
"chars": 284,
"preview": "#!/bin/sh\nPATH=/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin<% if @node[:languages][:ruby][:gems_dir] %>:"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/chef/README.rdoc",
"chars": 10089,
"preview": "= IMPORTANT CHANGES:\n\nFirst be aware of important changes in this version from previous versions.\n\n== General:\n\nThe attr"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/chef/attributes/chef.rb",
"chars": 2179,
"preview": "#\n# Author:: Joshua Timberman <joshua@opscode.com>\n# Cookbook Name:: chef\n# Attributes:: chef\n#\n# Copyright 2008-2009, O"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/chef/metadata.json",
"chars": 15594,
"preview": "{\n \"description\": \"Installs and configures chef client and server\",\n \"replacing\": {\n\n },\n \"recipes\": {\n \"chef::se"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/chef/metadata.rb",
"chars": 3064,
"preview": "maintainer \"Opscode, Inc.\"\nmaintainer_email \"cookbooks@opscode.com\"\nlicense \"Apache 2.0\"\ndescription "
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/chef/recipes/client.rb",
"chars": 2201,
"preview": "#\n# Author:: Joshua Timberman <joshua@opscode.com>\n# Author:: Joshua Sierles <joshua@37signals.com>\n# Cookbook Name:: ch"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/chef/recipes/default.rb",
"chars": 0,
"preview": ""
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/chef/recipes/server.rb",
"chars": 1912,
"preview": "#\n# Author:: Joshua Timberman <joshua@opscode.com>\n# Author:: Joshua Sierles <joshua@37signals.com>\n# Cookbook Name:: ch"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/chef/recipes/server_proxy.rb",
"chars": 2014,
"preview": "#\n# Author:: Joshua Timberman <joshua@opscode.com>\n# Cookbook Name:: chef\n# Recipe:: server_proxy\n#\n# Copyright 2009, Op"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/chef/templates/default/chef_server.conf.erb",
"chars": 1641,
"preview": "<VirtualHost *:443>\n ServerName <%= @params[:server_name] %>\n ServerAlias <% @params[:server_aliases].each do |a| %><%"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/chef/templates/default/client.rb.erb",
"chars": 1227,
"preview": "#\n# Chef Client Config File\n#\n# Dynamically generated by Chef - local modifications will be replaced\n#\n\nlog_level "
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/chef/templates/default/server.rb.erb",
"chars": 1442,
"preview": "#\n# Chef Server Config File\n#\n# Dynamically generated by Chef - local modifications will be replaced\n\nlog_level "
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/ec2/attributes/ec2_metadata.rb",
"chars": 1370,
"preview": "#\n# Cookbook Name:: ec2\n# Attribute File:: ec2_metadata.rb\n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/ec2/attributes/ec2_recipe_options.rb",
"chars": 1391,
"preview": "#\n# Cookbook Name:: ec2\n# Attribute File:: ec2_recipe_options.rb\n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed und"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/ec2/metadata.rb",
"chars": 298,
"preview": "maintainer \"Opscode, Inc.\"\nmaintainer_email \"cookbooks@opscode.com\"\nlicense \"Apache 2.0\"\ndescription "
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/ec2/recipes/default.rb",
"chars": 631,
"preview": "#\n# Cookbook Name:: ec2\n# Recipe:: default\n#\n# Copyright 2008-2009, Opscode, Inc.\n#\n# Licensed under the Apache License,"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/ganglia/README.rdoc",
"chars": 59,
"preview": "= DESCRIPTION:\n\n= REQUIREMENTS:\n\n= ATTRIBUTES: \n\n= USAGE:\n\n"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/ganglia/attributes/default.rb",
"chars": 698,
"preview": "set[:ganglia][:ganglia_this_nodes_private_ip] = ipaddress\n\n# set[:ganglia][:ganglia_gmetad_data_sources] = \"foo\"\n# set["
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/ganglia/metadata.rb",
"chars": 364,
"preview": "maintainer \"Nate Murray\"\nmaintainer_email \"\"\nlicense \"Apache 2.0\"\ndescription \"Installs/Configures g"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/ganglia/recipes/default.rb",
"chars": 3702,
"preview": "#\n# Cookbook Name:: ganglia\n# Recipe:: default\n\n# install rrd\ncase node[:platform]\nwhen \"redhat\",\"centos\"\n package \"apr"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/ganglia/recipes/gmetad.rb",
"chars": 1000,
"preview": "# Cookbook Name:: ganglia\n# Recipe:: gmetad\n\ntemplate \"/etc/init.d/gmetad\" do\n mode \"0755\"\n source \"bin/gmetad.erb\"\nen"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/ganglia/recipes/monitor_sshd.rb",
"chars": 271,
"preview": "template \"/etc/ganglia/bin/monitors/sshd_ganglia.sh\" do\n source \"bin/monitors/sshd_ganglia.sh.erb\"\n mode \"0755\"\nend\n\nc"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/ganglia/recipes/monitor_watson.rb",
"chars": 283,
"preview": "template \"/etc/ganglia/bin/monitors/watson_channels.sh\" do\n source \"bin/monitors/watson_channels.sh.erb\"\n mode \"0755\"\n"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/ganglia/recipes/web.rb",
"chars": 527,
"preview": "# Cookbook Name:: ganglia\n# Recipe:: web\n\n# hmm, maybe unify with below\nexecute \"create ganglia web interface\" do\n comm"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/ganglia/templates/default/bin/gmetad.erb",
"chars": 845,
"preview": "#!/bin/sh\n\nPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin\nDAEMON=/usr/sbin/gmetad\nNAME=gmetad\nDESC=\"G"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/ganglia/templates/default/bin/gmond.erb",
"chars": 838,
"preview": "#!/bin/sh\n\nPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin\nDAEMON=/usr/sbin/gmond\nNAME=gmond\nDESC=\"Gan"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/ganglia/templates/default/bin/monitors/sshd_ganglia.sh.erb",
"chars": 437,
"preview": "#!/bin/bash\n# Nate Murray <nmurray@attinterative.com>\n# Date 2009-07-13\n# \n# Record number of invalid users or failed pa"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/ganglia/templates/default/bin/monitors/watson_channels.sh.erb",
"chars": 350,
"preview": "#!/bin/bash\n# 2009-10-01\n\n# Also check if this is the right location of gmetric\nGMETRIC=/usr/bin/gmetric\nAUTH_LOG=/var/l"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/ganglia/templates/default/ganglia-web-conf.php.erb",
"chars": 3948,
"preview": "<?php\n# $Id: conf.php.in 1831 2008-09-26 12:18:54Z carenas $\n#\n# Gmetad-webfrontend version. Used to check for updates.\n"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/ganglia/templates/default/gmetad.conf.erb",
"chars": 4891,
"preview": "# This is an example of a Ganglia Meta Daemon configuration file\n# http://ganglia.sourceforge.net/\n#\n# $I"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/ganglia/templates/default/gmond.conf.erb",
"chars": 10546,
"preview": "/* This configuration is as close to 2.5.x default behavior as possible\n The values closely match ./gmond/metric.h def"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/ganglia/templates/default/jaunty.sources.list.erb",
"chars": 354,
"preview": "deb http://archive.ubuntu.com/ubuntu/ jaunty main restricted\ndeb http://archive.ubuntu.com/ubuntu/ jaunty universe\ndeb h"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/ntp/attributes/ntp.rb",
"chars": 338,
"preview": "ntp Mash.new unless attribute?(\"ntp\")\n\ncase platform \nwhen \"ubuntu\",\"debian\"\n ntp[:service] = \"ntp\"\nwhen \"redhat\",\"cent"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/ntp/metadata.json",
"chars": 1646,
"preview": "{\n \"description\": \"Installs and configures ntp as a client or server\",\n \"replacing\": {\n\n },\n \"recipes\": {\n \"ntp\":"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/ntp/metadata.rb",
"chars": 844,
"preview": "maintainer \"Opscode, Inc.\"\nmaintainer_email \"cookbooks@opscode.com\"\nlicense \"Apache 2.0\"\ndescription "
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/ntp/recipes/default.rb",
"chars": 1029,
"preview": "#\n# Cookbook Name:: ntp\n# Recipe:: default\n# Author:: Joshua Timberman (<joshua@opscode.com>)\n#\n# Copyright 2009, Opscod"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/ntp/templates/default/ntp.conf.erb",
"chars": 578,
"preview": "driftfile /var/lib/ntp/ntp.drift\nstatsdir /var/log/ntpstats/\n\nstatistics loopstats peerstats clockstats\nfilegen loopstat"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/rsyslog/README.rdoc",
"chars": 1706,
"preview": "= DESCRIPTION:\n\nInstalls rsyslog to replace sysklogd for client and/or server use. By default, server will be set up to "
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/rsyslog/attributes/rsyslog.rb",
"chars": 888,
"preview": "#\n# Cookbook Name:: rsyslog\n# Attributes:: rsyslog\n#\n# Copyright 2009, Opscode, Inc.\n#\n# Licensed under the Apache Licen"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/rsyslog/files/default/rsyslog.default",
"chars": 263,
"preview": "# Generated by Chef\n#\n# Use v3 native mode, rather than compatibility mode by specifying -c3\n# here. Compatibility mode "
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/rsyslog/files/ubuntu-8.04/rsyslog.default",
"chars": 461,
"preview": "# Options to rsyslogd\n# -m 0 disables 'MARK' messages.\n# -r enables logging from remote machines\n# -x disables DNS looku"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/rsyslog/files/ubuntu-9.10/rsyslog.default",
"chars": 342,
"preview": "# Generated by Chef\n#\n# Options for rsyslogd\n# -m 0 disables 'MARK' messages (deprecated, only used in compat mode < 3)\n"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/rsyslog/metadata.json",
"chars": 3512,
"preview": "{\n \"description\": \"Installs and configures rsyslog\",\n \"replacing\": {\n\n },\n \"recipes\": {\n \"rsyslog::server\": \"Sets"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/rsyslog/metadata.rb",
"chars": 997,
"preview": "maintainer \"Opscode, Inc.\"\nmaintainer_email \"cookbooks@opscode.com\"\nlicense \"Apache 2.0\"\ndescription "
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/rsyslog/recipes/client.rb",
"chars": 1310,
"preview": "#\n# Cookbook Name:: rsyslog\n# Recipe:: client\n#\n# Copyright 2009, Opscode, Inc.\n#\n# Licensed under the Apache License, V"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/rsyslog/recipes/default.rb",
"chars": 1381,
"preview": "#\n# Cookbook Name:: rsyslog\n# Recipe:: default\n#\n# Copyright 2009, Opscode, Inc.\n#\n# Licensed under the Apache License, "
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/rsyslog/recipes/server.rb",
"chars": 1342,
"preview": "#\n# Cookbook Name:: rsyslog\n# Recipe:: server\n#\n# Copyright 2009, Opscode, Inc.\n#\n# Licensed under the Apache License, V"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/rsyslog/templates/default/remote.conf.erb",
"chars": 110,
"preview": "<% case @protocol -%>\n<% when \"tcp\" -%>\n*.* @@<%= @server %>\n<% when \"udp\" -%>\n*.* @<%= @server %>\n<% end -%>\n"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/rsyslog/templates/default/rsyslog.conf.erb",
"chars": 2651,
"preview": "# /etc/rsyslog.conf\tConfiguration file for rsyslog v3.\n#\n#\t\t\tFor more information see \n#\t\t\t/usr/share/doc/rsyslog-doc/h"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/rsyslog/templates/default/server.conf.erb",
"chars": 2382,
"preview": "# Generated by Chef. \n# Local modifications will be overwritten.\n<% case @protocol -%>\n<% when \"tcp\" -%>\n$ModLoad imtcp\n"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/rsyslog/templates/ubuntu-9.10/50-default.conf.erb",
"chars": 1606,
"preview": "# Default rules for rsyslog.\n#\n#\t\t\tFor more information see rsyslog.conf(5) and /etc/rsyslog.conf\n\n#\n# First some stand"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/rsyslog/templates/ubuntu-9.10/remote.conf.erb",
"chars": 110,
"preview": "<% case @protocol -%>\n<% when \"tcp\" -%>\n*.* @@<%= @server %>\n<% when \"udp\" -%>\n*.* @<%= @server %>\n<% end -%>\n"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/rsyslog/templates/ubuntu-9.10/server.conf.erb",
"chars": 2382,
"preview": "# Generated by Chef. \n# Local modifications will be overwritten.\n<% case @protocol -%>\n<% when \"tcp\" -%>\n$ModLoad imtcp\n"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/runit/attributes/sv_bin.rb",
"chars": 796,
"preview": "#\n# Cookbook Name:: runit\n# Attribute File:: sv_bin\n#\n# Copyright 2008, OpsCode, Inc.\n#\n# Licensed under the Apache Lice"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/runit/definitions/runit_service.rb",
"chars": 1887,
"preview": "#\n# Cookbook Name:: runit\n# Definition:: runit_service\n#\n# Copyright 2008, OpsCode, Inc.\n#\n# Licensed under the Apache L"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/runit/files/ubuntu-6.10/runsvdir",
"chars": 130,
"preview": "start on runlevel-2\nstart on runlevel-3\nstart on runlevel-4\nstart on runlevel-5\nstop on shutdown\nrespawn /usr/sbin/runsv"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/runit/files/ubuntu-7.04/runsvdir",
"chars": 135,
"preview": "start on runlevel 2\nstart on runlevel 3\nstart on runlevel 4\nstart on runlevel 5\nstop on shutdown\nrespawn\nexec /usr/sbin/"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/runit/files/ubuntu-7.10/runsvdir",
"chars": 135,
"preview": "start on runlevel 2\nstart on runlevel 3\nstart on runlevel 4\nstart on runlevel 5\nstop on shutdown\nrespawn\nexec /usr/sbin/"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/runit/files/ubuntu-8.04/runsvdir",
"chars": 135,
"preview": "start on runlevel 2\nstart on runlevel 3\nstart on runlevel 4\nstart on runlevel 5\nstop on shutdown\nrespawn\nexec /usr/sbin/"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/runit/metadata.json",
"chars": 1587,
"preview": "{\n \"maintainer\": \"Opscode, Inc.\",\n \"description\": \"Installs runit and provides runit_service definition\",\n \"recommend"
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/runit/metadata.rb",
"chars": 826,
"preview": "maintainer \"Opscode, Inc.\"\nmaintainer_email \"cookbooks@opscode.com\"\nlicense \"Apache 2.0\"\ndescription "
},
{
"path": "examples/chef_cloud/chef_repo/cookbooks/runit/recipes/default.rb",
"chars": 1393,
"preview": "#\n# Cookbook Name:: runit\n# Recipe:: default\n#\n# Copyright 2008, Opscode, Inc.\n#\n# Licensed under the Apache License, Ve"
},
{
"path": "examples/chef_cloud/chef_repo/roles/README",
"chars": 107,
"preview": "Create roles here, in either .rb or .json files. Any roles created here win vs those created in the webui.\n"
},
{
"path": "examples/chef_cloud/chef_repo/roles/chef-upgrade.rb",
"chars": 598,
"preview": "name \"chef-upgrade\"\ndescription \"Use this role to upgrade Chef clients and server with the Opscode Chef cookbook. Requir"
},
{
"path": "examples/chef_cloud/chef_repo/site-cookbooks/README",
"chars": 96,
"preview": "This directory contains cookbooks that modify upstream ones, or that are specific to your site.\n"
},
{
"path": "examples/chef_cloud/chef_repo/site-cookbooks/hosts/attributes/hosts.rb",
"chars": 40,
"preview": "hosts Mash.new unless attribute?(:hosts)"
},
{
"path": "examples/chef_cloud/chef_repo/site-cookbooks/hosts/metadata.rb",
"chars": 135,
"preview": "maintainer \"37signals\"\nmaintainer_email \"sysadmins@37signals.com\"\ndescription \"Configures hosts\"\nversion "
},
{
"path": "examples/chef_cloud/chef_repo/site-cookbooks/hosts/recipes/default.rb",
"chars": 49,
"preview": "template \"/etc/hosts\" do\n source \"hosts.erb\"\nend"
},
{
"path": "examples/chef_cloud/chef_repo/site-cookbooks/hosts/templates/default/hosts.erb",
"chars": 482,
"preview": "127.0.0.1 localhost <%= @node[:hosts][:localhost_aliases].join(\" \") if @node[:hosts][:localhost_aliases] %>\n127.0.1.1 <%"
}
]
// ... and 141 more files (download for full content)
About this extraction
This page contains the full source code of the auser/poolparty GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 341 files (659.8 KB), approximately 197.4k tokens, and a symbol index with 972 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.