madscience 0.0.24 → 0.0.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/bin/madscience +25 -14
- data/lib/madscience/version.rb +1 -1
- data/madscience.gemspec +1 -1
- data/site-cookbooks/madscience-vagrant-cookbook/files/default/linode.json +7 -0
- data/site-cookbooks/madscience-vagrant-cookbook/recipes/default.rb +6 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34a9f1056f45be911a00ad0d7254a377fb3b4892
|
4
|
+
data.tar.gz: 00f049faf8223344c038efbe3c622a30ab035557
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e06c7fd2a2ddf2ed47fb6c18e28d4d102c3384285792c540478abd83ac5f3c42311c80e655dee179c487ab83ee384dccbcf98878e2f75709fcb1cd7e009a6c0
|
7
|
+
data.tar.gz: cf199b1ecfc14a92299f07fb477fca0b8fa12706e3d94b8c8ac76e433299b3802ed748c29330381fa0aa30e7d7f7e6f7402391cfcb0687a165d031f64e441972
|
data/README.md
CHANGED
@@ -15,7 +15,7 @@ doesn't exist, but you'll need to fill in your own passwords for external
|
|
15
15
|
services like email, your own AWS deploy keys and so on if you need them.
|
16
16
|
|
17
17
|
When in doubt, run setup and look in the deploy credentials directory and
|
18
|
-
nodes/
|
18
|
+
nodes/app-server.json.erb in the deploy repository. You can also read
|
19
19
|
documentation in the MadScience project Wiki:
|
20
20
|
https://github.com/noahgibbs/madscience/wiki
|
21
21
|
|
data/bin/madscience
CHANGED
@@ -77,9 +77,9 @@ end
|
|
77
77
|
|
78
78
|
def do_local_setup
|
79
79
|
in_madscience_dir do
|
80
|
-
# Don't librarian-chef install any more. The default
|
80
|
+
# Goal: Don't librarian-chef install any more. The default
|
81
81
|
# cookbooks should be included by default now.
|
82
|
-
|
82
|
+
system("librarian-chef", "install")
|
83
83
|
system("chown -R #{get_sudo_user} cookbooks")
|
84
84
|
system("chef-solo", "-c", "solo.rb") or raise "Failed during chef run!"
|
85
85
|
end
|
@@ -103,24 +103,35 @@ end
|
|
103
103
|
def do_deploy
|
104
104
|
# Deploy from the 'madscience' dir under this directory
|
105
105
|
|
106
|
-
|
106
|
+
Dir.chdir "madscience" do
|
107
|
+
# Bundle in the subdirectory, but unset existing Bundler
|
108
|
+
# env vars, anything w/ "BUNDLE"
|
109
|
+
bkeys = ENV.keys.select { |k| k["BUNDLE"] }
|
110
|
+
pid = Kernel.spawn Hash[bkeys.zip([])], "bundle"
|
111
|
+
Process.wait pid
|
107
112
|
|
108
|
-
|
109
|
-
pid = Kernel.spawn cmd
|
110
|
-
Process.wait pid # Wait for process to finish
|
113
|
+
cmd = "vagrant up --provision --provider=#{MADSCIENCE_PROVIDER}"
|
111
114
|
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
+
pid = Kernel.spawn cmd
|
116
|
+
Process.wait pid # Wait for process to finish
|
117
|
+
|
118
|
+
unless $?.success?
|
119
|
+
raise "Deploy process failed with status #{$?.exitstatus}! Fix and/or re-run using 'vagrant provision'!"
|
120
|
+
end
|
115
121
|
|
116
|
-
|
122
|
+
if Dir[File.join("madscience", ".deployed-*")].empty?
|
123
|
+
raise "Deploy process didn't create a successful deploy! Fix and/or re-run using 'vagrant provision'!"
|
124
|
+
end
|
125
|
+
|
126
|
+
puts <<-MESSAGE
|
117
127
|
You have successfully deployed the default Rails application in your repository (#{MADSCIENCE_REPO_URL}).
|
118
|
-
Congratulations! If this isn't your actual Rails application, go and modify madscience/nodes/
|
128
|
+
Congratulations! If this isn't your actual Rails application, go and modify madscience/nodes/app-server.json.erb.
|
119
129
|
You can find documentation in the RubyMadScience wiki:
|
120
130
|
https://github.com/noahgibbs/madscience/wiki
|
121
131
|
|
122
132
|
Have fun with RubyMadScience!
|
123
|
-
|
133
|
+
MESSAGE
|
134
|
+
end
|
124
135
|
end
|
125
136
|
|
126
137
|
# No subcommand takes arguments (yet?)
|
@@ -140,7 +151,7 @@ end
|
|
140
151
|
if ARGV[0] == "clone"
|
141
152
|
do_clone
|
142
153
|
|
143
|
-
puts "Successfully cloned repo under this directory. Now customize nodes/
|
154
|
+
puts "Successfully cloned repo under this directory. Now customize nodes/app-server.json.erb!"
|
144
155
|
exit 0
|
145
156
|
end
|
146
157
|
|
@@ -153,7 +164,7 @@ if ARGV[0] == "setup_clone_and_deploy" || ARGV[0] == "construct"
|
|
153
164
|
do_clone
|
154
165
|
do_deploy
|
155
166
|
|
156
|
-
puts "Successfully cloned repo #{MADSCIENCE_REPO_URL} under this directory. Now customize nodes/
|
167
|
+
puts "Successfully cloned repo #{MADSCIENCE_REPO_URL} under this directory. Now customize nodes/app-server.json.erb!"
|
157
168
|
exit 0
|
158
169
|
end
|
159
170
|
|
data/lib/madscience/version.rb
CHANGED
data/madscience.gemspec
CHANGED
@@ -29,7 +29,7 @@ DESC
|
|
29
29
|
|
30
30
|
spec.add_runtime_dependency 'knife-solo', '0.4.2'
|
31
31
|
spec.add_runtime_dependency 'librarian-chef', '0.0.4'
|
32
|
-
spec.add_runtime_dependency 'chef', '
|
32
|
+
spec.add_runtime_dependency 'chef', '11.18.6'
|
33
33
|
spec.add_runtime_dependency 'capistrano', '3.2.1'
|
34
34
|
spec.add_runtime_dependency 'capistrano-rails', '1.1.1'
|
35
35
|
spec.add_runtime_dependency 'capistrano-bundler', '1.1.2'
|
@@ -120,6 +120,12 @@ cookbook_file "aws.json" do
|
|
120
120
|
action :create_if_missing
|
121
121
|
end
|
122
122
|
|
123
|
+
cookbook_file "linode.json" do
|
124
|
+
owner user
|
125
|
+
path File.join(creds_dir, "linode.json")
|
126
|
+
action :create_if_missing
|
127
|
+
end
|
128
|
+
|
123
129
|
file File.join(creds_dir, "authorized_keys") do
|
124
130
|
user user
|
125
131
|
action :create_if_missing
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: madscience
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.25
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Noah Gibbs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - '='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 11.18.6
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - '='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 11.18.6
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: capistrano
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -319,6 +319,7 @@ files:
|
|
319
319
|
- site-cookbooks/madscience-vagrant-cookbook/README.md
|
320
320
|
- site-cookbooks/madscience-vagrant-cookbook/files/default/aws.json
|
321
321
|
- site-cookbooks/madscience-vagrant-cookbook/files/default/digital_ocean.json
|
322
|
+
- site-cookbooks/madscience-vagrant-cookbook/files/default/linode.json
|
322
323
|
- site-cookbooks/madscience-vagrant-cookbook/metadata.rb
|
323
324
|
- site-cookbooks/madscience-vagrant-cookbook/recipes/default.rb
|
324
325
|
- solo.rb
|