ska-tango-images-tango-rest

This image contains TangoRestServer. TangoRestServer is a web sever which exposes your Tango control system via a REST API.

Warning

This image is deprecated and will not recieve another release. Please use ska-tango-images-rest-server instead.

Summary

Release 0.6.0 of ska-tango-images provides the 1.22.1 tag of the ska-tango-images-tango-rest OCI image.

The image uses ska-tango-images-tango-admin as a base image and so provides the same features, in addition to the TangoRestServer application.

This image uses supervisord to spawn the TangoRestServer.

Included Software

Package

Version

TangoRestServer

1.22

JTango

9.6.6

tango_admin

1.24

cppTango

10.0.0

ZeroMQ

4.3.5

omniORB

4.3.2

opentelemetry-cpp

1.16.1

Usage Example

To launch the “rest” instance of the TangoRestServer device server, connecting to TANGO_HOST=localhost:10000 run the following:

docker run --rm --env TANGO_HOST=localhost:10000 --net=host \
  --detach --name tango-rest \
  artefact.skao.int/ska-tango-images-tango-rest:1.22.1

This will launch a REST server listening on port 8080, to check that this is working run the following curl command:

URL="http://localhost:8080/tango/rest/rc4/hosts/localhost/10000/devices/sys/rest/0"
curl -s -u "tango-cs:tango" $URL | python -m json.tool

Which should output something like the following:

{
    "name": "sys/rest/0",
    "info": {
        "last_exported": "?",
        "last_unexported": "?",
        "name": "sys/rest/0",
        "ior": "nada",
        "version": "nada",
        "exported": false,
        "pid": 0,
        "server": "TangoRestServer/rest",
        "hostname": "nada",
        "classname": "unknown",
        "is_taco": false
    },
    "attributes": "http://localhost:8080/tango/rest/rc4/hosts/localhost/10000/devices/sys/rest/0/attributes",
    "commands": "http://localhost:8080/tango/rest/rc4/hosts/localhost/10000/devices/sys/rest/0/commands",
    "pipes": "http://localhost:8080/tango/rest/rc4/hosts/localhost/10000/devices/sys/rest/0/pipes",
    "properties": "http://localhost:8080/tango/rest/rc4/hosts/localhost/10000/devices/sys/rest/0/properties",
    "state": "http://localhost:8080/tango/rest/rc4/hosts/localhost/10000/devices/sys/rest/0/state",
    "_links": {
        "_self": "http://localhost:8080/tango/rest/rc4/hosts/localhost/10000/devices/sys/rest/0",
        "_parent": "http://localhost:8080/tango/rest/rc4/hosts/localhost/10000/devices/"
    }
}

The REST server can be stopped with:

docker stop tango-rest