I want to deploy to an Azure SQL database, and I would like to run the tentacle performing deployments to be in Azure. I prefer to run everything I can on PaaS, and currently I have a solution where I install the tentacle in a Cloud Service. Since it seems like Cloud Services will be deprecated eventually and Web Apps are the future, I am trying to run the tentacle inside a site extension.
Here is my strategy to figure out how to get this working:
- Extract the tentacle installer to a folder
- Use the Kudu extension to upload the files from the installer (https://*.scm.azurewebsites.net/DebugConsole/?shell=powershell)
- Configure the tentacle using the debugging console with commands something like:
.\Tentacle.exe create-instance --instance “Tentacle” --config “D:\home\SiteExtensions\OctopusTentacle\Tentacle.config” --console
.\Tentacle.exe new-certificate --instance “Tentacle” --if-blank --console
.\Tentacle.exe configure --instance “Tentacle” --home “D:\home\SiteExtensions\OctopusTentacle” --app “D:\home\SiteExtensions\OctopusTentacle\Applications” --port “10933” --console
.\Tentacle.exe configure --instance “Tentacle” --trust “OCTOPUS_THUMBPRINT” --console
"netsh" advfirewall firewall add rule “name=Octopus Deploy Tentacle” dir=in action=allow protocol=TCP localport=10933
.\Tentacle.exe agent --instance “Tentacle” --console
I can’t get the first command to run without getting errors (see below). Is this something I can somehow work around? My goal here is really to figure out how create a site extension that runs a tentacle as an HttpPlatformHandler (so not a windows service) similar to this: https://github.com/wadewegner/azure-go-lang-site-extension/blob/master/golang/applicationHost.xdt
Thanks!
PS D:\home\SiteExtensions\OctopusTentacle> .\Tentacle.exe create-instance --instance “Tentacle” --config “D:\home\SiteExtensions\OctopusTentacle\Tentacle.config” --console
2015-10-24 14:34:31.7279 Error Error initializing target EventLog Target[eventlog] System.Security.SecurityException: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security.
at System.Diagnostics.EventLog.FindSourceRegistration(String source, String machineName, Boolean readOnly, Boolean wantToCreate)
at System.Diagnostics.EventLog._InternalLogNameFromSourceName(String source, String machineName)
at System.Diagnostics.EventLog.LogNameFromSourceName(String source, String machineName)
at NLog.Targets.EventLogTarget.InitializeTarget()
at NLog.Targets.Target.Initialize(LoggingConfiguration configuration)
The Zone of the assembly that failed was:
MyComputer.
Octopus Deploy: Tentacle version 3.1.5 (3.1.5+Branch.master.Sha.a3fb854d900077b8b028687f3a4ca01c59e84f56)
Creating empty configuration file: D:\home\SiteExtensions\OctopusTentacle\Tentacle.config
Saving instance: Tentacle
Error: The specified registry key does not exist.
Full error details are available in the log files.
At: C:\DWASFiles\Sites#1octo-tentacle\LocalAppData\Octopus\Logs
The specified registry key does not exist.
System.IO.IOException: The specified registry key does not exist.
at Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)
at Microsoft.Win32.RegistryKey.CreateSubKeyInternal(String subkey, RegistryKeyPermissionCheck permissionCheck, Object registrySecurityObj, RegistryOptions registryOptions)
at Microsoft.Win32.RegistryKey.CreateSubKey(String subkey, RegistryKeyPermissionCheck permissionCheck)
at Octopus.Shared.Configuration.ApplicationInstanceStore.CreateOrOpenKeyForWrite(RegistryKey parent, String keyName) in Y:\work\refs\tags\3.1.5\source\Octopus.Shared\Configuration\ApplicationInstanceStore.cs:line 88
at Octopus.Shared.Configuration.ApplicationInstanceStore.SaveInstance(ApplicationInstanceRecord instanceRecord) in Y:\work\refs\tags\3.1.5\source\Octopus.Shared\Configuration\ApplicationInstanceStore.cs:line 61
at Octopus.Shared.Startup.AbstractCommand.Octopus.Shared.Startup.ICommand.Start(String[] commandLineArguments, ICommandRuntime commandRuntime, OptionSet commonOptions) in Y:\work\refs\tags\3.1.5\source\Octopus.Shared\Startup\AbstractCommand.cs:line 57
at Octopus.Shared.Startup.ConsoleHost.Run(Action`1 start, Action shutdown) in Y:\work\refs\tags\3.1.5\source\Octopus.Shared\Startup\ConsoleHost.cs:line 72
at Octopus.Shared.Startup.OctopusProgram.Run() in Y:\work\refs\tags\3.1.5\source\Octopus.Shared\Startup\OctopusProgram.cs:line 87