SALSA Hands-ons


Maintained by tuwiendsg

Deploy and query sensoring resources

This hands-on aims to show the functionality of SALSA in deployment and query sensoring resources.

The hands-on is on one machine with docker. You can do it on a virtual machine (recommendation) or directly on you laptop. If working on the laptop, Docker may leaves some images on your system after finishing, which you need to delete manually later on.

Step 1: Install a message queue for SALSA (Optional)

By default, SALSA will connect to mqtt:// to transfer the message. However it is not stable. The best way is to install rabbitmq-server on the localhost. With Ubuntu, the following command does it:

sudo apt-get install rabbitmq-server
RabbitMQ is lightweight and automatically start up after installion.

Step 2: Install Docker (Optional)

SALSA can automatically install Docker on the target system. However you can install manually to make later process faster.

curl | sudo sh -

SALSA can automatically pull the default docker image. However for faster deployment process later, you can pull the image manually as following. This image is ubuntu with jre environment.

sudo docker pull leduchung/ubuntu:14.04-jre8

Step 3: Installing SALSA

  1. Download salsa-engine.jar and salsa-pioneer.jar. Please see this link. The command as below:
    mkdir salsa
  2. Get your current IP address. This is important because salsa-pioneer need the actual address rather than loopback IP (this will be obmitted on a next SALSA version). Use following command. Note that the interface can be eth0 or wlan0, which also work.
    wlan0     Link encap:Ethernet  HWaddr 24:77:03:f9:b1:90  
              inet addr:  Bcast:  Mask:
  3. Create a file name "" in the same folder (using nano/vi/gedit) with the content below. Consider to remove BROKER and BROKER_TYPE if you do not have RabbitMQ on you machine.
    SALSA_CENTER_IP=[your IP address above]
    BROKER=amqp://[your IP address above]
  4. Run the SALSA server by following command. Note that we need root to run docker. If you do not want to use root, please refer to Docker documentation to see how to enable Docker with regular user.
    sudo java -jar salsa-engine.jar
  5. Open the webpage on your browser: http://localhost:8080/salsa-engine

Step 4: Submit the topology and wait for the deployment done

  1. Download the TOSCA description.
  2. During the deployment, SALSA will download artifacts of the sensors from here. Note that the capabilities are defined in the "sensor.meta" while the actual scripts are packed in the achieve.
  3. Submit the TOSCA via the SALSA web interface and wait for the deployment.
  4. Checking the deployment status via SALSA web interface, in the service list.
  5. When the deployment is done, we run following command to retrieve the informatio:
    curl http://localhost:8080/salsa-engine/rest/elise/instance?name=sensorUnit
  6. The output will be a JSON. An example of the output is from here.