machinery-tool 1.21.0 → 1.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.git_revision +1 -1
- data/NEWS +8 -0
- data/html/index.html.haml +8 -7
- data/html/partials/changed_config_files.html.haml +1 -1
- data/html/partials/changed_managed_files.html.haml +1 -1
- data/html/partials/unmanaged_files.html.haml +2 -2
- data/lib/cli.rb +26 -4
- data/lib/diff_widget.rb +73 -0
- data/lib/dpkg_database.rb +16 -1
- data/lib/haml_helpers.rb +60 -0
- data/lib/kiwi_config.rb +7 -0
- data/lib/machinery.rb +3 -0
- data/lib/man_task.rb +3 -2
- data/lib/move_task.rb +1 -0
- data/lib/remote_system.rb +4 -0
- data/lib/server.rb +2 -105
- data/lib/static_html.rb +75 -0
- data/lib/system.rb +2 -1
- data/lib/system_description.rb +10 -0
- data/lib/version.rb +1 -1
- data/machinery-helper/version.go +1 -1
- data/man/generated/machinery.1.gz +0 -0
- data/manual/docs/README.md +8 -16
- data/manual/docs/docs.md +42 -4
- data/manual/docs/index.html +6 -2
- data/manual/docs/machinery-analyze.1.md +6 -10
- data/manual/docs/machinery-build.1.md +7 -11
- data/manual/docs/machinery-compare.1.md +5 -10
- data/manual/docs/machinery-config.1.md +4 -7
- data/manual/docs/machinery-copy.1.md +5 -10
- data/manual/docs/machinery-deploy.1.md +8 -12
- data/manual/docs/machinery-export-autoyast.1.md +10 -17
- data/manual/docs/machinery-export-html.1.md +32 -0
- data/manual/docs/machinery-export-kiwi.1.md +7 -12
- data/manual/docs/{machinery-inspect-docker.1.md → machinery-inspect-container.1.md} +10 -15
- data/manual/docs/machinery-inspect.1.md +10 -15
- data/manual/docs/machinery-list.1.md +4 -8
- data/manual/docs/machinery-man.1.md +4 -6
- data/manual/docs/machinery-move.1.md +4 -8
- data/manual/docs/machinery-remove.1.md +5 -10
- data/manual/docs/machinery-serve.1.md +5 -9
- data/manual/docs/machinery-show.1.md +7 -11
- data/manual/docs/machinery-upgrade-format.1.md +5 -9
- data/manual/docs/machinery-validate.1.md +4 -8
- data/manual/docs/machinery_main_general.1.md +33 -51
- data/manual/docs/machinery_main_scopes.1.md +13 -14
- data/manual/docs/{machinery_security_implications.1.md → machinery_main_security_implications.1.md} +15 -15
- data/manual/docs/machinery_main_usecases.1.md +2 -30
- data/manual/mkdocs.yml +9 -9
- data/manual/site/docs/index.html +71 -25
- data/manual/site/index.html +6 -2
- data/manual/site/machinery-analyze.1/index.html +34 -27
- data/manual/site/machinery-build.1/index.html +35 -28
- data/manual/site/machinery-compare.1/index.html +33 -26
- data/manual/site/machinery-config.1/index.html +32 -25
- data/manual/site/machinery-copy.1/index.html +33 -27
- data/manual/site/machinery-deploy.1/index.html +36 -29
- data/manual/site/machinery-export-autoyast.1/index.html +38 -32
- data/manual/site/machinery-export-html.1/index.html +175 -0
- data/manual/site/machinery-export-kiwi.1/index.html +35 -28
- data/manual/site/machinery-inspect-container.1/index.html +249 -0
- data/manual/site/machinery-inspect.1/index.html +38 -31
- data/manual/site/machinery-list.1/index.html +32 -25
- data/manual/site/machinery-man.1/index.html +32 -26
- data/manual/site/machinery-move.1/index.html +32 -25
- data/manual/site/machinery-remove.1/index.html +33 -26
- data/manual/site/machinery-serve.1/index.html +33 -26
- data/manual/site/machinery-show.1/index.html +35 -28
- data/manual/site/machinery-upgrade-format.1/index.html +33 -26
- data/manual/site/machinery-validate.1/index.html +32 -25
- data/manual/site/machinery_main_general.1/index.html +63 -70
- data/manual/site/machinery_main_scopes.1/index.html +41 -36
- data/manual/site/machinery_main_security_implications.1/index.html +228 -0
- data/manual/site/machinery_main_usecases.1/index.html +30 -48
- data/manual/site/mkdocs/search_index.json +246 -201
- data/manual/site/sitemap.xml +40 -30
- data/plugins/os/os_inspector.rb +1 -1
- data/plugins/packages/packages.yml +1 -1
- data/plugins/patterns/patterns.yml +2 -5
- data/plugins/repositories/repositories.yml +2 -2
- data/plugins/unmanaged_files/unmanaged_files.yml +3 -3
- data/plugins/unmanaged_files/unmanaged_files_renderer.rb +1 -1
- metadata +11 -5
- data/manual/docs/subcommand-template.1.md +0 -46
@@ -1,30 +1,25 @@
|
|
1
|
-
|
2
1
|
# copy — Copy System Description
|
3
2
|
|
4
|
-
##
|
3
|
+
## Synopsis
|
5
4
|
|
6
|
-
`machinery copy`
|
7
|
-
FROM_NAME TO_NAME
|
5
|
+
`machinery copy` FROM_NAME TO_NAME
|
8
6
|
|
9
7
|
`machinery` help copy
|
10
8
|
|
11
|
-
|
12
|
-
## DESCRIPTION
|
9
|
+
## Description
|
13
10
|
|
14
11
|
The `copy` command copies a stored system description. It creates a new
|
15
12
|
description named TO_NAME containing the same content as the description
|
16
13
|
FROM_NAME.
|
17
14
|
|
18
|
-
|
19
|
-
## ARGUMENTS
|
15
|
+
## Arguments
|
20
16
|
* `FROM_NAME` (required):
|
21
17
|
Name of the source system description.
|
22
18
|
|
23
19
|
* `TO_NAME` (required):
|
24
20
|
Name of the target system description.
|
25
21
|
|
26
|
-
|
27
|
-
## EXAMPLES
|
22
|
+
## Examples
|
28
23
|
|
29
24
|
* Create a copy of the system description `earth` under the name `moon`:
|
30
25
|
|
@@ -1,7 +1,6 @@
|
|
1
|
-
|
2
1
|
# deploy — Deploy Image to OpenStack Cloud
|
3
2
|
|
4
|
-
##
|
3
|
+
## Synopsis
|
5
4
|
|
6
5
|
`machinery deploy` NAME -c CONFIG_FILE | --cloud-config=CONFIG_FILE
|
7
6
|
[-i IMAGE_DIR | --image-dir=IMAGE_DIR]
|
@@ -10,11 +9,10 @@
|
|
10
9
|
|
11
10
|
`machinery` help [deploy]
|
12
11
|
|
13
|
-
|
14
|
-
## DESCRIPTION
|
12
|
+
## Description
|
15
13
|
|
16
14
|
The `deploy` command builds and deploys an image to an OpenStack cloud.
|
17
|
-
This command is particularly useful for testing, debugging, or
|
15
|
+
This command is particularly useful for testing, debugging, or validation.
|
18
16
|
|
19
17
|
|
20
18
|
> #### NOTE: Set Password for Unattended Work
|
@@ -30,14 +28,12 @@ This command is particularly useful for testing, debugging, or for validation.
|
|
30
28
|
>
|
31
29
|
> export OS_PASSWORD=YOUR_PASSWORD
|
32
30
|
|
33
|
-
|
34
|
-
## ARGUMENTS
|
31
|
+
## Arguments
|
35
32
|
|
36
33
|
* `NAME` (required):
|
37
34
|
Name of the system description.
|
38
35
|
|
39
|
-
|
40
|
-
## OPTIONS
|
36
|
+
## Options
|
41
37
|
|
42
38
|
* `-c CONFIG_FILE`, `--cloud-config=CONFIG_FILE` (required):
|
43
39
|
Path to file where the cloud config (openrc.sh) is located.
|
@@ -53,16 +49,16 @@ This command is particularly useful for testing, debugging, or for validation.
|
|
53
49
|
Allow to make "insecure" HTTPS requests, without checking the SSL
|
54
50
|
certificate when uploading to the cloud.
|
55
51
|
|
56
|
-
##
|
52
|
+
## Prerequisites
|
57
53
|
|
58
54
|
* The `deploy` command requires the packages `kiwi` for building the image
|
59
55
|
and `python-glanceclient` for uploading the image to the cloud.
|
60
56
|
|
61
|
-
##
|
57
|
+
## Supported Architectures
|
62
58
|
|
63
59
|
Machinery only supports deploying x86_64 images on x86_64 systems.
|
64
60
|
|
65
|
-
##
|
61
|
+
## Examples
|
66
62
|
|
67
63
|
* Build an image under the system description named `jeos`.
|
68
64
|
Deploy it to the OpenStack cloud name `tux-cloud` by using the
|
@@ -1,37 +1,32 @@
|
|
1
|
-
|
2
1
|
# export-autoyast — Export System Description as AutoYasST profile
|
3
2
|
|
4
|
-
##
|
3
|
+
## Synopsis
|
5
4
|
|
6
|
-
`machinery export-autoyast` -a | --autoyast-dir NAME
|
5
|
+
`machinery export-autoyast` -a | --autoyast-dir=DIRECTORY NAME
|
7
6
|
--force
|
8
7
|
|
9
8
|
`machinery` help export-autoyast
|
10
9
|
|
10
|
+
## Description
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
The `export-autoyast` subcommand exports a stored system description as a AutoYaST
|
12
|
+
The `export-autoyast` subcommand exports a stored system description as an AutoYaST
|
15
13
|
profile.
|
16
14
|
|
17
|
-
|
18
|
-
## ARGUMENTS
|
15
|
+
## Arguments
|
19
16
|
|
20
17
|
* `NAME` (required):
|
21
18
|
Name of the system description.
|
22
19
|
|
23
|
-
|
24
|
-
## OPTIONS
|
20
|
+
## Options
|
25
21
|
|
26
22
|
* `-a AUTOYAST_DIR`, `--autoyast-dir=AUTOYAST_DIR` (required):
|
27
23
|
Write the AutoYaST profile to a subdirectory at the specified directory. The directory
|
28
24
|
will be created if it does not exist yet.
|
29
25
|
|
30
26
|
* `--force` (optional):
|
31
|
-
Overwrite existing
|
32
|
-
|
27
|
+
Overwrite an existing output directory.
|
33
28
|
|
34
|
-
##
|
29
|
+
## System Registration
|
35
30
|
|
36
31
|
* To register a SLES 12 system automatically with AutoYaST, it is required to
|
37
32
|
edit the generated profile. The following example registers the system with
|
@@ -47,11 +42,9 @@ profile.
|
|
47
42
|
</suse_register>
|
48
43
|
```
|
49
44
|
|
50
|
-
* More information can be found at the SUSE AutoYaST documentation.
|
51
|
-
https://www.suse.com/documentation/sles-12/singlehtml/book_autoyast/book_autoyast.html
|
52
|
-
|
45
|
+
* More information can be found at the [SUSE AutoYaST documentation](https://www.suse.com/documentation/sles-12/singlehtml/book_autoyast/book_autoyast.html).
|
53
46
|
|
54
|
-
##
|
47
|
+
## Examples
|
55
48
|
|
56
49
|
* Export the `myhost` system description to `/tmp/myhost-autoyast`:
|
57
50
|
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# export-html — Export System Description as HTML
|
2
|
+
|
3
|
+
## Synopsis
|
4
|
+
|
5
|
+
`machinery export-html` -d | --html-dir=DIRECTORY NAME
|
6
|
+
--force
|
7
|
+
|
8
|
+
`machinery` help export-html
|
9
|
+
|
10
|
+
## Description
|
11
|
+
|
12
|
+
The `export-html` subcommand exports a stored system description as HTML.
|
13
|
+
|
14
|
+
## Arguments
|
15
|
+
|
16
|
+
* `NAME` (required):
|
17
|
+
Name of the system description.
|
18
|
+
|
19
|
+
## Options
|
20
|
+
|
21
|
+
* `-d DIRECTORY`, `--html-dir=DIRECTORY` (required):
|
22
|
+
Write the HTML page and assets to this directory. The directory will
|
23
|
+
be created if it does not exist yet.
|
24
|
+
|
25
|
+
* `--force` (optional):
|
26
|
+
Delete the directory if it exists and recreate it.
|
27
|
+
|
28
|
+
## Examples
|
29
|
+
|
30
|
+
* Export the `myhost` system description to `/tmp/myhost-html`:
|
31
|
+
|
32
|
+
$ `machinery` export-html --html-dir=/tmp myhost
|
@@ -1,37 +1,32 @@
|
|
1
|
-
|
2
1
|
# export-kiwi — Export System Description as KIWI Image Description
|
3
2
|
|
4
|
-
##
|
3
|
+
## Synopsis
|
5
4
|
|
6
|
-
`machinery export-kiwi` -k | --kiwi-dir NAME
|
5
|
+
`machinery export-kiwi` -k | --kiwi-dir=DIRECTORY NAME
|
7
6
|
--force
|
8
7
|
|
9
8
|
`machinery` help export-kiwi
|
10
9
|
|
11
|
-
|
12
|
-
## DESCRIPTION
|
10
|
+
## Description
|
13
11
|
|
14
12
|
The `export-kiwi` subcommand exports a stored system description as a KIWI
|
15
13
|
image description.
|
16
14
|
|
17
|
-
|
18
|
-
## ARGUMENTS
|
15
|
+
## Arguments
|
19
16
|
|
20
17
|
* `NAME` (required):
|
21
18
|
Name of the system description.
|
22
19
|
|
23
|
-
|
24
|
-
## OPTIONS
|
20
|
+
## Options
|
25
21
|
|
26
22
|
* `-k KIWI_DIR`, `--kiwi-dir=KIWI_DIR` (required):
|
27
23
|
Write the KIWI image description to a subdirectory at the specified directory. The directory
|
28
24
|
will be created if it does not exist yet.
|
29
25
|
|
30
26
|
* `--force` (optional):
|
31
|
-
Overwrite existing
|
32
|
-
|
27
|
+
Overwrite an existing output directory.
|
33
28
|
|
34
|
-
##
|
29
|
+
## Examples
|
35
30
|
|
36
31
|
* Export the `myhost` system description to `/tmp/myhost-kiwi`:
|
37
32
|
|
@@ -1,7 +1,6 @@
|
|
1
|
-
|
2
1
|
# inspect-container — Inspect Container
|
3
2
|
|
4
|
-
##
|
3
|
+
## Synopsis
|
5
4
|
|
6
5
|
`machinery inspect-container` [OPTIONS] IMAGENAME
|
7
6
|
|
@@ -9,8 +8,7 @@
|
|
9
8
|
|
10
9
|
`machinery` help inspect-container
|
11
10
|
|
12
|
-
|
13
|
-
## DESCRIPTION
|
11
|
+
## Description
|
14
12
|
|
15
13
|
The `inspect-container` command inspects a container image. It creates and starts the container from the provided image before inspection
|
16
14
|
and generates a system description from the gathered data. After the inspection the container will be killed and removed again.
|
@@ -25,27 +23,25 @@ The system data is structured into scopes, controlled by the
|
|
25
23
|
Machinery will always inspect all specified scopes, and skip scopes which
|
26
24
|
trigger errors.
|
27
25
|
|
28
|
-
|
29
|
-
## ARGUMENTS
|
26
|
+
## Arguments
|
30
27
|
|
31
28
|
* `IMAGENAME / IMAGEID` (required):
|
32
|
-
The name or
|
29
|
+
The name or ID of the image to be inspected. The provided name or ID will also be
|
33
30
|
used as the name of the stored system description unless another name is
|
34
31
|
provided with the `--name` option.
|
35
32
|
|
36
|
-
|
37
|
-
## OPTIONS
|
33
|
+
## Options
|
38
34
|
|
39
35
|
* `-n NAME`, `--name=NAME` (optional):
|
40
36
|
Store the system description under the specified name.
|
41
37
|
|
42
38
|
* `-s SCOPE`, `--scope=SCOPE` (optional):
|
43
39
|
Inspect image for specified scope.
|
44
|
-
See the [Scope section](
|
40
|
+
See the [Scope section](machinery_main_scopes.1/) for more information.
|
45
41
|
|
46
42
|
* `-e SCOPE`, `--ignore-scope=IGNORE-SCOPE` (optional):
|
47
43
|
Inspect image for all scopes except the specified scope.
|
48
|
-
See the [Scope section](
|
44
|
+
See the [Scope section](machinery_main_scopes.1/) for more information.
|
49
45
|
|
50
46
|
* `-x`, `--extract-files` (optional):
|
51
47
|
Extract changed configuration and unmanaged files from the inspected container.
|
@@ -79,10 +75,9 @@ trigger errors.
|
|
79
75
|
* `--verbose` (optional):
|
80
76
|
Display the filters which are used during inspection.
|
81
77
|
|
78
|
+
## Prerequisites
|
82
79
|
|
83
|
-
|
84
|
-
|
85
|
-
* Inspecting a container requires an image specified by the name or id.
|
80
|
+
* Inspecting a container requires an image specified by the name or ID.
|
86
81
|
|
87
82
|
* The image to be inspected needs to have the following commands:
|
88
83
|
|
@@ -93,7 +88,7 @@ trigger errors.
|
|
93
88
|
* `sed`
|
94
89
|
* `find`
|
95
90
|
|
96
|
-
##
|
91
|
+
## Examples
|
97
92
|
|
98
93
|
* Inspect Docker container `myimage` and save system description under name 'MyContainer':
|
99
94
|
|
@@ -1,14 +1,12 @@
|
|
1
|
-
|
2
1
|
# inspect — Inspect Running System
|
3
2
|
|
4
|
-
##
|
3
|
+
## Synopsis
|
5
4
|
|
6
5
|
`machinery inspect` [OPTIONS] HOSTNAME
|
7
6
|
|
8
7
|
`machinery` help inspect
|
9
8
|
|
10
|
-
|
11
|
-
## DESCRIPTION
|
9
|
+
## Description
|
12
10
|
|
13
11
|
The `inspect` command inspects a running system and generates a system
|
14
12
|
description from the gathered data.
|
@@ -23,32 +21,30 @@ trigger errors.
|
|
23
21
|
**Note**:
|
24
22
|
Tasks on Debian-like systems are treated as patterns.
|
25
23
|
|
26
|
-
|
27
|
-
## ARGUMENTS
|
24
|
+
## Arguments
|
28
25
|
|
29
26
|
* `HOSTNAME` (required):
|
30
27
|
The host name of the system to be inspected. The host name will also be
|
31
28
|
used as the name of the stored system description unless another name is
|
32
29
|
provided with the `--name` option.
|
33
30
|
|
34
|
-
|
35
|
-
## OPTIONS
|
31
|
+
## Options
|
36
32
|
|
37
33
|
* `-n NAME`, `--name=NAME` (optional):
|
38
34
|
Store the system description under the specified name.
|
39
35
|
|
40
36
|
* `-s SCOPE`, `--scope=SCOPE` (optional):
|
41
37
|
Inspect system for specified scope.
|
42
|
-
See the [Scope section](machinery_main_scopes.1/
|
38
|
+
See the [Scope section](machinery_main_scopes.1/) for more information.
|
43
39
|
|
44
40
|
* `-e SCOPE`, `--ignore-scope=IGNORE-SCOPE` (optional):
|
45
41
|
Inspect system for all scopes except the specified scope.
|
46
|
-
See the [Scope section](machinery_main_scopes.1/
|
42
|
+
See the [Scope section](machinery_main_scopes.1/) for more information.
|
47
43
|
|
48
44
|
* `-r USER`, `--remote-user=USER` (optional):
|
49
45
|
Defines the user which is used to access the inspected system via SSH.
|
50
46
|
This user needs to be allowed to run certain commands using sudo (see
|
51
|
-
|
47
|
+
Prerequisites for more information).
|
52
48
|
To change the default-user use `machinery config remote-user=USER`
|
53
49
|
|
54
50
|
* `-p SSH-PORT`, `--ssh-port SSH-PORT` (optional):
|
@@ -91,15 +87,14 @@ Tasks on Debian-like systems are treated as patterns.
|
|
91
87
|
* `--verbose` (optional):
|
92
88
|
Display the filters which are used during inspection.
|
93
89
|
|
94
|
-
|
95
|
-
## PREREQUISITES
|
90
|
+
## Prerequisites
|
96
91
|
|
97
92
|
* Inspecting a local system requires running `machinery` as root.
|
98
93
|
|
99
94
|
* Inspecting a remote system requires passwordless SSH login as root on the
|
100
95
|
inspected system.
|
101
96
|
Use `ssh-agent` or asymmetric keys (you can transfer the current SSH key
|
102
|
-
via `ssh-copy-id` to the inspected host, e.g.: `ssh-copy-id root@HOSTNAME`)
|
97
|
+
via `ssh-copy-id` to the inspected host, e.g.: `ssh-copy-id root@HOSTNAME`).
|
103
98
|
|
104
99
|
* The system to be inspected needs to have the following commands:
|
105
100
|
|
@@ -126,7 +121,7 @@ Tasks on Debian-like systems are treated as patterns.
|
|
126
121
|
|
127
122
|
\# `passwd` machinery
|
128
123
|
|
129
|
-
##
|
124
|
+
## Examples
|
130
125
|
|
131
126
|
* Inspect remote system `myhost` and save system description under name
|
132
127
|
'MySystem':
|
@@ -1,22 +1,19 @@
|
|
1
|
-
|
2
1
|
# list — List System Descriptions
|
3
2
|
|
4
|
-
##
|
3
|
+
## Synopsis
|
5
4
|
|
6
5
|
`machinery list` [OPTIONS] [NAME[,NAME2[,NAME3]]]
|
7
6
|
|
8
7
|
`machinery` help list
|
9
8
|
|
10
|
-
|
11
|
-
## DESCRIPTION
|
9
|
+
## Description
|
12
10
|
|
13
11
|
List the specified system descriptions if parameter name is given.
|
14
12
|
List all available system descriptions in the internal database if no name parameter is given.
|
15
13
|
The list is sorted alphabetically and contains a name and the
|
16
14
|
scopes for each system.
|
17
15
|
|
18
|
-
|
19
|
-
## OPTIONS
|
16
|
+
## Options
|
20
17
|
|
21
18
|
* `--verbose` (optional):
|
22
19
|
Print additional information about the origin of scopes.
|
@@ -27,8 +24,7 @@ scopes for each system.
|
|
27
24
|
Run a web server and open the list of system descriptions in HTML format in
|
28
25
|
your web browser using the `xdg-open` command.
|
29
26
|
|
30
|
-
|
31
|
-
## EXAMPLES
|
27
|
+
## Examples
|
32
28
|
|
33
29
|
* Lists the two specified system descriptions `a` and `b`:
|
34
30
|
|
@@ -1,16 +1,14 @@
|
|
1
|
-
|
2
1
|
# man — Shows Man Page
|
3
2
|
|
4
|
-
##
|
3
|
+
## Synopsis
|
5
4
|
|
6
5
|
`machinery man` [OPTIONS]
|
7
6
|
|
8
|
-
##
|
7
|
+
## Options
|
9
8
|
|
10
9
|
* `--html` (optional):
|
11
|
-
Run a web server and open the documentation in HTML format in your web browser
|
12
|
-
`xdg-open` command.
|
10
|
+
Run a web server and open the documentation in HTML format in your web browser.
|
13
11
|
|
14
|
-
##
|
12
|
+
## Description
|
15
13
|
|
16
14
|
The `man` command shows the Machinery man page.
|