dust-deploy 0.13.0 → 0.13.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.
- data/bin/dust +2 -0
- data/changelog.md +8 -0
- data/lib/dust/recipes/cjdroute.rb +49 -0
- data/lib/dust/recipes/dnsmasq.rb +39 -0
- data/lib/dust/version.rb +1 -1
- metadata +3 -2
data/bin/dust
CHANGED
@@ -268,6 +268,8 @@ module Dust
|
|
268
268
|
puts "\n\n------------------------------ SUMMARY ------------------------------".red unless $parallel
|
269
269
|
|
270
270
|
@nodes.each do |node|
|
271
|
+
next unless node['server']
|
272
|
+
|
271
273
|
messages = node['server'].messages.collect(level)
|
272
274
|
next if messages.empty?
|
273
275
|
|
data/changelog.md
CHANGED
@@ -42,6 +42,50 @@ class Cjdroute< Recipe
|
|
42
42
|
}
|
43
43
|
end
|
44
44
|
|
45
|
+
def public_peers
|
46
|
+
# list of public peers, taken from https://wiki.projectmeshnet.org/Public_peers
|
47
|
+
{
|
48
|
+
# derps nodes
|
49
|
+
'173.255.219.67:10000' => {
|
50
|
+
'password' => 'null',
|
51
|
+
'publicKey' => 'lj52930v1vmg3jqyb399us501svntt499bvgk0c1fud4pmy42gj0.k'
|
52
|
+
},
|
53
|
+
|
54
|
+
'96.126.112.124:10000' => {
|
55
|
+
'password' => 'null',
|
56
|
+
'publicKey' => '7zy1gb9bw4xp82kjvh66w01jdgh6y3lk7cfnl0pgb0xnn26b2jn0.k'
|
57
|
+
},
|
58
|
+
|
59
|
+
# rainfly x
|
60
|
+
'76.105.229.241:13982' => {
|
61
|
+
'password' => 'general_public_1985',
|
62
|
+
'publicKey' => '7pu8nlqphgd1bux9sdpjg0c104217r3b3m1bvmdtbn7uwcj5cky0.k'
|
63
|
+
},
|
64
|
+
|
65
|
+
# ds500ss
|
66
|
+
'87.208.234.24:28078' => {
|
67
|
+
'password' => 'freedomnetsrai9yah4Kic5Kojah5que4xoCh',
|
68
|
+
'publicKey' => 'qb426vh42usw995jy60ll6rtslguv1ylpvwp44ymzky6f0u5qvq0.k'
|
69
|
+
},
|
70
|
+
|
71
|
+
# Dans nodes
|
72
|
+
'199.83.100.24:41902' => {
|
73
|
+
'password' => 'znuhtpf005705tp8snzbywynm6',
|
74
|
+
'publicKey' => 'xltnfur6xh2n36g79y1qpht910c13sq7lb049662x7trfx3gf190.k'
|
75
|
+
},
|
76
|
+
|
77
|
+
'173.192.138.43:26099' => {
|
78
|
+
'password' => 'fjhgf77nsnsp8mrkvyxbwj5jw0',
|
79
|
+
'publicKey' => 'bzmd25v05dctt77nqlgl8rxm24g0q8hwlkkcc64ss7pybbx2ndg0.k'
|
80
|
+
},
|
81
|
+
|
82
|
+
'74.221.208.153:51674' => {
|
83
|
+
'password' => 'jljwnfutfpt1nz3yjsj0dscpf7',
|
84
|
+
'publicKey' => '8hgr62ylugxjyyhxkz254qtz60p781kbswmhhywtbb5rpzc5lxj0.k'
|
85
|
+
}
|
86
|
+
}
|
87
|
+
end
|
88
|
+
|
45
89
|
# installs cmake, git and other building tools needed
|
46
90
|
def install_dependencies
|
47
91
|
@node.messages.add("installing build dependencies\n")
|
@@ -132,6 +176,11 @@ class Cjdroute< Recipe
|
|
132
176
|
# parse generated json
|
133
177
|
cjdroute_conf = JSON.parse ret[:stdout]
|
134
178
|
|
179
|
+
# add some public peers, so we can get started directly
|
180
|
+
msg = @node.messages.add('adding public peers', :indent => 2)
|
181
|
+
cjdroute_conf['interfaces']['UDPInterface']['connectTo'] = public_peers
|
182
|
+
msg.ok
|
183
|
+
|
135
184
|
# exchange tun0 with configured tun device
|
136
185
|
cjdroute_conf['router']['interface']['tunDevice'] = @config['tun']
|
137
186
|
|
@@ -0,0 +1,39 @@
|
|
1
|
+
class Dnsmasq < Recipe
|
2
|
+
desc 'dnsmasq:deploy', 'installs and configures dnsmasq'
|
3
|
+
def deploy
|
4
|
+
return unless @node.install_package 'dnsmasq'
|
5
|
+
|
6
|
+
dnsmasq_conf = ''
|
7
|
+
@config.each do |key, values|
|
8
|
+
|
9
|
+
# some settings can be specified multiple times
|
10
|
+
# this is represented in the node.yaml as arrays e.g.
|
11
|
+
# server: [ nameserver1, '/yourdomain/yournameserver/' ]
|
12
|
+
# this will be translated to
|
13
|
+
# server=nameserver1
|
14
|
+
# server=/yourdomain/yournameserver/
|
15
|
+
values.to_array.each do |value|
|
16
|
+
|
17
|
+
# dnsmasq has some settings which are just set without a value
|
18
|
+
# in the node.yaml, this has to be specified using e.g.
|
19
|
+
# no-resolv: true
|
20
|
+
# this will be translated by this script to
|
21
|
+
# no-resolv
|
22
|
+
# we're also skipping settings that are set to false
|
23
|
+
next if value.is_a? FalseClass
|
24
|
+
|
25
|
+
if value.is_a? TrueClass
|
26
|
+
dnsmasq_conf << "#{key}\n"
|
27
|
+
|
28
|
+
# all other settings have key=value pairs
|
29
|
+
else
|
30
|
+
dnsmasq_conf << "#{key}=#{value}\n"
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
@node.write '/etc/dnsmasq.conf', dnsmasq_conf
|
37
|
+
@node.restart_service 'dnsmasq' if @options.restart
|
38
|
+
end
|
39
|
+
end
|
data/lib/dust/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dust-deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.13.
|
4
|
+
version: 0.13.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-05-
|
12
|
+
date: 2012-05-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|
@@ -172,6 +172,7 @@ files:
|
|
172
172
|
- lib/dust/recipes/cjdroute.rb
|
173
173
|
- lib/dust/recipes/cups_client.rb
|
174
174
|
- lib/dust/recipes/debsecan.rb
|
175
|
+
- lib/dust/recipes/dnsmasq.rb
|
175
176
|
- lib/dust/recipes/duplicity.rb
|
176
177
|
- lib/dust/recipes/etc_hosts.rb
|
177
178
|
- lib/dust/recipes/hash_check.rb
|