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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4df0d9249b04bbfb7808f867235ad6e2263a122c
4
- data.tar.gz: 75679d7d7916ea23947c5797d95f1fe998581825
3
+ metadata.gz: 34a9f1056f45be911a00ad0d7254a377fb3b4892
4
+ data.tar.gz: 00f049faf8223344c038efbe3c622a30ab035557
5
5
  SHA512:
6
- metadata.gz: 5e9828bbbebc878f53215599c4c29a014a4c59f6c3e6caa16d1202bff0931573001ff1b91898a90dc66046e30450f1a44e316ee4f23ced6b8c9fdc61105bb504
7
- data.tar.gz: 1543bfa1892f9f9e76fc027c357a104b269bc685e95ef9b83a1f9b476765ed0a5dfeb324cc7798fa6c450f00c92020f1ac57c7444c79627748469650e7b9802d
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/all_nodes.json.erb in the deploy repository. You can also read
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
- # system("librarian-chef", "install")
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
- cmd = "cd madscience && bundle && vagrant up --provision --provider=#{MADSCIENCE_PROVIDER}"
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
- # Does this display STDOUT properly?
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
- unless $?.success?
113
- raise "Deploy process failed with status #{$?.exitstatus}! Fix and/or re-run using 'vagrant provision'!"
114
- end
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
- puts <<-MESSAGE
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/all_nodes.json.erb.
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
- MESSAGE
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/all_nodes.json.erb!"
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/all_nodes.json.erb!"
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
 
@@ -1,4 +1,4 @@
1
1
  module MadScience
2
- VERSION = "0.0.24"
2
+ VERSION = "0.0.25"
3
3
  VERSION_LIBDIR = File.dirname(__FILE__)
4
4
  end
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', '12.0.3'
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'
@@ -0,0 +1,7 @@
1
+ {
2
+ "token": "",
3
+ "distribution": "Ubuntu 14.04 LTS",
4
+ "datacenter": "newark",
5
+ "plan": "Linode 2048",
6
+ "setup": false
7
+ }
@@ -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.24
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-03-31 00:00:00.000000000 Z
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: 12.0.3
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: 12.0.3
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