I am creating a web application in ASP.NET. This web application will get deployed to different web sites(will have different URL). These websites can be on the same server or can be placed on different servers too.
Please suggest if this is possible using OctopusDeploy, and how.
Thanks for getting in touch. Definitely can be done. Octopus lets you create variables whose values will change depending on how they are scoped. So for example you could have the same variable with different values depending on which Machine, Step, Role or Environment it is being used.
Lets say you have ServerA which has WebSiteA and ServerB which has WebSiteB. Both websites will use the exact same webapplication. You could create a variable called WebSiteName twice, each with a different scope:
(1)WebSiteName - Value: “WebsiteA” ; Scope: “ServerA”. This means that the variable’s value will be “WebSiteA” when it is used to deploy to a server with the name “ServerA”
Then, when the time comes to configure the deployment step, you’ll just use this variable when Octopus asks you for the name of the website, and it’lll be automatically resolved during the deployment. You might gonna have to do the same for other things like App Pools, Bindings, etc.
I am trying to do the same thing because we are upgrading to a new web server, so I need the deployment to do to 2 servers while we are in the migration process.
The problem I am having is with the IIS bindings and the SSL thumbprints.
I read the bit about scopes, but I don’t see where I can add those. I am running version 2.6.3.
Is it possible to deploy to multiple servers with different IIS bindings, and how do I tell one step to use one set of bindings for serverA and another set of bindings for serverB?
You can add a scope to a variable by going to your project’s Variables menu, then on a variable click on “Press enter to edit scope” (see 1.jpg) and then select the scope where you want to use that variable on the pop-up window (see 2.jpg).
For the bindings I’d recommend you to create 3 variables called Port, IPAddress and Hostname and use them on the “add binding” fields (see 3.jpg). Then adjust the scopes of each variable depending on the machine/environment/step you are using them.