So this an issue with the Tentacle software install using automation and not the octopus server.
Installer Octopus.Tentacle.5.0.13-x64
Cert creation code
Create a new cert for the Octopus Agent
$result = New-SelfSignedCertificate -DnsName “Octopus” -CertStoreLocation “cert:\LocalMachine\My” # -ProviderName “Microsoft Strong Cryptographic Provider”
$thumbprint = $result.Thumbprint
(Get-ChildItem -Path Cert:\LocalMachine\My$thumbprint).FriendlyName = “Octopus agent”
$path = “cert:\localMachine\my” + $thumbprint
$securePassword = ConvertTo-SecureString -String “InstallMe” -AsPlainText -Force
Export-PfxCertificate -Cert $path -FilePath $FilePath -Password $PfxPW -Verbose | Out-Null
Tentacle Config process
Set-Location “C:\Program Files\Octopus Deploy\Tentacle”
$tentacleConfigFile = $RootFolder + “\Octopus\Tentacle.config”
& .\tentacle.exe create-instance --instance “Tentacle” --config $tentacleConfigFile --console | Write-Output
if ($lastExitCode -ne 0) {
throw “Installation failed on create-instance”
}
Write-host "Cert Path " $CertPath
& .\tentacle.exe import-certificate --instance “Tentacle” -f $CertPath --console | Write-Output
020-07-03 10:44:33.7055 2692 1 INFO ================================================================================
2020-07-03 10:44:33.7055 2692 1 INFO Changed log folder from C:\Users\webadmin\AppData\Local\Octopus\Logs to c:\Bell\Octopus\Logs
2020-07-03 10:44:33.7211 2692 1 INFO Tentacle.exe version 5.0.13 (5.0.13+Branch.master.Sha.b2d2a46b46612a2bd237d7a2d35cc6ce73b1c9d9) instance Tentacle
2020-07-03 10:44:33.7211 2692 1 INFO Environment Information:
OperatingSystem: Microsoft Windows 6.3.9600
OsBitVersion: x64
Is64BitProcess: True
CurrentUser: MSPWEB010\webadmin
MachineName: MSPWEB010
ProcessorCount: 2
CurrentDirectory: C:\Program Files\Octopus Deploy\Tentacle
TempDirectory: C:\Users\webadmin\AppData\Local\Temp\
HostProcessName: Tentacle
PID: 2692
2020-07-03 10:44:33.7680 2692 1 INFO ==== ImportCertificateCommand ====
2020-07-03 10:44:33.7836 2692 1 INFO CommandLine: C:\Program Files\Octopus Deploy\Tentacle\Tentacle.exe import-certificate --instance Tentacle --from-file C:\Temp\OctopusInstaller\OctoCert.pfx --pfx-password ******** --console
2020-07-03 10:44:33.7836 2692 1 INFO Importing the certificate stored in PFX file in C:\Temp\OctopusInstaller\OctoCert.pfx using the provided password…
2020-07-03 10:44:33.8305 2692 1 WARN The X509 certificate CN=Octopus was loaded but the private key was not loaded.
Furthermore, the private key file could not be located: Unable to obtain private key file name
2020-07-03 10:44:33.8305 2692 1 ERROR ===============================================================================
2020-07-03 10:44:33.8461 2692 1 FATAL Unable to load X509 Certificate file. The X509 certificate file you provided does not include the private key. Please make sure the private key is included in your X509 certificate file and try again.
System.Security.Cryptography.CryptographicException
at Octopus.Shared.Security.Certificates.CertificateEncoder.FromPfxFile(String pfxFilePath, String password)
at Octopus.Tentacle.Commands.ImportCertificateCommand.Start()
at Octopus.Shared.Startup.AbstractCommand.Start(String[] commandLineArguments, ICommandRuntime commandRuntime, OptionSet commonOptions)
at Octopus.Shared.Startup.ConsoleHost.Run(Action`1 start, Action shutdown)
at Octopus.Shared.Startup.OctopusProgram.RunHost(ICommandHost host)
at Octopus.Shared.Startup.OctopusProgram.Run()
2020-07-03 10:44:33.8618 2692 1 FATAL -------------------------------------------------------------------------------
Terminating process with exit code 100
Full error details are available in the log files at:
c:\Bell\Octopus\Logs
C:\Users\webadmin\AppData\Local\Octopus\Logs
If you need help, please send these log files to https://octopus.com/support