Looking for best practice to add multiple IP bindings to site

(John Fox) #1

Hi there,

I’m trying to find the best way to add multiple IP bindings to a IIS website as part of our blue green website deployment. I need a IIS website with a number of bindings to a range of IP addresses on the same domain.

I was hoping to be able to use a variable for each environment with multiple IP addresses. I’ve tried the site setup using the variable. It create the site with only the one binding of the first IP address and not the rest.

I was hoping it would create multiple bindings for each of the IP addresses and seen similar behaviour using variables with multiple values. Guessing the IIS config is a bit different in that there’s a couple of variables at play.

Any advice on the best way to achieve this?

I was hoping to do it with variables but not too sure if it’s possible. I think it’s not possible to use the create IIS site step to have the two different sets of IPs for seperate environments (3 x IPs in blue and 3 x IP green environments).

There’s a custom IIS plugin to add bindings and I am going to start to look at this and see if I can combine it with a variable holding the IPs

(John Fox) #2

Just had a look over the IIS community plugin to add a binding (both https and add with SNI) but both of them do not allow me to add a binding to an IP address.

(Daniel Fischer) #4

Hi John,

Thanks for getting in touch! The built-in Deploy to IIS template gives you the option to add multiple bindings to your website.

Under the Bindings section when configuring this step, you are able to ADD additional bindings. Each part of this binding can be directly provided a value or point towards a variable.

You even have the ability to dynamically enable or disable each binding using our Variable Substitution Syntax. You can bind a variable to the Enabled option and have it evaluate to true or false depending on your needs. (See Conditionals)

Does this sound like you you are after?

Feel free to send through any further thoughts or questions here. And if I have misinterpreted your issue, please let me know. :slight_smile:

Looking forward to hearing from you.

Best regards,