WebSADL Backend Services

Last revised 9/14/2021. Contact us.

Introduction

WebSADL is a set of services that allow a SADL IDE to be instantiated in a Web browser. The functionality mirrors that of the Eclipse-based SADL IDE. WebSADL features include the following.

This document is primarily about configuring and running the WebSADL backend services. For more information about using WebSADL in a browser, please see WebSADL.

The WebSADL backend services are downloaded and run as a Docker image.

Installation

Windows Pre-requisite

If the server environment is Windows, Hyper-V must be enabled on the host. Otherwise, Docker cannot run the WebSADL Linux-based containers. See https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v/ for details. Administrator privileges are required so if you do not have administrative privileges you will need help from a System Administrator.

Docker Account

If you don't already have one, create a Docker account. See https://success.docker.com/article/how-do-you-register-for-a-docker-id. You will use your account ID to download the WebSADL image.

Docker Installation

If Docker is not already installed on the target server, download and install. Go to https://docs.docker.com/engine/install/ and select your OS or go to https://store.docker.com/search?type=edition&offering=community.

Test you installation of Docker to confirm that it is installed and working correctly. See https://docs.docker.com/docker-for-windows/#test-your-installation.

Pull the Latest WebSADL Image

In a cmd or terminal window, log into docker:
        docker login -u <your-docker-username>

You will be prompted for your password.

In the cmd or terminal window, run:
        docker pull theiaide/sadl:next

Note that if you are behind a firewall, you may need to configure proxies before you will be able to execute the pull. For information on docker proxy settings, see https://docs.docker.com/config/daemon/systemd/#httphttps-proxy.

Note also that if you have previously pulled the docker image, you may need to specify a tag to pull the latest, e.g., docker pull theiaide/sadl:next. See https://hub.docker.com/r/theiaide/sadl/tags for tags.

Run the WebSADL Image

Change directory to the location of your SADL projects or the location where you wish to create SADL projects. This is the host's current directory (cd).

In a cmd or terminal window, run
        docker run -it -p <host_port>:<container_port> -v "<host_location>:<container_location" theiaide/sadl:next

For example, in a Windows environment one might run one of the following, depending up the type of input window.

  1. cmd.exe window:
            docker run -it -p 3000:3000 -v "%cd%:/home/project" theiaide/sadl:next
  2. PowerShell window:
            docker run -it -p 3000:3000 -v "${PWD}:/home/project" theiaide/sadl:next
  3. Git Bash window: 
        winpty docker run -it -p 3000:3000 -v "/$(pwd -W):/home/project" theiaide/sadl:next

This would mean that the service is running on host port 3000, container port 3000, host location current directory (directory in which Docker was run), container location "/home/project".

In a Linux environment, the command would be:
                docker run -it -p 3000:3000 -v "$(pwd):/home/project" theiaide/sadl:next

You can see a list of the images that are locally available with the command:
                docker images

You can get information about currently running containers with the command:
                docker ps

The results of this command will reveal the name of the running container, e.g. "angry_fermat" in the output below:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9ce78044d643 theiaide/sadl:next  "yarn theia start /h…" 7 minutes ago Up 7 minutes 0.0.0.0:3000->3000/tcp angry_fermat

This name can then be used to get more information or to stop the container:

You can get information about containers, past and present, with the command:
               docker ps -a

For more information see https://docs.docker.com/engine/reference/commandline/docker/.

Using WebSADL with Git

The WebSADL server docker images comes with Git (2.13.7). For information on using git in WebSADL, see WebSADL.html#UsingGit.