Automating the Installation of VS Code With Mainframe Extensions
I have completely automated the installation of VS Code at Topdanmark, including the mainframe extensions, I did this to save time. People can simply request the “mainframe developer” package through an internal web page and it will automatically install on their workstation with relevant mainframe extensions and the right Zowe Explorer settings.
Manually installing VS Code, extensions, and configuring Zowe Explorer can easily take up to a few hours depending on how many extensions you use and how complicated the mainframe setup is, not to mention not every person who will use it will necessarily know what settings Zowe should be configured with. I won’t go into details of everything I did to automate the installation of VS Code, because not everyone uses the same package manager as we do. Many organizations at this point also don’t allow users to manually install software, so for many organizations automating all this is necessary and not just for saving time.
Automating the installation of extensions
After you have automated the installation of VS Code you will likely want to automate the installation of extensions. To do this the most efficient way is to install the extension through it's .vsix package. You can obtain these by going to the VS Code marketplace in your browser, as far as I know you cannot obtain these easily through the extensions manager in VS Code
After you have done this, you can install the vsix package through a command, which can be put into a script for automation.
As an example here is how IBM Z Open Editor 3.3.3 would be installed and uninstalled:
code --install-extension IBM.zopeneditor-3.3.3.vsix
To uninstall you can use
code --uninstall-extension IBM.zopeneditor-3.3.3.vsix
?
Automating the distribution of Zowe Explorer profiles and settings
You will likely also want to distribute the same settings to everyone or multiple people, you can create a script that can do this. The files you will want to transfer are on Windows supposed to go in %userprofile%\.zowe
You will want to transfer the following files out to the clients:
zowe.config.json
zowe.schema.json
If you don’t transfer the schema file then it won’t be ready out of the box, so make sure both are transferred into the .zowe folder.
If you need to generate a Zowe profile there’s documentation on the official Zowe website
Zowe profile customization tips
Plugins to consider rolling out in your setup
There's a growing list of mainframe/Db2 plugin list for VS Code here's a few to consider besides IBM Z Open Editor and Zowe Explorer:
--
7 个月May you tell me how can I solve this problems
Software Developer, Speaker & Advocate
1 年The VS Code CLI is so powerful (I am a big user of serve-web) so thanks for sharing! But, the way we handle it in IBM i is simply through an extension package. It has a whopping 10+ extensions in. Sadly this doesn’t automate any configuration for the user though as you suggest! https://marketplace.visualstudio.com/items?itemName=HalcyonTechLtd.ibm-i-development-pack
Principal Infrastructure Engineer
1 年Thank you for posting this! Nice work
Db2 for z/OS System Programmer at Handelsbanken
1 年Thank you so much for this. This may be just what we needed to convince some peolpe at our shop that we should use VS Code and Db2 Developer Extension.