Automating the Installation of VS Code With Mainframe Extensions

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

Image showing the IBM Z Open Editor in the VS Code marketplace

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

  1. You can change the highlighted field to a more descriptive name the default "zosmf"
  2. You can add in multiple LPARs/machines by simply adding another section
  3. The different LPARs/machines can now be added to the different sections easily

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:


May you tell me how can I solve this problems

  • 该图片无替代文字
回复
Liam Barry Allan

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

Rich Szabo

Principal Infrastructure Engineer

1 年

Thank you for posting this! Nice work

Martin ?lund

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.

要查看或添加评论,请登录

Emma Skovg?rd的更多文章