hybrid_platforms_conductor 32.12.0 → 32.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1103 -0
  3. data/LICENSE.md +31 -0
  4. data/README.md +395 -0
  5. data/bin/setup +1 -1
  6. data/docs/api.md +349 -0
  7. data/docs/config_dsl.md +315 -0
  8. data/docs/executables.md +226 -0
  9. data/docs/executables/check-node.md +155 -0
  10. data/docs/executables/deploy.md +198 -0
  11. data/docs/executables/dump_nodes_json.md +110 -0
  12. data/docs/executables/free_ips.md +93 -0
  13. data/docs/executables/free_veids.md +73 -0
  14. data/docs/executables/get_impacted_nodes.md +94 -0
  15. data/docs/executables/last_deploys.md +114 -0
  16. data/docs/executables/nodes_to_deploy.md +139 -0
  17. data/docs/executables/report.md +159 -0
  18. data/docs/executables/run.md +126 -0
  19. data/docs/executables/setup.md +92 -0
  20. data/docs/executables/ssh_config.md +151 -0
  21. data/docs/executables/test.md +213 -0
  22. data/docs/executables/topograph.md +139 -0
  23. data/docs/gen/mermaid/README.md-0.png +0 -0
  24. data/docs/gen/mermaid/docs/executables/check-node.md-0.png +0 -0
  25. data/docs/gen/mermaid/docs/executables/deploy.md-0.png +0 -0
  26. data/docs/gen/mermaid/docs/executables/free_ips.md-0.png +0 -0
  27. data/docs/gen/mermaid/docs/executables/free_veids.md-0.png +0 -0
  28. data/docs/gen/mermaid/docs/executables/get_impacted_nodes.md-0.png +0 -0
  29. data/docs/gen/mermaid/docs/executables/last_deploys.md-0.png +0 -0
  30. data/docs/gen/mermaid/docs/executables/nodes_to_deploy.md-0.png +0 -0
  31. data/docs/gen/mermaid/docs/executables/report.md-0.png +0 -0
  32. data/docs/gen/mermaid/docs/executables/run.md-0.png +0 -0
  33. data/docs/gen/mermaid/docs/executables/setup.md-0.png +0 -0
  34. data/docs/gen/mermaid/docs/executables/ssh_config.md-0.png +0 -0
  35. data/docs/gen/mermaid/docs/executables/test.md-0.png +0 -0
  36. data/docs/install.md +161 -0
  37. data/docs/plugins.md +215 -0
  38. data/docs/plugins/action/bash.md +37 -0
  39. data/docs/plugins/action/interactive.md +37 -0
  40. data/docs/plugins/action/remote_bash.md +67 -0
  41. data/docs/plugins/action/ruby.md +69 -0
  42. data/docs/plugins/action/scp.md +61 -0
  43. data/docs/plugins/cmdb/config.md +46 -0
  44. data/docs/plugins/cmdb/host_ip.md +33 -0
  45. data/docs/plugins/cmdb/host_keys.md +33 -0
  46. data/docs/plugins/cmdb/platform_handlers.md +33 -0
  47. data/docs/plugins/connector/local.md +28 -0
  48. data/docs/plugins/connector/ssh.md +95 -0
  49. data/docs/plugins/platform_handler/yaml_inventory.md +105 -0
  50. data/docs/plugins/provisioner/docker.md +27 -0
  51. data/docs/plugins/provisioner/podman.md +27 -0
  52. data/docs/plugins/provisioner/proxmox.md +115 -0
  53. data/docs/plugins/report/confluence.md +49 -0
  54. data/docs/plugins/report/mediawiki.md +28 -0
  55. data/docs/plugins/report/stdout.md +32 -0
  56. data/docs/plugins/test/bitbucket_conf.md +97 -0
  57. data/docs/plugins/test/can_be_checked.md +27 -0
  58. data/docs/plugins/test/check_deploy_and_idempotence.md +61 -0
  59. data/docs/plugins/test/check_from_scratch.md +28 -0
  60. data/docs/plugins/test/connection.md +27 -0
  61. data/docs/plugins/test/deploy_freshness.md +27 -0
  62. data/docs/plugins/test/deploy_from_scratch.md +28 -0
  63. data/docs/plugins/test/deploy_removes_root_access.md +29 -0
  64. data/docs/plugins/test/divergence.md +41 -0
  65. data/docs/plugins/test/executables.md +26 -0
  66. data/docs/plugins/test/file_system.md +49 -0
  67. data/docs/plugins/test/file_system_hdfs.md +65 -0
  68. data/docs/plugins/test/hostname.md +27 -0
  69. data/docs/plugins/test/idempotence.md +56 -0
  70. data/docs/plugins/test/ip.md +28 -0
  71. data/docs/plugins/test/jenkins_ci_conf.md +54 -0
  72. data/docs/plugins/test/jenkins_ci_masters_ok.md +54 -0
  73. data/docs/plugins/test/linear_strategy.md +26 -0
  74. data/docs/plugins/test/local_users.md +48 -0
  75. data/docs/plugins/test/mounts.md +55 -0
  76. data/docs/plugins/test/orphan_files.md +38 -0
  77. data/docs/plugins/test/ports.md +50 -0
  78. data/docs/plugins/test/private_ips.md +27 -0
  79. data/docs/plugins/test/public_ips.md +27 -0
  80. data/docs/plugins/test/spectre.md +26 -0
  81. data/docs/plugins/test/veids.md +27 -0
  82. data/docs/plugins/test/vulnerabilities.md +65 -0
  83. data/docs/plugins/test_report/confluence.md +43 -0
  84. data/docs/plugins/test_report/stdout.md +26 -0
  85. data/docs/plugins_create.md +135 -0
  86. data/docs/tutorial.md +57 -0
  87. data/docs/tutorial/01_installation.md +129 -0
  88. data/docs/tutorial/02_first_node.md +466 -0
  89. data/docs/tutorial/03_scale.md +876 -0
  90. data/docs/tutorial/04_test.md +965 -0
  91. data/docs/tutorial/05_extend_with_plugins.md +1132 -0
  92. data/examples/bare/Gemfile +4 -0
  93. data/examples/bare/hpc_config.rb +2 -0
  94. data/examples/localhost/Gemfile +4 -0
  95. data/examples/localhost/hpc_config.rb +2 -0
  96. data/examples/localhost/inventory.yaml +4 -0
  97. data/lib/hybrid_platforms_conductor/actions_executor.rb +1 -0
  98. data/lib/hybrid_platforms_conductor/deployer.rb +3 -2
  99. data/lib/hybrid_platforms_conductor/hpc_plugins/action/remote_bash.rb +29 -13
  100. data/lib/hybrid_platforms_conductor/hpc_plugins/action/scp.rb +1 -1
  101. data/lib/hybrid_platforms_conductor/hpc_plugins/connector/local.rb +98 -0
  102. data/lib/hybrid_platforms_conductor/hpc_plugins/connector/my_connector.rb.sample +2 -2
  103. data/lib/hybrid_platforms_conductor/hpc_plugins/connector/ssh.rb +7 -3
  104. data/lib/hybrid_platforms_conductor/hpc_plugins/platform_handler/platform_handler_plugin.rb.sample +5 -5
  105. data/lib/hybrid_platforms_conductor/hpc_plugins/platform_handler/yaml_inventory.rb +140 -0
  106. data/lib/hybrid_platforms_conductor/hpc_plugins/provisioner/proxmox.rb +5 -2
  107. data/lib/hybrid_platforms_conductor/hpc_plugins/test/bitbucket_conf.rb +4 -4
  108. data/lib/hybrid_platforms_conductor/hpc_plugins/test/deploy_freshness.rb +1 -1
  109. data/lib/hybrid_platforms_conductor/hpc_plugins/test/deploy_removes_root_access.rb +19 -17
  110. data/lib/hybrid_platforms_conductor/hpc_plugins/test/divergence.rb +3 -0
  111. data/lib/hybrid_platforms_conductor/hpc_plugins/test/hostname.rb +2 -1
  112. data/lib/hybrid_platforms_conductor/hpc_plugins/test/ip.rb +2 -1
  113. data/lib/hybrid_platforms_conductor/hpc_plugins/test/local_users.rb +2 -1
  114. data/lib/hybrid_platforms_conductor/hpc_plugins/test/mounts.rb +4 -3
  115. data/lib/hybrid_platforms_conductor/hpc_plugins/test/orphan_files.rb +2 -1
  116. data/lib/hybrid_platforms_conductor/hpc_plugins/test/spectre.rb +1 -1
  117. data/lib/hybrid_platforms_conductor/hpc_plugins/test/vulnerabilities.rb +8 -7
  118. data/lib/hybrid_platforms_conductor/hpc_plugins/test_report/confluence.rb +1 -1
  119. data/lib/hybrid_platforms_conductor/json_dumper.rb +1 -1
  120. data/lib/hybrid_platforms_conductor/platform_handler.rb +1 -1
  121. data/lib/hybrid_platforms_conductor/services_handler.rb +18 -16
  122. data/lib/hybrid_platforms_conductor/tests_runner.rb +0 -1
  123. data/lib/hybrid_platforms_conductor/topographer.rb +0 -1
  124. data/lib/hybrid_platforms_conductor/version.rb +1 -1
  125. data/spec/hybrid_platforms_conductor_test/api/actions_executor/actions/remote_bash_spec.rb +16 -0
  126. data/spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/local/connectable_nodes_spec.rb +30 -0
  127. data/spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/local/remote_actions_spec.rb +113 -0
  128. data/spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/cli_options_spec.rb +6 -2
  129. data/spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/global_helpers_spec.rb +38 -1
  130. data/spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/remote_actions_spec.rb +8 -8
  131. data/spec/hybrid_platforms_conductor_test/docs_spec.rb +10 -0
  132. data/tools/check_md +89 -0
  133. data/tools/generate_mermaid +75 -0
  134. metadata +207 -12
