Getting Started with SORCER
Author: Paweł Rubach
SORCER is cross-platform, so any OS supporting Java 1.6 or higher should be ok but the current distribution was tested on Windows XP/7 32/64bit, Linux (Debian/Ubuntu/Centos) 32/64bit and Mac OS X 10.5.x.
Go to our download page and pick the most suitable distribution:
- if you’re running Windows - use the Windows EXE setup file
- on other OSes use the JAR installer. After you’ve downloaded the file you can try double-clicking it, however, depending on your OS configuration this may not invoke the installer. In that case open a terminal window and run
java -jar sorcer-1.0-setup.jar
- if you prefer a manual install please use the zip file.
Installation on a headless machine
If you only have a console based (headless) access to a machine you can perform the installation using the text-based installer by invoking:
java -Djava.awt.headless=true -jar sorcer-1.0-setup.jar
Setting SORCER_HOME environment variable
After the installation it is recommended to set the SORCER_HOME environment variable to point to the main sorcer folder, for example: /home/user/sorcer.
This step may be omitted on Windows as the Windows installer adds the SORCER_HOME variable automatically, it is, however, required to logout and log back in after the installation to make sure this change is updated in your environment. The installer adds SORCER_HOME to your current user’s environment. If you would like to use SORCER from other accounts please add SORCER_HOME variable to your system environment. You can do that manually in the Control Panel -> System -> Advanced System Settings -> Environment Settings On Windows Vista/7/8 you can also run the script below as administrator (start cmd.exe by right clicking it and selecting “Run as Administrator”.
setx -m SORCER_HOME “C:\sorcer”
- system-wide to /etc/environment, or create a /etc/profile.d/sorcer.sh script
- per user - by adding it to .profile or .bash_profile etc.
Files and folders in the Sorcer installation
The Sorcer installation directory (SORCER_HOME) contains the following folders:
- bin - startup scripts
- configs - configuration files
- sorcer.env - the main SORCER environment config file
- logback.groovy - SORCER logging levels config
- docs - documentation and license files
- examples - examples that demonstrate how to create services in SORCER
- lib - directory with all sorcer and third-party jar files
- logs - empty directory for logs
- netlets - examples of NTL scripts for testing
- Uninstaller - not available if you’ve installed SORCER from a zip file.
- Uninstaller.jar - application that performs an uninstall of SORCER
The $SORCER_HOME/bin folder contains startup scripts. For basic commands both OS-dependent shell scripts are provided as well as cross-platform Ant scripts.
- To start the basic SORCER services please run:
To see all options of the sorcer-boot command please run:
- To start the SORCER Service Browser run:
- To start the SORCER Network Shell please run:
On UNIX you can use the rlwrap utility to enable the history of executed commands etc. Please install rlwrap and the shell will be started using rlwrap to enable history.
If all basic SORCER services, the SORCER Service Browser and the Network Shell (nsh) run correctly that means that you have successfully setup your SORCER environment. Congratulations! You are ready to try out the provided examples. Please read on our Running provided SORCER examples guide.