cheftacular 2.10.2 → 2.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cheftacular/README.md +119 -77
  3. data/lib/cheftacular/actions/check.rb +58 -24
  4. data/lib/cheftacular/actions/deploy.rb +5 -3
  5. data/lib/cheftacular/auditor.rb +4 -3
  6. data/lib/cheftacular/cheftacular.rb +1 -0
  7. data/lib/cheftacular/cloud_provider.rb +17 -12
  8. data/lib/cheftacular/file_system.rb +20 -0
  9. data/lib/cheftacular/getter.rb +1 -1
  10. data/lib/cheftacular/helper.rb +41 -28
  11. data/lib/cheftacular/initializer.rb +5 -3
  12. data/lib/cheftacular/parser.rb +10 -6
  13. data/lib/cheftacular/queue_master.rb +24 -0
  14. data/lib/cheftacular/stateless_actions/backups.rb +2 -2
  15. data/lib/cheftacular/stateless_actions/bootstrappers/{centos_bootstrap.rb → centos_bootstrap_from_queue.rb} +1 -1
  16. data/lib/cheftacular/stateless_actions/bootstrappers/{coreos_bootstrap.rb → coreos_bootstrap_from_queue.rb} +1 -1
  17. data/lib/cheftacular/stateless_actions/bootstrappers/{fedora_bootstrap.rb → fedora_bootstrap_from_queue.rb} +1 -1
  18. data/lib/cheftacular/stateless_actions/bootstrappers/{redhat_bootstrap.rb → redhat_bootstrap_from_queue.rb} +1 -1
  19. data/lib/cheftacular/stateless_actions/bootstrappers/ubuntu_bootstrap_from_queue.rb +203 -0
  20. data/lib/cheftacular/stateless_actions/bootstrappers/vyatta_bootstrap_from_queue.rb +7 -0
  21. data/lib/cheftacular/stateless_actions/check_cheftacular_yml_keys.rb +30 -0
  22. data/lib/cheftacular/stateless_actions/chef_bootstrap_from_queue.rb +89 -0
  23. data/lib/cheftacular/stateless_actions/cheftacular_yml_help.rb +55 -6
  24. data/lib/cheftacular/stateless_actions/client_list.rb +1 -3
  25. data/lib/cheftacular/stateless_actions/cloud_bootstrap.rb +24 -15
  26. data/lib/cheftacular/stateless_actions/cloud_bootstrap_from_queue.rb +37 -0
  27. data/lib/cheftacular/stateless_actions/environment.rb +80 -31
  28. data/lib/cheftacular/stateless_actions/fix_known_hosts.rb +1 -22
  29. data/lib/cheftacular/stateless_actions/{full_bootstrap.rb → full_bootstrap_from_queue.rb} +8 -15
  30. data/lib/cheftacular/stateless_actions/knife_upload.rb +14 -3
  31. data/lib/cheftacular/stateless_actions/reinitialize.rb +1 -1
  32. data/lib/cheftacular/stateless_actions/remove_client.rb +3 -3
  33. data/lib/cheftacular/stateless_actions/restart_swap.rb +0 -1
  34. data/lib/cheftacular/stateless_actions/test_env.rb +24 -18
  35. data/lib/cheftacular/stateless_actions/update_thecheftacularcookbook.rb +1 -1
  36. data/lib/cheftacular/stateless_actions/upload_nodes.rb +2 -2
  37. data/lib/cheftacular/version.rb +1 -1
  38. data/lib/cloud_interactor/domain/create.rb +2 -2
  39. data/lib/cloud_interactor/domain/create_record.rb +1 -1
  40. data/lib/cloud_interactor/domain/destroy.rb +2 -2
  41. data/lib/cloud_interactor/domain/destroy_record.rb +1 -1
  42. data/lib/cloud_interactor/domain/list_records.rb +1 -1
  43. data/lib/cloud_interactor/domain/read.rb +1 -1
  44. data/lib/cloud_interactor/domain/read_record.rb +1 -1
  45. data/lib/cloud_interactor/domain/update.rb +2 -2
  46. data/lib/cloud_interactor/domain/update_record.rb +2 -2
  47. data/lib/cloud_interactor/helpers.rb +11 -6
  48. data/lib/cloud_interactor/server/attach_volume.rb +1 -1
  49. data/lib/cloud_interactor/server/create.rb +4 -4
  50. data/lib/cloud_interactor/server/detach_volume.rb +2 -2
  51. data/lib/cloud_interactor/server/list_volumes.rb +1 -1
  52. data/lib/cloud_interactor/server/poll.rb +2 -2
  53. data/lib/cloud_interactor/server/read_volume.rb +1 -1
  54. data/lib/cloud_interactor/version.rb +1 -1
  55. data/lib/cloud_interactor/volume/create.rb +1 -1
  56. data/lib/sshkit/getters.rb +9 -1
  57. metadata +25 -10
  58. data/lib/cheftacular/stateless_actions/bootstrappers/ubuntu_bootstrap.rb +0 -116
  59. data/lib/cheftacular/stateless_actions/bootstrappers/vyatta_bootstrap.rb +0 -7
  60. data/lib/cheftacular/stateless_actions/chef_bootstrap.rb +0 -63
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 38c998ae8e5731af62924ee61299b8ef290d2968
4
- data.tar.gz: ebd8a82ef084eb1d59e72e6a78c31eeb8549f10e
3
+ metadata.gz: c29bc202f5d7ac613cde4b6867d92d9f656d3254
4
+ data.tar.gz: a7194967c447bd9fe26ecd4f7dcd078e7baf3e39
5
5
  SHA512:
