Remove package from octopusdeploy built-in nuget

octopusdeployOctopusdeploy has an built-in nuget feed as of version 2.1. This nuget feed is based on Nuget.Lucene. It is read-only and not usable from visual studio or other tools. A nuget delete will fail with “Not found” every time.

nuget.delete

During the setup and testing of octopusdeploy I created and pushed some packages I no longer need and have never used in a release. They are considered collateral damage and stay there forever, cluttering my beautiful feed.

There is no way (I know of) to delete a package using the official way.


The unofficial way of removing a package is to (remote desktop) login to your octopusdeploy server and locate the packages folder. In a default installation ( next-next-finish 😉 ) this is C:\Octopus\OctopusServer\Repository\Packages. Remove whatever packages / folders you no longer want.

works-on-my-machine
Since the information is not immediate synchronized with the index, the packages still end up in the search results. The next push of a package solves that. Your feed is now a little less cluttered.


Posted in Tooling | Tagged , , | Leave a comment

Week roundup

Here are the best articles I’ve read/seen last week:

Image courtesy of kanate / FreeDigitalPhotos.net

Image courtesy of kanate / FreeDigitalPhotos.net

What are your best reads this week? Leave them in the comments below.

Posted in Uncategorized | Tagged , , | Leave a comment

Tentacle register on new Azure instance

octopusdeployWe use octopus deploy for managing our environments. This uses agents (called tentacles) on the machines it controls. To get the correct configuration on an Azure VM created from an image I use a sysprep script.

The tentacle service can be configured from the commandline. Using the configuration wizard you can commit changes direct or generate a script. This script is commandline and can be run as a startup script. This is all well documented.

The trick of getting the script to run after provisioning is to add it to SetupComplete2.cmd in the C:\windows\OEM folder:

cd "C:\Program Files\Octopus Deploy\Tentacle"

Tentacle.exe create-instance --instance="Tentacle" --config="C:\Octopus\Tentacle\Tentacle.config"
Tentacle.exe new-certificate --instance="Tentacle" --if-blank
Tentacle.exe configure --instance="Tentacle" --home="C:\Octopus" --app="C:\Octopus\Applications"
Tentacle.exe register-with --instance "Tentacle" --server "http://MY-OCTOPUS" --apiKey="APIKEY" --role "web-server" --environment "Test" --comms-style TentacleActive
Tentacle.exe service --instance="Tentacle" --install --start

When loadbalancing the machines you should use the Tentacle in polling mode as there is no way to target a machine directly when it is behind a loadbalancer. In the script above that is what TentacleActive(line 6) does.

Now do the sysprep and image capture as described in the windowsazure documentation. When you create a new VM based on this image it will register with the Octopusdeploy server after it is done provisioning.

Important: uncheck the install vm agent when creating the vm you’re going to image. When the base image contains the vm agent and you leave the (default) option checked creating a new vm, that new vm remains in the running (provisioning) state for ages. Not installing the vm agent in your base image will prevent you from making that mistake.

References

Posted in Tooling | Tagged , , , , , , | Leave a comment

Week roundup

Here are the best articles I’ve read/seen last week:

Image courtesy of kanate / FreeDigitalPhotos.net

Image courtesy of kanate / FreeDigitalPhotos.net

What are your best reads this week? Leave them in the comments below.

Posted in Uncategorized | Tagged | Leave a comment