madscience 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/.madscience_gem_location +0 -0
- data/Cheffile +9 -0
- data/Cheffile.lock +34 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +9 -0
- data/README.md +126 -0
- data/Rakefile +1 -0
- data/TODO +17 -0
- data/bin/madscience +90 -0
- data/cookbooks/apt/CHANGELOG.md +183 -0
- data/cookbooks/apt/README.md +255 -0
- data/cookbooks/apt/attributes/default.rb +29 -0
- data/cookbooks/apt/files/default/apt-proxy-v2.conf +50 -0
- data/cookbooks/apt/libraries/helpers.rb +49 -0
- data/cookbooks/apt/libraries/matchers.rb +17 -0
- data/cookbooks/apt/libraries/network.rb +31 -0
- data/cookbooks/apt/metadata.json +54 -0
- data/cookbooks/apt/metadata.rb +34 -0
- data/cookbooks/apt/providers/preference.rb +63 -0
- data/cookbooks/apt/providers/repository.rb +150 -0
- data/cookbooks/apt/recipes/cacher-client.rb +81 -0
- data/cookbooks/apt/recipes/cacher-ng.rb +43 -0
- data/cookbooks/apt/recipes/default.rb +91 -0
- data/cookbooks/apt/resources/preference.rb +32 -0
- data/cookbooks/apt/resources/repository.rb +43 -0
- data/cookbooks/apt/templates/debian-6.0/acng.conf.erb +173 -0
- data/cookbooks/apt/templates/default/01proxy.erb +5 -0
- data/cookbooks/apt/templates/default/acng.conf.erb +275 -0
- data/cookbooks/apt/templates/ubuntu-10.04/acng.conf.erb +269 -0
- data/cookbooks/chef_handler/CHANGELOG.md +44 -0
- data/cookbooks/chef_handler/README.md +103 -0
- data/cookbooks/chef_handler/attributes/default.rb +30 -0
- data/cookbooks/chef_handler/files/default/handlers/README +1 -0
- data/cookbooks/chef_handler/libraries/matchers.rb +29 -0
- data/cookbooks/chef_handler/metadata.json +29 -0
- data/cookbooks/chef_handler/metadata.rb +7 -0
- data/cookbooks/chef_handler/providers/default.rb +97 -0
- data/cookbooks/chef_handler/recipes/default.rb +33 -0
- data/cookbooks/chef_handler/recipes/json_file.rb +28 -0
- data/cookbooks/chef_handler/resources/default.rb +34 -0
- data/cookbooks/dmg/CHANGELOG.md +75 -0
- data/cookbooks/dmg/README.md +143 -0
- data/cookbooks/dmg/attributes/default.rb +20 -0
- data/cookbooks/dmg/metadata.json +30 -0
- data/cookbooks/dmg/metadata.rb +9 -0
- data/cookbooks/dmg/providers/package.rb +91 -0
- data/cookbooks/dmg/recipes/default.rb +18 -0
- data/cookbooks/dmg/resources/package.rb +37 -0
- data/cookbooks/vagrant/Berksfile +2 -0
- data/cookbooks/vagrant/CHANGELOG.md +7 -0
- data/cookbooks/vagrant/README.md +146 -0
- data/cookbooks/vagrant/TESTING.md +25 -0
- data/cookbooks/vagrant/attributes/default.rb +22 -0
- data/cookbooks/vagrant/metadata.rb +14 -0
- data/cookbooks/vagrant/providers/plugin.rb +50 -0
- data/cookbooks/vagrant/recipes/debian.rb +9 -0
- data/cookbooks/vagrant/recipes/default.rb +34 -0
- data/cookbooks/vagrant/recipes/fedora.rb +1 -0
- data/cookbooks/vagrant/recipes/mac_os_x.rb +7 -0
- data/cookbooks/vagrant/recipes/rhel.rb +9 -0
- data/cookbooks/vagrant/recipes/uninstall_gem.rb +7 -0
- data/cookbooks/vagrant/recipes/windows.rb +5 -0
- data/cookbooks/vagrant/resources/plugin.rb +8 -0
- data/cookbooks/virtualbox/README.md +167 -0
- data/cookbooks/virtualbox/attributes/default.rb +32 -0
- data/cookbooks/virtualbox/attributes/user.rb +22 -0
- data/cookbooks/virtualbox/attributes/webportal.rb +22 -0
- data/cookbooks/virtualbox/attributes/webservice.rb +24 -0
- data/cookbooks/virtualbox/files/ubuntu/machines_enabled +1 -0
- data/cookbooks/virtualbox/files/ubuntu/vboxcontrol +104 -0
- data/cookbooks/virtualbox/libraries/helpers.rb +30 -0
- data/cookbooks/virtualbox/metadata.rb +16 -0
- data/cookbooks/virtualbox/recipes/default.rb +70 -0
- data/cookbooks/virtualbox/recipes/systemservice.rb +56 -0
- data/cookbooks/virtualbox/recipes/user.rb +39 -0
- data/cookbooks/virtualbox/recipes/webportal.rb +58 -0
- data/cookbooks/virtualbox/recipes/webservice.rb +44 -0
- data/cookbooks/virtualbox/templates/ubuntu/config.erb +3 -0
- data/cookbooks/virtualbox/templates/ubuntu/config.php.erb +183 -0
- data/cookbooks/virtualbox/templates/ubuntu/vbox.cfg.erb +51 -0
- data/cookbooks/windows/CHANGELOG.md +268 -0
- data/cookbooks/windows/README.md +665 -0
- data/cookbooks/windows/attributes/default.rb +23 -0
- data/cookbooks/windows/files/default/handlers/windows_reboot_handler.rb +76 -0
- data/cookbooks/windows/libraries/feature_base.rb +59 -0
- data/cookbooks/windows/libraries/matchers.rb +450 -0
- data/cookbooks/windows/libraries/powershell_helper.rb +59 -0
- data/cookbooks/windows/libraries/powershell_out.rb +79 -0
- data/cookbooks/windows/libraries/registry_helper.rb +357 -0
- data/cookbooks/windows/libraries/version.rb +206 -0
- data/cookbooks/windows/libraries/windows_architecture_helper.rb +86 -0
- data/cookbooks/windows/libraries/windows_helper.rb +88 -0
- data/cookbooks/windows/libraries/windows_privileged.rb +94 -0
- data/cookbooks/windows/metadata.json +31 -0
- data/cookbooks/windows/metadata.rb +9 -0
- data/cookbooks/windows/providers/auto_run.rb +32 -0
- data/cookbooks/windows/providers/batch.rb +62 -0
- data/cookbooks/windows/providers/feature_dism.rb +64 -0
- data/cookbooks/windows/providers/feature_powershell.rb +38 -0
- data/cookbooks/windows/providers/feature_servermanagercmd.rb +47 -0
- data/cookbooks/windows/providers/package.rb +252 -0
- data/cookbooks/windows/providers/pagefile.rb +153 -0
- data/cookbooks/windows/providers/path.rb +35 -0
- data/cookbooks/windows/providers/printer.rb +100 -0
- data/cookbooks/windows/providers/printer_port.rb +102 -0
- data/cookbooks/windows/providers/reboot.rb +31 -0
- data/cookbooks/windows/providers/registry.rb +72 -0
- data/cookbooks/windows/providers/shortcut.rb +56 -0
- data/cookbooks/windows/providers/task.rb +128 -0
- data/cookbooks/windows/providers/zipfile.rb +91 -0
- data/cookbooks/windows/recipes/default.rb +34 -0
- data/cookbooks/windows/recipes/reboot_handler.rb +32 -0
- data/cookbooks/windows/resources/auto_run.rb +30 -0
- data/cookbooks/windows/resources/batch.rb +36 -0
- data/cookbooks/windows/resources/feature.rb +44 -0
- data/cookbooks/windows/resources/package.rb +46 -0
- data/cookbooks/windows/resources/pagefile.rb +29 -0
- data/cookbooks/windows/resources/path.rb +28 -0
- data/cookbooks/windows/resources/printer.rb +41 -0
- data/cookbooks/windows/resources/printer_port.rb +40 -0
- data/cookbooks/windows/resources/reboot.rb +29 -0
- data/cookbooks/windows/resources/registry.rb +34 -0
- data/cookbooks/windows/resources/shortcut.rb +35 -0
- data/cookbooks/windows/resources/task.rb +50 -0
- data/cookbooks/windows/resources/zipfile.rb +33 -0
- data/cookbooks/yum/CHANGELOG.md +212 -0
- data/cookbooks/yum/README.md +268 -0
- data/cookbooks/yum/attributes/main.rb +97 -0
- data/cookbooks/yum/libraries/matchers.rb +27 -0
- data/cookbooks/yum/metadata.json +34 -0
- data/cookbooks/yum/metadata.rb +13 -0
- data/cookbooks/yum/providers/globalconfig.rb +37 -0
- data/cookbooks/yum/providers/repository.rb +85 -0
- data/cookbooks/yum/recipes/default.rb +34 -0
- data/cookbooks/yum/resources/globalconfig.rb +105 -0
- data/cookbooks/yum/resources/repository.rb +63 -0
- data/cookbooks/yum/templates/default/main.erb +251 -0
- data/cookbooks/yum/templates/default/repo.erb +109 -0
- data/lib/madscience/version.rb +3 -0
- data/lib/madscience.rb +5 -0
- data/madscience.gemspec +44 -0
- data/new_gem_version.rb +6 -0
- data/node-data.json +3 -0
- data/site-cookbooks/madscience-vagrant-cookbook/CHANGELOG.md +13 -0
- data/site-cookbooks/madscience-vagrant-cookbook/README.md +53 -0
- data/site-cookbooks/madscience-vagrant-cookbook/metadata.rb +17 -0
- data/site-cookbooks/madscience-vagrant-cookbook/recipes/default.rb +87 -0
- data/solo.rb +6 -0
- metadata +337 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: d663ca902dac91136dee8d76a24b2b969a927f8c
|
|
4
|
+
data.tar.gz: ad13b9a208e731d49555bab3be816b0cda0dde81
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 117990acc715bf9998d3d641510f4e3ab1123ab8cb186652b719b70caee7e74725399eec563e03fa4d43fed4e0a95c96825bb0903ffb0075b5d52b2564e1ddf8
|
|
7
|
+
data.tar.gz: dda335908e202e492a2c090f0404d6aae45e17b53c8fb7b70e9348ecde20268b0cad0cb23ca8e996d9295d07f0afedfa7182d757278148c56058fd36777fce30
|
data/.gitignore
ADDED
|
File without changes
|
data/Cheffile
ADDED
data/Cheffile.lock
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
SITE
|
|
2
|
+
remote: http://community.opscode.com/api/v1
|
|
3
|
+
specs:
|
|
4
|
+
apt (2.4.0)
|
|
5
|
+
chef_handler (1.1.6)
|
|
6
|
+
dmg (2.2.0)
|
|
7
|
+
windows (1.33.1)
|
|
8
|
+
chef_handler (>= 0.0.0)
|
|
9
|
+
yum (3.2.2)
|
|
10
|
+
|
|
11
|
+
GIT
|
|
12
|
+
remote: https://github.com/jtimberman/vagrant-cookbook
|
|
13
|
+
ref: master
|
|
14
|
+
sha: bd1af8d31f9f20a7856b66f641b37f093ec3c530
|
|
15
|
+
specs:
|
|
16
|
+
vagrant (0.2.0)
|
|
17
|
+
dmg (>= 0.0.0)
|
|
18
|
+
windows (>= 0.0.0)
|
|
19
|
+
|
|
20
|
+
GIT
|
|
21
|
+
remote: https://github.com/jtimberman/virtualbox-cookbook
|
|
22
|
+
ref: master
|
|
23
|
+
sha: f694fbed1827128f9aa915e07c2a2d5598c0c6f6
|
|
24
|
+
specs:
|
|
25
|
+
virtualbox (0.7.2)
|
|
26
|
+
apt (>= 0.0.0)
|
|
27
|
+
dmg (>= 0.0.0)
|
|
28
|
+
windows (>= 0.0.0)
|
|
29
|
+
yum (>= 0.0.0)
|
|
30
|
+
|
|
31
|
+
DEPENDENCIES
|
|
32
|
+
vagrant (>= 0)
|
|
33
|
+
virtualbox (>= 0)
|
|
34
|
+
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Vagrant-Cookbook copyright 2013-2014 Joshua Timberman,
|
|
2
|
+
Virtualbox-Cookbook copyright 2013-2014 Joshua Timberman,
|
|
3
|
+
everything else Copyright (c) 2014, Noah Gibbs
|
|
4
|
+
|
|
5
|
+
License for everything else is proprietary. For now, please do not
|
|
6
|
+
redistribute without the prior written permission of Noah Gibbs.
|
|
7
|
+
|
|
8
|
+
Except Joshua Timberman's Vagrant and VirtualBox cookbooks. You can
|
|
9
|
+
redistribute those according to the Apache 2.0 license.
|
data/README.md
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# MadScience
|
|
2
|
+
|
|
3
|
+
The MadScience stack helps deploy your Rails application to a new local VM and
|
|
4
|
+
a matching production environment. It uses Vagrant, Chef and Capistrano. It
|
|
5
|
+
stores deployment credentials under your home directory in the
|
|
6
|
+
.deploy_credentials subdirectory.
|
|
7
|
+
|
|
8
|
+
The Mad Science Stack is based on a class called Ruby Mad Science
|
|
9
|
+
(http://rubymadscience.com), a paid product.
|
|
10
|
+
|
|
11
|
+
Each version of the Mad Science Stack is tested with a specific version of
|
|
12
|
+
each tool. The current version of the Mad Science Stack, Version 0.0.1,
|
|
13
|
+
installs and uses these other specific tool versions:
|
|
14
|
+
|
|
15
|
+
Chef: 11.12.8
|
|
16
|
+
Librarian-Chef: 0.0.3
|
|
17
|
+
Knife-Solo: 0.4.2
|
|
18
|
+
Vagrant: 1.6.3
|
|
19
|
+
Vagrant-Omnibus: 1.4.2
|
|
20
|
+
VirtualBox: 4.3.12
|
|
21
|
+
Capistrano: 3.2.1
|
|
22
|
+
Capistrano-Rails: 1.1.1
|
|
23
|
+
Capistrano-Bundler: 1.1.2
|
|
24
|
+
Capistrano-RVM: 0.1.1
|
|
25
|
+
SSHKit: 1.5.1
|
|
26
|
+
|
|
27
|
+
Note that this doesn't include the tools that are (usually) deployed to like
|
|
28
|
+
NGinX, Ubuntu Linux and so on -- those depend on the deploy repository.
|
|
29
|
+
|
|
30
|
+
Not all of this software is used by every deploy repository. For instance,
|
|
31
|
+
Capistrano can be optional. But if you use it with a given version of
|
|
32
|
+
MadScience, that's the version being used.
|
|
33
|
+
|
|
34
|
+
The MadScience stack also has these dependencies:
|
|
35
|
+
Bundler and RubyGems (some recent version)
|
|
36
|
+
SSH
|
|
37
|
+
A git repo to deploy, unless you just want the sample app
|
|
38
|
+
|
|
39
|
+
A deploy repo will also use a number of specific gem and cookbook versions, of
|
|
40
|
+
course.
|
|
41
|
+
|
|
42
|
+
## Installation
|
|
43
|
+
|
|
44
|
+
Add 'madscience' to your Gemfile or install it manually:
|
|
45
|
+
|
|
46
|
+
gem install madscience
|
|
47
|
+
|
|
48
|
+
You'll also need Git and SSH installed already.
|
|
49
|
+
|
|
50
|
+
It's possible to clone this repo and run madscience locally, too.
|
|
51
|
+
|
|
52
|
+
## Usage
|
|
53
|
+
|
|
54
|
+
After you've installed the Mad Science gem ("gem install madscience"), you'll
|
|
55
|
+
want to run the setup command:
|
|
56
|
+
|
|
57
|
+
sudo madscience setup
|
|
58
|
+
# OR, with rvm:
|
|
59
|
+
rvmsudo madscience setup # this leaves RVM's env vars set properly
|
|
60
|
+
|
|
61
|
+
This will install, help install or check versions of all software in the
|
|
62
|
+
currently installed Mad Science Stack version. It will get you set up
|
|
63
|
+
correctly or complain if it can't. Make sure to use the right Ruby if you're
|
|
64
|
+
using a version manager (RVM, chruby, rbenv, etc.)
|
|
65
|
+
|
|
66
|
+
It will also set up initial deploy credentials such as SSH keys. You can
|
|
67
|
+
modify the results in ~/.deploy_credentials if you like. The default setup is
|
|
68
|
+
meant to be tolerably secure and fairly convenient. You only need one
|
|
69
|
+
~/.deploy_credentials directory no matter how many Rubies you have.
|
|
70
|
+
|
|
71
|
+
### Cloning
|
|
72
|
+
|
|
73
|
+
The setup command will set up basic deployment credentials if you don't have
|
|
74
|
+
them. It will also set up VirtualBox and Vagrant, and install the appropriate
|
|
75
|
+
tools and gems.
|
|
76
|
+
|
|
77
|
+
However, you'll still need a deploy repo - code that's specific to your setup,
|
|
78
|
+
including what host to install to, what Chef cookbooks to use and where to
|
|
79
|
+
find your application.
|
|
80
|
+
|
|
81
|
+
There's a default one (NOTE: currently it's a private repo! There will be a
|
|
82
|
+
public repo for this later.) Or you can set the MADSCIENCE_REPO environment
|
|
83
|
+
variable to customize what repo to clone from, or just clone the repo
|
|
84
|
+
yourself, locally.
|
|
85
|
+
|
|
86
|
+
# No sudo here, you don't want root (admin) to own these files
|
|
87
|
+
madscience clone
|
|
88
|
+
|
|
89
|
+
This will clone and configure a new repository which you can configure for
|
|
90
|
+
your app(s).
|
|
91
|
+
|
|
92
|
+
### Implementation
|
|
93
|
+
|
|
94
|
+
The setup command will run Chef locally on your development machine. So it'll
|
|
95
|
+
leave behind a Chef temp directory (/var/chef on Linux or Mac OS X machines.)
|
|
96
|
+
That's also why you need to run it as the administrator -- that and the fact
|
|
97
|
+
that you're installing virtualization software, of course.
|
|
98
|
+
|
|
99
|
+
### Running locally
|
|
100
|
+
|
|
101
|
+
If you've cloned the madscience gem from GitHub and don't have it installed,
|
|
102
|
+
you'll want to run it like this:
|
|
103
|
+
|
|
104
|
+
# No RVM? Change "rvmsudo" to "sudo"
|
|
105
|
+
bundle install
|
|
106
|
+
librarian-chef install
|
|
107
|
+
rvmsudo bundle exec bin/madscience setup
|
|
108
|
+
bundle exec bin/madscience clone
|
|
109
|
+
|
|
110
|
+
## License
|
|
111
|
+
|
|
112
|
+
* Author:: Noah Gibbs (the.codefolio.guy@gmail.com)
|
|
113
|
+
* Vagrant-Cookbook copyright 2013-2014 Joshua Timberman, Apache 2.0 License
|
|
114
|
+
* Virtualbox-Cookbook copyright 2013-2014 Joshua Timberman, Apache 2.0 License
|
|
115
|
+
* Everything else (C) Noah Gibbs, 2014
|
|
116
|
+
|
|
117
|
+
With the exception of Joshua Timberman's cookbooks, this code is under the MIT
|
|
118
|
+
license.
|
|
119
|
+
|
|
120
|
+
## Contributing
|
|
121
|
+
|
|
122
|
+
1. Fork it ( http://github.com/noah.gibbs/madscience/fork )
|
|
123
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
124
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
|
125
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
|
126
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require "bundler/gem_tasks"
|
data/TODO
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Mac and Linux:
|
|
2
|
+
Ensure current user has an id_rsa/id_dsa SSH key available
|
|
3
|
+
|
|
4
|
+
Windows:
|
|
5
|
+
runas /user:Administrator "cmd /C chef-client" (or equivalent chef-solo)
|
|
6
|
+
install Vagrant and VirtualBox MSI files, check registry for definitive MSI version string
|
|
7
|
+
|
|
8
|
+
MSI PLEASE NOTE - For proper idempotence the resource's package_name should be
|
|
9
|
+
the same as the 'DisplayName' registry value in the uninstallation data
|
|
10
|
+
that is created during package installation. The easiest way to
|
|
11
|
+
definitively find the proper 'DisplayName' value is to install the package
|
|
12
|
+
on a machine and search for the uninstall information under the following
|
|
13
|
+
registry keys:
|
|
14
|
+
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall
|
|
15
|
+
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall
|
|
16
|
+
HKEY_LOCAL_MACHINE\Software\Wow6464Node\Microsoft\Windows\CurrentVersion\Uninstall
|
|
17
|
+
For maximum flexibility the source attribute supports both remote and local installation packages.
|
data/bin/madscience
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
MADSCIENCE_REPO_URL = ENV['MADSCIENCE_REPO'] ||
|
|
4
|
+
"git@github.com:noahgibbs/rubydeploy-deploy-repo.git"
|
|
5
|
+
|
|
6
|
+
# TODO: Add Windows runas incantation to replace sudo on Windows
|
|
7
|
+
USAGE_INFO = <<USAGE
|
|
8
|
+
Usage:
|
|
9
|
+
sudo #{$0} setup
|
|
10
|
+
#{$0} clone
|
|
11
|
+
|
|
12
|
+
OR
|
|
13
|
+
|
|
14
|
+
rvmsudo #{$0} setup
|
|
15
|
+
${$0} clone
|
|
16
|
+
USAGE
|
|
17
|
+
|
|
18
|
+
# First, make sure we have the right Ruby version
|
|
19
|
+
# TODO: add more checks for RUBY_VERSION, RUBY_PLATFORM, etc. Ensure MRI.
|
|
20
|
+
if RUBY_PLATFORM == "java"
|
|
21
|
+
raise "Please install and run the MadScience gem in the Ruby you'll be deploying with! That means MRI 1.9.2+!"
|
|
22
|
+
end
|
|
23
|
+
unless RUBY_VERSION[0..1] == "2." || RUBY_VERSION[0..2] == "1.9"
|
|
24
|
+
raise "Please install Ruby version 1.9.2+ for MadScience compatibility!"
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Require the MadScience gem, which will then be in $LOAD_PATH
|
|
28
|
+
require "madscience"
|
|
29
|
+
require "madscience/version"
|
|
30
|
+
|
|
31
|
+
cur_dir = Dir.pwd
|
|
32
|
+
|
|
33
|
+
# Change to MadScience dir to get correct Gemfile
|
|
34
|
+
ms_path = $LOAD_PATH.detect { |p| File.exist? File.join(p, "..", ".madscience_gem_location") }
|
|
35
|
+
raise "Can't find MadScience gem in $LOAD_PATH: #{$LOAD_PATH.inspect}!" unless ms_path
|
|
36
|
+
Dir.chdir File.join(ms_path, "..")
|
|
37
|
+
|
|
38
|
+
# Set up Bundler with the MadScience gem's Gemfile
|
|
39
|
+
require "bundler"
|
|
40
|
+
Bundler.setup
|
|
41
|
+
|
|
42
|
+
# TODO: make sure we're running with sufficient permissions - or use sudo?
|
|
43
|
+
# On Mac and Linux, can check for Process.uid == 0
|
|
44
|
+
|
|
45
|
+
if ARGV[0] == "setup"
|
|
46
|
+
if ARGV.size > 1
|
|
47
|
+
puts "#{$0} setup takes no other arguments!"
|
|
48
|
+
exit -1
|
|
49
|
+
end
|
|
50
|
+
# Now we'll use Chef to install the right version of Vagrant
|
|
51
|
+
# with the right plugin(s).
|
|
52
|
+
|
|
53
|
+
system("librarian-chef", "install")
|
|
54
|
+
system("chef-solo", "-c", "solo.rb") or exit -1
|
|
55
|
+
exit 0 # Success!
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
if ARGV[0] == "clone"
|
|
59
|
+
if ARGV.size > 1
|
|
60
|
+
puts "#{$0} clone takes no other arguments!"
|
|
61
|
+
exit -1
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Change back to pre-Bundler-setup directory where we were invoked
|
|
65
|
+
Dir.chdir cur_dir
|
|
66
|
+
|
|
67
|
+
location = "../deploy_repo"
|
|
68
|
+
|
|
69
|
+
# Now we'll git clone the MadScience repo, at a branch corresponding to our MadScience version
|
|
70
|
+
# TODO: check out MadScience::VERSION branch when we start having real releases
|
|
71
|
+
cmd = "git clone #{MADSCIENCE_REPO_URL} #{location}"
|
|
72
|
+
|
|
73
|
+
unless system cmd
|
|
74
|
+
puts "Couldn't successfully clone MadScience repo from #{MADSCIENCE_REPO_URL}, branch #{MadScience::VERSION}!"
|
|
75
|
+
exit -1
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
puts "Successfully cloned repo into #{location} under directory #{cur_dir}. Now go in and customize it."
|
|
79
|
+
exit 0
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if ARGV == []
|
|
83
|
+
puts "No command given."
|
|
84
|
+
puts USAGE_INFO
|
|
85
|
+
exit -1
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
puts "Unrecognized command: #{ARGV.inspect}!"
|
|
89
|
+
puts USAGE_INFO
|
|
90
|
+
exit -1
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
apt Cookbook CHANGELOG
|
|
2
|
+
======================
|
|
3
|
+
This file is used to list changes made in each version of the apt cookbook.
|
|
4
|
+
|
|
5
|
+
v2.4.0 (2014-05-15)
|
|
6
|
+
-------------------
|
|
7
|
+
- [COOK-4534]: Add option to update apt cache at compile time
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
v2.3.10 (2014-04-23)
|
|
11
|
+
--------------------
|
|
12
|
+
- [COOK-4512] Bugfix: Use empty PATH if PATH is nil
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
v2.3.8 (2014-02-14)
|
|
16
|
+
-------------------
|
|
17
|
+
### Bug
|
|
18
|
+
- **[COOK-4287](https://tickets.opscode.com/browse/COOK-4287)** - Cleanup the Kitchen
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
v2.3.6
|
|
22
|
+
------
|
|
23
|
+
* [COOK-4154] - Add chefspec matchers.rb file to apt cookbook
|
|
24
|
+
* [COOK-4102] - Only index created repository
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
v2.3.6
|
|
28
|
+
------
|
|
29
|
+
* [COOK-4154] - Add chefspec matchers.rb file to apt cookbook
|
|
30
|
+
* [COOK-4102] - Only index created repository
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
v2.3.4
|
|
34
|
+
------
|
|
35
|
+
No change. Version bump for toolchain sanity
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
v2.3.2
|
|
39
|
+
------
|
|
40
|
+
- [COOK-3905] apt-get-update-periodic: configuration for the update period
|
|
41
|
+
- Updating style for rubocops
|
|
42
|
+
- Updating test-kitchen harness
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
v2.3.0
|
|
46
|
+
------
|
|
47
|
+
### Bug
|
|
48
|
+
- **[COOK-3812](https://tickets.opscode.com/browse/COOK-3812)** - Add a way to bypass the apt existence check
|
|
49
|
+
|
|
50
|
+
### Improvement
|
|
51
|
+
- **[COOK-3567](https://tickets.opscode.com/browse/COOK-3567)** - Allow users to bypass apt-cache via attributes
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
v2.2.1
|
|
55
|
+
------
|
|
56
|
+
### Improvement
|
|
57
|
+
- **[COOK-664](https://tickets.opscode.com/browse/COOK-664)** - Check platform before running apt-specific commands
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
v2.2.0
|
|
61
|
+
------
|
|
62
|
+
### Bug
|
|
63
|
+
- **[COOK-3707](https://tickets.opscode.com/browse/COOK-3707)** - multiple nics confuse apt::cacher-client
|
|
64
|
+
|
|
65
|
+
v2.1.2
|
|
66
|
+
------
|
|
67
|
+
### Improvement
|
|
68
|
+
- **[COOK-3551](https://tickets.opscode.com/browse/COOK-3551)** - Allow user to set up a trusted APT repository
|
|
69
|
+
|
|
70
|
+
v2.1.1
|
|
71
|
+
------
|
|
72
|
+
### Bug
|
|
73
|
+
- **[COOK-1856](https://tickets.opscode.com/browse/COOK-1856)** - Match GPG keys without case sensitivity
|
|
74
|
+
|
|
75
|
+
v2.1.0
|
|
76
|
+
------
|
|
77
|
+
- [COOK-3426]: cacher-ng fails with restrict_environment set to true
|
|
78
|
+
- [COOK-2859]: cacher-client executes out of order
|
|
79
|
+
- [COOK-3052]: Long GPG keys are downloaded on every run
|
|
80
|
+
- [COOK-1856]: apt cookbook should match keys without case sensitivity
|
|
81
|
+
- [COOK-3255]: Attribute name incorrect in README
|
|
82
|
+
- [COOK-3225]: Call use_inline_resources only if defined
|
|
83
|
+
- [COOK-3386]: Cache dir for apt-cacher-ng
|
|
84
|
+
- [COOK-3291]: apt_repository: enable usage of a keyserver on port 80
|
|
85
|
+
- Greatly expanded test coverage with ChefSpec and Test-Kitchen
|
|
86
|
+
|
|
87
|
+
v2.0.0
|
|
88
|
+
------
|
|
89
|
+
### Bug
|
|
90
|
+
|
|
91
|
+
- [COOK-2258]: apt: LWRP results in error under why-run mode in apt 1.9.0 cookbook
|
|
92
|
+
|
|
93
|
+
v1.10.0
|
|
94
|
+
-------
|
|
95
|
+
### Improvement
|
|
96
|
+
|
|
97
|
+
- [COOK-2885]: Improvements for apt cache server search
|
|
98
|
+
|
|
99
|
+
### Bug
|
|
100
|
+
|
|
101
|
+
- [COOK-2441]: Apt recipe broken in new chef version
|
|
102
|
+
- [COOK-2660]: Create Debian 6.0 "squeeze" specific template for
|
|
103
|
+
apt-cacher-ng
|
|
104
|
+
|
|
105
|
+
v1.9.2
|
|
106
|
+
------
|
|
107
|
+
- [COOK-2631] - Create Ubuntu 10.04 specific template for apt-cacher-ng
|
|
108
|
+
|
|
109
|
+
v1.9.0
|
|
110
|
+
------
|
|
111
|
+
- [COOK-2185] - Proxy for apt-key
|
|
112
|
+
- [COOK-2338] - Support pinning by glob() or regexp
|
|
113
|
+
|
|
114
|
+
v1.8.4
|
|
115
|
+
------
|
|
116
|
+
- [COOK-2171] - Update README to clarify required Chef version: 10.18.0
|
|
117
|
+
or higher.
|
|
118
|
+
|
|
119
|
+
v1.8.2
|
|
120
|
+
------
|
|
121
|
+
- [COOK-2112] - need [] around "arch" in sources.list entries
|
|
122
|
+
- [COOK-2171] - fixes a regression in the notification
|
|
123
|
+
|
|
124
|
+
v1.8.0
|
|
125
|
+
------
|
|
126
|
+
- [COOK-2143] - Allow for a custom cacher-ng port
|
|
127
|
+
- [COOK-2171] - On `apt_repository.run_action(:add)` the source file
|
|
128
|
+
is not created.
|
|
129
|
+
- [COOK-2184] - apt::cacher-ng, use `cacher_port` attribute in
|
|
130
|
+
acng.conf
|
|
131
|
+
|
|
132
|
+
v1.7.0
|
|
133
|
+
------
|
|
134
|
+
- [COOK-2082] - add "arch" parameter to apt_repository LWRP
|
|
135
|
+
|
|
136
|
+
v1.6.0
|
|
137
|
+
------
|
|
138
|
+
- [COOK-1893] - `apt_preference` use "`package_name`" resource instead of "name"
|
|
139
|
+
- [COOK-1894] - change filename for sources.list.d files
|
|
140
|
+
- [COOK-1914] - Wrong dir permissions for /etc/apt/preferences.d/
|
|
141
|
+
- [COOK-1942] - README.md has wrong name for the keyserver attribute
|
|
142
|
+
- [COOK-2019] - create 01proxy before any other apt-get updates get executed
|
|
143
|
+
|
|
144
|
+
v1.5.2
|
|
145
|
+
------
|
|
146
|
+
- [COOK-1682] - use template instead of file resource in apt::cacher-client
|
|
147
|
+
- [COOK-1875] - cacher-client should be Environment-aware
|
|
148
|
+
|
|
149
|
+
V1.5.0
|
|
150
|
+
------
|
|
151
|
+
- [COOK-1500] - Avoid triggering apt-get update
|
|
152
|
+
- [COOK-1548] - Add execute commands for autoclean and autoremove
|
|
153
|
+
- [COOK-1591] - Setting up the apt proxy should leave https
|
|
154
|
+
connections direct
|
|
155
|
+
- [COOK-1596] - execute[apt-get-update-periodic] never runs
|
|
156
|
+
- [COOK-1762] - create /etc/apt/preferences.d directory
|
|
157
|
+
- [COOK-1776] - apt key check isn't idempotent
|
|
158
|
+
|
|
159
|
+
v1.4.8
|
|
160
|
+
------
|
|
161
|
+
* Adds test-kitchen support
|
|
162
|
+
- [COOK-1435] - repository lwrp is not idempotent with http key
|
|
163
|
+
|
|
164
|
+
v1.4.6
|
|
165
|
+
------
|
|
166
|
+
- [COOK-1530] - apt_repository isn't aware of update-success-stamp
|
|
167
|
+
file (also reverts COOK-1382 patch).
|
|
168
|
+
|
|
169
|
+
v1.4.4
|
|
170
|
+
------
|
|
171
|
+
- [COOK-1229] - Allow cacher IP to be set manually in non-Chef Solo
|
|
172
|
+
environments
|
|
173
|
+
- [COOK-1530] - Immediately update apt-cache when sources.list file is dropped off
|
|
174
|
+
|
|
175
|
+
v1.4.2
|
|
176
|
+
------
|
|
177
|
+
- [COOK-1155] - LWRP for apt pinning
|
|
178
|
+
|
|
179
|
+
v1.4.0
|
|
180
|
+
------
|
|
181
|
+
- [COOK-889] - overwrite existing repo source files
|
|
182
|
+
- [COOK-921] - optionally use cookbook\_file or remote\_file for key
|
|
183
|
+
- [COOK-1032] - fixes problem with apt repository key installation
|