hybrid_platforms_conductor 32.11.0 → 32.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1109 -0
- data/LICENSE.md +31 -0
- data/README.md +395 -0
- data/bin/setup +1 -1
- data/docs/api.md +349 -0
- data/docs/config_dsl.md +315 -0
- data/docs/executables.md +226 -0
- data/docs/executables/check-node.md +155 -0
- data/docs/executables/deploy.md +198 -0
- data/docs/executables/dump_nodes_json.md +110 -0
- data/docs/executables/free_ips.md +93 -0
- data/docs/executables/free_veids.md +73 -0
- data/docs/executables/get_impacted_nodes.md +94 -0
- data/docs/executables/last_deploys.md +114 -0
- data/docs/executables/nodes_to_deploy.md +139 -0
- data/docs/executables/report.md +159 -0
- data/docs/executables/run.md +126 -0
- data/docs/executables/setup.md +92 -0
- data/docs/executables/ssh_config.md +151 -0
- data/docs/executables/test.md +213 -0
- data/docs/executables/topograph.md +139 -0
- data/docs/gen/mermaid/README.md-0.png +0 -0
- data/docs/gen/mermaid/docs/executables/check-node.md-0.png +0 -0
- data/docs/gen/mermaid/docs/executables/deploy.md-0.png +0 -0
- data/docs/gen/mermaid/docs/executables/free_ips.md-0.png +0 -0
- data/docs/gen/mermaid/docs/executables/free_veids.md-0.png +0 -0
- data/docs/gen/mermaid/docs/executables/get_impacted_nodes.md-0.png +0 -0
- data/docs/gen/mermaid/docs/executables/last_deploys.md-0.png +0 -0
- data/docs/gen/mermaid/docs/executables/nodes_to_deploy.md-0.png +0 -0
- data/docs/gen/mermaid/docs/executables/report.md-0.png +0 -0
- data/docs/gen/mermaid/docs/executables/run.md-0.png +0 -0
- data/docs/gen/mermaid/docs/executables/setup.md-0.png +0 -0
- data/docs/gen/mermaid/docs/executables/ssh_config.md-0.png +0 -0
- data/docs/gen/mermaid/docs/executables/test.md-0.png +0 -0
- data/docs/install.md +161 -0
- data/docs/plugins.md +215 -0
- data/docs/plugins/action/bash.md +37 -0
- data/docs/plugins/action/interactive.md +37 -0
- data/docs/plugins/action/remote_bash.md +67 -0
- data/docs/plugins/action/ruby.md +69 -0
- data/docs/plugins/action/scp.md +61 -0
- data/docs/plugins/cmdb/config.md +46 -0
- data/docs/plugins/cmdb/host_ip.md +33 -0
- data/docs/plugins/cmdb/host_keys.md +33 -0
- data/docs/plugins/cmdb/platform_handlers.md +33 -0
- data/docs/plugins/connector/local.md +28 -0
- data/docs/plugins/connector/ssh.md +95 -0
- data/docs/plugins/platform_handler/yaml_inventory.md +105 -0
- data/docs/plugins/provisioner/docker.md +27 -0
- data/docs/plugins/provisioner/podman.md +27 -0
- data/docs/plugins/provisioner/proxmox.md +115 -0
- data/docs/plugins/report/confluence.md +49 -0
- data/docs/plugins/report/mediawiki.md +28 -0
- data/docs/plugins/report/stdout.md +32 -0
- data/docs/plugins/test/bitbucket_conf.md +97 -0
- data/docs/plugins/test/can_be_checked.md +27 -0
- data/docs/plugins/test/check_deploy_and_idempotence.md +61 -0
- data/docs/plugins/test/check_from_scratch.md +28 -0
- data/docs/plugins/test/connection.md +27 -0
- data/docs/plugins/test/deploy_freshness.md +27 -0
- data/docs/plugins/test/deploy_from_scratch.md +28 -0
- data/docs/plugins/test/deploy_removes_root_access.md +29 -0
- data/docs/plugins/test/divergence.md +41 -0
- data/docs/plugins/test/executables.md +26 -0
- data/docs/plugins/test/file_system.md +49 -0
- data/docs/plugins/test/file_system_hdfs.md +65 -0
- data/docs/plugins/test/hostname.md +27 -0
- data/docs/plugins/test/idempotence.md +56 -0
- data/docs/plugins/test/ip.md +28 -0
- data/docs/plugins/test/jenkins_ci_conf.md +54 -0
- data/docs/plugins/test/jenkins_ci_masters_ok.md +54 -0
- data/docs/plugins/test/linear_strategy.md +26 -0
- data/docs/plugins/test/local_users.md +48 -0
- data/docs/plugins/test/mounts.md +55 -0
- data/docs/plugins/test/orphan_files.md +38 -0
- data/docs/plugins/test/ports.md +50 -0
- data/docs/plugins/test/private_ips.md +27 -0
- data/docs/plugins/test/public_ips.md +27 -0
- data/docs/plugins/test/spectre.md +26 -0
- data/docs/plugins/test/veids.md +27 -0
- data/docs/plugins/test/vulnerabilities.md +65 -0
- data/docs/plugins/test_report/confluence.md +43 -0
- data/docs/plugins/test_report/stdout.md +26 -0
- data/docs/plugins_create.md +135 -0
- data/docs/tutorial.md +61 -0
- data/docs/tutorial/01_installation.md +129 -0
- data/docs/tutorial/02_first_node.md +466 -0
- data/docs/tutorial/03_scale.md +876 -0
- data/docs/tutorial/04_test.md +975 -0
- data/docs/tutorial/05_extend_with_plugins.md +1130 -0
- data/examples/bare/Gemfile +4 -0
- data/examples/bare/hpc_config.rb +2 -0
- data/examples/localhost/Gemfile +4 -0
- data/examples/localhost/hpc_config.rb +2 -0
- data/examples/localhost/inventory.yaml +4 -0
- data/examples/tutorial/01_installation/my-platforms/Gemfile +3 -0
- data/examples/tutorial/01_installation/my-platforms/hpc_config.rb +0 -0
- data/examples/tutorial/02_first_node/my-platforms/Gemfile +3 -0
- data/examples/tutorial/02_first_node/my-platforms/hpc_config.rb +1 -0
- data/examples/tutorial/02_first_node/my-service-conf-repo/inventory.yaml +13 -0
- data/examples/tutorial/02_first_node/my-service-conf-repo/my-service.conf.erb +3 -0
- data/examples/tutorial/02_first_node/my-service-conf-repo/service_my-service.rb +58 -0
- data/examples/tutorial/02_first_node/node/my-service.conf +4 -0
- data/examples/tutorial/03_scale/my-platforms/Gemfile +3 -0
- data/examples/tutorial/03_scale/my-platforms/hpc_config.rb +1 -0
- data/examples/tutorial/03_scale/my-platforms/my_commands.bash +2 -0
- data/examples/tutorial/03_scale/my-service-conf-repo/inventory.yaml +90 -0
- data/examples/tutorial/03_scale/my-service-conf-repo/my-service.conf.erb +3 -0
- data/examples/tutorial/03_scale/my-service-conf-repo/service_my-service.rb +58 -0
- data/examples/tutorial/03_scale/my-service-conf-repo/service_web-hello.rb +43 -0
- data/examples/tutorial/03_scale/node/my-service.conf +4 -0
- data/examples/tutorial/03_scale/web_docker_image/Dockerfile +33 -0
- data/examples/tutorial/03_scale/web_docker_image/hello_world.txt +1 -0
- data/examples/tutorial/03_scale/web_docker_image/hpc_root.key +27 -0
- data/examples/tutorial/03_scale/web_docker_image/hpc_root.key.pub +1 -0
- data/examples/tutorial/03_scale/web_docker_image/main.go +43 -0
- data/examples/tutorial/03_scale/web_docker_image/start.sh +7 -0
- data/examples/tutorial/03_scale/web_docker_image/test.bash +6 -0
- data/examples/tutorial/04_test/my-platforms/Gemfile +3 -0
- data/examples/tutorial/04_test/my-platforms/hpc_config.rb +12 -0
- data/examples/tutorial/04_test/my-platforms/images/debian_10/Dockerfile +13 -0
- data/examples/tutorial/04_test/my-platforms/my_commands.bash +2 -0
- data/examples/tutorial/04_test/my-service-conf-repo/inventory.yaml +100 -0
- data/examples/tutorial/04_test/my-service-conf-repo/my-service.conf.erb +3 -0
- data/examples/tutorial/04_test/my-service-conf-repo/service_my-service.rb +58 -0
- data/examples/tutorial/04_test/my-service-conf-repo/service_web-hello.rb +43 -0
- data/examples/tutorial/04_test/node/my-service.conf +4 -0
- data/examples/tutorial/04_test/web_docker_image/Dockerfile +33 -0
- data/examples/tutorial/04_test/web_docker_image/hello_world.txt +1 -0
- data/examples/tutorial/04_test/web_docker_image/hpc_root.key +27 -0
- data/examples/tutorial/04_test/web_docker_image/hpc_root.key.pub +1 -0
- data/examples/tutorial/04_test/web_docker_image/main.go +43 -0
- data/examples/tutorial/04_test/web_docker_image/start.sh +7 -0
- data/examples/tutorial/04_test/web_docker_image/test.bash +6 -0
- data/examples/tutorial/05_extend_with_plugins/dev-servers-conf-repo/hosts.json +12 -0
- data/examples/tutorial/05_extend_with_plugins/dev-servers-conf-repo/install-gcc.bash +14 -0
- data/examples/tutorial/05_extend_with_plugins/dev-servers-conf-repo/install-python.bash +14 -0
- data/examples/tutorial/05_extend_with_plugins/dev_docker_image/Dockerfile +20 -0
- data/examples/tutorial/05_extend_with_plugins/dev_docker_image/hpc_root.key +27 -0
- data/examples/tutorial/05_extend_with_plugins/dev_docker_image/hpc_root.key.pub +1 -0
- data/examples/tutorial/05_extend_with_plugins/my-platforms/Gemfile +4 -0
- data/examples/tutorial/05_extend_with_plugins/my-platforms/hpc_config.rb +13 -0
- data/examples/tutorial/05_extend_with_plugins/my-platforms/images/debian_10/Dockerfile +13 -0
- data/examples/tutorial/05_extend_with_plugins/my-platforms/my_commands.bash +2 -0
- data/examples/tutorial/05_extend_with_plugins/my-service-conf-repo/inventory.yaml +100 -0
- data/examples/tutorial/05_extend_with_plugins/my-service-conf-repo/my-service.conf.erb +3 -0
- data/examples/tutorial/05_extend_with_plugins/my-service-conf-repo/service_my-service.rb +58 -0
- data/examples/tutorial/05_extend_with_plugins/my-service-conf-repo/service_web-hello.rb +43 -0
- data/examples/tutorial/05_extend_with_plugins/my_hpc_plugins/lib/my_hpc_plugins/hpc_plugins/platform_handler/json_bash.rb +115 -0
- data/examples/tutorial/05_extend_with_plugins/my_hpc_plugins/lib/my_hpc_plugins/hpc_plugins/report/web_report.rb +52 -0
- data/examples/tutorial/05_extend_with_plugins/my_hpc_plugins/lib/my_hpc_plugins/hpc_plugins/test/root_space.rb +44 -0
- data/examples/tutorial/05_extend_with_plugins/my_hpc_plugins/my_hpc_plugins.gemspec +15 -0
- data/examples/tutorial/05_extend_with_plugins/node/my-service.conf +4 -0
- data/examples/tutorial/05_extend_with_plugins/web_docker_image/Dockerfile +33 -0
- data/examples/tutorial/05_extend_with_plugins/web_docker_image/hello_world.txt +1 -0
- data/examples/tutorial/05_extend_with_plugins/web_docker_image/hpc_root.key +27 -0
- data/examples/tutorial/05_extend_with_plugins/web_docker_image/hpc_root.key.pub +1 -0
- data/examples/tutorial/05_extend_with_plugins/web_docker_image/main.go +43 -0
- data/examples/tutorial/05_extend_with_plugins/web_docker_image/start.sh +7 -0
- data/examples/tutorial/05_extend_with_plugins/web_docker_image/test.bash +6 -0
- data/lib/hybrid_platforms_conductor/actions_executor.rb +1 -0
- data/lib/hybrid_platforms_conductor/deployer.rb +3 -2
- data/lib/hybrid_platforms_conductor/hpc_plugins/action/remote_bash.rb +29 -13
- data/lib/hybrid_platforms_conductor/hpc_plugins/action/scp.rb +1 -1
- data/lib/hybrid_platforms_conductor/hpc_plugins/connector/local.rb +98 -0
- data/lib/hybrid_platforms_conductor/hpc_plugins/connector/my_connector.rb.sample +2 -2
- data/lib/hybrid_platforms_conductor/hpc_plugins/connector/ssh.rb +15 -4
- data/lib/hybrid_platforms_conductor/hpc_plugins/platform_handler/platform_handler_plugin.rb.sample +5 -5
- data/lib/hybrid_platforms_conductor/hpc_plugins/platform_handler/yaml_inventory.rb +140 -0
- data/lib/hybrid_platforms_conductor/hpc_plugins/provisioner/proxmox.rb +6 -3
- data/lib/hybrid_platforms_conductor/hpc_plugins/report/templates/confluence_inventory.html.erb +1 -1
- data/lib/hybrid_platforms_conductor/hpc_plugins/test/bitbucket_conf.rb +4 -4
- data/lib/hybrid_platforms_conductor/hpc_plugins/test/deploy_freshness.rb +1 -1
- data/lib/hybrid_platforms_conductor/hpc_plugins/test/deploy_removes_root_access.rb +19 -17
- data/lib/hybrid_platforms_conductor/hpc_plugins/test/divergence.rb +3 -0
- data/lib/hybrid_platforms_conductor/hpc_plugins/test/executables.rb +27 -13
- data/lib/hybrid_platforms_conductor/hpc_plugins/test/hostname.rb +2 -1
- data/lib/hybrid_platforms_conductor/hpc_plugins/test/ip.rb +2 -1
- data/lib/hybrid_platforms_conductor/hpc_plugins/test/local_users.rb +2 -1
- data/lib/hybrid_platforms_conductor/hpc_plugins/test/mounts.rb +4 -3
- data/lib/hybrid_platforms_conductor/hpc_plugins/test/orphan_files.rb +2 -1
- data/lib/hybrid_platforms_conductor/hpc_plugins/test/spectre.rb +1 -1
- data/lib/hybrid_platforms_conductor/hpc_plugins/test/vulnerabilities.rb +8 -7
- data/lib/hybrid_platforms_conductor/hpc_plugins/test_report/confluence.rb +1 -1
- data/lib/hybrid_platforms_conductor/hpc_plugins/test_report/templates/confluence.html.erb +1 -1
- data/lib/hybrid_platforms_conductor/json_dumper.rb +1 -1
- data/lib/hybrid_platforms_conductor/platform_handler.rb +1 -1
- data/lib/hybrid_platforms_conductor/services_handler.rb +18 -16
- data/lib/hybrid_platforms_conductor/tests_runner.rb +0 -1
- data/lib/hybrid_platforms_conductor/topographer.rb +0 -1
- data/lib/hybrid_platforms_conductor/version.rb +1 -1
- data/spec/hybrid_platforms_conductor_test/api/actions_executor/actions/remote_bash_spec.rb +16 -0
- data/spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/local/connectable_nodes_spec.rb +30 -0
- data/spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/local/remote_actions_spec.rb +113 -0
- data/spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/cli_options_spec.rb +6 -2
- data/spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/global_helpers_spec.rb +38 -1
- data/spec/hybrid_platforms_conductor_test/api/actions_executor/connectors/ssh/remote_actions_spec.rb +37 -4
- data/spec/hybrid_platforms_conductor_test/docs_spec.rb +10 -0
- data/tools/check_md +89 -0
- data/tools/generate_mermaid +75 -0
- metadata +337 -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
|