Bind to IP Address of Target

I am in the process of bringing my company up to using Octopus for our deployments and have run into a bit of a snag. This is the last snag I have to work out before purchasing will be approved.

We have many customers and each of them is given a virtual machine to run the software on. Octopus would be in charge of deploying our product to all of the VMs when there is an update.

On each VM, there are two web sites. One is the main web application and the other is a reporting service. The main web site is setup as a web application and is bound to the specific IP address of the machine. The reporting service is a virtual directory under the Default Web Site which is bound to “All Unassigned”. Since they aren’t bound to the same thing, it works and both can be started at the same time.

The problem is in deploying the main application. I need to bind to that machine’s ip address instead of *. But, since we have so many VMs, variables really can’t be used. At least I can’t see how they can. What I need is a variable that contains the IP Address of the target tentacle.

Any ideas what I can do here?

Hi Brian

Thanks for getting in touch! This is a fun one.

What I’d probably do (and it’s slightly ugly) is grab the IP of the machine with a powershell script. So in the deployment process, have the first step be a script that figures out the correct IP address and uses Set-OctopusVariable to set it. Then in your nuget step, bind IIS to something like


(obviously replacing the step and variable name to suit).

Have a read of these :

and you should be able to do what you want.

Let me know if that makes sense and works for you.

Kind regards