Last time I spoke of deployment with Powershell I didn’t really get into the nitty gritty details of how to actually do some of this stuff so i just want to go a little deeper into how to actually accomplish this.
We have a number of different environments here - some for devs, other for QA and some for end users to see our progress before going live.
Each one of these environments has a mixture of ArcGIS, database and web servers and dependencies to various third party services that are specific to that environment (think Bing APIs and keys, etc.) To manage all of this I use an xml file per environment that describes these resources and the roles they play in the environment. You will see something similar to this in our dev.xml file:
You can see there are 5 nodes that are assigned different roles. When the deployment script runs it will loop trough these nodes and run the deployment package with the correct roles. This push model works well for us for the time being as it allows for very granular control over the process with no waiting and guessing what state each node is in. We haven’t really got any tolerance for that yet, it’s something you kinda work you way up to.
The final node is virtual and it covers tasks that need to be run but not against any particular node. I have been planing to add one to the start as well and move the dbproxy to a virtual node since don’t acutely run this on the db server - hence the proxy in the dbproxy name.
The Powershell script that does the heavy lifting is the deploy script but to bootstrap that we use something like below. I’ve omitted some parts that are not super interesting for brevity’s sake.