VS Code Experience on Mainframe with Eclipse Che

An easy install recipe

Dejan Milinkovic
Modern Mainframe
5 min readMay 19, 2020

--

Photo by Katie Smith on Unsplash

During this Covid-19 many of us in software development are fortunate to continue normal work simply from home. But a recent conversation I had with a colleague highlights two changes that have become evident. During a call, I asked him what he was doing. He replied, “trying out COBOL program editing in Eclipse Che while waiting for the bread that I just put into the oven.” What are those changes? First, developers are looking into business critical languages, like COBOL, while trying out new technologies for development, such as Eclipse Che. And second, people are spending a lot more time in the kitchen.

Along with a couple of colleagues, I have created a short guide, or recipe in fact, to help you set up Eclipse Che on your own laptop.

After we are done, you will be able to create a COBOL development workspace using che4z with VS code experience.

So let’s have a look at our recipe (with googling, you can achieve the same results, but this is a more straightforward approach):

(Preparation time: 20–60 minutes; 1 consumer)

Ingredients:

  • 1 laptop (we validated with Mac OS and also Windows 10)
  • 1 enthusiastic user with administration rights
  • 1 Internet Connection
  • A pinch of attention to details (or smart usage of copy/paste :))

Mac OS users

  1. Install homebrew
  2. Run `brew install helm`
  3. Proceed to step 2 in Windows part

Windows 10 users

1. Install Helm.

  • Validate that the PATH was updated:
    i. Open Terminal / command console and type helm
    Note: If you had the terminal open prior to making changes, close and reopen it in order for the changes to take effect
    ii. A summary about helm should display as a result of successful PATH update

Now both Mac OS and Windows 10 OS continue together:

2. Install Docker Desktop (with pre-selected config) https://www.docker.com/products/docker-desktop

3. (Optional) Register on DockerHub.

4. Open Docker Desktop Dashboard and Enable Kubernetes in Settings / Kubernetes as shown below:

  • Hit Apply and Restart

Note: Allow 5 to 10 minutes, for the change to take effect then validate that Kubernetes is running

5. Install Eclipse Che

  • Open PowerShell or Command prompt on Windows and run the following command:

    Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString(‘https://www.eclipse.org/che/chectl/win/'))
  • On Mac OS run command in terminal
    bash <(curl -sL https://www.eclipse.org/che/chectl/)
  • Validate the version of chectl by running the command: chectl version

The chectl version should be 7.11.0 or higher. In the case that there is a different version, such as 0.0.20200408-next.cac07fe run the command: chectl update stable

Note: Eclipse Che releases a new version approximately each 3 weeks, so keep in mind that you should update regularly to ensure you are using the current version.

6. Run the following command in powershell (windows 10) or in terminal for mac users:

chectl server:start -- platform=docker-desktop

Allow a few minutes for this to complete, then verify that it finished successfully.

7. Open Eclipse Che

  • Use the link that you obtained from the previous step to open Eclipse Che within your browser, for example http://che-che.xxx.xxx.nip.io/ in my case
  • Validate you have a dashboard of your own local che server

8. Create your own workspace

  • Choose the Mainframe Basic Stack and create your COBOL Workspace (It will take some time like baking bread, so please be patient).

Note: the time it takes could be dependent on your resources settings in Docker Desktop (you can change it based on your laptop performance) and internet connection

So now you have your own workspace allowing you to use code4z components to work with COBOL applications. To understand more about Mainframe stack, recommend to check this blog from my colleague Lukas or che4z project on github.

Bon appetit!

Troubleshooting

Windows 10 users

Step 3

If information about Helm is not displayed, some errors are displayed, please check if the System Environment variable path is correct, and then repeat the process and try again.

Both Mac OS and Windows 10 users:

Step 5

Note: if you have more than one kubernetes you may need to make sure that docker desktop is selected.

Step 6

In case of errors, please check:

  • Error: E_REQUISITE_NOT_FOUND
    Run command (in terminal): kubectl

Validate if kubectl.exe is in folder:
c:\Program Files\Docker\Docker\resources\bin\
and if this folder is added in PATH (System Environment variable)

  • Error: Command failed with ENOENT: kubectl apply -f installers\cert-manager.yml — validate=false

Spawn kubectl apply -f installers\cert-manager.yml — validate=false ENOENT

  • Error: The path “installers\\cert-manager.yml” does not exist
    Please run command from specific folder:
    cd C:\ProgramData\chectl\chectl\c run chectl server:start — platform=docker-desktop

Allow a few minutes for this to complete, then verify that it finished successfully

Step 8

If you are not able to create a workspace from any of default stacks, please try to reset kubernetes cluster (from Docker Desktop Dashboard) and start again from step #5

Also, it can happen that your environment after some time is not working anymore. In most cases it is because your IP changed hence you cannot access Eclipse che dashboard anymore.

  • Open powershell
  • run chectl server:delete
  • run chectl server:start — platform=docker-desktop once again. (step 6)
  • use new URL

--

--

Dejan Milinkovic
Modern Mainframe

Product manager @Broadcom (previously CA technologies), working with Development tools. Crazy, enthusiastic, fan of sports and nature.