@@ -0,0 +1,41 @@
1
+ # Test plugin: `divergence`
2
+
3
+ The `divergence` test plugin checks that nodes are aligned with wanted configuration.
4
+ It does so by issuing a check on the nodes, and reporting divergent tasks as errors.
5
+
6
+ ## Config DSL extension
7
+
8
+ ### `ignore_divergent_tasks`
9
+
10
+ `ignore_divergent_tasks` defines a list of tasks that may be divergent (meaning that checking nodes can return differences for those tasks). In such cases, those tasks will not be reported as errors by the idempotence or divergence tests.
11
+
12
+ It takes a `Hash<String, String>` as a parameter, as a set of `<task_name>` => `<descriptive_reason_for_ignore>`.
13
+
14
+ Example:
15
+ ```ruby
16
+ for_nodes('scheduler_node') do
17
+ ignore_divergent_tasks({
18
+ 'Jenkins - Create config' => 'Config file is reindented by Jenkins, so always appears different',
19
+ 'Jenkins - Restart' => 'Jenkins is always restarted as config file is different when deploying'
20
+ })
21
+ end
22
+ ```
23
+
24
+ ## Used credentials
25
+
26
+ | Credential | Usage
27
+ | --- | --- |
28
+
29
+ ## Used Metadata
30
+
31
+ | Metadata | Type | Usage
32
+ | --- | --- | --- |
33
+
34
+ ## Used environment variables
35
+
36
+ | Variable | Usage
37
+ | --- | --- |
38
+
39
+ ## External tools dependencies
40
+
41
+ None
@@ -0,0 +1,26 @@
1
+ # Test plugin: `executables`
2
+
3
+ The `executables` test plugin checks that all Hybrid Platforms Conductor executables are accessible and can be executed.
4
+
5
+ ## Config DSL extension
6
+
7
+ None
8
+
9
+ ## Used credentials
10
+
11
+ | Credential | Usage
12
+ | --- | --- |
13
+
14
+ ## Used Metadata
15
+
16
+ | Metadata | Type | Usage
17
+ | --- | --- | --- |
18
+
19
+ ## Used environment variables
20
+
21
+ | Variable | Usage
22
+ | --- | --- |
23
+
24
+ ## External tools dependencies
25
+
26
+ None
@@ -0,0 +1,49 @@
1
+ # Test plugin: `file_system`
2
+
3
+ The `file_system` test plugin performs various checks on the file system of a node.
4
+
5
+ ## Config DSL extension
6
+
7
+ ### `check_files_do_exist`
8
+
9
+ `check_files_do_exist` takes a path or a list of paths as parameter. Those paths should be present on the nodes and will be reported as missing if not.
10
+
11
+ Example:
12
+ ```ruby
13
+ for_nodes('/tst_.*/') do
14
+ check_files_do_exist '/etc/init.d', '/home/test_user'
15
+ end
16
+ for_nodes('/prd_.*/') do
17
+ check_files_do_exist '/etc/init.d'
18
+ end
19
+ ```
20
+
21
+ ### `check_files_do_not_exist`
22
+
23
+ `check_files_do_not_exist` takes a path or a list of paths as parameter. Those paths should be absent on the nodes and will be reported as extra if not.
24
+
25
+ Example:
26
+ ```ruby
27
+ for_nodes('/tst_.*/') do
28
+ check_files_do_not_exist '/tmp/wrong_file', '/home/obsolete_user'
29
+ end
30
+ ```
31
+
32
+ ## Used credentials
33
+
34
+ | Credential | Usage
35
+ | --- | --- |
36
+
37
+ ## Used Metadata
38
+
39
+ | Metadata | Type | Usage
40
+ | --- | --- | --- |
41
+
42
+ ## Used environment variables
43
+
44
+ | Variable | Usage
45
+ | --- | --- |
46
+
47
+ ## External tools dependencies
48
+
49
+ None
@@ -0,0 +1,65 @@
1
+ # Test plugin: `file_system_hdfs`
2
+
3
+ The `file_system_hdfs` test plugin performs various checks on the HDFS file system of a node.
4
+
5
+ ## Config DSL extension
6
+
7
+ ### `on_hdfs`
8
+
9
+ `on_hdfs` defines a configuration scope in which the `check_files_do_exist` and `check_files_do_not_exist` apply on paths from an HDFS file system.
10
+ It takes a code block as parameter to define this scope.
11
+ An optional argument `with_sudo` (`String`) can be specified with the sudo user name to be used in front of the hdfs commands checking for paths.
12
+
13
+ Example:
14
+ ```ruby
15
+ for_nodes('hadoop-gateway') do
16
+ on_hdfs(with_sudo: 'hdfs') do
17
+ check_files_do_not_exist '/user/obsolete_hdfs_user'
18
+ end
19
+ end
20
+ ```
21
+
22
+ ### `check_files_do_exist`
23
+
24
+ `check_files_do_exist` takes a path or a list of paths as parameter. Those paths should be present on the nodes and will be reported as missing if not.
25
+
26
+ Example:
27
+ ```ruby
28
+ for_nodes('hadoop-gateway') do
29
+ on_hdfs(with_sudo: 'hdfs') do
30
+ check_files_do_exist '/user/hadoop_user'
31
+ end
32
+ end
33
+ ```
34
+
35
+ ### `check_files_do_not_exist`
36
+
37
+ `check_files_do_not_exist` takes a path or a list of paths as parameter. Those paths should be absent on the nodes and will be reported as extra if not.
38
+
39
+ Example:
40
+ ```ruby
41
+ for_nodes('hadoop-gateway') do
42
+ on_hdfs(with_sudo: 'hdfs') do
43
+ check_files_do_not_exist '/user/obsolete_hdfs_user'
44
+ end
45
+ end
46
+ ```
47
+
48
+ ## Used credentials
49
+
50
+ | Credential | Usage
51
+ | --- | --- |
52
+
53
+ ## Used Metadata
54
+
55
+ | Metadata | Type | Usage
56
+ | --- | --- | --- |
57
+
58
+ ## Used environment variables
59
+
60
+ | Variable | Usage
61
+ | --- | --- |
62
+
63
+ ## External tools dependencies
64
+
65
+ None
@@ -0,0 +1,27 @@
1
+ # Test plugin: `hostname`
2
+
3
+ The `hostname` test plugin checks that a node's hostname corresponds to its node name.
4
+ This test can help detect discrepancies or conflicts in the IP address or DNS spaces.
5
+
6
+ ## Config DSL extension
7
+
8
+ None
9
+
10
+ ## Used credentials
11
+
12
+ | Credential | Usage
13
+ | --- | --- |
14
+
15
+ ## Used Metadata
16
+
17
+ | Metadata | Type | Usage
18
+ | --- | --- | --- |
19
+
20
+ ## Used environment variables
21
+
22
+ | Variable | Usage
23
+ | --- | --- |
24
+
25
+ ## External tools dependencies
26
+
27
+ None
@@ -0,0 +1,56 @@
1
+ # Test plugin: `idempotence`
2
+
3
+ The `idempotence` test plugin checks that a node can be checked successfully after being deployed, and that tasks are not reporting any divergence.
4
+
5
+ Only 1 node per combination of services will be tested by this test plugin, as the goal is to validate the configuration recipes/playbooks by deploying on newly-provisioned nodes for test, and not on the real nodes.
6
+
7
+ ## Config DSL extension
8
+
9
+ ### `ignore_idempotence_tasks`
10
+
11
+ `ignore_idempotence_tasks` defines a list of tasks that may not be idempotent during tests (meaning that checking after deploying return differences for those tasks). In such cases, those tasks will not be reported as errors by the idempotence tests.
12
+
13
+ It takes a `Hash<String, String>` as a parameter, as a set of `<task_name>` => `<descriptive_reason_for_ignore>`.
14
+
15
+ Example:
16
+ ```ruby
17
+ ignore_idempotence_tasks({
18
+ 'DNS - Create config' => '/etc/resolv.conf can\'t be changed in Docker test nodes, so checking always report it as different'
19
+ })
20
+
21
+ ```
22
+
23
+ ### `ignore_divergent_tasks`
24
+
25
+ `ignore_divergent_tasks` defines a list of tasks that may be divergent (meaning that checking nodes can return differences for those tasks). In such cases, those tasks will not be reported as errors by the idempotence or divergence tests.
26
+
27
+ It takes a `Hash<String, String>` as a parameter, as a set of `<task_name>` => `<descriptive_reason_for_ignore>`.
28
+
29
+ Example:
30
+ ```ruby
31
+ for_nodes('scheduler_node') do
32
+ ignore_divergent_tasks({
33
+ 'Jenkins - Create config' => 'Config file is reindented by Jenkins, so always appears different',
34
+ 'Jenkins - Restart' => 'Jenkins is always restarted as config file is different when deploying'
35
+ })
36
+ end
37
+ ```
38
+
39
+ ## Used credentials
40
+
41
+ | Credential | Usage
42
+ | --- | --- |
43
+
44
+ ## Used Metadata
45
+
46
+ | Metadata | Type | Usage
47
+ | --- | --- | --- |
48
+
49
+ ## Used environment variables
50
+
51
+ | Variable | Usage
52
+ | --- | --- |
53
+
54
+ ## External tools dependencies
55
+
56
+ None
@@ -0,0 +1,28 @@
1
+ # Test plugin: `ip`
2
+
3
+ The `ip` test plugin checks that a node's configured IP address corresponds to its metadata.
4
+ This test can help detect discrepancies or conflicts in the IP address space.
5
+
6
+ ## Config DSL extension
7
+
8
+ None
9
+
10
+ ## Used credentials
11
+
12
+ | Credential | Usage
13
+ | --- | --- |
14
+
15
+ ## Used Metadata
16
+
17
+ | Metadata | Type | Usage
18
+ | --- | --- | --- |
19
+ | `private_ips` | `Array<String>` | List of possible private IPs the node should have |
20
+
21
+ ## Used environment variables
22
+
23
+ | Variable | Usage
24
+ | --- | --- |
25
+
26
+ ## External tools dependencies
27
+
28
+ None
@@ -0,0 +1,54 @@
1
+ # Test plugin: `jenkins_ci_conf`
2
+
3
+ The `jenkins_ci_conf` test plugin checks that Bitbucket repositories are configured properly to have their CI/CD running on a Jenkins instance, using multi-pipelines jobs.
4
+
5
+ ## Config DSL extension
6
+
7
+ ### `bitbucket_repos`
8
+
9
+ Define a Bitbucket installation to be targeted.
10
+
11
+ It takes the following parameters:
12
+ * **url** (`String`): URL to the Bitbucket server
13
+ * **project** (`String`): Project name from the Bitbucket server, storing repositories
14
+ * **jenkins_ci_url** (`String` or `nil`): Corresponding Jenkins CI URL, or nil if none.
15
+ * **repos** (`Array<String>` or `Symbol`): List of repository names from this project, or :all for all [default: :all]
16
+
17
+ Example:
18
+ ```ruby
19
+ bitbucket_repos(
20
+ # Bitbucket root URL
21
+ url: 'https://my_bitbucket.my_domain.com/git',
22
+ # Bitbucket's project containing repositories
23
+ project: 'PRJ',
24
+ # List of repositories to check
25
+ repos: [
26
+ 'my-platform-repo',
27
+ 'my-chef-repo',
28
+ 'my-hpc-plugins'
29
+ ],
30
+ # Under this URL we should have 1 multi-pipeline job per repository having its CI running on Jenkins
31
+ jenkins_ci_url: 'https://my_jenkins.my_domain.com/job/PRJ/'
32
+ )
33
+ ```
34
+
35
+ ## Used credentials
36
+
37
+ | Credential | Usage
38
+ | --- | --- |
39
+ | `bitbucket` | Used to connect to the Bitbucket API |
40
+ | `jenkins_ci` | Used to connect to the Jenkins instance |
41
+
42
+ ## Used Metadata
43
+
44
+ | Metadata | Type | Usage
45
+ | --- | --- | --- |
46
+
47
+ ## Used environment variables
48
+
49
+ | Variable | Usage
50
+ | --- | --- |
51
+
52
+ ## External tools dependencies
53
+
54
+ None
@@ -0,0 +1,54 @@
1
+ # Test plugin: `jenkins_ci_masters_ok`
2
+
3
+ The `jenkins_ci_masters_ok` test plugin checks that Bitbucket repositories CI are all having a succesful build on the current master branch.
4
+
5
+ ## Config DSL extension
6
+
7
+ ### `bitbucket_repos`
8
+
9
+ Define a Bitbucket installation to be targeted.
10
+
11
+ It takes the following parameters:
12
+ * **url** (`String`): URL to the Bitbucket server
13
+ * **project** (`String`): Project name from the Bitbucket server, storing repositories
14
+ * **jenkins_ci_url** (`String` or `nil`): Corresponding Jenkins CI URL, or nil if none.
15
+ * **repos** (`Array<String>` or `Symbol`): List of repository names from this project, or :all for all [default: :all]
16
+
17
+ Example:
18
+ ```ruby
19
+ bitbucket_repos(
20
+ # Bitbucket root URL
21
+ url: 'https://my_bitbucket.my_domain.com/git',
22
+ # Bitbucket's project containing repositories
23
+ project: 'PRJ',
24
+ # List of repositories to check
25
+ repos: [
26
+ 'my-platform-repo',
27
+ 'my-chef-repo',
28
+ 'my-hpc-plugins'
29
+ ],
30
+ # Under this URL we should have 1 multi-pipeline job per repository having its CI running on Jenkins
31
+ jenkins_ci_url: 'https://my_jenkins.my_domain.com/job/PRJ/'
32
+ )
33
+ ```
34
+
35
+ ## Used credentials
36
+
37
+ | Credential | Usage
38
+ | --- | --- |
39
+ | `bitbucket` | Used to connect to the Bitbucket API |
40
+ | `jenkins_ci` | Used to connect to the Jenkins instance |
41
+
42
+ ## Used Metadata
43
+
44
+ | Metadata | Type | Usage
45
+ | --- | --- | --- |
46
+
47
+ ## Used environment variables
48
+
49
+ | Variable | Usage
50
+ | --- | --- |
51
+
52
+ ## External tools dependencies
53
+
54
+ None
@@ -0,0 +1,26 @@
1
+ # Test plugin: `linear_strategy`
2
+
3
+ The `linear_strategy` test plugin checks that the git repositories of your platforms follow a [git straight-line strategy](https://www.bitsnbites.eu/a-tidy-linear-git-history/).
4
+
5
+ ## Config DSL extension
6
+
7
+ None
8
+
9
+ ## Used credentials
10
+
11
+ | Credential | Usage
12
+ | --- | --- |
13
+
14
+ ## Used Metadata
15
+
16
+ | Metadata | Type | Usage
17
+ | --- | --- | --- |
18
+
19
+ ## Used environment variables
20
+
21
+ | Variable | Usage
22
+ | --- | --- |
23
+
24
+ ## External tools dependencies
25
+
26
+ * `git`: Used to query git repository information.
@@ -0,0 +1,48 @@
1
+ # Test plugin: `local_users`
2
+
3
+ The `local_users` test plugin checks that local Linux users on nodes are setup correctly.
4
+
5
+ ## Config DSL extension
6
+
7
+ ### `check_local_users_do_exist`
8
+
9
+ Check that a given list of users do exist on a given set of nodes.
10
+ Takes as parameter a list of Linux user names.
11
+
12
+ Example:
13
+ ```ruby
14
+ # Check users for our production nodes
15
+ for_nodes('/prod.*/') do
16
+ check_local_users_do_exist %w[netadmin prodadmin]
17
+ end
18
+ ```
19
+
20
+ ### `check_local_users_do_not_exist`
21
+
22
+ Check that a given list of users do not exist on a given set of nodes.
23
+ Takes as parameter a list of Linux user names.
24
+
25
+ Example:
26
+ ```ruby
27
+ # Check that obsolete users are removed from nodes
28
+ check_local_users_do_not_exist %w[olduser1 olduser2]
29
+ ```
30
+
31
+ ## Used credentials
32
+
33
+ | Credential | Usage
34
+ | --- | --- |
35
+
36
+ ## Used Metadata
37
+
38
+ | Metadata | Type | Usage
39
+ | --- | --- | --- |
40
+
41
+ ## Used environment variables
42
+
43
+ | Variable | Usage
44
+ | --- | --- |
45
+
46
+ ## External tools dependencies
47
+
48
+ None