6
- metadata.gz: 3677518b3bc9e7a132323de58962c06bc1038db3966f82fc7b3cf2462b6f9c58a42f614b5c29e4fe7125afc17989ad655463f6c42d58327ad6d814f8b1b2bb52
7
- data.tar.gz: 27ff9027ab3a1b9e98f82179db6103beb3ac3da4709da5647d1e4d575b616a7fea43aca9e3cdec448ec826b6d40cdbb8eabb9752c93906d5e253f0218b83a373
6
+ metadata.gz: e77f37c717b2c3b1787620d37b62a8a696b06b75a4e7e959be0957205b6ea297e8904cacf09aebbaefaaecd70501dd55eaeaf47da51ddbea2a07f1959dc4d316
7
+ data.tar.gz: 63115c5445fcfa90168d56636d19559355506b92afa54061464152803adfef94f1a83c7044488453f99d1ecfa8dc494cbe883d0fe340ab941dec1d24f1120a02
@@ -74,10 +74,12 @@
74
74
 
75
75
  4. `restore` will simply just run the _backup loading command_ to load the latest backup onto the server.
76
76
 
77
- 2. `cft check` Checks the commits for all servers for a repository (for an environment) and returns them in a simple chart. Also shows when these commits were deployed to the server.
77
+ 2. `cft check [all]` Checks the commits for all servers for a repository (for an environment) and returns them in a simple chart. Also shows when these commits were deployed to the server.
78
78
 
79
79
  1. If the node has special repository based keys from TheCheftacularCookbook, this command will also display information about the branch and organization currently deployed to the node(s).
80
80
 
81
+ 2. If the all argument is provided, all repositories will be checked for the current environment
82
+
81
83
  3. `cft chef_server [restart|processes|memory]` this command can be used to query the chef server for stats if the cheftacular.yml has the chef_server key filled out. Useful for low resource chef-servers.
82
84
 
83
85
  1. `restart` restarts all chef processes on the chef server which may alleviate slow cheftacular load times for some users. (NOTE) do not run this command while the chef-server is performing actions or instability may result! Not tested for high volume chef servers.
@@ -90,35 +92,41 @@
90
92
 
91
93
  5. NOTE 2! Cheftacular does not (and will not) support accessing your chef server over ssh with password auth. If you have done this, you should feel bad and immediately switch ssh access to key authentication...
92
94
 
93
- 4. `cft cheftacular_config [display|sync|overwrite]` this command Allows you to interact with your complete cheftacular configuration, the union of all repository's cheftacular.ymls.
95
+ 4. `cft cheftacular_config [diff|display|sync|overwrite]` this command Allows you to interact with your complete cheftacular configuration, the union of all repository's cheftacular.ymls.
94
96
 
95
97
  1. `display` will show the current overall configuration for cheftacular.
96
98
 
97
- 2. `sync` will sync your local cheftacular yaml keys ONTO the server's keys. This happens automatically whenever a difference is detected between the local keys and the remote keys but can be run manually. Will send a slack notification if slack is configured (the slack notification contains the diffed keys). The sync only occurs if there are CHANGES to the file.
99
+ 2. `diff` will show the difference between your current cheftacular.yml and the server's. Run automatically on a sync.
100
+
101
+ 3. `sync` will sync your local cheftacular yaml keys ONTO the server's keys. Will send a slack notification if slack is configured (the slack notification contains the diffed keys). The sync only occurs if there are CHANGES to the file.
102
+
103
+ 5. `cft cheftacular_yml_help KEY` this commandallows you to get help on the meaning of each key in your cheftacular.yml overall config.
104
+
105
+ 1. This command can also by run with `cft yaml_help`.
98
106
 
99
- 5. `cft clear_caches` this command allows you to clear all of your local caches.
107
+ 2. To examine nested keys, you can use colons inbetween the keys like cloud_authentication:rackspace:email
108
+
109
+ 6. `cft clear_caches` this command allows you to clear all of your local caches.
100
110
 
101
111
  1. This command will force you to refetch all previously cached chef server data on the next `cft` run.
102
112
 
103
- 6. `cft client_list` Allows you check the basic information for all the servers setup via chef. Shows the server's short name, its public ip address and roles (run_list) by default.
113
+ 7. `cft client_list` Allows you check the basic information for all the servers setup via chef. Shows the server's short name, its public ip address and roles (run_list) by default.
104
114
 
105
115
  1. `-v` option will make this command display the server's domain name, whether its password is stored on the chef server and what that password is.
106
116
 
107
117
  2. `-W|--with-priv` option will make this command display the server's local (private) ip address. This address is also the server's `local.<SERVER_DNS_NAME>`.
108
118
 
109
- 3. This command is aliased to `client-list` with no arguments or cft prefix.
110
-
111
- 7. `cft console` will create a console session on the first node found for a repository.
119
+ 8. `cft console` will create a console session on the first node found for a repository.
112
120
 
113
121
  1. Attempts to setup a console for the unique stack, stacks currently supported for console is only Rails.
114
122
 
115
- 8. `cft db_console` will create a database console session on the first node found for a database stack in the current environment.
123
+ 9. `cft db_console` will create a database console session on the first node found for a database stack in the current environment.
116
124
 
117
125
  1. This command is aliased to psql, typing `cft psql` will drop you into a rails stack database psql session.
118
126
 
119
127
  2. This command is also aliased to mongo, typing `cft mongo` will drop you into a mongodb mongo session.
120
128
 
121
- 9. `cft deploy` will do a simple chef-client run on the servers for a role. Logs of the run itself will be sent to the local log directory in the application (or chef-repo) where the run was conducted.
129
+ 10. `cft deploy` will do a simple chef-client run on the servers for a role. Logs of the run itself will be sent to the local log directory in the application (or chef-repo) where the run was conducted.
122
130
 
123
131
  1. The `-Z REVISION` flag can be used with TheCheftacularCookbook to set a revision your app will run.
124
132
 
@@ -130,17 +138,23 @@
130
138
 
131
139
  5. The `-v|--verbose` option will cause failed deploys to output to the terminal window and to their normal log file. Useful for debugging.
132
140
 
133
- 10. `cft disk_report` will fetch useful statistics from every server for every environment and output it into your log directory.
141
+ 11. `cft disk_report` will fetch useful statistics from every server for every environment and output it into your log directory.
134
142
 
