Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
maukoquiroga committed Sep 28, 2012
1 parent 5de1ac9 commit e9cc832
Show file tree
Hide file tree
Showing 112 changed files with 5,783 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .rvmrc
@@ -0,0 +1,34 @@
#!/usr/bin/env bash

# This is an RVM Project .rvmrc file, used to automatically load the ruby
# development environment upon cd'ing into the directory

# First we specify our desired <ruby>[@<gemset>], the @gemset name is optional,
# Only full ruby name is supported here, for short names use:
# echo "rvm use 1.9.3" > .rvmrc
environment_id="ruby-1.9.3-p194@chef-rails"

# Uncomment the following lines if you want to verify rvm version per project
# rvmrc_rvm_version="1.15.8 ()" # 1.10.1 seams as a safe start
# eval "$(echo ${rvm_version}.${rvmrc_rvm_version} | awk -F. '{print "[[ "$1*65536+$2*256+$3" -ge "$4*65536+$5*256+$6" ]]"}' )" || {
# echo "This .rvmrc file requires at least RVM ${rvmrc_rvm_version}, aborting loading."
# return 1
# }

# First we attempt to load the desired environment directly from the environment
# file. This is very fast and efficient compared to running through the entire
# CLI and selector. If you want feedback on which environment was used then
# insert the word 'use' after --create as this triggers verbose mode.
if [[ -d "${rvm_path:-$HOME/.rvm}/environments"
&& -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]]
then
\. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
[[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]] &&
\. "${rvm_path:-$HOME/.rvm}/hooks/after_use" || true
else
# If the environment file has not yet been created, use the RVM CLI to select.
rvm --create "$environment_id" || {
echo "Failed to create RVM environment '${environment_id}'."
return 1
}
fi
11 changes: 11 additions & 0 deletions Cheffile
@@ -0,0 +1,11 @@
#!/usr/bin/env ruby
#^syntax detection

site 'http://community.opscode.com/api/v1'

cookbook 'apt'
cookbook 'build-essential'
cookbook 'runit'
cookbook 'ohai'
cookbook 'git'
cookbook 'openssl'
23 changes: 23 additions & 0 deletions Cheffile.lock
@@ -0,0 +1,23 @@
SITE
remote: http://community.opscode.com/api/v1
specs:
apt (1.4.8)
build-essential (1.1.0)
dmg (1.0.0)
git (1.0.0)
dmg (>= 0.0.0)
runit (>= 0.0.0)
yum (>= 0.0.0)
ohai (1.1.2)
openssl (1.0.0)
runit (0.15.0)
yum (0.8.0)

DEPENDENCIES
apt (>= 0)
build-essential (>= 0)
git (>= 0)
ohai (>= 0)
openssl (>= 0)
runit (>= 0)

4 changes: 4 additions & 0 deletions Gemfile
@@ -0,0 +1,4 @@
source :rubygems

gem 'knife-solo'
gem 'librarian'
74 changes: 74 additions & 0 deletions Gemfile.lock
@@ -0,0 +1,74 @@
GEM
remote: http://rubygems.org/
specs:
archive-tar-minitar (0.5.2)
bunny (0.7.9)
chef (10.14.2)
bunny (>= 0.6.0, < 0.8.0)
erubis
highline (>= 1.6.9)
json (>= 1.4.4, <= 1.6.1)
mixlib-authentication (>= 1.3.0)
mixlib-cli (>= 1.1.0)
mixlib-config (>= 1.1.2)
mixlib-log (>= 1.3.0)
mixlib-shellout
moneta
net-ssh (~> 2.2.2)
net-ssh-multi (~> 1.1.0)
ohai (>= 0.6.0)
rest-client (>= 1.0.4, < 1.7.0)
treetop (~> 1.4.9)
uuidtools
yajl-ruby (~> 1.1)
erubis (2.7.0)
highline (1.6.15)
ipaddress (0.8.0)
json (1.6.1)
knife-solo (0.0.14)
chef (>= 0.10.10)
librarian (~> 0.0.20)
net-ssh (>= 2.1.3, < 2.3.0)
librarian (0.0.24)
archive-tar-minitar (>= 0.5.2)
chef (>= 0.10)
highline
thor (~> 0.15)
mime-types (1.19)
mixlib-authentication (1.3.0)
mixlib-log
mixlib-cli (1.2.2)
mixlib-config (1.1.2)
mixlib-log (1.4.1)
mixlib-shellout (1.1.0)
moneta (0.6.0)
net-ssh (2.2.2)
net-ssh-gateway (1.1.0)
net-ssh (>= 1.99.1)
net-ssh-multi (1.1)
net-ssh (>= 2.1.4)
net-ssh-gateway (>= 0.99.0)
ohai (6.14.0)
ipaddress
mixlib-cli
mixlib-config
mixlib-log
systemu
yajl-ruby
polyglot (0.3.3)
rest-client (1.6.7)
mime-types (>= 1.16)
systemu (2.5.2)
thor (0.16.0)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
uuidtools (2.1.3)
yajl-ruby (1.1.0)

PLATFORMS
ruby

