Support for configurable IIS bindings?

I’d like to dynamically generate or modify the bindings on a website I’m deploying. (It’s a multi-tenanted app with a relatively small number of businesses as customers. Each business that signs up gets to customize their own url.)

I’m currently doing this in octopus using a deployment process step with an arbitrarily large number of bindings defined based on variables for the hostname, SSL certificate and enabled flag. I populate those variables in a script step using Set-OctopusVariable. I find it annoying that I have to pre-configure the deployment step to support enough bindings needed at run-time.

Ultimately an option to preserve existing bindings would allow me to solve this in a more elegant way.

I think I could also use the IIS bindings backup and restore steps from the library, but I don’t like the idea of temporarily removing bindings during deployment. This discussion talks about writing a custom version of calmari, but I share the posters concern about maintaining that.

Is there any way to write a script to generate or modify the entire contents of the Octopus.Action.IISWebSite.Bindings property before the following step runs? My (limited) knowledge is that variables output from one step need to be included in subsequent steps as #{Octopus.Action[SetBindingsEnabled].Output.Enable2}

Are there any other more elegant ways to do this?

Thanks,
Matt

Hi Matt,

Thanks for getting in touch! As you can use variables in the binding feature, my first thought if you’re using tenants is to set up your bindings as tenant variables, where you can have variables per tenant. Building these variables using a convention would make it easier to manage as you continue adding new tenants. We have a great documentation page focusing on tenant-specific variables specifically in this way.

Check out our blog post as well for further reading if you’re interested.

Let me know what you think. With that being said, can you send screenshots showing how you’re setting these variables and accomplishing this currently? Anything that’ll help me get a better picture of your current setup and process, and I’ll be happy to reassess and help get to the best solution for your scenario.

And don’t hesitate to reach out if you have any other questions as well.

Best regards,

Kenny