135
- 11. `cft environment boot|destroy` will boot / destroy the current environment
143
+ 12. `cft environment boot|boot_without_deploy|destroy|destroy_raw_servers [SERVER_NAMES]` will boot / destroy the current environment
136
144
 
137
145
  1. `boot` will spin up servers and bring them to a stable state. This includes setting up their subdomains for the target environment.
138
146
 
139
147
  2. `destroy` will destroy all servers needed for the target environment
140
148
 
141
- 3. This command will prompt when attempting to destroy servers in staging or production
149
+ 3. `destroy_raw_servers` will destroy the servers without destroying the node data.
150
+
151
+ 4. `boot_without_deploy` will spin up servers and bring them to a state where they are ready to be deployed
142
152
 
143
- 12. `cft file NODE_NAME LOCATION_ALIAS MODE FILE_NAME` interacts with a file on the remote server
153
+ 5. This command will prompt when attempting to destroy servers in staging or production. Additionally, only devops clients will be able to destroy servers in those environments.
154
+
155
+ 6. This command also accepts a *comma delimited list* of server names to boot / destroy instead of all the stored ones for an environment.
156
+
157
+ 13. `cft file NODE_NAME LOCATION_ALIAS MODE FILE_NAME` interacts with a file on the remote server
144
158
 
145
159
  1. `LOCATION_ALIAS` will be parsed as a path if it has backslash characters. Otherwise it will be parsed from your location_aliases hash in your cheftacular.yml
146
160
 
@@ -170,25 +184,25 @@
170
184
 
171
185
  1. `--save-to-file FILE_PATH` can also be used in the `fetch` context to specify where exactly to save the file and what to name it as.
172
186
 
173
- 13. `cft fix_known_hosts [HOSTNAME]` this command will delete entries in your known_hosts file for all the servers that are in our system (ip addresses AND dns names)
187
+ 14. `cft fix_known_hosts [HOSTNAME]` this command will delete entries in your known_hosts file for all the servers that are in our system (ip addresses AND dns names)
174
188
 
175
189
  1. Passing in a hostname will make the command only remove entries with that hostname / ip specifically
176
190
 
177
- 14. `cft get_haproxy_log` this command will generate a haproxy html file for the load balancer(s) associated with a repository in the log directory. Opening this log file in the browser will show the status of that haproxy at the time of the log.
191
+ 15. `cft get_haproxy_log` this command will generate a haproxy html file for the load balancer(s) associated with a repository in the log directory. Opening this log file in the browser will show the status of that haproxy at the time of the log.
178
192
 
179
193
  1. In devops mode, this command will not do anything without the -R repository passed.
180
194
 
181
- 15. `cft get_log_from_bag <NODE_NAME-COMMAND_TYPE>` this command grabs the latest command run log from the data bags and saves it to your log directory. There are different types of logs saved per server depending on command.
195
+ 16. `cft get_log_from_bag <NODE_NAME-COMMAND_TYPE>` this command grabs the latest command run log from the data bags and saves it to your log directory. There are different types of logs saved per server depending on command.
182
196
 
183
- 16. `cft get_pg_pass ['clip']` command will output the current environment's pg_password to your terminal. Optionally you can pass in clip like `cft get_pg_pass clip` to have it also copy the pass to your clipboard.
197
+ 17. `cft get_pg_pass ['clip']` command will output the current environment's pg_password to your terminal. Optionally you can pass in clip like `cft get_pg_pass clip` to have it also copy the pass to your clipboard.
184
198
 
185
- 17. `cft help COMMAND|MODE` this command returns the documentation for a specific command if COMMAND matches the name of a command. Alternatively, it can be passed `action|arguments|application|current|devops|stateless_action` to fetch the commands for a specific mode.Misspellings of commands will display near hits.
199
+ 18. `cft help COMMAND|MODE` this command returns the documentation for a specific command if COMMAND matches the name of a command. Alternatively, it can be passed `action|arguments|application|current|devops|stateless_action` to fetch the commands for a specific mode.Misspellings of commands will display near hits.
186
200
 
187
- 18. `cft list_toggleable_roles NODE_NAME` This command will allow you to see all toggleable roles for a node
201
+ 19. `cft list_toggleable_roles NODE_NAME` This command will allow you to see all toggleable roles for a node
188
202
 
189
- 19. `cft location_aliases` will list all location aliases listed in your cheftacular.yml. These aliases can be used in the `cft file` command.
203
+ 20. `cft location_aliases` will list all location aliases listed in your cheftacular.yml. These aliases can be used in the `cft file` command.
190
204
 
191
- 20. `cft log` this command will output the last 500 lines of logs from every server set for the repository (can be given additional args to specify) to the log directory
205
+ 21. `cft log` this command will output the last 500 lines of logs from every server set for the repository (can be given additional args to specify) to the log directory
192
206
 
193
207
  1. `--nginx` will fetch the nginx logs as well as the application logs
194
208
 
@@ -200,13 +214,13 @@
200
214
 
201
215
  4. `--fetch-backup` If doing a pg_data log, this will fetch the latest logs from the pg_data log directory for each database.
202
216
 
203
- 21. `cft migrate` this command will grab the first alphabetical node for a repository and run a migration that will hit the database primary server.
217
+ 22. `cft migrate` this command will grab the first alphabetical node for a repository and run a migration that will hit the database primary server.
204
218
 
205
219
  1. Currently only supports rails stacks.
206
220
 
207
- 22. `cft pass NODE_NAME` will drop the server's sudo password into your clipboard. Useful for when you need to ssh into the server itself and try advanced linux commands
221
+ 23. `cft pass NODE_NAME` will drop the server's sudo password into your clipboard. Useful for when you need to ssh into the server itself and try advanced linux commands
208
222
 
209
- 23. `cft role_toggle NODE_NAME ROLE_NAME activate|deactivate` This command will allow you to **toggle** roles on nodes without using `cft upload_nodes`
223
+ 24. `cft role_toggle NODE_NAME ROLE_NAME activate|deactivate` This command will allow you to **toggle** roles on nodes without using `cft upload_nodes`
210
224
 
211
225
  1. This command uses your *role_toggling:deactivated_role_suffix* attribute set in your cheftacular.yml to toggle the role, it checks to see if the toggled name exists then sets the node's run_list to include the toggled role
212
226
 
@@ -218,7 +232,7 @@
218
232
 
219
233
  1. Please run `cft list_toggleable_roles NODE_NAME` to get a list of your org's toggleable roles for a node.
220
234
 
221
- 24. `cft run COMMAND [--all]` will trigger the command on the first server in the role. Can be used to run rake commands or anything else.
235
+ 25. `cft run COMMAND [--all]` will trigger the command on the first server in the role. Can be used to run rake commands or anything else.
222
236
 
223
237
  1. `--all` will make the command run against all servers in a role rather than the first server it comes across. Don't do this if you're modifying the database with the command.
224
238
 
@@ -228,11 +242,11 @@
228
242
 
229
243
  4. IMPORTANT NOTE: You cannot run `cft run rake -T` as is, you have to enclose any command that uses command line dash arguments in quotes like `cft run "rake -T"`
230
244
 
231
- 25. `cft scale up|down [NUM_TO_SCALE]` will add (or remove) NUM_TO_SCALE servers from the server array. This command will not let you scale down below 1 server.
245
+ 26. `cft scale up|down [NUM_TO_SCALE]` will add (or remove) NUM_TO_SCALE servers from the server array. This command will not let you scale down below 1 server.
232
246
 
233
247
  1. In the case of server creation, this command takes a great deal of time to execute. It will output what stage it is currently on to the terminal but <b>you must not kill this command while it is executing</b>.A failed build may require the server to be destroyed / examined by a DevOps engineer.
234
248
 
235
- 26. `cft tail [PATTERN_TO_MATCH]` will tail the logs (return continuous output) of the first node if finds that has an application matching the repository running on it. Currently only supports rails stacks
249
+ 27. `cft tail [PATTERN_TO_MATCH]` will tail the logs (return continuous output) of the first node if finds that has an application matching the repository running on it. Currently only supports rails stacks
236
250
 
237
251
  1. pass `-n NODE_NAME` to grab the output of a node other than the first.
238
252
 
@@ -240,6 +254,10 @@
240
254
 
241
255
  3. if the `PATTERN_TO_MATCH` argument exists, the tail will only return entries that have that pattern rather than everything written to the file.
242
256
 
257
+ 28. `cft update_cheftacular` this command attempts to update cheftacular to the latest version.
258
+
259
+ 29. `cft version` this command prints out the current version of cheftacular.
260
+
243
261
 
244
262
  ## Commands that can ONLY be run in the devops context
245
263
 
@@ -263,9 +281,9 @@
263
281
 
264
282
  5. `cft check_cheftacular_yml_keys` allows you to check to see if your cheftacular yml keys are valid to the current version of cheftacular. It will also set your missing keys to their likely default and let you know to update the cheftacular.yml file.
265
283
 
266
- 6. `cft chef_bootstrap ADDRESS NODE_NAME` allows you to register a node in the chef system, remove any lingering data that may be associated with it and update the node's runlist if it has an entry in nodes_dir for its NODE_NAME.
284
+ 6. `cft chef_bootstrap_from_queue` allows you to register a node in the chef system, remove any lingering data that may be associated with it and update the node's runlist if it has an entry in nodes_dir for its NODE_NAME.
267
285
 
268
- 1. This command is part of the `cft full_bootstrap` command
286
+ 1. This command is part of the `cft full_bootstrap` command and cannot be called directly
269
287
 
270
288
  7. `cft chef_server [restart|processes|memory]` this command can be used to query the chef server for stats if the cheftacular.yml has the chef_server key filled out. Useful for low resource chef-servers.
271
289
 
@@ -279,31 +297,37 @@
279
297
 
280
298
  5. NOTE 2! Cheftacular does not (and will not) support accessing your chef server over ssh with password auth. If you have done this, you should feel bad and immediately switch ssh access to key authentication...
281
299
 
282
- 8. `cft cheftacular_config [display|sync|overwrite]` this command Allows you to interact with your complete cheftacular configuration, the union of all repository's cheftacular.ymls.
300
+ 8. `cft cheftacular_config [diff|display|sync|overwrite]` this command Allows you to interact with your complete cheftacular configuration, the union of all repository's cheftacular.ymls.
283
301
 
284
302
  1. `display` will show the current overall configuration for cheftacular.
285
303
 
286
- 2. `sync` will sync your local cheftacular yaml keys ONTO the server's keys. This happens automatically whenever a difference is detected between the local keys and the remote keys but can be run manually. Will send a slack notification if slack is configured (the slack notification contains the diffed keys). The sync only occurs if there are CHANGES to the file.
304
+ 2. `diff` will show the difference between your current cheftacular.yml and the server's. Run automatically on a sync.
305
+
306
+ 3. `sync` will sync your local cheftacular yaml keys ONTO the server's keys. Will send a slack notification if slack is configured (the slack notification contains the diffed keys). The sync only occurs if there are CHANGES to the file.
307
+
308
+ 9. `cft cheftacular_yml_help KEY` this commandallows you to get help on the meaning of each key in your cheftacular.yml overall config.
287
309
 
288
- 9. `cft clean_cookbooks [force] [remove_cookbooks]` allows you to update the internal chef-repo's cookbooks easily. By default this script will force you to decide what to do with each cookbook individually (shows version numbers and whether to overwrite it to cookbooks or not).
310
+ 1. This command can also by run with `cft yaml_help`.
311
+
312
+ 2. To examine nested keys, you can use colons inbetween the keys like cloud_authentication:rackspace:email
313
+
314
+ 10. `cft clean_cookbooks [force] [remove_cookbooks]` allows you to update the internal chef-repo's cookbooks easily. By default this script will force you to decide what to do with each cookbook individually (shows version numbers and whether to overwrite it to cookbooks or not).
289
315
 
