machinery-tool 1.17.0 → 1.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (310) hide show
  1. checksums.yaml +4 -4
  2. data/.git_revision +1 -1
  3. data/NEWS +17 -1
  4. data/bin/machinery +1 -1
  5. data/export_helpers/merge_users_and_groups.pl.erb +1 -1
  6. data/html/comparison.html.haml +14 -9
  7. data/html/index.html.haml +5 -2
  8. data/html/landing_page.html.haml +4 -1
  9. data/html/partials/changed_managed_files.html.haml +2 -0
  10. data/html/partials/compare/alert.html.haml +1 -1
  11. data/html/partials/compare/unmanaged_file_list.html.haml +12 -0
  12. data/html/partials/config_files.html.haml +2 -0
  13. data/html/partials/landing_page/alert.html.haml +1 -1
  14. data/html/partials/unmanaged_files.html.haml +14 -0
  15. data/inspect_helpers/changed_files.sh +1 -1
  16. data/inspect_helpers/dpkg_unmanaged_files.sh +1 -1
  17. data/inspect_helpers/yum_repositories.py +1 -1
  18. data/lib/analyze_config_file_diffs_task.rb +1 -1
  19. data/lib/array.rb +1 -1
  20. data/lib/autoyast.rb +34 -34
  21. data/lib/build_task.rb +1 -1
  22. data/lib/cli.rb +21 -6
  23. data/lib/compare_task.rb +1 -1
  24. data/lib/comparison.rb +1 -1
  25. data/lib/config.rb +1 -1
  26. data/lib/config_base.rb +1 -1
  27. data/lib/config_task.rb +1 -1
  28. data/lib/constants.rb +2 -2
  29. data/lib/containerize_task.rb +1 -1
  30. data/lib/containerized_app.rb +1 -1
  31. data/lib/copy_task.rb +1 -1
  32. data/lib/current_user.rb +1 -1
  33. data/lib/deploy_task.rb +1 -1
  34. data/lib/docker_system.rb +4 -5
  35. data/lib/dpkg_database.rb +2 -2
  36. data/lib/element_filter.rb +1 -1
  37. data/lib/exceptions.rb +2 -2
  38. data/lib/export_task.rb +1 -1
  39. data/lib/exporter.rb +1 -1
  40. data/lib/file_diff.rb +1 -1
  41. data/lib/file_scope.rb +1 -1
  42. data/lib/file_validator.rb +1 -1
  43. data/lib/filter.rb +1 -1
  44. data/lib/filter_option_parser.rb +1 -1
  45. data/lib/helper.rb +1 -1
  46. data/lib/hint.rb +1 -1
  47. data/lib/html.rb +1 -1
  48. data/lib/inspect_task.rb +1 -1
  49. data/lib/inspector.rb +1 -1
  50. data/lib/json_schema_monkey_patch.rb +35 -0
  51. data/lib/json_validation_error_cleaner.rb +1 -1
  52. data/lib/json_validator.rb +1 -1
  53. data/lib/kiwi_config.rb +69 -67
  54. data/lib/list_task.rb +1 -1
  55. data/lib/local_system.rb +1 -1
  56. data/lib/logged_cheetah.rb +1 -1
  57. data/lib/machinery.rb +6 -2
  58. data/lib/machinery_helper.rb +28 -8
  59. data/lib/machinery_logger.rb +1 -1
  60. data/lib/man_task.rb +50 -5
  61. data/lib/managed_files_database.rb +24 -17
  62. data/lib/manifest.rb +3 -2
  63. data/lib/migration.rb +1 -1
  64. data/lib/mountpoints.rb +1 -1
  65. data/lib/move_task.rb +1 -1
  66. data/lib/object.rb +1 -1
  67. data/lib/remote_system.rb +2 -2
  68. data/lib/remove_task.rb +1 -1
  69. data/lib/renderer.rb +1 -1
  70. data/lib/renderer_helper.rb +1 -1
  71. data/lib/rpm.rb +1 -1
  72. data/lib/rpm_database.rb +1 -1
  73. data/lib/scope.rb +1 -1
  74. data/lib/scope_file_store.rb +1 -1
  75. data/lib/serve_html_task.rb +1 -1
  76. data/lib/server.rb +32 -2
  77. data/lib/show_task.rb +1 -1
  78. data/lib/system.rb +1 -1
  79. data/lib/system_description.rb +2 -2
  80. data/lib/system_description_memory_store.rb +1 -1
  81. data/lib/system_description_store.rb +1 -1
  82. data/lib/system_file.rb +1 -1
  83. data/lib/tarball.rb +1 -1
  84. data/lib/tee_io.rb +39 -0
  85. data/lib/try.rb +1 -1
  86. data/lib/ui.rb +1 -1
  87. data/lib/upgrade_format_task.rb +1 -1
  88. data/lib/validate_task.rb +1 -1
  89. data/lib/version.rb +2 -2
  90. data/lib/workload_mapper.rb +1 -1
  91. data/lib/workload_mapper_dsl.rb +1 -1
  92. data/lib/zypper.rb +3 -3
  93. data/machinery-helper/Rakefile +2 -8
  94. data/machinery-helper/file_utils.go +28 -0
  95. data/machinery-helper/file_utils_test.go +21 -0
  96. data/machinery-helper/machinery_helper.go +121 -8
  97. data/machinery-helper/machinery_helper_test.go +102 -0
  98. data/machinery-helper/mountpoints_test.go +33 -33
  99. data/machinery-helper/version.go +1 -1
  100. data/man/generated/machinery.1.gz +0 -0
  101. data/manual/custom_theme/base.html +42 -0
  102. data/manual/docs/CNAME +1 -0
  103. data/manual/docs/README.md +128 -0
  104. data/manual/docs/css/bootstrap.min.css +7 -0
  105. data/manual/docs/css/custom.css +788 -0
  106. data/manual/docs/css/fixed-positioning.css +45 -0
  107. data/manual/docs/custom.css +804 -0
  108. data/manual/docs/docs.md +7 -0
  109. data/manual/docs/favicon.png +0 -0
  110. data/manual/docs/hand3.png +0 -0
  111. data/manual/docs/img/arrow.png +0 -0
  112. data/manual/docs/img/background/1.png +0 -0
  113. data/manual/docs/img/background/2.png +0 -0
  114. data/manual/docs/img/background/3.png +0 -0
  115. data/manual/docs/img/background/4.png +0 -0
  116. data/manual/docs/img/background/5.png +0 -0
  117. data/manual/docs/img/background/6.png +0 -0
  118. data/manual/docs/img/background/7.png +0 -0
  119. data/manual/docs/img/bk-cloud.png +0 -0
  120. data/manual/docs/img/bk-sec-15.png +0 -0
  121. data/manual/docs/img/book.png +0 -0
  122. data/manual/docs/img/configuration-discovery.png +0 -0
  123. data/manual/docs/img/dot-line-left.png +0 -0
  124. data/manual/docs/img/dot-line-right.png +0 -0
  125. data/manual/docs/img/gear.png +0 -0
  126. data/manual/docs/img/gear2.png +0 -0
  127. data/manual/docs/img/gear3.png +0 -0
  128. data/manual/docs/img/hand.png +0 -0
  129. data/manual/docs/img/hand2.png +0 -0
  130. data/manual/docs/img/hand3.png +0 -0
  131. data/manual/docs/img/home2.png +0 -0
  132. data/manual/docs/img/moustache.png +0 -0
  133. data/manual/docs/img/navig.png +0 -0
  134. data/manual/docs/img/philo.png +0 -0
  135. data/manual/docs/img/service-migration.png +0 -0
  136. data/manual/docs/img/system-validation.png +0 -0
  137. data/manual/docs/img/ticket2.png +0 -0
  138. data/manual/docs/img/usecase-default.png +0 -0
  139. data/manual/docs/img/usecase1.png +0 -0
  140. data/manual/docs/img/usecase2.png +0 -0
  141. data/manual/docs/img/usecase3.png +0 -0
  142. data/manual/docs/img/usecase4.png +0 -0
  143. data/manual/docs/img/wheels.png +0 -0
  144. data/manual/docs/index.html +402 -0
  145. data/manual/docs/js/bootstrap.min.js +6 -0
  146. data/manual/docs/js/custom.js +148 -0
  147. data/manual/docs/js/jquery.js +4 -0
  148. data/manual/docs/js/jquery.nicescroll.min.js +116 -0
  149. data/manual/docs/js/jquery.pageslide.min.js +11 -0
  150. data/manual/docs/js/parallaxImg.js +146 -0
  151. data/manual/docs/js/skrollr.min.js +2 -0
  152. data/manual/docs/machinery-analyze.1.md +37 -0
  153. data/manual/docs/machinery-build.1.md +62 -0
  154. data/manual/docs/machinery-compare.1.md +63 -0
  155. data/manual/docs/machinery-config.1.md +45 -0
  156. data/manual/docs/machinery-copy.1.md +31 -0
  157. data/manual/docs/machinery-deploy.1.md +71 -0
  158. data/manual/docs/machinery-export-autoyast.1.md +58 -0
  159. data/manual/docs/machinery-export-kiwi.1.md +38 -0
  160. data/manual/docs/machinery-inspect-docker.1.md +108 -0
  161. data/manual/docs/machinery-inspect.1.md +145 -0
  162. data/manual/docs/machinery-list.1.md +51 -0
  163. data/manual/docs/machinery-man.1.md +16 -0
  164. data/manual/docs/machinery-move.1.md +29 -0
  165. data/manual/docs/machinery-remove.1.md +44 -0
  166. data/manual/docs/machinery-serve.1.md +45 -0
  167. data/manual/docs/machinery-show.1.md +63 -0
  168. data/manual/docs/machinery-upgrade-format.1.md +47 -0
  169. data/manual/docs/machinery-validate.1.md +34 -0
  170. data/manual/docs/machinery.ymp +114 -0
  171. data/manual/docs/machinery_main_general.1.md +139 -0
  172. data/manual/docs/machinery_main_scopes.1.md +98 -0
  173. data/manual/docs/machinery_main_usecases.1.md +49 -0
  174. data/manual/docs/machinery_security_implications.1.md +89 -0
  175. data/manual/docs/subcommand-template.1.md +46 -0
  176. data/manual/docs/wheels.png +0 -0
  177. data/manual/mkdocs.yml +30 -0
  178. data/manual/site/CNAME +1 -0
  179. data/manual/site/base.html +42 -0
  180. data/manual/site/css/bootstrap.min.css +7 -0
  181. data/manual/site/css/custom.css +788 -0
  182. data/manual/site/css/fixed-positioning.css +45 -0
  183. data/manual/site/custom.css +804 -0
  184. data/manual/site/docs/index.html +144 -0
  185. data/manual/site/favicon.png +0 -0
  186. data/manual/site/hand3.png +0 -0
  187. data/manual/site/img/arrow.png +0 -0
  188. data/manual/site/img/background/1.png +0 -0
  189. data/manual/site/img/background/2.png +0 -0
  190. data/manual/site/img/background/3.png +0 -0
  191. data/manual/site/img/background/4.png +0 -0
  192. data/manual/site/img/background/5.png +0 -0
  193. data/manual/site/img/background/6.png +0 -0
  194. data/manual/site/img/background/7.png +0 -0
  195. data/manual/site/img/bk-cloud.png +0 -0
  196. data/manual/site/img/bk-sec-15.png +0 -0
  197. data/manual/site/img/book.png +0 -0
  198. data/manual/site/img/configuration-discovery.png +0 -0
  199. data/manual/site/img/dot-line-left.png +0 -0
  200. data/manual/site/img/dot-line-right.png +0 -0
  201. data/manual/site/img/gear.png +0 -0
  202. data/manual/site/img/gear2.png +0 -0
  203. data/manual/site/img/gear3.png +0 -0
  204. data/manual/site/img/hand.png +0 -0
  205. data/manual/site/img/hand2.png +0 -0
  206. data/manual/site/img/hand3.png +0 -0
  207. data/manual/site/img/home2.png +0 -0
  208. data/manual/site/img/moustache.png +0 -0
  209. data/manual/site/img/navig.png +0 -0
  210. data/manual/site/img/philo.png +0 -0
  211. data/manual/site/img/service-migration.png +0 -0
  212. data/manual/site/img/system-validation.png +0 -0
  213. data/manual/site/img/ticket2.png +0 -0
  214. data/manual/site/img/usecase-default.png +0 -0
  215. data/manual/site/img/usecase1.png +0 -0
  216. data/manual/site/img/usecase2.png +0 -0
  217. data/manual/site/img/usecase3.png +0 -0
  218. data/manual/site/img/usecase4.png +0 -0
  219. data/manual/site/img/wheels.png +0 -0
  220. data/manual/site/index.html +402 -0
  221. data/manual/site/js/bootstrap.min.js +6 -0
  222. data/manual/site/js/custom.js +148 -0
  223. data/manual/site/js/jquery.js +4 -0
  224. data/manual/site/js/jquery.nicescroll.min.js +116 -0
  225. data/manual/site/js/jquery.pageslide.min.js +11 -0
  226. data/manual/site/js/parallaxImg.js +146 -0
  227. data/manual/site/js/skrollr.min.js +2 -0
  228. data/manual/site/machinery-analyze.1/index.html +167 -0
  229. data/manual/site/machinery-build.1/index.html +198 -0
  230. data/manual/site/machinery-compare.1/index.html +200 -0
  231. data/manual/site/machinery-config.1/index.html +175 -0
  232. data/manual/site/machinery-copy.1/index.html +164 -0
  233. data/manual/site/machinery-deploy.1/index.html +200 -0
  234. data/manual/site/machinery-export-autoyast.1/index.html +188 -0
  235. data/manual/site/machinery-export-kiwi.1/index.html +169 -0
  236. data/manual/site/machinery-inspect-docker.1/index.html +242 -0
  237. data/manual/site/machinery-inspect.1/index.html +283 -0
  238. data/manual/site/machinery-list.1/index.html +180 -0
  239. data/manual/site/machinery-man.1/index.html +148 -0
  240. data/manual/site/machinery-move.1/index.html +162 -0
  241. data/manual/site/machinery-remove.1/index.html +175 -0
  242. data/manual/site/machinery-serve.1/index.html +174 -0
  243. data/manual/site/machinery-show.1/index.html +199 -0
  244. data/manual/site/machinery-upgrade-format.1/index.html +173 -0
  245. data/manual/site/machinery-validate.1/index.html +161 -0
  246. data/manual/site/machinery.ymp +114 -0
  247. data/manual/site/machinery_main_general.1/index.html +260 -0
  248. data/manual/site/machinery_main_scopes.1/index.html +242 -0
  249. data/manual/site/machinery_main_usecases.1/index.html +182 -0
  250. data/manual/site/machinery_security_implications.1/index.html +223 -0
  251. data/manual/site/mkdocs/js/lunr-0.5.7.min.js +7 -0
  252. data/manual/site/mkdocs/js/mustache.min.js +1 -0
  253. data/manual/site/mkdocs/js/require.js +36 -0
  254. data/manual/site/mkdocs/js/search-results-template.mustache +4 -0
  255. data/manual/site/mkdocs/js/search.js +88 -0
  256. data/manual/site/mkdocs/js/text.js +390 -0
  257. data/manual/site/mkdocs/search_index.json +824 -0
  258. data/manual/site/sitemap.xml +152 -0
  259. data/manual/site/wheels.png +0 -0
  260. data/plugins/changed_managed_files/changed_managed_files_inspector.rb +1 -1
  261. data/plugins/changed_managed_files/changed_managed_files_model.rb +1 -1
  262. data/plugins/changed_managed_files/changed_managed_files_renderer.rb +1 -1
  263. data/plugins/changed_managed_files/schema/system-description-changed-managed-files.schema-v7.json +160 -0
  264. data/plugins/config_files/config_files_inspector.rb +1 -1
  265. data/plugins/config_files/config_files_model.rb +1 -1
  266. data/plugins/config_files/config_files_renderer.rb +1 -1
  267. data/plugins/config_files/schema/system-description-config-files.schema-v7.json +160 -0
  268. data/plugins/environment/environment_inspector.rb +1 -1
  269. data/plugins/environment/environment_model.rb +1 -1
  270. data/plugins/environment/schema/system-description-environment.schema-v7.json +17 -0
  271. data/plugins/groups/groups_inspector.rb +1 -1
  272. data/plugins/groups/groups_model.rb +1 -1
  273. data/plugins/groups/groups_renderer.rb +1 -1
  274. data/plugins/groups/schema/system-description-groups.schema-v7.json +49 -0
  275. data/plugins/os/os_inspector.rb +1 -1
  276. data/plugins/os/os_model.rb +1 -1
  277. data/plugins/os/os_renderer.rb +1 -1
  278. data/plugins/os/schema/system-description-os.schema-v7.json +21 -0
  279. data/plugins/packages/packages_inspector.rb +1 -1
  280. data/plugins/packages/packages_model.rb +1 -1
  281. data/plugins/packages/packages_renderer.rb +1 -1
  282. data/plugins/packages/schema/system-description-packages.schema-v7.json +115 -0
  283. data/plugins/patterns/patterns_inspector.rb +6 -6
  284. data/plugins/patterns/patterns_model.rb +1 -1
  285. data/plugins/patterns/patterns_renderer.rb +1 -1
  286. data/plugins/patterns/schema/system-description-patterns.schema-v7.json +58 -0
  287. data/plugins/repositories/repositories_inspector.rb +16 -16
  288. data/plugins/repositories/repositories_model.rb +1 -1
  289. data/plugins/repositories/repositories_renderer.rb +1 -1
  290. data/plugins/repositories/schema/system-description-repositories.schema-v7.json +165 -0
  291. data/plugins/services/schema/system-description-services.schema-v7.json +93 -0
  292. data/plugins/services/services_inspector.rb +1 -1
  293. data/plugins/services/services_model.rb +1 -1
  294. data/plugins/services/services_renderer.rb +1 -1
  295. data/plugins/unmanaged_files/schema/system-description-unmanaged-files.schema-v6.json +19 -61
  296. data/plugins/unmanaged_files/schema/system-description-unmanaged-files.schema-v7.json +124 -0
  297. data/plugins/unmanaged_files/unmanaged_files_inspector.rb +21 -436
  298. data/plugins/unmanaged_files/unmanaged_files_model.rb +2 -2
  299. data/plugins/unmanaged_files/unmanaged_files_renderer.rb +2 -2
  300. data/plugins/users/schema/system-description-users.schema-v7.json +86 -0
  301. data/plugins/users/users_inspector.rb +1 -1
  302. data/plugins/users/users_model.rb +1 -1
  303. data/plugins/users/users_renderer.rb +1 -1
  304. data/schema/migrations/migrate1to2.rb +1 -1
  305. data/schema/migrations/migrate6to7.rb +38 -0
  306. data/schema/system-description-global.schema-v7.json +43 -0
  307. data/tools/go.rb +92 -0
  308. data/tools/helper_builder.rb +16 -49
  309. metadata +182 -6
  310. data/man/generated/machinery.1.html +0 -1399
@@ -0,0 +1,145 @@
1
+
2
+ # inspect — Inspect Running System
3
+
4
+ ## SYNOPSIS
5
+
6
+ `machinery inspect` [OPTIONS] HOSTNAME
7
+
8
+ `machinery` help inspect
9
+
10
+
11
+ ## DESCRIPTION
12
+
13
+ The `inspect` command inspects a running system and generates a system
14
+ description from the gathered data.
15
+
16
+ The system data is structured into scopes, controlled by the
17
+ `--scope` option.
18
+
19
+ **Note**:
20
+ Machinery will always inspect all specified scopes, and skip scopes which
21
+ trigger errors.
22
+
23
+
24
+ ## ARGUMENTS
25
+
26
+ * `HOSTNAME` (required):
27
+ The host name of the system to be inspected. The host name will also be
28
+ used as the name of the stored system description unless another name is
29
+ provided with the `--name` option.
30
+
31
+
32
+ ## OPTIONS
33
+
34
+ * `-n NAME`, `--name=NAME` (optional):
35
+ Store the system description under the specified name.
36
+
37
+ * `-s SCOPE`, `--scope=SCOPE` (optional):
38
+ Inspect system for specified scope.
39
+ See the [Scope section](machinery_main_scopes.1/index.html) for more information.
40
+
41
+ * `-e SCOPE`, `--exclude-scope=EXCLUDE-SCOPE` (optional):
42
+ Inspect system for all scopes except the specified scope.
43
+ See the [Scope section](machinery_main_scopes.1/index.html) for more information.
44
+
45
+ * `-r USER`, `--remote-user=USER` (optional):
46
+ Defines the user which is used to access the inspected system via SSH.
47
+ This user needs to be allowed to run certain commands using sudo (see
48
+ PREREQUISITES for more information).
49
+ To change the default-user use `machinery config remote-user=USER`
50
+
51
+ * `-p SSH-PORT`, `--ssh-port SSH-PORT` (optional):
52
+ Specifies the SSH port of the remote SSH server.
53
+
54
+ * `-i SSH-IDENTITY-FILE`, `--ssh-identity-file SSH-IDENTITY-FILE` (optional):
55
+ Specifies the SSH private key what should be used to authenticate with the
56
+ remote SSH server. Keys with a passphrase are not allowed here. Use the ssh-agent
57
+ instead.
58
+
59
+ * `-x`, `--extract-files` (optional):
60
+ Extract changed configuration and unmanaged files from the inspected system.
61
+ Shortcut for the combination of `--extract-changed-config-files`,
62
+ `--extract-unmanaged-files`, and `--extract-changed-managed-files`
63
+
64
+ * `--extract-changed-config-files` (optional):
65
+ Extract changed configuration files from the inspected system.
66
+
67
+ * `--extract-unmanaged-files` (optional):
68
+ Extract unmanaged files from the inspected system.
69
+
70
+ * `--extract-changed-managed-files` (optional):
71
+ Extract changed managed files from inspected system.
72
+
73
+ * `--skip-files` (optional):
74
+ Do not consider given files or directories during inspection. Either provide
75
+ one file or directory name or a list of names separated by commas. You can
76
+ also point to a file which contains a list of files to filter (one per line)
77
+ by adding an '@' before the path, e.g.
78
+
79
+ $ `machinery` inspect --skip-files=@/path/to/filter_file myhost
80
+
81
+ If a filename contains a comma it needs to be escaped, e.g.
82
+
83
+ $ `machinery` inspect --skip-files=/file\\,with_comma myhost
84
+
85
+ **Note**: File or directory names are not expanded, e.g. '../path' is taken
86
+ literally and not expanded.
87
+
88
+ * `--verbose` (optional):
89
+ Display the filters which are used during inspection.
90
+
91
+
92
+ ## PREREQUISITES
93
+
94
+ * Inspecting a local system requires running `machinery` as root.
95
+
96
+ * Inspecting a remote system requires passwordless SSH login as root on the
97
+ inspected system.
98
+ Use `ssh-agent` or asymmetric keys (you can transfer the current SSH key
99
+ via `ssh-copy-id` to the inspected host, e.g.: `ssh-copy-id root@HOSTNAME`)
100
+
101
+ * The system to be inspected needs to have the following commands:
102
+
103
+ * `rpm` or `dpkg`
104
+ * `zypper`, `yum`, or `apt-cache`
105
+ * `rsync`
106
+ * `chkconfig`, `initctl`, or `systemctl`
107
+ * `cat`
108
+ * `sed`
109
+ * `find`
110
+ * `tar`
111
+
112
+ * When inspecting as non-root the user needs passwordless sudo rights.
113
+ The following entry in the sudoers file would allow the user `machinery`
114
+ to run sudo without password input:
115
+
116
+ machinery ALL=(ALL) NOPASSWD: ALL
117
+
118
+ * To add a remote `machinery` user run as root:
119
+
120
+ \# `useradd` -m machinery -c "remote user for machinery"
121
+
122
+ To configure a password for the new user run:
123
+
124
+ \# `passwd` machinery
125
+
126
+ ## EXAMPLES
127
+
128
+ * Inspect remote system `myhost` and save system description under name
129
+ 'MySystem':
130
+
131
+ $ `machinery` inspect --name=MySystem myhost
132
+
133
+ * Inspect the installed packages of your local system and save system description
134
+ under the name 'localhost' (you need to become root):
135
+
136
+ \# `machinery` inspect --scope="packages" localhost
137
+
138
+ * Extracts changed managed files and saves them in the same way as changed
139
+ configuration files are saved:
140
+
141
+ $ `machinery` inspect --scope=changed-managed-files --extract-files myhost
142
+
143
+ * To inspect the remote system `myhost` with the user `machinery`:
144
+
145
+ $ `machinery` inspect --remote-user machinery myhost
@@ -0,0 +1,51 @@
1
+
2
+ # list — List System Descriptions
3
+
4
+ ## SYNOPSIS
5
+
6
+ `machinery list` [OPTIONS] [NAME[,NAME2[,NAME3]]]
7
+
8
+ `machinery` help list
9
+
10
+
11
+ ## DESCRIPTION
12
+
13
+ List the specified system descriptions if parameter name is given.
14
+ List all available system descriptions in the internal database if no name parameter is given.
15
+ The list is sorted alphabetically and contains a name and the
16
+ scopes for each system.
17
+
18
+
19
+ ## OPTIONS
20
+
21
+ * `--verbose` (optional):
22
+ Print additional information about the origin of scopes.
23
+ Currently displays [HOSTNAME] and (DATE).
24
+ * `--short` (optional):
25
+ List only descripton names.
26
+ * `--html` (optional):
27
+ Run a web server and open the list of system descriptions in HTML format in
28
+ your web browser using the `xdg-open` command.
29
+
30
+
31
+ ## EXAMPLES
32
+
33
+ * Lists the two specified system descriptions `a` and `b`:
34
+
35
+ $ `machinery` list a b
36
+
37
+ * Lists all available system descriptions:
38
+
39
+ $ `machinery` list
40
+
41
+ * Same as previous command, but additionally prints the date of each scope:
42
+
43
+ $ `machinery` list --verbose
44
+
45
+ * Lists all available system description names without any additional details:
46
+
47
+ $ `machinery` list --short
48
+
49
+ * Opens HTML view of list of all available system descriptions in web browser:
50
+
51
+ $ `machinery` list --html
@@ -0,0 +1,16 @@
1
+
2
+ # man — Shows Man Page
3
+
4
+ ## SYNOPSIS
5
+
6
+ `machinery man` [OPTIONS]
7
+
8
+ ## OPTIONS
9
+
10
+ * `--html` (optional):
11
+ Run a web server and open the documentation in HTML format in your web browser using the
12
+ `xdg-open` command.
13
+
14
+ ## DESCRIPTION
15
+
16
+ The `man` command shows the Machinery man page.
@@ -0,0 +1,29 @@
1
+
2
+ # move — Move System Description
3
+
4
+ ## SYNOPSIS
5
+
6
+ `machinery move`
7
+ FROM_NAME TO_NAME
8
+
9
+ `machinery` help move
10
+
11
+
12
+ ## DESCRIPTION
13
+
14
+ The `move` command renames a stored system description from `FROM_NAME` to `TO_NAME`.
15
+
16
+
17
+ ## ARGUMENTS
18
+ * `FROM_NAME` (required):
19
+ Current name of the system description.
20
+
21
+ * `TO_NAME` (required):
22
+ New name of the system description.
23
+
24
+
25
+ ## EXAMPLES
26
+
27
+ * Rename the system description `earth` to `moon`:
28
+
29
+ $ `machinery` move earth moon
@@ -0,0 +1,44 @@
1
+
2
+ # remove — Remove System Descriptions
3
+
4
+ ## SYNOPSIS
5
+
6
+ `machinery remove` [--all]
7
+ [NAME[,NAME2[,NAME3]]]
8
+
9
+ `machinery` help remove
10
+
11
+
12
+ ## DESCRIPTION
13
+
14
+ The `remove` command removes all specified system descriptions.
15
+
16
+
17
+ ## OPTIONS
18
+
19
+ * `--all` (optional):
20
+ Remove all stored system descriptions.
21
+
22
+ * `--verbose` (optional):
23
+ Explain what is being done.
24
+
25
+
26
+ ## ARGUMENTS
27
+
28
+ * `NAME...` (required):
29
+ Remove specified system descriptions.
30
+
31
+
32
+ ## EXAMPLES
33
+
34
+ * Remove the system description stored as `earth`:
35
+
36
+ $ `machinery` remove earth
37
+
38
+ * Remove the system descriptions stored as `earth` and `moon`:
39
+
40
+ $ `machinery` remove earth moon
41
+
42
+ * Remove all stored system descriptions:
43
+
44
+ $ `machinery` remove --all
@@ -0,0 +1,45 @@
1
+
2
+ # serve — Serve System Descriptions Using A Web Server
3
+
4
+ ## SYNOPSIS
5
+
6
+ `machinery serve` [-p PORT | --port=PORT] [--public]
7
+
8
+ `machinery` help serve
9
+
10
+
11
+ ## DESCRIPTION
12
+
13
+ The `serve` command spawns a web server to view system descriptions as an HTML
14
+ view.
15
+
16
+ By default the server is available from http://127.0.0.1:7585 but both the
17
+ IP address and the port can be configured using the according options.
18
+
19
+ Specific descriptions are available from http://127.0.0.1:7585/NAME, where NAME
20
+ is the name of the system description. If no name is specified in the URL an
21
+ overview of all descriptions is served.
22
+
23
+
24
+ ## OPTIONS
25
+
26
+ * `-p PORT`, `--port=PORT` (optional):
27
+ Specify the port on which the web server will serve the HTML view: Default: 7585
28
+
29
+ Ports can be selected in a range between 2-65535. Ports between 2 and 1023 can only be
30
+ chosen when `machinery` will be executed as `root` user.
31
+
32
+ * `--public` (optional):
33
+ Specifying this option, lets the server listen on each configured IP address. By default
34
+ the server will only listen on the localhost IP address 127.0.0.1
35
+
36
+
37
+ ## EXAMPLES
38
+
39
+ * Start the server with default options:
40
+
41
+ $ `machinery` serve
42
+
43
+ * Make the server available to other machines on the network on port 3000:
44
+
45
+ $ `machinery` serve --public --port 3000
@@ -0,0 +1,63 @@
1
+
2
+ # show — Show System Description
3
+
4
+ ## SYNOPSIS
5
+
6
+ `machinery show` [-s SCOPE | --scope=SCOPE] [-e EXCLUDE-SCOPE | --exclude-scope=EXCLUDE-SCOPE] [--no-pager] [--show-diffs] [--html] NAME
7
+
8
+ `machinery` help show
9
+
10
+
11
+ ## DESCRIPTION
12
+
13
+ The `show` command displays a stored system description.
14
+ Scopes are supported and limit the output to the given scope.
15
+ The hostname of the inspected system and the last modification
16
+ in local time are shown in the title of each scope section.
17
+
18
+
19
+ ## ARGUMENTS
20
+
21
+ * `NAME` (required):
22
+ Use specified system description.
23
+
24
+
25
+ ## OPTIONS
26
+
27
+ * `-s SCOPE`, `--scope=SCOPE` (optional):
28
+ Limit output to the specified scope.
29
+ See the [Scope section](#Scopes) for more information.
30
+ If displaying information related to a scope fails, `show` will print an error message what has failed.
31
+ In case of an error, no content is displayed.
32
+
33
+ * `-e EXCLUDE-SCOPE`, `--exclude-scope=EXCLUDE-SCOPE` (optional):
34
+ Skip output of the specified scope.
35
+ See the [Scope section](#Scopes) for more information.
36
+
37
+ * `--no-pager` (optional):
38
+ Do not pipe output into a pager.
39
+
40
+ * `--show-diffs` (optional):
41
+ Include the generated diffs in the output if available (see `machinery help analyze`
42
+ for more information).
43
+
44
+ * `--html` (optional):
45
+ Run a web server and open the system description in HTML format in your web browser using the
46
+ `xdg-open` command.
47
+
48
+ * `--verbose` (optional):
49
+ Display the filters which were applied before showing the system description.
50
+
51
+ ## EXAMPLES
52
+
53
+ * Show the system description taken from the last inspection, saved as `earth`:
54
+
55
+ $ `machinery` show earth
56
+
57
+ * Show the system description, but limit the scope to repositories only:
58
+
59
+ $ `machinery` show earth -s repositories
60
+
61
+ * Show the list of changed managed files:
62
+
63
+ $ `machinery` show earth --scope=changed-managed-files
@@ -0,0 +1,47 @@
1
+
2
+ # upgrade-format — Upgrade System Description
3
+
4
+ ## SYNOPSIS
5
+
6
+ `machinery upgrade-format` --all
7
+
8
+ `machinery upgrade-format` NAME
9
+
10
+ `machinery` help upgrade-format
11
+
12
+
13
+ ## DESCRIPTION
14
+
15
+ The `upgrade-format` command upgrades a system description to the latest format
16
+ version.
17
+
18
+ The `format` in this context is the structure of the internal system description
19
+ data. If the format version of a system description does not match the current
20
+ `machinery` format version, `machinery` is no longer able to work with the data
21
+ until it is upgraded. The current format version can be retrieved using
22
+ `machinery --version`. The format version of a system description can be found
23
+ in the `meta` section of the according `manifest.json` file.
24
+
25
+ If the `--all` switch is given all local descriptions will be upgraded.
26
+
27
+
28
+ ## OPTIONS
29
+
30
+ * `--all` (optional):
31
+ Upgrade all stored system descriptions.
32
+
33
+ ## ARGUMENTS
34
+
35
+ * `NAME` (optional):
36
+ Upgrade specified system description.
37
+
38
+
39
+ ## EXAMPLES
40
+
41
+ * Upgrade the system description stored as `earth`:
42
+
43
+ $ `machinery` upgrade-format earth
44
+
45
+ * Upgrade all stored system descriptions:
46
+
47
+ $ `machinery` upgrade-format --all