dust-deploy 0.8.2 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
data/bin/dust CHANGED
@@ -97,7 +97,7 @@ module Dust
97
97
  def check_dust_dir
98
98
  if Dir.pwd.split('.').last != 'dust'
99
99
  Dust.print_failed 'current directory does not end with .dust, are you in your dust directory?'
100
- Dust.print_msg "try running 'dust new mynetwork' to let me create one for you with tons of examples!\n", 0
100
+ Dust.print_msg "try running 'dust new mynetwork' to let me create one for you with tons of examples!\n", :indent => 0
101
101
  return false
102
102
  end
103
103
 
data/changelog.md CHANGED
@@ -1,6 +1,13 @@
1
1
  Changelog
2
2
  =============
3
3
 
4
+ 0.8.3
5
+ ------------
6
+
7
+ - cjdroute recipe fixes (manually adding rules not necessary anymore)
8
+ - small bugfixes
9
+
10
+
4
11
  0.8.2
5
12
  ------------
6
13
 
@@ -27,12 +27,6 @@ class Cjdroute< Recipe
27
27
  # create the config file and place it into etc_dir
28
28
  return unless generate_config
29
29
 
30
- # create the tuntap interface
31
- return unless create_tuntap
32
-
33
- # add route for cjdns network
34
- return unless add_route
35
-
36
30
  start_cjdroute
37
31
  end
38
32
 
@@ -41,10 +35,12 @@ class Cjdroute< Recipe
41
35
  def default_config
42
36
  {
43
37
  'git_repo' => 'git://github.com/cjdelisle/cjdns.git',
38
+ 'git_branch' => 'master',
44
39
  'build_dir' => '/tmp/cjdns-tmp',
45
40
  'bin_dir' => '/usr/local/bin',
46
41
  'etc_dir' => '/etc/cjdns/',
47
42
  'tun' => 'cjdroute0',
43
+ 'loglevel' => 'WARN'
48
44
  }
49
45
  end
50
46
 
@@ -142,7 +138,7 @@ class Cjdroute< Recipe
142
138
 
143
139
  # git clone cjdns repository
144
140
  ::Dust.print_msg "cloning cjdns repository into #{@config['build_dir']}\n"
145
- ret = @node.exec "git clone #{@config['git_repo']} #{@config['build_dir']}", :live => true
141
+ ret = @node.exec "git clone #{@config['git_repo']} -b #{@config['git_branch']} #{@config['build_dir']}", :live => true
146
142
  return ::Dust.print_failed 'error cloning git repository' unless ret[:exit_code] == 0
147
143
  end
148
144
 
@@ -160,14 +156,14 @@ class Cjdroute< Recipe
160
156
 
161
157
  def run_cmake
162
158
  ::Dust.print_msg "running cmake\n"
163
- ret = @node.exec "cd #{@config['build_dir']}/build; cmake ..", :live => true
159
+ ret = @node.exec "export Log_LEVEL=#{@config['loglevel']}; cd #{@config['build_dir']}/build; cmake ..", :live => true
164
160
  return ::Dust.print_failed 'error running cmake' unless ret[:exit_code] == 0
165
161
  true
166
162
  end
167
163
 
168
164
  def run_make
169
165
  ::Dust.print_msg "compiling cjdns\n"
170
- ret = @node.exec "cd #{@config['build_dir']}/build; make", :live => true
166
+ ret = @node.exec "export Log_LEVEL=#{@config['loglevel']}; cd #{@config['build_dir']}/build; make", :live => true
171
167
  return ::Dust.print_failed 'error compiling cjdroute' unless ret[:exit_code] == 0
172
168
  true
173
169
  end
@@ -198,29 +194,6 @@ class Cjdroute< Recipe
198
194
  return @node.write "#{@config['etc_dir']}/cjdroute.conf", JSON.pretty_generate(cjdroute_conf)
199
195
  end
200
196
 
201
- # creates the cjdroute tuntap device
202
- def create_tuntap
203
- unless @node.exec("/sbin/ip tuntap list |grep #{@config['tun']}")[:exit_code] == 0
204
- ::Dust.print_msg "creating tun interface #{@config['tun']}"
205
- return false unless ::Dust.print_result @node.exec("/sbin/ip tuntap add mode tun dev #{@config['tun']}")[:exit_code]
206
- else
207
- ::Dust.print_msg "tun interface #{@config['tun']} already exists, flushing ip addresses"
208
- ::Dust.print_result @node.exec("ip addr flush dev #{@config['tun']}")[:exit_code]
209
- end
210
-
211
- true
212
- end
213
-
214
- # set the route for the cjdns network
215
- def add_route
216
- ::Dust.print_msg 'getting routing information'
217
- ret = @node.exec "#{@config['bin_dir']}/cjdroute --getcmds < #{@config['etc_dir']}/cjdroute.conf"
218
- return false unless ::Dust.print_result ret[:exit_code]
219
-
220
- ::Dust.print_msg 'applying cjdns routes'
221
- ::Dust.print_result @node.exec(ret[:stdout])[:exit_code]
222
- end
223
-
224
197
  # kill any cjdroute processes that might be running
225
198
  def stop_cjdroute
226
199
  ::Dust.print_msg 'stopping cjdroute'
data/lib/dust/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Dust
2
- VERSION = "0.8.2"
2
+ VERSION = "0.8.3"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 8
8
- - 2
9
- version: 0.8.2
8
+ - 3
9
+ version: 0.8.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - kris kechagia
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2012-03-12 00:00:00 +01:00
17
+ date: 2012-03-14 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency