Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    Adding multiple IIS bindings with Ensure-Site

    Scheduled Pinned Locked Moved Support
    microsoftbuildmasteriis
    17 Posts 1 Posters 69 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ? This user is from outside of this forum
      Guest
      last edited by

      I am deploying IIS websites and am running into trouble with sites that have multiple bindings. How do you specify multiple bindings (ex. http/:80: AND https/:443:) using Ensure-Site? Do you have to use Ensure-Site twice (once for each binding)? If that is the case, are there any plans to allow this from one call of Ensure-Site? I have use cases where servers have 10 IIS sites with 6 bindings each (different host headers). Obviously this is a bit cumbersome if each one is a separate entry.

      Product: BuildMaster
      Version: 5.6.2

      1 Reply Last reply Reply Quote 0
      • ? This user is from outside of this forum
        Guest
        last edited by

        The operation/configuration doesn't currently support this, though it might not be too difficult to add. Alternatively an additional operation like Ensure-Bindings might work as well.

        Just looking at IisSiteConfiguration.cs, if the BindingInformation property were converted to a string[], you could then specify them in your OtterScript as scalar or vector expression (thus making it backwards compatible), and then alter the configuration's code to verify all of the bindings instead of just the first.

        1 Reply Last reply Reply Quote 0
        • ? This user is from outside of this forum
          Guest
          last edited by

          I'm also interested in this. Should we just customize the windows extension? What's the process for pushing back into the github repo?

          1 Reply Last reply Reply Quote 0
          • ? This user is from outside of this forum
            Guest
            last edited by

            Unfortunately we haven't had a chance to do this just yet (it's #11)... but if you'd be willing to try that'd be great! It should be pretty easy to be honest...

            Cloning and Patching an Inedo Extension

            1 Reply Last reply Reply Quote 0
            • ? This user is from outside of this forum
              Guest
              last edited by

              Writing a custom extension to do this is not really a valid answer. This is broken (as multiple bindings is very common)... and it not working is more than a minor inconvenience.

              It is not ideal, but can work around the problem with appcmd.exe more easily than writing my own extension.

              However, considering this does seem to be an easy change on your side (that would be backward compatible), as you mention, why is it taking so long to address it?

              1 Reply Last reply Reply Quote 0
              • ? This user is from outside of this forum
                Guest
                last edited by

                Well, the operation was modeled off of other IaC tools (Chef, Puppet, DSC), and they did not seem to support this, so we didn't know if it was needed. But yes, it would be a very nice thing to have, I agree!

                Of course there was only one request for it, and now there are two. We have a fairly large backlog, so it's a matter of prioritizing...

                1 Reply Last reply Reply Quote 0
                • ? This user is from outside of this forum
                  Guest
                  last edited by

                  This feature will be included in the next maintenance release of Otter (v1.5.3, scheduled this week).

                  It will also require an upgrade to the Windows extension (<s>v1.5.0</s> v1.5.1) which will be released at the same time.

                  We did want to get this in sooner but it took considerably more effort than initially estimated.

                  1 Reply Last reply Reply Quote 0
                  • ? This user is from outside of this forum
                    Guest
                    last edited by

                    Tod/Alana, thank you!

                    I look forward to testing it out.

                    1 Reply Last reply Reply Quote 0
                    • ? This user is from outside of this forum
                      Guest
                      last edited by

                      Thank you from me too!

                      1 Reply Last reply Reply Quote 0
                      • ? This user is from outside of this forum
                        Guest
                        last edited by

                        Alana/Tod, any update?

                        Still waiting for the fix... anxiously.

                        1 Reply Last reply Reply Quote 0
                        • ? This user is from outside of this forum
                          Guest
                          last edited by

                          The feature was shipped a while ago (Otter v1.5.3 and Windows extension v1.5.1), was there an issue with it?

                          1 Reply Last reply Reply Quote 0
                          • ? This user is from outside of this forum
                            Guest
                            last edited by

                            Hmmm... we only use BuildMaster (and Otter script). I am running the latest version with the latest version of the windows extension. It seems to still have problems with multiple bindings (or it is still complaining that there are multiple bindings and it is only going to replace the first).

                            Do these changes not get merged into BuildMaster?

                            1 Reply Last reply Reply Quote 0
                            • ? This user is from outside of this forum
                              Guest
                              last edited by

                              Just pushed the BuildMaster Windows extension v5.6.3 (for a different reason, but that one should include the multiple binding feature).

                              1 Reply Last reply Reply Quote 0
                              • ? This user is from outside of this forum
                                Guest
                                last edited by

                                Looking at the source code in GIT, it doesn't look like multiple hosts is implemented. Maybe I am looking in the wrong place, however, it would be nice to have an official answer and/or an official solution for this problem.

                                1 Reply Last reply Reply Quote 0
                                • ? This user is from outside of this forum
                                  Guest
                                  last edited by

                                  The operation is EnsureIisSiteOperation.cs, and it has been implemented.

                                  Here is how to use it (OtterSCript):

                                  IIS::Ensure-Site( 
                                      Name: Otter, 
                                      AppPool: OtterAppPool, 
                                      Path: E:\Websites\Otter, 
                                      Bindings: @( 
                                          %( 
                                              IPAddress: 192.0.2.100,  
                                              Port: 80,  
                                              HostName: example.com,  
                                              Protocol: http 
                                          ) 
                                      ) 
                                  );
                                  
                                  1 Reply Last reply Reply Quote 0
                                  • ? This user is from outside of this forum
                                    Guest
                                    last edited by

                                    Is there a minimum server requirement for this plugin to work?

                                    We are running BM version 5.6.3 (Build 3) and recently updated to the latest version of the windows plugin in order to use the multiple binding support. However, it seem not to work leaving us unable to deploy. Also rolling back to the previous version proves to be ineffective.

                                    When we use the original configuration (pre-multiple bindings) we get the following error:
                                    Unhandled exception: System.ArgumentNullException: Value cannot be null.

                                    When we use the new, multiple bindings configuration we get:
                                    System.Runtime.Serialization.SerializationException: Type 'Inedo.ExecutionEngine.RuntimeValue' in Assembly 'Inedo.ExecutionEngine, Version=50.1.0.0, Culture=neutral, PublicKeyToken=68703f0e52007e75' is not marked as serializable.

                                    Any ideas?

                                    1 Reply Last reply Reply Quote 0
                                    • ? This user is from outside of this forum
                                      Guest
                                      last edited by

                                      If you upgrade to the latest v5.6 (currently 5.6.11), then it should work OK!

                                      1 Reply Last reply Reply Quote 0

                                      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                      With your input, this post could be even better 💗

                                      Register Login
                                      • 1 / 1
                                      • First post
                                        Last post
                                      Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation