OK
I understand I have to manage this at the script level (SHExec ou PSExec).
I hoped I could do it inside Otter Script, something like :
SHExec >>
Some command
>>
(
OutputLog: $MyOutput
);
Thanks you @atripp
OK
I understand I have to manage this at the script level (SHExec ou PSExec).
I hoped I could do it inside Otter Script, something like :
SHExec >>
Some command
>>
(
OutputLog: $MyOutput
);
Thanks you @atripp
Here is an Inedo example of the Otter 3 PSEnsure.
Create a Powerscript like test-psensure.ps1
<#
.PARAMETER HotFixID
ID of the HotFix to check, such as "KB4562830"
.AHCONFIGKEY
$HotFixID
.AHCONFIGTYPE
HotFix
.AHEXECMODE
$ExecutionMode
#>
param ([string]$HotFixID)
if ($ExecutionMode -eq "Collect") {
return !!((Get-HotFix -Id $HotFixID) 2> $null)
} else if ($ExecutionMode -eq "Configure") {
# install Hot Fix ... Which is complex
}
Create an Otter script:
##AH:UseTextMode
PSEnsure Test-PSEnsure
(
HotFixID: KB4532938
);
In visual mode, you will have :
Make a role with this desired configuration
Ensure-PsRepository
(
Exists: true,
InstallationPolicy: trusted,
SourceLocation: https://www.powershellgallery.com/api/v2,
Name: PSGallery
);
Assign the role to the server
Remediate
Et voilÃ
This should work
Cheers
PhilippeC.
For the modules, 2 ways
Create a second role which depend on the previous one and use
Ensure-psmodule function to add the required module
You don t need the set psgallery to be trusted if you use the Force in the Ensure-psmodule
Cf https://docs.inedo.com/docs/otter-reference-operations-powershell-ensure-powershell-module
Hello
Just in case, starting from Ubuntu 22.04, certificates for Debian repositories stored in Proget can be imported using this command
curl -fsSL ${proget}/${feed}/keys/${feed}.asc | sudo gpg --dearmor -o /etc/apt/keyrings/${feed}.gpg
A source file in /etc/apt/sources.list.d/ will contain
deb [arch=amd64 signed-by=/etc/apt/keyrings/${feed}.gpg] ${proget}/${feed} ${distribution} ${components}
Best regards
PhilippeC.
Hello @stevedennis
Just a question, if we put the database problem aside, why a full ServerCheck is started every time a creation / modification is made for a server ? Is it the expected behavior ?
Version
Otter docker 2023.4
SQL : docker express:2019-latest
I have done some db maintenance (mainly for defrag index), but as I am not a dba guy and I don't have too much for debugging so it is difficult for me to found some missing index.
@stevedennis
Few weeks ago,I migrated the docker stack Otter from a small linux vm (2 vCpu / 8 go Ram) to a physical serveur (2 x 16 core / 256 Go Ram).
There was still the pb .
I will try to make the database maintenance as you suggest and let you know what is going on.
Cheers
PhilippeC.
@stevedennis said in [BM / OT] Renaming "user/password" or "private key" credentials breaks Linux config:
I can't think of a work-around that would be any simpler then editing the impacted servers.
Thank you.
Do you plan also for OTTER ?
Best regards
PhilippeC.
@stevedennis said in [OT] Modifying a server configuration triggers a full "Server Check":
Also, can you give more detail about what you mean by crashing? There is no "app pool" on Linux/Docker (doesn't use IIS), and the web application isn't responsible for running the server check (that's the Service application). So unclear what the crash would be.
Hi Steve
Yes, every time a Full Server check is running, Otter hangs and restart (docker swarm stack).
Following the error msg I got.
Error msg
Hello,
When a modification is made on a server configuration, a full Server Check is triggered.
This results in a app pool server crash and a restart .
log order: bottom - top
Otter docker last version.
Best regards
PhilippeC.
Hi @atripp
As you suggested, I export the json, and when I try to import it.
I have errors:
Validation failed: Error converting value "[{"Nom": "Carbon","Version": "2.15.1"},{"Nom": "ActiveDirectoryDsc","Version": "6.2.0"},{"Nom": "ComputerManagementDsc","Version": "9.0.0"},{"Nom": "NetworkingDsc","Version": "9.0.0"}]" to type 'Inedo.Otter.Infrastructure.VariableValueJsonModel'. Path 'roles[2].variables.PSModules', line 2678, position 367.
The json line is
"variables": {
"PSModules": "[{\u0022Nom\u0022: \u0022Carbon\u0022,\u0022Version\u0022: \u00222.15.1\u0022},{\u0022Nom\u0022: \u0022ActiveDirectoryDsc\u0022,\u0022Version\u0022: \u00226.2.0\u0022},{\u0022Nom\u0022: \u0022ComputerManagementDsc\u0022,\u0022Version\u0022: \u00229.0.0\u0022},{\u0022Nom\u0022: \u0022NetworkingDsc\u0022,\u0022Version\u0022: \u00229.0.0\u0022}]"
}
Screenshot of the variable
The problem is present for all list type variables I have
Any thoughts ?
Hi @atripp
Thanks for the reply and the tricks.
I thought that credential name was just a label so I changed it. Bad idea
Best regards
PhilippeC.
@atripp
Yes, you should update the doc.
Starting debian 11 and ubuntu 22.04 apt-key is deprecated.
You will find more details on this article
Best regards
PhilippeC.