knife-depsolver 2.0.0 → 2.0.1

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: 6778025284948e0f288edf8c6c7f2c2524b183a4
4
- data.tar.gz: 0ede42f4cc18050f8e27c28b96b454aa62e3c4a8
3
+ metadata.gz: d898d03bc79de23335e1ce6f1d81ca9cc68527d9
4
+ data.tar.gz: 9fc64f30535ff4441cacd2316dceeacb1ce66345
5
5
  SHA512:
6
- metadata.gz: ed6a0cf93519256d488c6038f8aaf7c93647cd6620025b05cd95ba3cdb41b0b8194d012989a61c55ec1ecc208d4dd6d8adaa69619097e52748334dc2260924a0
7
- data.tar.gz: 6d754f00136a1174ceefcd1f5c47025d4113b420e169eb9405786425de8fb308a7d0a99241677b8c261d452c52542b93cb02d5b5161f27187cb30efeec1ca58d
6
+ metadata.gz: 5eae154d12a6d07c72fa13a8a3b89b96849bf7b5ca6d3b42f614573c239a432d2f550164810b2cdbbb4ff7fc95b94f00256ed01745f183edb31b71730cc61b38
7
+ data.tar.gz: 60cd833bbe8e5f321e453fe41cba4ab78652e96bdb99d63b8a83709526634454c8564c72abb05178868cf6081a8c42a55c314a0352f8369c5028736561a6cc5a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ## 2.0.1 (2017-05-02)
4
+
5
+ * Minor change to file name timestamp format
6
+
3
7
  ## 2.0.0 (2017-05-02)
4
8
 
5
9
  * Set the node's environment to ensure accurate run_list expansion
data/README.md CHANGED
@@ -38,6 +38,8 @@ opscode-erchef to send a list of cookbook file metadata back to the chef-client
38
38
  chef gem install knife-depsolver
39
39
  ```
40
40
 
41
+ *Currently NOT compatible with Windows Chef DK*
42
+
41
43
  ### Using knife-depsolver with Chef Server's depsolver
42
44
 
43
45
  Find the depsolver solution for a node's run_list.
@@ -95,7 +97,7 @@ Now use the "--env-constraints", "universe" and "expanded-run-list" options to p
95
97
  For example:
96
98
 
97
99
  ```
98
- knife depsolver --env-constraints rehearsal-environment-20170501185240-5f5843d819ecb0b174f308d76d4336bb7bbfacbf.txt --universe automate-universe-20170501185240-1c8e59e23530b1e1a8e0b3b3cc5236a29c84e469.txt --expanded-run-list expanded-run-list-20170501185240-387d90499514747792a805213c30be13d830d31f.txt
100
+ knife depsolver --env-constraints rehearsal-environment-2017-05-01-18.52.40-5f5843d819ecb0b174f308d76d4336bb7bbfacbf.txt --universe automate-universe-2017-05-01-18.52.40-1c8e59e23530b1e1a8e0b3b3cc5236a29c84e469.txt --expanded-run-list expanded-run-list-2017-05-01-18.52.40-387d90499514747792a805213c30be13d830d31f.txt
99
101
  ```
100
102
 
101
103
  Now it is easy to modify any combination of the expanded run list, the environment cookbook version constraints or the cookbook universe in those files and see the impact on the depsolver in an effort to isolate the problem.
@@ -103,7 +105,7 @@ Now it is easy to modify any combination of the expanded run list, the environme
103
105
  Sometimes it can help to give the depsolver more than the default five seconds to perform its calculations. This can be done by using the "--timeout <seconds>" option to change the depsolver timeout.
104
106
 
105
107
  ```
106
- knife depsolver --env-constraints production-environment-20170501185240-5f5843d819ecb0b174f308d76d4336bb7bbfacbf.txt --universe my-org-universe-20170501185240-1c8e59e23530b1e1a8e0b3b3cc5236a29c84e469.txt --expanded-run-list expanded-run-list-20170501185240-387d90499514747792a805213c30be13d830d31f.txt --timeout 120
108
+ knife depsolver --env-constraints production-environment-2017-05-01-18.52.40-5f5843d819ecb0b174f308d76d4336bb7bbfacbf.txt --universe my-org-universe-2017-05-01-18.52.40-1c8e59e23530b1e1a8e0b3b3cc5236a29c84e469.txt --expanded-run-list expanded-run-list-2017-05-01-18.52.40-387d90499514747792a805213c30be13d830d31f.txt --timeout 120
107
109
  ```
108
110
 
109
111
  ### Chef Server <= 12.4.0
@@ -137,7 +139,11 @@ ORDER BY updated_at DESC;
137
139
  EOF
138
140
  ```
