vagrant-managed-servers 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/Berksfile +4 -0
- data/CHANGELOG.md +4 -0
- data/Gemfile +14 -0
- data/LICENSE +8 -0
- data/README.md +142 -0
- data/Rakefile +21 -0
- data/Vagrantfile +44 -0
- data/cookbooks/apache2/CHANGELOG.md +95 -0
- data/cookbooks/apache2/CONTRIBUTING.md +257 -0
- data/cookbooks/apache2/Gemfile +10 -0
- data/cookbooks/apache2/LICENSE +201 -0
- data/cookbooks/apache2/README.md +567 -0
- data/cookbooks/apache2/attributes/default.rb +149 -0
- data/cookbooks/apache2/attributes/mod_auth_cas.rb +2 -0
- data/cookbooks/apache2/attributes/mod_auth_openid.rb +32 -0
- data/cookbooks/apache2/definitions/apache_conf.rb +26 -0
- data/cookbooks/apache2/definitions/apache_module.rb +53 -0
- data/cookbooks/apache2/definitions/apache_site.rb +43 -0
- data/cookbooks/apache2/definitions/web_app.rb +49 -0
- data/cookbooks/apache2/files/default/apache2_module_conf_generate.pl +41 -0
- data/cookbooks/apache2/files/default/tests/minitest/default_test.rb +77 -0
- data/cookbooks/apache2/files/default/tests/minitest/god_monitor_test.rb +34 -0
- data/cookbooks/apache2/files/default/tests/minitest/mod_apreq2_test.rb +19 -0
- data/cookbooks/apache2/files/default/tests/minitest/mod_auth_cas_test.rb +11 -0
- data/cookbooks/apache2/files/default/tests/minitest/mod_auth_openid_test.rb +37 -0
- data/cookbooks/apache2/files/default/tests/minitest/mod_cgi_test.rb +13 -0
- data/cookbooks/apache2/files/default/tests/minitest/mod_dav_svn_test.rb +14 -0
- data/cookbooks/apache2/files/default/tests/minitest/mod_fastcgi.rb +11 -0
- data/cookbooks/apache2/files/default/tests/minitest/mod_perl_test.rb +18 -0
- data/cookbooks/apache2/files/default/tests/minitest/mod_php5_test.rb +13 -0
- data/cookbooks/apache2/files/default/tests/minitest/mod_python_test.rb +10 -0
- data/cookbooks/apache2/files/default/tests/minitest/mod_ssl_test.rb +23 -0
- data/cookbooks/apache2/files/default/tests/minitest/support/helpers.rb +50 -0
- data/cookbooks/apache2/metadata.json +513 -0
- data/cookbooks/apache2/metadata.rb +207 -0
- data/cookbooks/apache2/recipes/default.rb +208 -0
- data/cookbooks/apache2/recipes/god_monitor.rb +33 -0
- data/cookbooks/apache2/recipes/logrotate.rb +29 -0
- data/cookbooks/apache2/recipes/mod_alias.rb +22 -0
- data/cookbooks/apache2/recipes/mod_apreq2.rb +54 -0
- data/cookbooks/apache2/recipes/mod_auth_basic.rb +20 -0
- data/cookbooks/apache2/recipes/mod_auth_cas.rb +59 -0
- data/cookbooks/apache2/recipes/mod_auth_digest.rb +20 -0
- data/cookbooks/apache2/recipes/mod_auth_openid.rb +111 -0
- data/cookbooks/apache2/recipes/mod_authn_file.rb +20 -0
- data/cookbooks/apache2/recipes/mod_authnz_ldap.rb +20 -0
- data/cookbooks/apache2/recipes/mod_authz_default.rb +20 -0
- data/cookbooks/apache2/recipes/mod_authz_groupfile.rb +20 -0
- data/cookbooks/apache2/recipes/mod_authz_host.rb +20 -0
- data/cookbooks/apache2/recipes/mod_authz_user.rb +20 -0
- data/cookbooks/apache2/recipes/mod_autoindex.rb +22 -0
- data/cookbooks/apache2/recipes/mod_cgi.rb +20 -0
- data/cookbooks/apache2/recipes/mod_dav.rb +20 -0
- data/cookbooks/apache2/recipes/mod_dav_fs.rb +21 -0
- data/cookbooks/apache2/recipes/mod_dav_svn.rb +41 -0
- data/cookbooks/apache2/recipes/mod_deflate.rb +22 -0
- data/cookbooks/apache2/recipes/mod_dir.rb +22 -0
- data/cookbooks/apache2/recipes/mod_env.rb +20 -0
- data/cookbooks/apache2/recipes/mod_expires.rb +20 -0
- data/cookbooks/apache2/recipes/mod_fastcgi.rb +26 -0
- data/cookbooks/apache2/recipes/mod_fcgid.rb +55 -0
- data/cookbooks/apache2/recipes/mod_headers.rb +20 -0
- data/cookbooks/apache2/recipes/mod_include.rb +20 -0
- data/cookbooks/apache2/recipes/mod_ldap.rb +20 -0
- data/cookbooks/apache2/recipes/mod_log_config.rb +24 -0
- data/cookbooks/apache2/recipes/mod_logio.rb +24 -0
- data/cookbooks/apache2/recipes/mod_mime.rb +22 -0
- data/cookbooks/apache2/recipes/mod_negotiation.rb +22 -0
- data/cookbooks/apache2/recipes/mod_perl.rb +44 -0
- data/cookbooks/apache2/recipes/mod_php5.rb +77 -0
- data/cookbooks/apache2/recipes/mod_proxy.rb +22 -0
- data/cookbooks/apache2/recipes/mod_proxy_ajp.rb +21 -0
- data/cookbooks/apache2/recipes/mod_proxy_balancer.rb +20 -0
- data/cookbooks/apache2/recipes/mod_proxy_connect.rb +20 -0
- data/cookbooks/apache2/recipes/mod_proxy_http.rb +20 -0
- data/cookbooks/apache2/recipes/mod_python.rb +38 -0
- data/cookbooks/apache2/recipes/mod_rewrite.rb +20 -0
- data/cookbooks/apache2/recipes/mod_setenvif.rb +22 -0
- data/cookbooks/apache2/recipes/mod_ssl.rb +46 -0
- data/cookbooks/apache2/recipes/mod_status.rb +22 -0
- data/cookbooks/apache2/recipes/mod_wsgi.rb +38 -0
- data/cookbooks/apache2/recipes/mod_xsendfile.rb +38 -0
- data/cookbooks/apache2/templates/default/a2dismod.erb +22 -0
- data/cookbooks/apache2/templates/default/a2dissite.erb +29 -0
- data/cookbooks/apache2/templates/default/a2enmod.erb +37 -0
- data/cookbooks/apache2/templates/default/a2ensite.erb +38 -0
- data/cookbooks/apache2/templates/default/apache2.conf.erb +237 -0
- data/cookbooks/apache2/templates/default/apache2.god.erb +19 -0
- data/cookbooks/apache2/templates/default/charset.erb +6 -0
- data/cookbooks/apache2/templates/default/default-site.erb +57 -0
- data/cookbooks/apache2/templates/default/mods/README +2 -0
- data/cookbooks/apache2/templates/default/mods/alias.conf.erb +24 -0
- data/cookbooks/apache2/templates/default/mods/auth_cas.conf.erb +1 -0
- data/cookbooks/apache2/templates/default/mods/auth_cas.load.erb +1 -0
- data/cookbooks/apache2/templates/default/mods/authopenid.load.erb +1 -0
- data/cookbooks/apache2/templates/default/mods/autoindex.conf.erb +101 -0
- data/cookbooks/apache2/templates/default/mods/deflate.conf.erb +16 -0
- data/cookbooks/apache2/templates/default/mods/dir.conf.erb +5 -0
- data/cookbooks/apache2/templates/default/mods/fastcgi.conf.erb +5 -0
- data/cookbooks/apache2/templates/default/mods/fcgid.conf.erb +10 -0
- data/cookbooks/apache2/templates/default/mods/mime.conf.erb +198 -0
- data/cookbooks/apache2/templates/default/mods/negotiation.conf.erb +18 -0
- data/cookbooks/apache2/templates/default/mods/php5.conf.erb +16 -0
- data/cookbooks/apache2/templates/default/mods/proxy.conf.erb +19 -0
- data/cookbooks/apache2/templates/default/mods/setenvif.conf.erb +28 -0
- data/cookbooks/apache2/templates/default/mods/ssl.conf.erb +76 -0
- data/cookbooks/apache2/templates/default/mods/status.conf.erb +26 -0
- data/cookbooks/apache2/templates/default/port_apache.erb +2 -0
- data/cookbooks/apache2/templates/default/ports.conf.erb +6 -0
- data/cookbooks/apache2/templates/default/security.erb +50 -0
- data/cookbooks/apache2/templates/default/web_app.conf.erb +43 -0
- data/cookbooks/apt/Berksfile +8 -0
- data/cookbooks/apt/CHANGELOG.md +97 -0
- data/cookbooks/apt/CONTRIBUTING +29 -0
- data/cookbooks/apt/LICENSE +201 -0
- data/cookbooks/apt/README.md +243 -0
- data/cookbooks/apt/TESTING.md +25 -0
- data/cookbooks/apt/attributes/default.rb +4 -0
- data/cookbooks/apt/files/default/apt-proxy-v2.conf +50 -0
- data/cookbooks/apt/metadata.json +1 -0
- data/cookbooks/apt/metadata.rb +30 -0
- data/cookbooks/apt/providers/preference.rb +61 -0
- data/cookbooks/apt/providers/repository.rb +132 -0
- data/cookbooks/apt/recipes/cacher-client.rb +59 -0
- data/cookbooks/apt/recipes/cacher-ng.rb +40 -0
- data/cookbooks/apt/recipes/default.rb +68 -0
- data/cookbooks/apt/resources/preference.rb +30 -0
- data/cookbooks/apt/resources/repository.rb +40 -0
- data/cookbooks/apt/templates/debian-6.0/acng.conf.erb +174 -0
- data/cookbooks/apt/templates/default/01proxy.erb +2 -0
- data/cookbooks/apt/templates/default/acng.conf.erb +276 -0
- data/cookbooks/apt/templates/ubuntu-10.04/acng.conf.erb +270 -0
- data/dummy.box +0 -0
- data/lib/vagrant-managed-servers.rb +18 -0
- data/lib/vagrant-managed-servers/action.rb +114 -0
- data/lib/vagrant-managed-servers/action/is_created.rb +18 -0
- data/lib/vagrant-managed-servers/action/is_reachable.rb +18 -0
- data/lib/vagrant-managed-servers/action/link_server.rb +31 -0
- data/lib/vagrant-managed-servers/action/message_not_reachable.rb +16 -0
- data/lib/vagrant-managed-servers/action/read_state.rb +84 -0
- data/lib/vagrant-managed-servers/action/sync_folders.rb +85 -0
- data/lib/vagrant-managed-servers/action/unlink_server.rb +30 -0
- data/lib/vagrant-managed-servers/action/warn_networks.rb +19 -0
- data/lib/vagrant-managed-servers/config.rb +28 -0
- data/lib/vagrant-managed-servers/errors.rb +19 -0
- data/lib/vagrant-managed-servers/plugin.rb +72 -0
- data/lib/vagrant-managed-servers/provider.rb +51 -0
- data/lib/vagrant-managed-servers/util/timer.rb +17 -0
- data/lib/vagrant-managed-servers/version.rb +5 -0
- data/locales/en.yml +45 -0
- data/spec/vagrant-managed-servers/config_spec.rb +28 -0
- data/vagrant-managed-servers.gemspec +56 -0
- metadata +264 -0
data/.gitignore
ADDED
data/Berksfile
ADDED
data/CHANGELOG.md
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
source "https://rubygems.org"
|
2
|
+
|
3
|
+
gemspec
|
4
|
+
|
5
|
+
group :development do
|
6
|
+
# We depend on Vagrant for development, but we don't add it as a
|
7
|
+
# gem dependency because we expect to be installed within the
|
8
|
+
# Vagrant environment itself using `vagrant plugin`.
|
9
|
+
gem "vagrant", "1.2.2",
|
10
|
+
:git => "https://github.com/mitchellh/vagrant.git",
|
11
|
+
:ref => "v1.2.2"
|
12
|
+
gem "berkshelf", "2.0.1"
|
13
|
+
gem "vagrant-omnibus", "1.0.2"
|
14
|
+
end
|
data/LICENSE
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
Copyright (c) 2013 Mitchell Hashimoto
|
3
|
+
|
4
|
+
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:
|
5
|
+
|
6
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
7
|
+
|
8
|
+
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.
|
data/README.md
ADDED
@@ -0,0 +1,142 @@
|
|
1
|
+
# Vagrant ManagedServers Provider
|
2
|
+
|
3
|
+
This is a [Vagrant](http://www.vagrantup.com) 1.2+ plugin that adds a provider for "managed servers" to Vagrant, i.e. servers for which you have SSH access but no control over their lifecycle.
|
4
|
+
|
5
|
+
Since you don't control the lifecylce:
|
6
|
+
* `up` and `destroy` are re-interpreted as "linking" / "unlinking" vagrant with a managed server
|
7
|
+
* once "linked", the `ssh` and `provision` commands work as expected and `status` shows the managed server as either "running" or "not reachable"
|
8
|
+
* `halt`, `destroy`, `reload` and `suspend` and `resume` are no-ops in this provider
|
9
|
+
|
10
|
+
Credits: this provider was initially based on the [vagrant-aws](https://github.com/mitchellh/vagrant-aws) provider with the AWS-specific functionality stripped out.
|
11
|
+
|
12
|
+
**NOTE:** This plugin requires Vagrant 1.2+
|
13
|
+
|
14
|
+
## Features
|
15
|
+
|
16
|
+
* SSH into managed servers.
|
17
|
+
* Provision managed servers with any built-in Vagrant provisioner.
|
18
|
+
* Minimal synced folder support via `rsync`.
|
19
|
+
|
20
|
+
## Usage
|
21
|
+
|
22
|
+
Install using standard Vagrant 1.1+ plugin installation methods. After installing, `vagrant up` and specify the `managed` provider. An example is shown below.
|
23
|
+
|
24
|
+
```
|
25
|
+
$ vagrant plugin install vagrant-managed-servers
|
26
|
+
...
|
27
|
+
$ vagrant up --provider=managed
|
28
|
+
$ vagrant provision
|
29
|
+
...
|
30
|
+
```
|
31
|
+
|
32
|
+
Of course prior to doing this, you'll need to obtain an managed server-compatible box file for Vagrant. Simply use the managed server dummy box for this purpose (see below).
|
33
|
+
|
34
|
+
## Quick Start
|
35
|
+
|
36
|
+
After installing the plugin (instructions above), the quickest way to get started is to actually use a managed server dummy box and specify the IP address / hostname of the managed server within a `config.vm.provider` block. So first, add the dummy box using any name you want:
|
37
|
+
|
38
|
+
```
|
39
|
+
$ vagrant box add dummy https://github.com/tknerr/vagrant-managed-servers/raw/master/dummy.box
|
40
|
+
...
|
41
|
+
```
|
42
|
+
|
43
|
+
And then make a Vagrantfile that looks like the following, filling in your information where necessary.
|
44
|
+
|
45
|
+
```
|
46
|
+
Vagrant.configure("2") do |config|
|
47
|
+
config.vm.box = "dummy"
|
48
|
+
|
49
|
+
config.vm.provider :managed do |managed, override|
|
50
|
+
managed.server = "ip-or-hostname"
|
51
|
+
override.ssh.username = "ubuntu"
|
52
|
+
override.ssh.private_key_path = "PATH TO YOUR PRIVATE KEY"
|
53
|
+
end
|
54
|
+
end
|
55
|
+
```
|
56
|
+
|
57
|
+
Then run `vagrant up --provider=managed` to "link" vagrant with the managed server.
|
58
|
+
|
59
|
+
Once linked, you can run `vagrant ssh` to ssh into the managed server or `vagrant provision` to provision that server with any of the available vagrant provisioners.
|
60
|
+
|
61
|
+
If you are done, you can "unlink" vagrant from the managed server by running `vagrant destroy`.
|
62
|
+
|
63
|
+
If you try any of the other VM lifecycle commands like `halt`, `resume`, `reload`, etc... you will get a warning that these commands are not supported with the vagrant-managed-servers provider.
|
64
|
+
|
65
|
+
## Box Format
|
66
|
+
|
67
|
+
Every provider in Vagrant must introduce a custom box format.
|
68
|
+
|
69
|
+
This provider introduces `managed` box which is really nothing more than the required `metadata.json` with the provider name set to "managed".
|
70
|
+
|
71
|
+
Typically you will not need to change this and can always use the [dummy.box](https://github.com/tknerr/vagrant-managed-servers/raw/master/dummy.box)
|
72
|
+
|
73
|
+
## Configuration
|
74
|
+
|
75
|
+
This provider currently exposes only a single provider-specific configuration option:
|
76
|
+
|
77
|
+
* `server` - The IP address or hostname of the existing managed server
|
78
|
+
|
79
|
+
It can be set like typical provider-specific configuration:
|
80
|
+
|
81
|
+
```ruby
|
82
|
+
Vagrant.configure("2") do |config|
|
83
|
+
# ... other stuff
|
84
|
+
|
85
|
+
config.vm.provider :managed do |managed|
|
86
|
+
managed.server = "some-server.org"
|
87
|
+
end
|
88
|
+
end
|
89
|
+
```
|
90
|
+
|
91
|
+
## Networks
|
92
|
+
|
93
|
+
Networking features in the form of `config.vm.network` are not
|
94
|
+
supported with `vagrant-managed-servers`. If any of these are
|
95
|
+
specified, Vagrant will emit a warning and just ignore it.
|
96
|
+
|
97
|
+
## Synced Folders
|
98
|
+
|
99
|
+
There is minimal support for synced folders. Upon `vagrant provision`,
|
100
|
+
the managed servers provider will use
|
101
|
+
`rsync` (if available) to uni-directionally sync the folder to
|
102
|
+
the remote machine over SSH.
|
103
|
+
|
104
|
+
This is good enough for all built-in Vagrant provisioners (shell,
|
105
|
+
chef, and puppet) to work!
|
106
|
+
|
107
|
+
## Development
|
108
|
+
|
109
|
+
To work on the `vagrant-managed-servers` plugin, clone this repository out, and use
|
110
|
+
[Bundler](http://gembundler.com) to get the dependencies:
|
111
|
+
|
112
|
+
```
|
113
|
+
$ bundle
|
114
|
+
```
|
115
|
+
|
116
|
+
Once you have the dependencies, verify the unit tests pass with `rake`:
|
117
|
+
|
118
|
+
```
|
119
|
+
$ bundle exec rake
|
120
|
+
```
|
121
|
+
|
122
|
+
If those pass, you're ready to start developing the plugin. You can test
|
123
|
+
the plugin without installing it into your Vagrant environment by using the
|
124
|
+
`Vagrantfile` in the top level of this directory and use bundler to execute Vagrant.
|
125
|
+
|
126
|
+
First, fake a managed server by bringing up the `fake_managed_server` vagrant VM with the default virtualbox provider:
|
127
|
+
|
128
|
+
```
|
129
|
+
$ bundle exec vagrant up fake_managed_server
|
130
|
+
```
|
131
|
+
|
132
|
+
Now you can use the managed provider (defined in a separate VM named `my_server`) to ssh into or provision the (fake) managed server:
|
133
|
+
|
134
|
+
```
|
135
|
+
$ # link vagrant with the server
|
136
|
+
$ bundle exec vagrant up my_server --provider=managed
|
137
|
+
$ # ssh / provision
|
138
|
+
$ bundle exec vagrant ssh my_server
|
139
|
+
$ bundle exec vagrant provision my_server
|
140
|
+
$ # unlink
|
141
|
+
$ bundle exec vagrant destroy my_server
|
142
|
+
```
|
data/Rakefile
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler/setup'
|
3
|
+
require 'rspec/core/rake_task'
|
4
|
+
|
5
|
+
# Immediately sync all stdout so that tools like buildbot can
|
6
|
+
# immediately load in the output.
|
7
|
+
$stdout.sync = true
|
8
|
+
$stderr.sync = true
|
9
|
+
|
10
|
+
# Change to the directory of this file.
|
11
|
+
Dir.chdir(File.expand_path("../", __FILE__))
|
12
|
+
|
13
|
+
# This installs the tasks that help with gem creation and
|
14
|
+
# publishing.
|
15
|
+
Bundler::GemHelper.install_tasks
|
16
|
+
|
17
|
+
# Install the `spec` task so that we can run tests.
|
18
|
+
RSpec::Core::RakeTask.new
|
19
|
+
|
20
|
+
# Default task is to run the unit tests
|
21
|
+
task :default => "spec"
|
data/Vagrantfile
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
# -*- mode: ruby -*-
|
2
|
+
# vi: set ft=ruby :
|
3
|
+
|
4
|
+
# require plugin for testing via bundler
|
5
|
+
Vagrant.require_plugin "vagrant-managed-servers"
|
6
|
+
Vagrant.require_plugin "vagrant-omnibus"
|
7
|
+
|
8
|
+
Vagrant.configure("2") do |config|
|
9
|
+
|
10
|
+
config.omnibus.chef_version = "11.4.4"
|
11
|
+
|
12
|
+
|
13
|
+
#
|
14
|
+
# fake a managed server by bringing up a virtualbox vm
|
15
|
+
#
|
16
|
+
config.vm.define :fake_managed_server do |fms_config|
|
17
|
+
fms_config.vm.box = "opscode_ubuntu-13.04_provisionerless"
|
18
|
+
fms_config.vm.box_url = "https://opscode-vm.s3.amazonaws.com/vagrant/opscode_ubuntu-13.04_provisionerless.box"
|
19
|
+
|
20
|
+
fms_config.vm.network :private_network, ip: "33.33.77.35"
|
21
|
+
end
|
22
|
+
|
23
|
+
#
|
24
|
+
# configure managed provider to connect to `fake_managed_server`
|
25
|
+
#
|
26
|
+
config.vm.define :my_server do |ms_config|
|
27
|
+
|
28
|
+
ms_config.vm.box = "dummy"
|
29
|
+
ms_config.vm.box_url = "https://github.com/tknerr/vagrant-managed-servers/raw/master/dummy.box"
|
30
|
+
|
31
|
+
ms_config.vm.provider :managed do |managed_config, override|
|
32
|
+
managed_config.server = "33.33.77.35"
|
33
|
+
override.ssh.username = "vagrant"
|
34
|
+
override.ssh.private_key_path = "#{ENV['HOME']}/.vagrant.d/insecure_private_key"
|
35
|
+
end
|
36
|
+
|
37
|
+
ms_config.vm.provision :chef_solo do |chef|
|
38
|
+
chef.cookbooks_path = [ './cookbooks' ]
|
39
|
+
chef.add_recipe "apt"
|
40
|
+
chef.add_recipe "apache2"
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
@@ -0,0 +1,95 @@
|
|
1
|
+
## v1.2.0:
|
2
|
+
|
3
|
+
* [COOK-692] - delete package conf.d files in module recipes, for EL
|
4
|
+
* [COOK-1693] - Foodcritic finding for unnecessary string interpolation
|
5
|
+
* [COOK-1757] - platform_family and better style / usage practices
|
6
|
+
|
7
|
+
## v1.1.16:
|
8
|
+
|
9
|
+
re-releasing as .16 due to error on tag 1.1.14
|
10
|
+
|
11
|
+
* [COOK-1466] - add `mod_auth_cas` recipe
|
12
|
+
* [COOK-1609] - apache2 changes ports.conf twice per run when using
|
13
|
+
apache2::mod_ssl
|
14
|
+
|
15
|
+
## v1.1.12:
|
16
|
+
|
17
|
+
* [COOK-1436] - restore apache2 web_app definition
|
18
|
+
* [COOK-1356] - allow ExtendedStatus via attribute
|
19
|
+
* [COOK-1403] - add mod_fastcgi recipe
|
20
|
+
|
21
|
+
## v1.1.10:
|
22
|
+
|
23
|
+
* [COOK-1315] - allow the default site to not be enabled
|
24
|
+
* [COOK-1328] - cookbook tests (minitest, cucumber)
|
25
|
+
|
26
|
+
## v1.1.8:
|
27
|
+
|
28
|
+
* Some platforms with minimal installations that don't have perl won't
|
29
|
+
have a `node['languages']['perl']` attribute, so remove the
|
30
|
+
conditional and rely on the power of idempotence in the package
|
31
|
+
resource.
|
32
|
+
* [COOK-1214] - address foodcritic warnings
|
33
|
+
* [COOK-1180] - add `mod_logio` and fix `mod_proxy`
|
34
|
+
|
35
|
+
## v1.1.6:
|
36
|
+
|
37
|
+
FreeBSD users: This release requires the `freebsd` cookbook. See README.md.
|
38
|
+
|
39
|
+
* [COOK-1025] - freebsd support in mod_php5 recipe
|
40
|
+
|
41
|
+
## v1.1.4:
|
42
|
+
|
43
|
+
* [COOK-1100] - support amazon linux
|
44
|
+
|
45
|
+
## v1.1.2:
|
46
|
+
|
47
|
+
* [COOK-996] - apache2::mod_php5 can cause PHP and module API mismatches
|
48
|
+
* [COOK-1083] - return string for v_f_p and use correct value for
|
49
|
+
default
|
50
|
+
|
51
|
+
## v1.1.0:
|
52
|
+
|
53
|
+
* [COOK-861] - Add `mod_perl` and apreq2
|
54
|
+
* [COOK-941] - fix `mod_auth_openid` on FreeBSD
|
55
|
+
* [COOK-1021] - add a commented-out LoadModule directive to keep apxs happy
|
56
|
+
* [COOK-1022] - consistency for icondir attribute
|
57
|
+
* [COOK-1023] - fix platform test for attributes
|
58
|
+
* [COOK-1024] - fix a2enmod script so it runs cleanly on !bash
|
59
|
+
* [COOK-1026] - fix `error_log` location on FreeBSD
|
60
|
+
|
61
|
+
## v1.0.8:
|
62
|
+
|
63
|
+
* COOK-548 - directory resource doesn't have backup parameter
|
64
|
+
|
65
|
+
## v1.0.6:
|
66
|
+
|
67
|
+
* COOK-915 - update to `mod_auth_openid` version 0.6, see __Recipes/mod_auth_openid__ below.
|
68
|
+
* COOK-548 - Add support for FreeBSD.
|
69
|
+
|
70
|
+
## v1.0.4:
|
71
|
+
|
72
|
+
* COOK-859 - don't hardcode module paths
|
73
|
+
|
74
|
+
## v1.0.2
|
75
|
+
|
76
|
+
* Tickets resolved in this release: COOK-788, COOK-782, COOK-780
|
77
|
+
|
78
|
+
## v1.0.0
|
79
|
+
|
80
|
+
* Red Hat family support is greatly improved, all recipes except `god_monitor` converge.
|
81
|
+
* Recipe `mod_auth_openid` now works on RHEL family distros
|
82
|
+
* Recipe `mod_php5` will now remove config from package on RHEL family so it doesn't conflict with the cookbook's.
|
83
|
+
* Added `php5.conf.erb` template for `mod_php5` recipe.
|
84
|
+
* Create the run state directory for `mod_fcgid` to prevent a startup error on RHEL version 6.
|
85
|
+
* New attribute `node['apache']['lib_dir']` to handle lib vs lib64 on RHEL family distributions.
|
86
|
+
* New attribute `node['apache']['group']`.
|
87
|
+
* Scientific Linux support added.
|
88
|
+
* Use a file resource instead of the generate-module-list executed perl script on RHEL family.
|
89
|
+
* "default" site can now be disabled.
|
90
|
+
* web_app now has an "enable" parameter.
|
91
|
+
* Support for dav_fs apache module.
|
92
|
+
* Tickets resolved in this release: COOK-754, COOK-753, COOK-665, COOK-624, COOK-579, COOK-519, COOK-518
|
93
|
+
* Fix node references in template for a2dissite
|
94
|
+
* Use proper user and group attributes on files and templates.
|
95
|
+
* Replace the anemic README.rdoc with this new and improved superpowered README.md :).
|
@@ -0,0 +1,257 @@
|
|
1
|
+
# Contributing to Opscode Cookbooks
|
2
|
+
|
3
|
+
We are glad you want to contribute to Opscode Cookbooks! The first
|
4
|
+
step is the desire to improve the project.
|
5
|
+
|
6
|
+
You can find the answers to additional frequently asked questions
|
7
|
+
[on the wiki](http://wiki.opscode.com/display/chef/How+to+Contribute).
|
8
|
+
|
9
|
+
You can find additional information about
|
10
|
+
[contributing to cookbooks](http://wiki.opscode.com/display/chef/How+to+Contribute+to+Opscode+Cookbooks)
|
11
|
+
on the wiki as well.
|
12
|
+
|
13
|
+
## Quick-contribute
|
14
|
+
|
15
|
+
* Create an account on our [bug tracker](http://tickets.opscode.com)
|
16
|
+
* Sign our contributor agreement (CLA)
|
17
|
+
[ online](https://secure.echosign.com/public/hostedForm?formid=PJIF5694K6L)
|
18
|
+
(keep reading if you're contributing on behalf of your employer)
|
19
|
+
* Create a ticket for your change on the
|
20
|
+
[bug tracker](http://tickets.opscode.com)
|
21
|
+
* Link to your patch as a rebased git branch or pull request from the
|
22
|
+
ticket
|
23
|
+
* Resolve the ticket as fixed
|
24
|
+
|
25
|
+
We regularly review contributions and will get back to you if we have
|
26
|
+
any suggestions or concerns.
|
27
|
+
|
28
|
+
## The Apache License and the CLA/CCLA
|
29
|
+
|
30
|
+
Licensing is very important to open source projects, it helps ensure
|
31
|
+
the software continues to be available under the terms that the author
|
32
|
+
desired. Chef uses the Apache 2.0 license to strike a balance between
|
33
|
+
open contribution and allowing you to use the software however you
|
34
|
+
would like to.
|
35
|
+
|
36
|
+
The license tells you what rights you have that are provided by the
|
37
|
+
copyright holder. It is important that the contributor fully
|
38
|
+
understands what rights they are licensing and agrees to them.
|
39
|
+
Sometimes the copyright holder isn't the contributor, most often when
|
40
|
+
the contributor is doing work for a company.
|
41
|
+
|
42
|
+
To make a good faith effort to ensure these criteria are met, Opscode
|
43
|
+
requires a Contributor License Agreement (CLA) or a Corporate
|
44
|
+
Contributor License Agreement (CCLA) for all contributions. This is
|
45
|
+
without exception due to some matters not being related to copyright
|
46
|
+
and to avoid having to continually check with our lawyers about small
|
47
|
+
patches.
|
48
|
+
|
49
|
+
It only takes a few minutes to complete a CLA, and you retain the
|
50
|
+
copyright to your contribution.
|
51
|
+
|
52
|
+
You can complete our contributor agreement (CLA)
|
53
|
+
[ online](https://secure.echosign.com/public/hostedForm?formid=PJIF5694K6L).
|
54
|
+
If you're contributing on behalf of your employer, have your employer
|
55
|
+
fill out our
|
56
|
+
[Corporate CLA](https://secure.echosign.com/public/hostedForm?formid=PIE6C7AX856)
|
57
|
+
instead.
|
58
|
+
|
59
|
+
## Ticket Tracker (JIRA)
|
60
|
+
|
61
|
+
The [ticket tracker](http://tickets.opscode.com) is the most important
|
62
|
+
documentation for the code base. It provides significant historical
|
63
|
+
information, such as:
|
64
|
+
|
65
|
+
* Which release a bug fix is included in
|
66
|
+
* Discussion regarding the design and merits of features
|
67
|
+
* Error output to aid in finding similar bugs
|
68
|
+
|
69
|
+
Each ticket should aim to fix one bug or add one feature.
|
70
|
+
|
71
|
+
## Using git
|
72
|
+
|
73
|
+
You can get a quick copy of the repository for this cookbook by
|
74
|
+
running `git clone
|
75
|
+
git://github.com/opscode-coobkooks/COOKBOOKNAME.git`.
|
76
|
+
|
77
|
+
For collaboration purposes, it is best if you create a Github account
|
78
|
+
and fork the repository to your own account. Once you do this you will
|
79
|
+
be able to push your changes to your Github repository for others to
|
80
|
+
see and use.
|
81
|
+
|
82
|
+
If you have another repository in your GitHub account named the same
|
83
|
+
as the cookbook, we suggest you suffix the repository with -cookbook.
|
84
|
+
|
85
|
+
### Branches and Commits
|
86
|
+
|
87
|
+
You should submit your patch as a git branch named after the ticket,
|
88
|
+
such as COOK-1337. This is called a _topic branch_ and allows users to
|
89
|
+
associate a branch of code with the ticket.
|
90
|
+
|
91
|
+
It is a best practice to have your commit message have a _summary
|
92
|
+
line_ that includes the ticket number, followed by an empty line and
|
93
|
+
then a brief description of the commit. This also helps other
|
94
|
+
contributors understand the purpose of changes to the code.
|
95
|
+
|
96
|
+
[COOK-1757] - platform_family and style
|
97
|
+
|
98
|
+
* use platform_family for platform checking
|
99
|
+
* update notifies syntax to "resource_type[resource_name]" instead of
|
100
|
+
resources() lookup
|
101
|
+
* COOK-692 - delete config files dropped off by packages in conf.d
|
102
|
+
* dropped debian 4 support because all other platforms have the same
|
103
|
+
values, and it is older than "old stable" debian release
|
104
|
+
|
105
|
+
Remember that not all users use Chef in the same way or on the same
|
106
|
+
operating systems as you, so it is helpful to be clear about your use
|
107
|
+
case and change so they can understand it even when it doesn't apply
|
108
|
+
to them.
|
109
|
+
|
110
|
+
### Github and Pull Requests
|
111
|
+
|
112
|
+
All of Opscode's open source cookbook projects are available on
|
113
|
+
[Github](http://www.github.com/opscode-cookbooks).
|
114
|
+
|
115
|
+
We don't require you to use Github, and we will even take patch diffs
|
116
|
+
attached to tickets on the tracker. However Github has a lot of
|
117
|
+
convenient features, such as being able to see a diff of changes
|
118
|
+
between a pull request and the main repository quickly without
|
119
|
+
downloading the branch.
|
120
|
+
|
121
|
+
If you do choose to use a pull request, please provide a link to the
|
122
|
+
pull request from the ticket __and__ a link to the ticket from the
|
123
|
+
pull request. Because pull requests only have two states, open and
|
124
|
+
closed, we can't easily filter pull requests that are waiting for a
|
125
|
+
reply from the author for various reasons.
|
126
|
+
|
127
|
+
### More information
|
128
|
+
|
129
|
+
Additional help with git is available on the
|
130
|
+
[Working with Git](http://wiki.opscode.com/display/chef/Working+with+Git)
|
131
|
+
wiki page.
|
132
|
+
|
133
|
+
## Functional and Unit Tests
|
134
|
+
|
135
|
+
This cookbook is set up to run tests under
|
136
|
+
[Opscode's test-kitchen](https://github.com/opscode/test-kitchen). It
|
137
|
+
uses minitest-chef to run integration tests after the node has been
|
138
|
+
converged to verify that the state of the node.
|
139
|
+
|
140
|
+
Test kitchen should run completely without exception using the default
|
141
|
+
[baseboxes provided by Opscode](https://github.com/opscode/bento).
|
142
|
+
Because Test Kitchen creates VirtualBox machines and runs through
|
143
|
+
every configuration in the Kitchenfile, it may take some time for
|
144
|
+
these tests to complete.
|
145
|
+
|
146
|
+
If your changes are only for a specific recipe, run only its
|
147
|
+
configuration with Test Kitchen. If you are adding a new recipe, or
|
148
|
+
other functionality such as a LWRP or definition, please add
|
149
|
+
appropriate tests and ensure they run with Test Kitchen.
|
150
|
+
|
151
|
+
If any don't pass, investigate them before submitting your patch.
|
152
|
+
|
153
|
+
Any new feature should have unit tests included with the patch with
|
154
|
+
good code coverage to help protect it from future changes. Similarly,
|
155
|
+
patches that fix a bug or regression should have a _regression test_.
|
156
|
+
Simply put, this is a test that would fail without your patch but
|
157
|
+
passes with it. The goal is to ensure this bug doesn't regress in the
|
158
|
+
future. Consider a regular expression that doesn't match a certain
|
159
|
+
pattern that it should, so you provide a patch and a test to ensure
|
160
|
+
that the part of the code that uses this regular expression works as
|
161
|
+
expected. Later another contributor may modify this regular expression
|
162
|
+
in a way that breaks your use cases. The test you wrote will fail,
|
163
|
+
signalling to them to research your ticket and use case and accounting
|
164
|
+
for it.
|
165
|
+
|
166
|
+
If you need help writing tests, please ask on the Chef Developer's
|
167
|
+
mailing list, or the #chef-hacking IRC channel.
|
168
|
+
|
169
|
+
## Code Review
|
170
|
+
|
171
|
+
Opscode regularly reviews code contributions and provides suggestions
|
172
|
+
for improvement in the code itself or the implementation.
|
173
|
+
|
174
|
+
We find contributions by searching the ticket tracker for _resolved_
|
175
|
+
tickets with a status of _fixed_. If we have feedback we will reopen
|
176
|
+
the ticket and you should resolve it again when you've made the
|
177
|
+
changes or have a response to our feedback. When we believe the patch
|
178
|
+
is ready to be merged, we will tag the _Code Reviewed_ field with
|
179
|
+
_Reviewed_.
|
180
|
+
|
181
|
+
Depending on the project, these tickets are then merged within a week
|
182
|
+
or two, depending on the current release cycle.
|
183
|
+
|
184
|
+
## Release Cycle
|
185
|
+
|
186
|
+
The versioning for Opscode Cookbook projects is X.Y.Z.
|
187
|
+
|
188
|
+
* X is a major release, which may not be fully compatible with prior
|
189
|
+
major releases
|
190
|
+
* Y is a minor release, which adds both new features and bug fixes
|
191
|
+
* Z is a patch release, which adds just bug fixes
|
192
|
+
|
193
|
+
A released version of a cookbook will end in an even number, e.g.
|
194
|
+
"1.2.4" or "0.8.0". When development for the next version of the
|
195
|
+
cookbook begins, the "Z" patch number is incremented to the next odd
|
196
|
+
number, however the next release of the cookbook may be a major or
|
197
|
+
minor incrementing version.
|
198
|
+
|
199
|
+
Releases of Opscode's cookbooks are usually announced on the Chef user
|
200
|
+
mailing list. Releases of several cookbooks may be batched together
|
201
|
+
and announced on the [Opscode Blog](http://www.opscode.com/blog).
|
202
|
+
|
203
|
+
## Working with the community
|
204
|
+
|
205
|
+
These resources will help you learn more about Chef and connect to
|
206
|
+
other members of the Chef community:
|
207
|
+
|
208
|
+
* [chef](http://lists.opscode.com/sympa/info/chef) and
|
209
|
+
[chef-dev](http://lists.opscode.com/sympa/info/chef-dev) mailing
|
210
|
+
lists
|
211
|
+
* #chef and #chef-hacking IRC channels on irc.freenode.net
|
212
|
+
* [Community Cookbook site](http://community.opscode.com)
|
213
|
+
* [Chef wiki](http://wiki.opscode.com/display/chef)
|
214
|
+
* Opscode Chef [product page](http://www.opscode.com/chef)
|
215
|
+
|
216
|
+
|
217
|
+
## Cookbook Contribution Do's and Don't's
|
218
|
+
|
219
|
+
Please do include tests for your contribution. If you need help, ask
|
220
|
+
on the
|
221
|
+
[chef-dev mailing list](http://lists.opscode.com/sympa/info/chef-dev)
|
222
|
+
or the
|
223
|
+
[#chef-hacking IRC channel](http://community.opscode.com/chat/chef-hacking).
|
224
|
+
Not all platforms that a cookbook supports may be supported by Test
|
225
|
+
Kitchen. Please provide evidence of testing your contribution if it
|
226
|
+
isn't trivial so we don't have to duplicate effort in testing. Chef
|
227
|
+
10.14+ "doc" formatted output is sufficient.
|
228
|
+
|
229
|
+
Please do indicate new platform (families) or platform versions in the
|
230
|
+
commit message, and update the relevant ticket.
|
231
|
+
|
232
|
+
If a contribution adds new platforms or platform versions, indicate
|
233
|
+
such in the body of the commit message(s), and update the relevant
|
234
|
+
COOK ticket. When writing commit messages, it is helpful for others if
|
235
|
+
you indicate the COOK ticket. For example:
|
236
|
+
|
237
|
+
git commit -m '[COOK-1041] - Updated pool resource to correctly
|
238
|
+
delete.'
|
239
|
+
|
240
|
+
Please do use [foodcritic](http://acrmp.github.com/foodcritic) to
|
241
|
+
lint-check the cookbook. Except FC007, it should pass all correctness
|
242
|
+
rules. FC007 is okay as long as the dependent cookbooks are *required*
|
243
|
+
for the default behavior of the cookbook, such as to support an
|
244
|
+
uncommon platform, secondary recipe, etc.
|
245
|
+
|
246
|
+
Please do ensure that your changes do not break or modify behavior for
|
247
|
+
other platforms supported by the cookbook. For example if your changes
|
248
|
+
are for Debian, make sure that they do not break on CentOS.
|
249
|
+
|
250
|
+
Please do not modify the version number in the metadata.rb, Opscode
|
251
|
+
will select the appropriate version based on the release cycle
|
252
|
+
information above.
|
253
|
+
|
254
|
+
Please do not update the CHANGELOG.md for a new version. Not all
|
255
|
+
changes to a cookbook may be merged and released in the same versions.
|
256
|
+
Opscode will update the CHANGELOG.md when releasing a new version of
|
257
|
+
the cookbook.
|