Skip to content

Latest commit

 

History

History
79 lines (49 loc) · 2.95 KB

build-under-wsl.md

File metadata and controls

79 lines (49 loc) · 2.95 KB

Building Under Windows Subsystem for Linux

The following notes document my working environment for building and testing a full Zally installation from a Windows 10 workstation.

Prepare Windows Environment

Prepare Linux Environment

  • In the Debian console:

    • enter a username & password to complete the installation
  • Install some general prerequisites

    sudo apt-get update -y && sudo apt-get install -y git openjdk-8-jdk curl make g++

    (I was quite surprised to see that make and g++ were necessary to build some dependency of the web-ui)

  • Install NodeJS 14 by using installation instructions

  • Make Windows docker binaries available on linux path:

    sudo ln -s /mnt/c/Program\ Files/Docker/Docker/resources/bin/docker.exe /usr/local/bin/docker
    sudo ln -s /mnt/c/Program\ Files/Docker/Docker/resources/bin/docker-compose.exe /usr/local/bin/docker-compose
    sudo ln -s /mnt/c/Program\ Files/Docker/Docker/resources/bin/docker-machine.exe /usr/local/bin/docker-machine
    sudo ln -s /mnt/c/Program\ Files/Docker/Docker/resources/bin/docker-credential-wincred.exe /usr/local/bin/docker-credential-wincred
  • Clone Zally into a folder easily addressable under Windows (C:\Zally)

    cd /mnt/c
    git clone https://github.com/zalando/zally
    cd zally
    

Build and Run

Run the following script to build and then run the services under docker:

./build-and-run.sh

It'll take a while but eventually you'll see something like the following to indicate that we're ready to connect:

Started ApplicationKt in 36.576 seconds (JVM running for 40.144)

Testing

Use a browser to check that things are working correctly:

Troubleshooting

Variations on the following error messages are a regular occurrence when building the web-ui under Windows. The command in question can typically be rerun without producing exactly the same occurrence, so incrementally the command gets further each run. (Producing this guide took 5x attempts at the web-ui build before a full run completed).

error An unexpected error occurred: "ENOENT: no such file or directory, copyfile '/home/username/.cache/yarn/v1/npm-react-ace-5.8.0-872d9ee8b664300ed5ab9edac6234bbe90836836/webpack.config.base.js' -> '/mnt/c/zally/web-ui/node_modules/react-ace/webpack.config.base.js'".