I have been asked to set up a way to automatically deploy virtual services to the VSE. In short, instead of allowing the user to do it, I want some kind of script that will do this for me. We use TFS in Visual Studio as a source code repository only--not for builds with CA LISA.
What are my options if I want to deploy items to the VSE via scripting?
We have deploy script that executes lines from a CSV file of services through the VSEManager command line tool.
This looks helpful. One question though: how do I start this tool? I've gone through the BIN directory and nothing in there seems to help, or open a separate window.
Open a command prompt and navigate to the bin directory - VSEManager.exe
Run it with no arguments and it'll give you the --help message
D:\APPS\Lisa\7.5.2\bin\MakeMar --create --marinfo=D:\AssetsV7\QA2_April.mari --archive=D:\Temp\QA2_April.mar
D:\APPS\Lisa\7.5.2\bin\VSEManager.exe --registry tcp://10.11.12.13:2010/Registry --vse VirtualServices_A9_VSE --deploy D:\Temp\QA2_April.mar
D:\APPS\Lisa\7.5.2\bin\VSEManager.exe --registry tcp://10.11.12.13:2010/Registry --vse VirtualServices_A9_VSE --stop QA2_April
D:\APPS\Lisa\7.5.2\bin\VSEManager.exe --registry tcp://10.11.12.13:2010/Registry --vse VirtualServices_A9_VSE --start QA2_April
Put your commands in a bat file.
If you are still struggling with your automated deployment approach I can share my bash scripts for automated deployment.
Let me know in case you need them.
I played with the examples that Ben Atkinson provided for me and I have a basic .bat file that I can play with that works. I'm going to play around with it in Visual Studio and let you know soonish.
Thanks for the help, Slaman.
Just in case if you don't fancy writing bash scripts, see below test case that will allow you to deploy MAR file from LISA Test Case.
I also posted batch scripts here that use Deploymar
I have a PowerShell script which is executed by Jenkins through a Stash webhook that notifies Jenkins when we've merged a .mar file to the master branch. It remotely executes the VSEManager CLI command on the VSE server, passing the filenames/paths of the .mar files from the git commit log.
So, our process flow is:
- User commits VSI/VSM changes to their local git repo, and includes the .mar file
- User pushes the change up to Stash
- User creates a Pull request to merge their dev branch to the master branch
- Admin checks the request is correct, then approves and clicks the 'Merge' button
- Stash contacts Jenkins to say a change has been made, Jenkins runs the PowerShell script which deploys/redeploys/removes the virtual service to/from the VSE.
I've also modified the PowerShell script to POST to the REST API for LISA v7.5 & v8 (v8 requires extra calls as the ACL is enabled).
This document was generated from the following discussion: Tips for Approaching Automated Deployments.