Install on IIS
jochem4207
Posts: 47
Hello Redgate,
I started today with exploring the Deployment manager. I've found lots of awesome stuff but i've problems when rolling out a package to IIS sites.
I don't seem to find a parameter for hostname bindings.
I also get this warning. Maybe it is actually the problem:
Edit:
I use the variables:
RedGateCreateWebSiteOnPort
RedGateCreateWebSiteApplicationPool
RedGateWebSiteName
I started today with exploring the Deployment manager. I've found lots of awesome stuff but i've problems when rolling out a package to IIS sites.
I don't seem to find a parameter for hostname bindings.
I also get this warning. Maybe it is actually the problem:
2013-12-06 13:58:46 +01:00 INFO Updating IIS website *sitename*. You can use the RedGateWebSiteName project variable to override an IIS site name. If you don't specify the variable, the package name is used. 2013-12-06 13:58:47 +01:00 WARN Could not find IIS website *sitename* on the local machine. You can use the RedGateWebSiteName project variable to override an IIS site name or specify a virtual directory. If you don't specify the variable, the package name is used. 2013-12-06 13:58:48 +01:00 INFO Created an application pool 'Sites' for .NET v4.0
Edit:
I use the variables:
RedGateCreateWebSiteOnPort
RedGateCreateWebSiteApplicationPool
RedGateWebSiteName
Comments
Did you create a new release after you added RedGateWebSiteName variable and before you deployed it?
Releases in Deployment Manager are immutable, which means that you need to create a new release every time you change package steps and variables, for it to affect your deployment.
While immutability of releases guarantees reliability during deployments, it can be painful when you are changing project configuration!
Best regards,
Chris
Redgate Software
I will check that out soon today.
Also the a other question came up:
Is it possible to define redgate variables other than key value pairs. (To replace bigger parts in the config)
For example:
Greetings,
Jochem
You can use web config transforms for this purpose. Eg. web.Testing.config and web.Production.config, where Testing and Production are matching your environment names. Deployment Manager will apply these at deployment time.
We'd like to do this in a more elegant way, and there is a UserVoice item for this which you can vote for:
http://redgate.uservoice.com/forums/176 ... in-config-
Best wishes,
Justin
Developer
Redgate Software Ltd
I've voted for the uservoice feature. I also see it is a planned feature. Is there any release date availble ?
Thanks for the fast reply.
Greets
Actually we've got a meeting this afternoon where we'll be discussing upcoming work. I've got a proposed solution, but we need to spike a few things first.
I'll update the UserVoice item as I know more.
Thanks,
Justin
Developer
Redgate Software Ltd
Hey Justin,
Is there any news about this idea/issue?
Edit: About the topicstart.
When I use RedGateWebsiteName it does give a name to the IIS Site but the host name still keeps empty.
Like this uservoice: http://redgate.uservoice.com/forums/176 ... te-binding
Thanks
Unfortunately nothing conclusive from that meeting on this specific topic, but I suspect we might not tackle it too soon.
Did you try using web.config transforms to achieve this?
The solution I was imagining should also be possible using a predeploy.ps1. If you want to explore it, I was thinking to apply the web deploy parameters.xml concept:
http://msdn.microsoft.com/en-us/library ... 8(v=vs.110).aspx
You create a parameters.xml file that is part of your package. That describes the parameters available to configure using name, description and eg. XPath expressions. This way, you can configure anything, quite elegantly from variables in Deployment Manager.
The challenge I saw was calling the web deploy transformation code from the predeploy.ps1. I'm sure it was in the Microsoft.Web.Publishing.Tasks namespace, in or near the ImportParametersFile class. But I got a little confused about how to create file objects to pass to the Files ITaskItem array.
Let us know if you make any progress on this.
Regarding the other UserVoice item, yes I can see how that would be a nice addition. Again, it's not something I expect us to be able to look at right now unfortunately, but do add your votes to the suggestion!
Best wishes,
Justin
Developer
Redgate Software Ltd
I tried to work on this solution.
I have a Powershell script that read/edits parameters.xml. After that I want to write a script that does the transformation. (see below)
I used this example:
http://stackoverflow.com/questions/8989737/web-config-transforms-outside-of-microsoft-msbuild
My stackoverflow question: http://stackoverflow.com/questions/2065 ... powershell
Edit:
Deleted some questions
After some more thinking and figuring out i've now
- edit/save/create a XML (e.g. transform.xml)
- Powershell script that execute the transformation (code is on stackoverflow)
Fixed the most of that problems now. By using a defaultlocation
Two days later I finially have all stuff working
I can now use any redgate variable in any config with
For everyone who is missing this option in redgate to replace any variable with redgate variable, I recommend taking a look into the xml functions of powershell
Greets Jochem
Redgate Software
Hey Mike,
This is true but i wanted to say that I used a deploy powershell to create a xml file. So I can use all variables anywhere I want. After that I call the transform so it get transformed. But I think I'm going to change this so the redgate environment-specific code does this for me.
----
About the new release it's awesome that we can delete or deploys. This cleans up a lot! Also Happy christmas/holidays