139
141
 
140
- Then you can run "knife depsolver --csv-universe-to-json universe.csv" to convert it to the normal JSON format.
142
+ Then you can run the following command to convert it to the normal JSON format.
143
+
144
+ ```
145
+ knife depsolver --csv-universe-to-json universe.csv
146
+ ```
141
147
 
142
148
  If the Chef Server doesn't have the "chef-server-ctl psql" command available then you can try replacing that line with the following.
143
149
 
@@ -100,7 +100,7 @@ class Chef
100
100
  end
101
101
 
102
102
  universe_json = JSON.pretty_generate(universe)
103
- universe_filename = "universe-#{Time.now.strftime("%Y-%m-%d-%H:%M:%S")}-#{Digest::SHA1.hexdigest(universe_json)}.txt"
103
+ universe_filename = "universe-#{Time.now.strftime("%Y-%m-%d-%H.%M.%S")}-#{Digest::SHA1.hexdigest(universe_json)}.txt"
104
104
  IO.write(universe_filename, universe_json)
105
105
  puts "Cookbook universe saved to #{universe_filename}"
106
106
  exit!
@@ -147,7 +147,7 @@ class Chef
147
147
  end
148
148
  env = { name: node.chef_environment, cookbook_versions: environment_cookbook_versions }
149
149
  environment_constraints_json = JSON.pretty_generate(env)
150
- environment_constraints_filename = "#{node.chef_environment}-environment-#{Time.now.strftime("%Y-%m-%d-%H:%M:%S")}-#{Digest::SHA1.hexdigest(environment_constraints_json)}.txt"
150
+ environment_constraints_filename = "#{node.chef_environment}-environment-#{Time.now.strftime("%Y-%m-%d-%H.%M.%S")}-#{Digest::SHA1.hexdigest(environment_constraints_json)}.txt"
151
151
  IO.write(environment_constraints_filename, environment_constraints_json)
152
152
  puts "Environment constraints saved to #{environment_constraints_filename}"
153
153
 
@@ -156,7 +156,7 @@ class Chef
156
156
  universe_json = JSON.pretty_generate(universe)
157
157
  universe_filename = ""
158
158
  rest.url.to_s.match(".*/organizations/(.*)/?") { universe_filename = "#{$1}-" }
159
- universe_filename += "universe-#{Time.now.strftime("%Y-%m-%d-%H:%M:%S")}-#{Digest::SHA1.hexdigest(universe_json)}.txt"
159
+ universe_filename += "universe-#{Time.now.strftime("%Y-%m-%d-%H.%M.%S")}-#{Digest::SHA1.hexdigest(universe_json)}.txt"
160
160
  IO.write(universe_filename, universe_json)
161
161
  puts "Cookbook universe saved to #{universe_filename}"
162
162
  rescue Net::HTTPServerException
@@ -208,7 +208,7 @@ class Chef
208
208
  versions.delete_if {|version, v| !env_constraints[name].include?(version)} if env_constraints[name]
209
209
  end
210
210
  filtered_universe_json = JSON.pretty_generate(universe)
211
- filtered_universe_filename = "filtered-universe-#{Time.now.strftime("%Y-%m-%d-%H:%M:%S")}-#{Digest::SHA1.hexdigest(filtered_universe_json)}.txt"
211
+ filtered_universe_filename = "filtered-universe-#{Time.now.strftime("%Y-%m-%d-%H.%M.%S")}-#{Digest::SHA1.hexdigest(filtered_universe_json)}.txt"
212
212
  IO.write(filtered_universe_filename, filtered_universe_json)
213
213
  puts "Filtered cookbook universe saved to #{filtered_universe_filename}"
214
214
  exit!
@@ -309,7 +309,7 @@ class Chef
309
309
 
310
310
  if config[:capture]
311
311
  results_json = JSON.pretty_generate(results)
312
- expanded_run_list_filename = "expanded-run-list-#{Time.now.strftime("%Y-%m-%d-%H:%M:%S")}-#{Digest::SHA1.hexdigest(results_json)}.txt"
312
+ expanded_run_list_filename = "expanded-run-list-#{Time.now.strftime("%Y-%m-%d-%H.%M.%S")}-#{Digest::SHA1.hexdigest(results_json)}.txt"
313
313
  IO.write(expanded_run_list_filename, results_json)
314
314
  puts "Expanded run list saved to #{expanded_run_list_filename}"
315
315
  else
@@ -1,3 +1,3 @@
1
1
  module KnifeDepsolver
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-depsolver
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremiah Snapp