DEPENDENCIES
knife-solo
librarian
4 changes: 4 additions & 0 deletions Vagrantfile
@@ -0,0 +1,4 @@
Vagrant::Config.run do |config|
config.vm.box = "chef-rails"
config.vm.forward_port 80, 8000
end
Empty file added data_bags/.gitkeep
Empty file.
Empty file added nodes/.gitkeep
Empty file.
109 changes: 109 additions & 0 deletions nodes/localhost.json.example
@@ -0,0 +1,109 @@
{
"run_list": [
"recipe[sudo]",
"recipe[apt]",
"recipe[build-essential]",
"recipe[ohai]",
"recipe[runit]",
"recipe[git]",
"recipe[postgresql::server]",
"recipe[nginx::default]",
"recipe[nginx::apps]",
"recipe[ruby]"
],

"authorization": {
"sudo": {
"groups": ["admin", "wheel", "sysadmin"],
"users": ["vagrant"],
"passwordless": true
}
},

"postgresql": {
"users": [
{
"username" : "vagrant",
"password" : "asdf1234",
"superuser" : true,
"createdb" : true,
"login" : true
}
],

"databases": [
{
"name" : "example",
"owner" : "vagrant",
"template" : "template0",
"encoding" : "utf8",
"locale" : "en_US.UTF8"
}
],

"pg_hba": [
"local all all trust",
"host all all 127.0.0.1/32 md5",
"host all all ::1/128 md5"
]
},

"nginx": {
"distribution": "oneiric",
"components": ["main"],
"default_site": false,
"apps": {
"app1": {
"listen" : [80],
"server_name": "app1.example.com",
"public_path": "/home/vagrant/public_html/app1/public",
"locations": [
{
"path": "/",
"directives": [
"proxy_set_header X-Forwarded-Proto $scheme;",
"proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;",
"proxy_set_header X-Real-IP $remote_addr;",
"proxy_set_header Host $host;",
"proxy_redirect off;",
"proxy_http_version 1.1;",
"proxy_set_header Connection '';",
"proxy_pass http://localhost:8000;"
]
}
]
},
"app2": {
"listen" : [80],
"server_name": "app2.example.com",
"public_path": "/home/vagrant/public_html/app2/public",
"locations": [
{
"path": "/",
"directives": [
"proxy_set_header X-Forwarded-Proto $scheme;",
"proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;",
"proxy_set_header X-Real-IP $remote_addr;",
"proxy_set_header Host $host;",
"proxy_redirect off;",
"proxy_http_version 1.1;",
"proxy_set_header Connection '';",
"proxy_pass http://localhost:10000;"
]
}
]
}
}
},

"languages": {
"ruby": {
"default_version": "1.9.1"
}
}
}





Empty file added roles/.gitkeep
Empty file.
Empty file added site-cookbooks/.gitkeep
Empty file.
44 changes: 44 additions & 0 deletions site-cookbooks/nginx/CHANGELOG.md
@@ -0,0 +1,44 @@
## v0.101.6:

Erroneous cookbook upload due to timeout.

Version #'s are cheap.

## v0.101.4:

* [COOK-1280] - Improve RHEL family support and fix ohai_plugins
recipe bug
* [COOK-1194] - allow installation method via attribute
* [COOK-458] - fix duplicate nginx processes

## v0.101.2:

* [COOK-1211] - include the default attributes explicitly so version
is available.

## v0.101.0:

**Attribute Change**: `node['nginx']['url']` -> `node['nginx']['source']['url']`; see the README.md.

* [COOK-1115] - daemonize when using init script
* [COOK-477] - module compilation support in nginx::source

## v0.100.4:

* [COOK-1126] - source version bump to 1.0.14

## v0.100.2:

* [COOK-1053] - Add :url attribute to nginx cookbook

## v0.100.0:

* [COOK-818] - add "application/json" per RFC.
* [COOK-870] - bluepill init style support
* [COOK-957] - Compress application/javascript.
* [COOK-981] - Add reload support to NGINX service

## v0.99.2:

* [COOK-809] - attribute to disable access logging
* [COOK-772] - update nginx download source location
29 changes: 29 additions & 0 deletions site-cookbooks/nginx/CONTRIBUTING
@@ -0,0 +1,29 @@
If you would like to contribute, please open a ticket in JIRA:

* http://tickets.opscode.com

Create the ticket in the COOK project and use the cookbook name as the
component.

For all code contributions, we ask that contributors sign a
contributor license agreement (CLA). Instructions may be found here:

* http://wiki.opscode.com/display/chef/How+to+Contribute

When contributing changes to individual cookbooks, please do not
modify the version number in the metadata.rb. Also please do not
update the CHANGELOG.md for a new version. Not all changes to a
cookbook may be merged and released in the same versions. Opscode will
handle the version updates during the release process. You are welcome
to correct typos or otherwise make updates to documentation in the
README.

If a contribution adds new platforms or platform versions, indicate
such in the body of the commit message(s), and update the relevant
COOK ticket. When writing commit messages, it is helpful for others if
you indicate the COOK ticket. For example:

git commit -m '[COOK-1041] Updated pool resource to correctly delete.'

In the ticket itself, it is also helpful if you include log output of
a successful Chef run, but this is not absolutely required.

0 comments on commit e9cc832

Please sign in to comment.