Am I missing something here Anthill deployment engineers? The concept is quit simple; if you deploy code to a XenApp 6.5 server (or any version) and it fails, chances are people have sessions remaining on the server that need ended before the deployment can be successfull. Please take the time to better understand the environments you server and cater to as it is indeed possible that people or other processes have handles on the files you intend to replace! At a bare minimum the pre deployment processing should go like this:
If “notepad.exe” is running, use the following command to end existing sessions prior to deployment – taskkill /im “notepad.exe” /f. After the command runs to end the process, simply either check for any existing sessions or proceed to the actual deployment! Now I’m sure the logic can be slightly more difficult but you get the drift right? RIGHT?
[Update] Say you want to get a little more complex with the pre-deployment update logic. The following example should get you up and running, and even get the the documentation started for the non technology minded project management people you are forced to deal with. A few things to make note of:
- Logic is as follows… this is just basically a glorified batch file that’s callable via anthill deployments or any other scripted process.
- Enumerate running processes and look for instances where marketdataapplication.exe is running and only end instances where the “specified” parameter is detected
- Example: if marketdataapplication.exe is running with the following parameter “-app:bloombergTest” is detected end the underlying process.
- .NET concole application will be capable of accepting command-line parameters which can be called via anthill deployments. The ability to specify the –app parameter will allow for a targeted deployment.
- Example call from anthill deployment: ./marketdataapplication.exe –app:bloombergTest –>this will only end instances where –app:matricstest is detected. Any other instances with marketdataapplication.exe will be left in a functional state.
- The console application needs to be secure. The intended .net app will run under the context of the user account – no need to specify a password or user account. If the user running the app does not have the rights, the app will simply fail.
- Enumerate running processes and look for instances where marketdataapplication.exe is running and only end instances where the “specified” parameter is detected
That’s it in a nutshell, the above should both address a simple deployment where you can end any existing sessions with taskkill and a more complex deployment where its possible to see many the same application running but with different commands.