290
316
  1. `force` argument will cause the downloaded cookbooks to *always* overwrite the chef-repo's cookbooks as long as the downloaded cookbook has a higher version number.
291
317
 
292
318
  2. If you would like to remove all the cookbooks on the chef server, run `knife cookbook bulk delete '.*' -p -c ~/.chef/knife.rb`
293
319
 
294
- 10. `cft clear_caches` this command allows you to clear all of your local caches.
320
+ 11. `cft clear_caches` this command allows you to clear all of your local caches.
295
321
 
296
322
  1. This command will force you to refetch all previously cached chef server data on the next `cft` run.
297
323
 
298
- 11. `cft client_list` Allows you check the basic information for all the servers setup via chef. Shows the server's short name, its public ip address and roles (run_list) by default.
324
+ 12. `cft client_list` Allows you check the basic information for all the servers setup via chef. Shows the server's short name, its public ip address and roles (run_list) by default.
299
325
 
300
326
  1. `-v` option will make this command display the server's domain name, whether its password is stored on the chef server and what that password is.
301
327
 
302
328
  2. `-W|--with-priv` option will make this command display the server's local (private) ip address. This address is also the server's `local.<SERVER_DNS_NAME>`.
303
329
 
304
- 3. This command is aliased to `client-list` with no arguments or cft prefix.
305
-
306
- 12. `cft cloud <FIRST_LEVEL_ARG> [<SECOND_LEVEL_ARG>[:<SECOND_LEVEL_ARG_QUERY>]*] ` this command handles talking to various cloud APIs. If no args are passed nothing will happen.
330
+ 13. `cft cloud <FIRST_LEVEL_ARG> [<SECOND_LEVEL_ARG>[:<SECOND_LEVEL_ARG_QUERY>]*] ` this command handles talking to various cloud APIs. If no args are passed nothing will happen.
307
331
 
308
332
  1. `domain` first level argument for interacting with cloud domains
309
333
 
@@ -399,7 +423,7 @@
399
423
 
400
424
  5. `bootstrap` captures the current computer's hostname and checks to see if a key matching this hostname exists on the cloud service. If the key does not exist, the command attempts to read the contents of the ~/.ssh/id_rsa.pub file and create a new key with that data and the hostname of the current computer. Run automatically when creating DigitalOcean servers. It's worth noting that if the computer's key already exists on DigitalOcean under a different name, this specific command will fail with a generic error. Please check your keys.
401
425
 
402
- 13. `cft cloud_bootstrap NODE_NAME FLAVOR_NAME [DESCRIPTOR] [--with-dn DOMAIN]` uses a cloud api to create a server and attaches its DOMAIN_NAME to the TLD specified for that environment (IE: example-staging.com for staging)
426
+ 14. `cft cloud_bootstrap NODE_NAME FLAVOR_NAME [DESCRIPTOR] [--with-dn DOMAIN]` uses a cloud api to create a server and attaches its DOMAIN_NAME to the TLD specified for that environment (IE: example-staging.com for staging)
403
427
 
404
428
  1. If no DOMAIN_NAME is supplied it will use the node's NODE_NAME (IE: api01.example-staging.com)
405
429
 
@@ -409,11 +433,15 @@
409
433
 
410
434
  4. DESCRIPTOR is used as an internal tag for the node, if left blank it will become the name of the node. It is recommended to enter a custom repository-dependent tag here to make nodes easier to load-balance like "lb:[CODEBASE_NAME]"
411
435
 
412
- 14. `cft compile_audit_log [clean]` compiles the audit logs in each environment's audit data bag a audit-log-CURRENTDAY.md file in the log folder of the application. Bear in mind that the bag can only hold 100K bytes and will need to have that data removed to store more than that.
436
+ 15. `cft cloud_bootstrap_from_queue` uses a cloud api to create several servers. It is a wrapper around the cloud_bootstrap command that tries to queue server creation.
413
437
 
414
- 15. `cft compile_readme` compiles all documentation methods and creates a README.md file in the log folder of the application.
438
+ 1. This command cannot be called directly and can only be utilized from `cft environment boot`
415
439
 
416
- 16. `cft create_git_key ID_RSA_FILE [OAUTH_TOKEN]` This command will update the default/authentication data bag with new credentials. The [ID_RSA_FILE](https://help.github.com/articles/generating-ssh-keys) needs to exist beforehand.
440
+ 16. `cft compile_audit_log [clean]` compiles the audit logs in each environment's audit data bag a audit-log-CURRENTDAY.md file in the log folder of the application. Bear in mind that the bag can only hold 100K bytes and will need to have that data removed to store more than that.
441
+
442
+ 17. `cft compile_readme` compiles all documentation methods and creates a README.md file in the log folder of the application.
443
+
444
+ 18. `cft create_git_key ID_RSA_FILE [OAUTH_TOKEN]` This command will update the default/authentication data bag with new credentials. The [ID_RSA_FILE](https://help.github.com/articles/generating-ssh-keys) needs to exist beforehand.
417
445
 
418
446
  1. This command will upload both the private and public key to the data bag. The public key should be the one that matches the github user for your deployment github user.
419
447
 
@@ -421,17 +449,23 @@
421
449
 
422
450
  3. NOTE! The ID_RSA_FILE should be in your .chef folder in the root of your home directory!
423
451
 
424
- 17. `cft disk_report` will fetch useful statistics from every server for every environment and output it into your log directory.
452
+ 19. `cft disk_report` will fetch useful statistics from every server for every environment and output it into your log directory.
425
453
 
426
- 18. `cft environment boot|destroy` will boot / destroy the current environment
454
+ 20. `cft environment boot|boot_without_deploy|destroy|destroy_raw_servers [SERVER_NAMES]` will boot / destroy the current environment
427
455
 
428
456
  1. `boot` will spin up servers and bring them to a stable state. This includes setting up their subdomains for the target environment.
429
457
 
430
458
  2. `destroy` will destroy all servers needed for the target environment
431
459
 
432
- 3. This command will prompt when attempting to destroy servers in staging or production
460
+ 3. `destroy_raw_servers` will destroy the servers without destroying the node data.
461
+
462
+ 4. `boot_without_deploy` will spin up servers and bring them to a state where they are ready to be deployed
433
463
 
434
- 19. `cft file NODE_NAME LOCATION_ALIAS MODE FILE_NAME` interacts with a file on the remote server
464
+ 5. This command will prompt when attempting to destroy servers in staging or production. Additionally, only devops clients will be able to destroy servers in those environments.
465
+
466
+ 6. This command also accepts a *comma delimited list* of server names to boot / destroy instead of all the stored ones for an environment.
467
+
468
+ 21. `cft file NODE_NAME LOCATION_ALIAS MODE FILE_NAME` interacts with a file on the remote server
435
469
 
436
470
  1. `LOCATION_ALIAS` will be parsed as a path if it has backslash characters. Otherwise it will be parsed from your location_aliases hash in your cheftacular.yml
437
471
 
@@ -461,23 +495,23 @@
461
495
 
462
496
  1. `--save-to-file FILE_PATH` can also be used in the `fetch` context to specify where exactly to save the file and what to name it as.
463
497
 
464
- 20. `cft fix_known_hosts [HOSTNAME]` this command will delete entries in your known_hosts file for all the servers that are in our system (ip addresses AND dns names)
498
+ 22. `cft fix_known_hosts [HOSTNAME]` this command will delete entries in your known_hosts file for all the servers that are in our system (ip addresses AND dns names)
465
499
 
466
500
  1. Passing in a hostname will make the command only remove entries with that hostname / ip specifically
467
501
 
468
- 21. `cft full_bootstrap ADDRESS ROOT_PASS NODE_NAME` This command performs both ubuntu_bootstrap and chef_bootstrap.
502
+ 23. `cft full_bootstrap_from_queue` This command performs both ubuntu_bootstrap and chef_bootstrap.
469
503
 
470
- 1. This command is run by `cft cloud_bootstrap` and should not be run on its own unless the target server is already created and not initialized.
504
+ 1. This command is run by `cft cloud_bootstrap` and should not be run on its own.
471
505
 
472
- 22. `cft get_haproxy_log` this command will generate a haproxy html file for the load balancer(s) associated with a repository in the log directory. Opening this log file in the browser will show the status of that haproxy at the time of the log.
506
+ 24. `cft get_haproxy_log` this command will generate a haproxy html file for the load balancer(s) associated with a repository in the log directory. Opening this log file in the browser will show the status of that haproxy at the time of the log.
473
507
 
474
508
  1. In devops mode, this command will not do anything without the -R repository passed.
475
509
 
476
- 23. `cft get_log_from_bag <NODE_NAME-COMMAND_TYPE>` this command grabs the latest command run log from the data bags and saves it to your log directory. There are different types of logs saved per server depending on command.
510
+ 25. `cft get_log_from_bag <NODE_NAME-COMMAND_TYPE>` this command grabs the latest command run log from the data bags and saves it to your log directory. There are different types of logs saved per server depending on command.
477
511
 
478
- 24. `cft get_pg_pass ['clip']` command will output the current environment's pg_password to your terminal. Optionally you can pass in clip like `cft get_pg_pass clip` to have it also copy the pass to your clipboard.
512
+ 26. `cft get_pg_pass ['clip']` command will output the current environment's pg_password to your terminal. Optionally you can pass in clip like `cft get_pg_pass clip` to have it also copy the pass to your clipboard.
479
513
 
480
- 25. `cft get_shorewall_allowed_connections [PATH_TO_LOCAL_FILE] -n NODE_NAME` command will query a single server and return all of its ACCEPT connections from shorewall in it's syslog and return the results in a CSV format. Useful for tracking IP activity.
514
+ 27. `cft get_shorewall_allowed_connections [PATH_TO_LOCAL_FILE] -n NODE_NAME` command will query a single server and return all of its ACCEPT connections from shorewall in it's syslog and return the results in a CSV format. Useful for tracking IP activity.
481
515
 
482
516
  1. You must pass in a node name to query with `-n NODE_NAME`
483
517
 
@@ -485,41 +519,43 @@
485
519
 
486
520
  3. If `PATH_TO_LOCAL_FILE` is not blank, the command will use that file instead of building a file on the remote server
487
521
 
488
- 26. `cft help COMMAND|MODE` this command returns the documentation for a specific command if COMMAND matches the name of a command. Alternatively, it can be passed `action|arguments|application|current|devops|stateless_action` to fetch the commands for a specific mode.Misspellings of commands will display near hits.
522
+ 28. `cft help COMMAND|MODE` this command returns the documentation for a specific command if COMMAND matches the name of a command. Alternatively, it can be passed `action|arguments|application|current|devops|stateless_action` to fetch the commands for a specific mode.Misspellings of commands will display near hits.
489
523
 
490
- 27. `cft initialize_cheftacular_yml [application|TheCheftacularCookbook]` will create a cheftacular.yml file in your config folder (and create the config folder if it does not exist). If you already have a cheftacular.yml file in the config folder, it will create a cheftacular.example.yml file that will contain the new changes / keys in the latest cheftacular version.
524
+ 29. `cft initialize_cheftacular_yml [application|TheCheftacularCookbook]` will create a cheftacular.yml file in your config folder (and create the config folder if it does not exist). If you already have a cheftacular.yml file in the config folder, it will create a cheftacular.example.yml file that will contain the new changes / keys in the latest cheftacular version.
491
525
 
492
526
  1. If `TheCheftacularCookbook` is passed, the generated cheftacular.yml file will include the additional TheCheftacularCookbook keys.
493
527
 
494
528
  2. If `application` is passed, the generated cheftacular.yml file will look like one you could use in an application directory.
495
529
 
496
- 28. `cft initialize_data_bag_contents ENVIRONMENT_NAME` will ensure the data bags always have the correct structure before each run. This command is run every time the gem is started and if called directly, will exit after completion.
530
+ 30. `cft initialize_data_bag_contents ENVIRONMENT_NAME` will ensure the data bags always have the correct structure before each run. This command is run every time the gem is started and if called directly, will exit after completion.
531
+
532
+ 31. `cft knife_upload [force]` will resync the chef-server with the local chef-repo code. This command is analog for `knife upload /`
497
533
 
498
- 29. `cft knife_upload` will resync the chef-server with the local chef-repo code. This command is analog for `knife upload /`
534
+ 1. The force option will add the force option to knife upload.
499
535
 
500
- 30. `cft list_toggleable_roles NODE_NAME` This command will allow you to see all toggleable roles for a node
536
+ 32. `cft list_toggleable_roles NODE_NAME` This command will allow you to see all toggleable roles for a node
501
537
 
502
- 31. `cft location_aliases` will list all location aliases listed in your cheftacular.yml. These aliases can be used in the `cft file` command.
538
+ 33. `cft location_aliases` will list all location aliases listed in your cheftacular.yml. These aliases can be used in the `cft file` command.
503
539
 
504
- 32. `cft pass NODE_NAME` will drop the server's sudo password into your clipboard. Useful for when you need to ssh into the server itself and try advanced linux commands
540
+ 34. `cft pass NODE_NAME` will drop the server's sudo password into your clipboard. Useful for when you need to ssh into the server itself and try advanced linux commands
505
541
 
506
- 33. `cft reinitialize IP_ADDRESS NODE_NAME` will reconnect a server previously managed by chef to a new chef server. The node name MUST MATCH THE NODE'S ORIGINAL NODE NAME for the roles to be setup correctly.
542
+ 35. `cft reinitialize IP_ADDRESS NODE_NAME` will reconnect a server previously managed by chef to a new chef server. The node name MUST MATCH THE NODE'S ORIGINAL NODE NAME for the roles to be setup correctly.
507
543
 
508
- 34. `cft remove_client NODE_NAME [destroy]` removes a client (and its node data) from the chef-server. It also removes its dns records from the cloud service (if possible). This should not be done lightly as you will have to wipe the server and trigger another chef-client run to get it to register again. Alternatively, you can run `cft reinitialize IP_ADDRESS NODE_NAME as well.
544
+ 36. `cft remove_client NODE_NAME [destroy]` removes a client (and its node data) from the chef-server. It also removes its dns records from the cloud service (if possible). This should not be done lightly as you will have to wipe the server and trigger another chef-client run to get it to register again. Alternatively, you can run `cft reinitialize IP_ADDRESS NODE_NAME as well.
509
545
 
510
546
  1. `destroy` deletes the server as well as removing it from the chef environment.
511
547
 
512
548
  2. This command is aliased to `cft remove_node`
513
549
 
514
- 35. `cft replication_status` will check the status of the database master and slaves in every environment. Also lists how far behind the slaves are from the master in milliseconds.
550
+ 37. `cft replication_status` will check the status of the database master and slaves in every environment. Also lists how far behind the slaves are from the master in milliseconds.
515
551
 
516
- 36. `cft reset_bag BAG_NAME` this command allows you to reset a data bag item to an empty state. Run this on full data bags to clear them out.
552
+ 38. `cft reset_bag BAG_NAME` this command allows you to reset a data bag item to an empty state. Run this on full data bags to clear them out.
517
553
 
518
- 37. `cft restart_swap` will restart the swap on every server that doesn't have swap currently on. Useful if you notice servers with no swap activated from `cft disk_report`
554
+ 39. `cft restart_swap` will restart the swap on every server that doesn't have swap currently on. Useful if you notice servers with no swap activated from `cft disk_report`
519
555
 
520
556
  1. There is no risk in running this command. Sometimes swap doesnt reactivate if the server was rebooted and this command fixes that.
521
557
 
522
- 38. `cft role_toggle NODE_NAME ROLE_NAME activate|deactivate` This command will allow you to **toggle** roles on nodes without using `cft upload_nodes`
558
+ 40. `cft role_toggle NODE_NAME ROLE_NAME activate|deactivate` This command will allow you to **toggle** roles on nodes without using `cft upload_nodes`
523
559
 
524
560
  1. This command uses your *role_toggling:deactivated_role_suffix* attribute set in your cheftacular.yml to toggle the role, it checks to see if the toggled name exists then sets the node's run_list to include the toggled role
525
561
 
@@ -531,7 +567,7 @@
531
567
 
532
568
  1. Please run `cft list_toggleable_roles NODE_NAME` to get a list of your org's toggleable roles for a node.
533
569
 
534
- 39. `cft rvm [COMMAND] [ADDITIONAL_COMMANDS]*` will run rvm commands on the remote servers. Output from this command for each server will go into your rvm directory under the log directory. Please refer to [the rvm help page](https://rvm.io/rvm) for more information on rvm commands.
570
+ 41. `cft rvm [COMMAND] [ADDITIONAL_COMMANDS]*` will run rvm commands on the remote servers. Output from this command for each server will go into your rvm directory under the log directory. Please refer to [the rvm help page](https://rvm.io/rvm) for more information on rvm commands.
535
571
 
536
572
  1. When no commands are passed, rvm will just run `rvm list` on each server on all servers in the current environment.
537
573
 
@@ -547,11 +583,11 @@
547
583
 
548
584
  7. `upgrade_rvm` will run `rvm get stable --auth-dotfiles` on all servers for the current environment. It will also check and attempt to upgrade pre 1.25 installations of RVM to 1.26+ (which requires a GPG key).
549
585
 
550
- 40. `cft server_update [restart]` allows you to force update all nodes' packages for a specific environment. This should be done with caution as this *might* break something.
586
+ 42. `cft server_update [restart]` allows you to force update all nodes' packages for a specific environment. This should be done with caution as this *might* break something.
551
587
 
552
588
  1. `cft server_update restart` will prompt to ask if you also want to restart all servers in a rolling restart. This should be done with extreme caution and only in a worst-case scenario.
553
589
 
554
- 41. `cft service [COMMAND] [SERVICE]` will run service commands on remote servers. This command only runs on the first server it comes across. Specify others with -n NODE_NAME.
590
+ 43. `cft service [COMMAND] [SERVICE]` will run service commands on remote servers. This command only runs on the first server it comes across. Specify others with -n NODE_NAME.
555
591
 
556
592
  1. When no commands are passed, the command will list all the services in the /etc/init directory
557
593
 
@@ -559,13 +595,13 @@
559
595
 
560
596
  3. When `restart|stop|start SERVICE` is passed, the command will attempt to restart|stop|start the service if it has a .conf file on the remote server in the /etc/init directory.
561
597
 
562
- 42. `cft slack "MESSAGE" [CHANNEL]` will attempt to post the message to the webhook set in your cheftacular.yml. Slack posts to your default channel by default but if the CHANNEL argument is supplied the message will post there.
598
+ 44. `cft slack "MESSAGE" [CHANNEL]` will attempt to post the message to the webhook set in your cheftacular.yml. Slack posts to your default channel by default but if the CHANNEL argument is supplied the message will post there.
563
599
 
564
600
  1. NOTE: To prevent confusing spam from many possible sources, the username posted to slack will always be *Cheftacular*. This can be overloaded in the StatelessAction method "slack" but this is not recommended.
565
601
 
566
602
  2. Remember, if you have auditing turned on in your cheftacular.yml, you can track who sends what to slack.
567
603
 
568
- 43. `cft test_env [TARGET_ENV] boot|destroy` will create (or destroy) the test nodes for a particular environment (defaults to staging, prod split-envs can be set with `-p`). Please read below for how TARGET_ENV works
604
+ 45. `cft test_env [TARGET_ENV] boot|destroy` will create (or destroy) the test nodes for a particular environment (defaults to staging, prod split-envs can be set with `-p`). Please read below for how TARGET_ENV works
569
605
 
570
606
  1. TARGET_ENV changes functionality depending on the overall (like staging / production) environment
571
607
 
@@ -575,9 +611,11 @@
575
611
 
576
612
  3. The default tld used should change depending on which environment you are booting / destroying. This is set in the environment's config data bag under the tld key
577
613
 
578
- 44. `cft ubuntu_bootstrap ADDRESS ROOT_PASS` This command will bring a fresh server to a state where chef-client can be run on it via `cft chef-bootstrap`. It should be noted that it is in this step where a server's randomized deploy_user sudo password is generated.
614
+ 46. `cft ubuntu_bootstrap_from_queue` This command will bring a fresh server to a state where chef-client can be run on it via `cft chef-bootstrap`. It should be noted that it is in this step where a server's randomized deploy_user sudo password is generated.
579
615
 
580
- 45. `cft update_cloudflare_dns_from_cloud [skip_update_tld]` command will force a full dns update for cloudflare.
616
+ 47. `cft update_cheftacular` this command attempts to update cheftacular to the latest version.
617
+
618
+ 48. `cft update_cloudflare_dns_from_cloud [skip_update_tld]` command will force a full dns update for cloudflare.
581
619
 
582
620
  1. It will ensure all the subdomain entries are correct (based on the contents of the addresses data bag) and update them if they are not. It will also create the local subdomain for the entry as well if it does exist and point it to the correct private address for an environment.
583
621
 
@@ -585,7 +623,7 @@
585
623
 
586
624
  3. The argument `skip_update_tld` will stop the long process of checking and updating all the server domains _before_ cloudflare is updated. Only skip if you believe your domain info on your cloud is accurate.
587
625
 
588
- 46. `cft update_split_branches` will perform a series of git commands that will merge all the split branches for your split_branch enabled repositories with what is currently on master and push them.
626
+ 49. `cft update_split_branches` will perform a series of git commands that will merge all the split branches for your split_branch enabled repositories with what is currently on master and push them.
589
627
 
590
628
  1. Repository must be set with `-R REPOSITORY_NAME` for this command to work.
591
629
 
@@ -595,9 +633,11 @@
595
633
 
596
634
  4. This command will return a helpful error statement if you attempt to run the command with changes to your current working directory. You must commit these changes before running this command.
597
635
 
598
- 47. `cft update_tld TLD` command will force a full dns update for a tld in the preferred cloud. It will ensure all the subdomain entries are correct (based on the contents of the addresses data bag) and update them if they are not. It will also create the local subdomain for the entry as well if it does exist and point it to the correct private address.
636
+ 50. `cft update_thecheftacularcookbook` allows you to update ONLY the internal chef-repo's TheCheftacularCookbook.
637
+
638
+ 51. `cft update_tld TLD` command will force a full dns update for a tld in the preferred cloud. It will ensure all the subdomain entries are correct (based on the contents of the addresses data bag) and update them if they are not. It will also create the local subdomain for the entry as well if it does exist and point it to the correct private address.
599
639
 
600
- 48. `cft upload_nodes` This command will resync the chef server's nodes with the data in our chef-repo/node_roles.
640
+ 52. `cft upload_nodes` This command will resync the chef server's nodes with the data in our chef-repo/node_roles.
601
641
 
602
642
  1. This command changes behavior depending on several factors about both your mode and the state of your environment
603
643
 
@@ -609,4 +649,6 @@
609
649
 
610
650
  1. Due to this, only users running this against their chef-repo need to worry about having a nodes_dir, the way it should be.
611
651
 
612
- 49. `cft upload_roles` This command will resync the chef server's roles with the data in the chef-repo/roles.
652
+ 53. `cft upload_roles` This command will resync the chef server's roles with the data in the chef-repo/roles.
653
+
654
+ 54. `cft version` this command prints out the current version of cheftacular.