dust-deploy 0.1.3 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -61,7 +61,7 @@ you can then save the file, and tell dust to get to work:
61
61
  - installing git-core [ ok ]
62
62
  - checking if rsync is installed [ ok ]
63
63
 
64
- you should see dust connecting to the node, checking if the requestet packages are installed, and if not, install them.
64
+ you should see dust connecting to the node, checking if the requested packages are installed, and if not, install them.
65
65
  dust works with aptitude, yum and emerge systems at the moment (testet with ubuntu, debian, gentoo, scientificlinux, centos).
66
66
  feel free to contribute to dust, so that your system is also supported. contribution is easy! just send me a github pull request. You can find the repository here: https://github.com/kechagia/dust-deploy
67
67
 
@@ -112,7 +112,7 @@ you can then inherit these templates in your yourhost.yaml:
112
112
  running dust now, will use the inherited settings as well.
113
113
  you can also overwrite settings in the template with the ones in yourhost.yaml
114
114
 
115
- **NOTE** hashes will be deep merged with inherited hashes, other types will be overwritten!
115
+ **NOTE:** hashes will be deep merged with inherited hashes, other types will be overwritten!
116
116
 
117
117
  $ dust deploy
118
118
 
@@ -142,6 +142,7 @@ filters and proxy
142
142
  ------------
143
143
 
144
144
  because that's not awesome enough, you can also filter your hosts using the --filter flag
145
+
145
146
  $ dust deploy --filter hostname:myhost-1,otherhost
146
147
 
147
148
  $ dust deploy --filter group:debian
@@ -168,7 +169,7 @@ dust comes with a set of predifined, (almost) ready to use recipes managing a lo
168
169
  - install basic system tools and pushing .configuration files for root
169
170
  - iptables firewall
170
171
  - debian/ubuntu debsecan security notifications
171
- - debian/ubunto repositories
172
+ - debian/ubuntu repositories
172
173
  - duplicity backups
173
174
  - mysql server configuration
174
175
  - postgresql server configuration (including corosync scripts)
@@ -181,9 +182,9 @@ dust comes with a set of predifined, (almost) ready to use recipes managing a lo
181
182
  writing your own recipes
182
183
  ------------
183
184
 
184
- because the above recipes will probably not in all cases fullfill your needs, it's pretty easy to write your own recipes. You can either file them in using a git pull request (if you think it's a generic one which others might use as well), or place them locally in the "recipes" folder in your mynetwork.dust directory.
185
+ because the above recipes will probably not in all cases fulfill your needs, it's pretty easy to write your own recipes. You can either file them in using a git pull request (if you think it's a generic one which others might use as well), or place them locally in the "recipes" folder in your mynetwork.dust directory.
185
186
 
186
- dust comes with a set of predifined functions to perform system taks, which you can (and should!) use.
187
+ dust comes with a set of predefined functions to perform system tasks, which you can (and should!) use.
187
188
 
188
189
  ### the server.rb methods you can (and should!) use
189
190
 
data/bin/dust CHANGED
@@ -7,42 +7,6 @@ require 'yaml'
7
7
  require 'fileutils'
8
8
  require 'dust'
9
9
 
10
- # stole this from rails
11
- # https://github.com/rails/rails/blob/c0262827cacc1baf16668af65c35a09138166394/activesupport/lib/active_support/core_ext/hash/deep_merge.rb
12
- class Hash
13
- # Returns a new hash with +self+ and +other_hash+ merged recursively.
14
- def deep_merge(other_hash)
15
- dup.deep_merge!(other_hash)
16
- end
17
-
18
- # Returns a new hash with +self+ and +other_hash+ merged recursively.
19
- # Modifies the receiver in place.
20
- def deep_merge!(other_hash)
21
- other_hash.each_pair do |k,v|
22
- tv = self[k]
23
- self[k] = tv.is_a?(Hash) && v.is_a?(Hash) ? tv.deep_merge(v) : v
24
- end
25
- self
26
- end
27
- end
28
-
29
- # stole this from Afz902k who posted something similar at stackoverflow.com
30
- # adds ability to check if a class with the name of a string exists
31
- class String
32
- def to_class
33
- Kernel.const_get self.capitalize
34
- rescue NameError
35
- nil
36
- end
37
-
38
- def is_a_defined_class?
39
- true if self.to_class
40
- rescue NameError
41
- false
42
- end
43
- end
44
-
45
-
46
10
  module Dust
47
11
  class Deploy < Thor::Runner
48
12
 
@@ -139,6 +103,7 @@ module Dust
139
103
  # runs the method with the recipe name, defined and included in recipe/*.rb
140
104
  # call recipes for each recipe that is defined for this node
141
105
  recipes.each do |recipe, ingredients|
106
+ ::Dust.print_recipe recipe
142
107
  send recipe, context, server, ingredients, options
143
108
  puts
144
109
  end
@@ -1,3 +1,4 @@
1
+ require 'dust/helper'
1
2
  require 'dust/print_status'
2
3
  require 'dust/convert_size'
3
4
  require 'dust/server'
@@ -0,0 +1,51 @@
1
+ # combines two arrays
2
+ # stolen from Juan Matias (jmrepetti) from stackoverflow.com
3
+ class Array
4
+ def combine a
5
+ return a if self.empty?
6
+ return self if a.empty?
7
+
8
+ aux = []
9
+ self.each do |self_elem|
10
+ a.each do |other_elem|
11
+ aux << [ self_elem, other_elem ]
12
+ end
13
+ end
14
+ aux.map {|elem| elem.flatten }
15
+ end
16
+ end
17
+
18
+ # stole this from rails
19
+ # https://github.com/rails/rails/blob/c0262827cacc1baf16668af65c35a09138166394/activesupport/lib/active_support/core_ext/hash/deep_merge.rb
20
+ class Hash
21
+ # Returns a new hash with +self+ and +other_hash+ merged recursively.
22
+ def deep_merge(other_hash)
23
+ dup.deep_merge!(other_hash)
24
+ end
25
+
26
+ # Returns a new hash with +self+ and +other_hash+ merged recursively.
27
+ # Modifies the receiver in place.
28
+ def deep_merge!(other_hash)
29
+ other_hash.each_pair do |k,v|
30
+ tv = self[k]
31
+ self[k] = tv.is_a?(Hash) && v.is_a?(Hash) ? tv.deep_merge(v) : v
32
+ end
33
+ self
34
+ end
35
+ end
36
+
37
+ # stole this from Afz902k who posted something similar at stackoverflow.com
38
+ # adds ability to check if a class with the name of a string exists
39
+ class String
40
+ def to_class
41
+ Kernel.const_get self.capitalize
42
+ rescue NameError
43
+ nil
44
+ end
45
+
46
+ def is_a_defined_class?
47
+ true if self.to_class
48
+ rescue NameError
49
+ false
50
+ end
51
+ end
@@ -1,3 +1,3 @@
1
1
  module Dust
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.5"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 3
9
- version: 0.1.3
8
+ - 5
9
+ version: 0.1.5
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: 2011-12-20 00:00:00 +01:00
17
+ date: 2011-12-23 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -109,6 +109,7 @@ files:
109
109
  - lib/dust/examples/templates/postgres/recovery.conf.erb
110
110
  - lib/dust/examples/templates/ssh_authorized_keys/users.yaml
111
111
  - lib/dust/examples/templates/zabbix_agent/zabbix_agentd.conf.erb
112
+ - lib/dust/helper.rb
112
113
  - lib/dust/print_status.rb
113
114
  - lib/dust/recipes/aliases.rb
114
115
  - lib/dust/recipes/basic_setup.rb