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.
Authoring of SADL model files in a feature-rich text editor.
Live model instance validation.
Generation (OWL, N3, and NT) based on valid SADL models.
LS-based semantic highlighting.
Navigation between the SADL model elements.
Content assist in the SADL editors.
Downloading and managing external SADL resources into the workspace.
Preferences.
Testing and querying SADL models.
Reviewing the output of any SADL model via Ask and Test statements.
Collaboration with the Theia Git extension.
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.
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.
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.
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.
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.
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.
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
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/.
The WebSADL server docker images comes with Git (2.13.7). For information on using git in WebSADL, see WebSADL.html#UsingGit.