You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/100-General/10-Changelog.md
+1
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
28
28
*[#495](https://github.com/Icinga/icinga-powershell-framework/pull/495) Adds feature to check the sign status for the local Icinga Agent certificate and notifying the user, in case the certificate is not yet signed by the Icinga CA
29
29
*[#496](https://github.com/Icinga/icinga-powershell-framework/pull/496) Improves REST-Api default timeout for internal plugin execution calls from 30s to 120s
30
30
*[#498](https://github.com/Icinga/icinga-powershell-framework/pull/498) Adds feature for thread queuing optimisation and frozen thread detection for REST calls
31
+
*[#514](https://github.com/Icinga/icinga-powershell-framework/pull/514) Adds support for Icinga for Windows module isolation
Copy file name to clipboardExpand all lines: doc/900-Developer-Guide/00-General.md
+15-1
Original file line number
Diff line number
Diff line change
@@ -121,6 +121,18 @@ The following entries are set by default within the `Protected` space:
121
121
| DebugMode | Enables the debug mode of Icinga for Windows, printing additional details during operations or tasks |
122
122
| Minimal | Changes certain behavior regarding check execution and internal error handling |
123
123
124
+
## Private and Public Functions
125
+
126
+
Icinga for Windows will by default only export `Functions` and `Cmdlets`, in case they are either located within the `root .psm1` file, inside a folder called `public` or in case `Global:` is added before the function:
127
+
128
+
```powershell
129
+
function Global:Invoke-MyCommand()
130
+
```
131
+
132
+
In addition, all commands with the alias `Invoke-IcingaCheck` are automatically exported for plugins. This ensures that each module is isolated from each other and functions with the same name can be used within different modules, without overwriting existing ones. This ensures a better integrity of the module itself.
133
+
134
+
Last but not least, each module is created with a compilation file which is created during the first run of the module and used later on. This ensures en even faster response and reduced load on the system.
135
+
124
136
## Using Icinga for Windows Dev Tools
125
137
126
138
Maintaining the entire structure above seems to be complicated at the beginning, especially when considering to update the `NestedModules` section whenever you make changes. To mitigate this, Icinga for Windows provides a bunch of Cmdlets to help with the process
@@ -139,7 +151,7 @@ The command ships with a bunch of configurations to modify the created `.psd1` i
139
151
140
152
### Publish/Update Components
141
153
142
-
Once you have started to write your own code, you can use the Cmdlet `Publish-IcingaForWindowsComponent` to update the `NestedModules` attribute inside the `.psd1` file automatically, including the documentation in case the module is of type plugin.
154
+
Once you have started to write your own code, you can use the Cmdlet `Publish-IcingaForWindowsComponent` to compile and add requires functions for the calls, including the documentation in case the module is of type plugin.
143
155
144
156
In addition, you ca create a `.zip` file for this module which can be integrated directly into the [Repository Manager](../120-Repository-Manager/01-Add-Repositories.md). By default, created `.zip` files will be created in your home folder, the path can how ever be changed while executing the command.
145
157
@@ -149,6 +161,8 @@ In addition, you ca create a `.zip` file for this module which can be integrated
149
161
| ReleasePackagePath | String | The path on where the `.zip` file will be created in. Defaults to the current users home folder |
150
162
| CreateReleasePackage | Switch | This will toggle the `.zip` file creation of the specified package |
151
163
164
+
Please note that using `Publish-IcingaForWindowsComponent` is mandatory, before you can use the module on target systems. Each Icinga for Windows module is isolated from the general environment and allows to overwrite certain functions locally, inside the module instead of having to worry about them being overwritten on other, critical areas.
165
+
152
166
### Testing Your Component
153
167
154
168
In order to validate if your module can be loaded and is working properly, you can use the command `Test-IcingaForWindowsComponent`. In addition to an import check, it will also validate the code styling and give you an overview if and how many issues there are with your code.
0 commit comments