foreman_hdm 0.1.4 → 1.1.0
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/README.md +34 -2
- data/Rakefile +1 -1
- data/db/migrate/20240228114101_add_foreign_key_to_hdm_proxy_id.rb +5 -0
- data/lib/foreman_hdm/engine.rb +21 -19
- data/lib/foreman_hdm/version.rb +1 -1
- metadata +12 -80
- data/test/factories/foreman_hdm_factories.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55623f7a7440aaab0000cc55ec9ef7236cfc7e94ec5ebc4a32a9c1a62d11a736
|
4
|
+
data.tar.gz: 1d58c2bf7261cb3ab2ed3fe7fc9c02ab216be3ede3070b684a7dcf4e9544e64b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a495decc3c8536fd6f04ed543e774e23d785fb7a19282c37baf33d166c1fc2333e7279f6a669817405e19b2dc6c252bfdf8f15663eb580c2cef1d0749a036dfb
|
7
|
+
data.tar.gz: 9489039656916e68b6125f8d1d59e030a16004fa2f77d1554240c427cacdf8ace1d08243ff8d60e777594c9f5edbcb24896e0fec9f1ed0938223145d1a7e8dd8
|
data/README.md
CHANGED
@@ -6,16 +6,44 @@
|
|
6
6
|
[](https://rubygems.org/gems/foreman_hdm)
|
7
7
|
[](https://rubygems.org/gems/foreman_hdm)
|
8
8
|
|
9
|
-
Browse hiera data for a given Host using [HDM](https://github.com/betadots/hdm) and the [HDM smart proxy plugin](https://github.com/betadots/
|
9
|
+
Browse hiera data for a given Host using [HDM](https://github.com/betadots/hdm) and the [HDM smart proxy plugin](https://github.com/betadots/smart_proxy_hdm).
|
10
|
+
|
11
|
+
## Requirement
|
12
|
+
|
13
|
+
You must have a [HDM](https://github.com/betadots/hdm) installation running.
|
14
|
+
If you are running with authentication enabled, you need an API user in HDM.
|
10
15
|
|
11
16
|
## Installation
|
12
17
|
|
13
18
|
See [How_to_Install_a_Plugin](http://projects.theforeman.org/projects/foreman/wiki/How_to_Install_a_Plugin)
|
14
19
|
for how to install Foreman plugins
|
15
20
|
|
21
|
+
The most simple way is installing from packages (available with Foreman 3.6 and later)
|
22
|
+
|
23
|
+
RedHat: `dnf install rubygem-foreman_hdm rubygem-smart_proxy_hdm`
|
24
|
+
|
25
|
+
After installation you must initialize the database: `foreman-rake db:migrate`
|
26
|
+
|
27
|
+
The HDM Smart Proxy must be configured:
|
28
|
+
|
29
|
+
```yaml
|
30
|
+
# /etc/foreman-proxy/settings.d/hdm.yml
|
31
|
+
# HDM Smart Proxy
|
32
|
+
:enabled: https
|
33
|
+
:hdm_url: 'http://<HDM IP>:<HDM Port>'
|
34
|
+
:hdm_user: '<HDM API User Email>'
|
35
|
+
:hdm_password: '<HDM API User Password>'
|
36
|
+
```
|
37
|
+
|
38
|
+
Next you must restart the smart-proxy: `systemctl restart foreman-proxy`
|
39
|
+
|
16
40
|
## Usage
|
17
41
|
|
18
|
-
|
42
|
+
Go to Foreman and Refresh the Smart Proxy features.
|
43
|
+
|
44
|
+
Within the nodes or node groups you can now set the HDM Smart Proxy.
|
45
|
+
|
46
|
+
When you now select a node, you will see an HDM tab.
|
19
47
|
|
20
48
|
## TODO
|
21
49
|
|
@@ -53,3 +81,7 @@ To make a new release, please do:
|
|
53
81
|
* if required, add labels to unlabled PR/issues, regenerate the changelog
|
54
82
|
* Create a PR with it
|
55
83
|
* After it got merged, push a tag that's prefixed with `v`. GitHub Actions will do the actual release to Rubygems and GitHub Packages
|
84
|
+
|
85
|
+
The Foreman team packages this gem as Debian package (deb) and as RedHat package
|
86
|
+
(rpm). They have a bot that will automatically propose an rpm/deb update at
|
87
|
+
[github.com/theforeman/foreman-packaging](https://github.com/theforeman/foreman-packaging/pulls).
|
data/Rakefile
CHANGED
@@ -53,7 +53,7 @@ else
|
|
53
53
|
version = ForemanHdm::VERSION
|
54
54
|
config.future_release = "v#{version}" if /^\d+\.\d+.\d+$/.match?(version)
|
55
55
|
config.header = "# Changelog\n\nAll notable changes to this project will be documented in this file."
|
56
|
-
config.exclude_labels = %w[duplicate question invalid wontfix wont-fix skip-changelog]
|
56
|
+
config.exclude_labels = %w[duplicate question invalid wontfix wont-fix skip-changelog github_actions]
|
57
57
|
config.user = 'betadots'
|
58
58
|
config.project = 'foreman_hdm'
|
59
59
|
end
|
data/lib/foreman_hdm/engine.rb
CHANGED
@@ -16,26 +16,28 @@ module ForemanHdm
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
-
initializer 'foreman_hdm.register_plugin', :before => :finisher_hook do |
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
19
|
+
initializer 'foreman_hdm.register_plugin', :before => :finisher_hook do |app|
|
20
|
+
app.reloader.to_prepare do
|
21
|
+
Foreman::Plugin.register :foreman_hdm do
|
22
|
+
requires_foreman '>= 3.4.0'
|
23
|
+
|
24
|
+
# Add Global files for extending foreman-core components and routes
|
25
|
+
register_global_js_file 'global'
|
26
|
+
|
27
|
+
# Add permissions
|
28
|
+
security_block :foreman_hdm do
|
29
|
+
permission :view_foreman_hdm, { :'foreman_hdm/keys' => %i[index show] }
|
30
|
+
end
|
31
|
+
|
32
|
+
# Add a new role called 'Discovery' if it doesn't exist
|
33
|
+
role 'ForemanHdm', [:view_foreman_hdm]
|
34
|
+
|
35
|
+
smart_proxy_for Host::Managed, :hdm_proxy,
|
36
|
+
feature: 'Hdm',
|
37
|
+
label: N_('HDM Proxy'),
|
38
|
+
description: N_('Smart proxy to access HDM'),
|
39
|
+
api_description: N_('ID of HDM Proxy')
|
29
40
|
end
|
30
|
-
|
31
|
-
# Add a new role called 'Discovery' if it doesn't exist
|
32
|
-
role 'ForemanHdm', [:view_foreman_hdm]
|
33
|
-
|
34
|
-
smart_proxy_for Host, :hdm_proxy,
|
35
|
-
feature: 'Hdm',
|
36
|
-
label: N_('HDM Proxy'),
|
37
|
-
description: N_('Smart proxy to access HDM'),
|
38
|
-
api_description: N_('ID of HDM Proxy')
|
39
41
|
end
|
40
42
|
end
|
41
43
|
|
data/lib/foreman_hdm/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_hdm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- betadots GmbH
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -45,87 +45,19 @@ dependencies:
|
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '6.5'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
|
-
name: rubocop
|
48
|
+
name: theforeman-rubocop
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
54
|
-
- - ">="
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
version: 1.52.1
|
57
|
-
type: :development
|
58
|
-
prerelease: false
|
59
|
-
version_requirements: !ruby/object:Gem::Requirement
|
60
|
-
requirements:
|
61
|
-
- - "~>"
|
62
|
-
- !ruby/object:Gem::Version
|
63
|
-
version: '1.52'
|
64
|
-
- - ">="
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
version: 1.52.1
|
67
|
-
- !ruby/object:Gem::Dependency
|
68
|
-
name: rubocop-minitest
|
69
|
-
requirement: !ruby/object:Gem::Requirement
|
70
|
-
requirements:
|
71
|
-
- - "~>"
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
version: 0.31.0
|
74
|
-
type: :development
|
75
|
-
prerelease: false
|
76
|
-
version_requirements: !ruby/object:Gem::Requirement
|
77
|
-
requirements:
|
78
|
-
- - "~>"
|
79
|
-
- !ruby/object:Gem::Version
|
80
|
-
version: 0.31.0
|
81
|
-
- !ruby/object:Gem::Dependency
|
82
|
-
name: rubocop-performance
|
83
|
-
requirement: !ruby/object:Gem::Requirement
|
84
|
-
requirements:
|
85
|
-
- - "~>"
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
version: '1.18'
|
88
|
-
type: :development
|
89
|
-
prerelease: false
|
90
|
-
version_requirements: !ruby/object:Gem::Requirement
|
91
|
-
requirements:
|
92
|
-
- - "~>"
|
93
|
-
- !ruby/object:Gem::Version
|
94
|
-
version: '1.18'
|
95
|
-
- !ruby/object:Gem::Dependency
|
96
|
-
name: rubocop-rails
|
97
|
-
requirement: !ruby/object:Gem::Requirement
|
98
|
-
requirements:
|
99
|
-
- - "~>"
|
100
|
-
- !ruby/object:Gem::Version
|
101
|
-
version: '2.19'
|
102
|
-
- - ">="
|
103
|
-
- !ruby/object:Gem::Version
|
104
|
-
version: 2.19.1
|
105
|
-
type: :development
|
106
|
-
prerelease: false
|
107
|
-
version_requirements: !ruby/object:Gem::Requirement
|
108
|
-
requirements:
|
109
|
-
- - "~>"
|
110
|
-
- !ruby/object:Gem::Version
|
111
|
-
version: '2.19'
|
112
|
-
- - ">="
|
113
|
-
- !ruby/object:Gem::Version
|
114
|
-
version: 2.19.1
|
115
|
-
- !ruby/object:Gem::Dependency
|
116
|
-
name: rubocop-rake
|
117
|
-
requirement: !ruby/object:Gem::Requirement
|
118
|
-
requirements:
|
119
|
-
- - "~>"
|
120
|
-
- !ruby/object:Gem::Version
|
121
|
-
version: 0.6.0
|
53
|
+
version: 0.1.2
|
122
54
|
type: :development
|
123
55
|
prerelease: false
|
124
56
|
version_requirements: !ruby/object:Gem::Requirement
|
125
57
|
requirements:
|
126
58
|
- - "~>"
|
127
59
|
- !ruby/object:Gem::Version
|
128
|
-
version: 0.
|
60
|
+
version: 0.1.2
|
129
61
|
description: Get hiera data from HDM and display alongside hosts in Foreman
|
130
62
|
email:
|
131
63
|
- info@betadots.de
|
@@ -140,6 +72,7 @@ files:
|
|
140
72
|
- app/services/proxy_api/hdm.rb
|
141
73
|
- config/routes.rb
|
142
74
|
- db/migrate/20230519125201_add_hdm_proxy_id_to_hosts.rb
|
75
|
+
- db/migrate/20240228114101_add_foreign_key_to_hdm_proxy_id.rb
|
143
76
|
- db/seeds.d/75-hdm_seeds.rb
|
144
77
|
- lib/foreman_hdm.rb
|
145
78
|
- lib/foreman_hdm/engine.rb
|
@@ -150,7 +83,6 @@ files:
|
|
150
83
|
- locale/foreman_hdm.pot
|
151
84
|
- locale/gemspec.rb
|
152
85
|
- package.json
|
153
|
-
- test/factories/foreman_hdm_factories.rb
|
154
86
|
- test/test_plugin_helper.rb
|
155
87
|
- test/unit/foreman_hdm_test.rb
|
156
88
|
- webpack/global_index.js
|
@@ -165,10 +97,11 @@ files:
|
|
165
97
|
- webpack/test_setup.js
|
166
98
|
homepage: https://github.com/betadots/foreman_hdm
|
167
99
|
licenses:
|
168
|
-
- GPL-3.0
|
100
|
+
- GPL-3.0-only
|
169
101
|
metadata:
|
170
102
|
is_foreman_plugin: 'true'
|
171
|
-
|
103
|
+
github_repo: https://github.com/betadots/foreman_hdm
|
104
|
+
post_install_message:
|
172
105
|
rdoc_options: []
|
173
106
|
require_paths:
|
174
107
|
- lib
|
@@ -183,11 +116,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
183
116
|
- !ruby/object:Gem::Version
|
184
117
|
version: '0'
|
185
118
|
requirements: []
|
186
|
-
rubygems_version: 3.
|
187
|
-
signing_key:
|
119
|
+
rubygems_version: 3.5.22
|
120
|
+
signing_key:
|
188
121
|
specification_version: 4
|
189
122
|
summary: Display hiera data in Foreman using HDM
|
190
123
|
test_files:
|
191
|
-
- test/factories/foreman_hdm_factories.rb
|
192
124
|
- test/test_plugin_helper.rb
|
193
125
|
- test/unit/foreman_hdm_test.rb
|