IBM Z and LinuxONE - Languages

Languages

Languages

Broad range of supported development languages and tools allows to transform software delivery practices.

 View Only

Running IBM Db2 for z/OS Developer Extension in Eclipse Theia

By Kendrick Ren posted Tue October 27, 2020 09:06 PM

  

by Katherine Soohoo, Kendrick Ren

The Db2 Developer Extension is available on Visual Studio Code MarketPlace for VS Code users, but we've also built the extension to run on Eclipse Theia.

The following instructions describe how to download and run Db2 Developer Extension on Theia.

Downloading Db2 Developer Extension

Download the latest Db2 Developer Extension from our release page.

Building Theia and running Db2 Developer Extension

You can run Db2 Developer Extension on Theia by using either of the following methods:

  • Build with Node.js and yarn
  • Build with Docker

Build with Node.js and yarn

You can build Theia on your development machine and run it on a web server.

  1. Follow Theia's Setup instructions to set up the Theia application.
  2. After pasting the contents for the package.json file, add the following additional entries into the dependencies object:
    "@theia/plugin-ext": "next",
    "keytar": "^6.0.1",
    Attention: If you want to add built-in VS Code extensions for Theia, do not add the vscode-builtin-sql extension because it will conflict with the Db2 Developer Extension.
  3. Follow Theia's Building instructions to build the Theia application.
  4. Create a folder called plugins in the directory where you built Theia, and drop the downloaded VSIX file into that folder.
  5. Start Theia.
    yarn theia start --plugins=local-dir:./plugins
  6. Open a web browser and navigate to http://localhost:3000.

Build with Docker

You can build Theia from one of their Docker images and run it in a Docker container. Because Db2 Developer Extension requires additional prerequisites, we recommend creating a Dockerfile to build and run the container.

  1. Create a new folder and move to it.
    mkdir db2devext-docker
    cd db2devext-docker
  2. Drop the downloaded VSIX file into this folder.
  3. Create a Dockerfile in the same folder, copy and paste in the following contents, then save and close the file.
    FROM theiaide/theia-full:next
    
    # Install packages for storing secrets.
    RUN sudo apt-get update && \
        sudo apt-get upgrade -y && \
        sudo apt-get install -y gnome-keyring libsecret-1-0 dbus-x11
    
    # Add keytar to Theia installation.
    RUN sudo yarn add keytar@6.0.1
    
    # Remove built-in SQL extension.
    RUN rm -rf plugins/vscode-builtin-sql
    
    # Copy the Db2 for z/OS Developer Extension to the plugins folder.
    COPY db2forzosdeveloperextension*.vsix plugins/
  4. Build the Docker image from the Dockerfile.
    docker build -t theia/db2devext .
  5. Run the Docker container.
    docker run -it --init -p 3000:3000 theia/db2devext
  6. Open a web browser and navigate to http://localhost:3000.
0 comments
18 views

Permalink