Prerequisites for setting up containerized developer toolkit on a Windows environment

Before you set up the containerized developer toolkit on a Windows environment, you must complete the following steps.

Before you begin

Windows Subsystem for Linux® version 2 (WSL 2) and Ubuntu is used extensively for setting up the developer toolkit in a Windows environment. Hence, it is required that you have adequate knowledge of working with WSL 2 and Ubuntu systems.

Procedure

  1. Install Windows Subsystem for Linux version 2 (WSL 2) on your Windows 10 system, if it is not already installed. For more information about Windows Subsystem for Linux version 2 (WSL 2) installation, see Windows Subsystem for Linux Installation Guide for Windows 10.
  2. Download and install Ubuntu 20.04 as part of WSL 2.
  3. Log in to your WSL 2 Ubuntu terminal.
  4. Download and install Docker. For more information, see Install Docker Engine on Ubuntu.
    Important: You must set up the developer toolkit environment as a non-root user. You must also add the user to the docker group. For more information, see Manage Docker as a non-root user.
  5. After installation, ensure that you start Docker and verify that Docker is installed correctly.
    In your Ubuntu system, run the following command as super user to start Docker:
    sudo service docker start

    You must either run this command every time your WSL 2 system restarts or you can set this at the OS startup level, which then starts and enables Docker every time your WSL 2 system restarts.

  6. Install Docker Compose version 2.x (tested on 2.23.0, 2.24 versions). For more information about Docker Compose, see Overview of Docker Compose and Install Docker Compose.
  7. It is recommended that you either stop or disable any native DB2®, WebSphere® Application Server,IBM WebSphere Liberty application server, or MQ application services that are running on your WSL 2 system because they might unnecessarily consume system resources and the port numbers might conflict with the Docker Compose environment.
  8. On your WSL 2 system, add mqserver as a localhost in your /etc/hosts file. This step must be repeated every time the WSL 2 system restarts. It is recommended that you automate this step to run at the startup of your WSL 2 system.

What to do next

Keep the following points in mind when you are setting up developer toolkit in a Windows WSL 2 environment:
Important:
  • In the context of setting up the developer toolkit in a Windows (WSL 2) environment, wherever localhost is mentioned, you must use the IP address of your WSL 2 system. You can get the IP address of the WSL 2 system by running the following command:

    ip addr | grep -Ee 'inet.*eth0'

    This command returns the IP address at the start of the output of this command. This IP address changes every time your WSL 2 system restarts.

    If you want to use localhost instead of IP address in the URL that is used to consume the services that are running in the Ubuntu system from your Windows (WSL2) system, you must forward the relevant ports on which these services are running, such as 80, 443, 1414, 9080,9443, 50000, to the IP address of your WSL 2 system.

  • It is recommended that you extract the developer toolkit files in your /home/user/ directory so that the devtoolkit_docker directory is directly within your /home/user/ directory. This will also ensure that your developer toolkit is running on the root file system of your Ubuntu system and not on any drives or directories that are shared with Windows, like /mnt/c .

    For more information about extracting the developer toolkit, see extracting developer toolkit.

  • After your setup is finished, while running any shell script or commands from your extracted /runtime/bin directory of your developer toolkit, if you get errors such as set: Illegal option -o pipefail, prefix your commands with bash.

    For example, you must enter the command as bash ./agentserver.sh AgentServer instead of ./agentserver.sh AgentServer.