Categories
Automation

Avoiding Complex Octopus Deploy Variables

Octopus Deploy has a very smart system of variable management that allows you to scope variables to machines, environments, steps, roles – and to store variables in projects and in shared library sets. It is so flexible, you could make your life very miserably if you don’t make things as manageable as possible. Scope Octopus […]

Categories
Automation

Database Deployments with Octopus Deploy and a SQL Cluster

So you have a SQL Cluster and you want to run a database upgrade using Octopus Deploy… where do you start? There are actually two strategies you can employ to do this, and you can choose the most appropriate one based on how you have things set up. Octopus Deploy is cluster-agnoistic, but you can […]

Categories
Automation Programming Windows

Secure Octopus Deploy with an Auto-Updating Let’s Encrypt Certificate

Octopus Deploy has a web portal that runs a self-hosted website on whatever port you specify. You can even have Octopus generate a self-signed certificate in order to use HTTPS when browsing the web portal… but if you connect other application that are strictly validating certificates, they won’t be too pleased with self-signed certificates. Purchasing […]

Categories
Programming

Run a Console Application With PowerShell

I have a DbUp console application that needed to be executed with PowerShell (in my case via Octopus Deploy – but this works in any case), but I wanted to be able to get the result when executing it. By default, running the “Database.exe” from PowerShell will open a new console window for the application […]

Categories
Automation Programming

Highlight Versions on Octopus Deploy Dashboard

Unless you enjoy carefully comparing numbers, the Octopus Deploy Dashboard is a bit of a pain when it comes to seeing what version is one what environment. What follows is a terribly hacky trick you can use to colourise the version numbers on the dashboard (a feature that I imagine will eventually become a graceful […]

Categories
Automation

Cannot Create a File When That File Already Exists

This is one of the few hitches you may come across when deploying to IIS from Octopus Deploy: Cannot create a file when that file already exists. (Exception from HRESULT: 0x800700B7) This error simply means something is already running on the port number that you are planning on using (and that probably means the default […]

Categories
Automation Programming

Kill a Deployment Stuck in a Cancelled State in Octopus Deploy

This very rarely happens in Octopus Deploy, but if something catastrophic happens you may find it useful. I discovered this when the SQL Database server that has the OctopusDeploy database on was switched off during a deployment. Due to the loss of connectivity, the deployment got stuck, and cancelling it caused the deployment to get […]

Categories
Automation

Reconfigure Octopus Deploy on a Cloned VM

If you clone a VM that has an existing Octopus Deploy tentacle running, you’ll find that you’ll have a problem with a thumbprint clash. All you need to do is generate a new thumprint using tentacle.exe. You can do this using a command window, or PowerShell… cd “c:\Program Files\Octopus Deploy\Tentacle” .\tentacle.exe new-certificate This command will […]

Categories
Automation

Octopus Deploy: Deployments are Code

In the professional software development community, we use a disciplined approach to releasing our software. This is why many of us use tools such as Octopus Deploy to manage releases and deployments. Because this post is specifically about Octopus Deploy, I will assume that you understand why a code change should flow through a continuous […]

Categories
Automation Programming

Pass Octopus Deploy Variables to DacPac Deployment via PowerShell

This is the process for sending a variable from Octopus Deploy, all the way down to a SQL script that is hidden inside a DacPac, which is being called from PowerShell, which is being executed by Octopus Deploy. I have covered the end-to-end process of how to package and deploy your Visual Studio database project […]