The Cloud Service Toolkit (CST) IoT Service version 1.3 has been released as a Docker image and is available on the Docker hub. The Docker image provides the IoT Service in its standard (default) configuration, and instructions for obtaining the Docker image and starting the Docker container are provided below. If you want to make any configuration changes and create your own Docker image, you can download the latest version of the IoT Service here and then use the instructions below to build the image and start the Docker container.

Using the Docker image to run the IoT Service in its standard configuration

Note: Before you can download the Docker image, you will need a Docker hub account and access to the cstkit repositories. To obtain a Docker hub account, go to https://hub.docker.com/. To learn more about CST, please explore our Website. If you need specific information that is not currently available online, you can request additional information using the form on our Home page.

  1. Obtain a Docker hub account and request access to the cstkit repositories.
  2. Enter the following command to log in to Docker:
    docker login
  3. Start the Docker container using the following command:
    docker run -p 3567:3567 --name iot-service cstkit/cst-iot-service:1.3
Modifying the IoT Service configuration settings and creating your own Docker image
  1. Download and unpack the latest IoT Service tarball.
    The cst-iot-service-1.3.tar.gz tarball is available here.
  2. Change the configuration parameters as needed.
    For example, to change the heartbeat period of the IoT Service, open the conf/iot-service.yaml file and enter a new value for the heartbeat period. (The “heartbeat” parameter is located in the “Endpoint” section of the file.)
  3. Create a file named Dockerfile containing the following lines of code and place it in the root directory of the extracted .tar.gz file:
    # Install system dependencies (if any)
    RUN apt-get -yqq update

    # Install app
    RUN mkdir /cst-iot-service-1.3
    RUN rm -rf /cst-iot-service-1.3/*
    COPY . /cst-iot-service-1.3
    WORKDIR /cst-iot-service-1.3

    # Expose port
    EXPOSE 3567

    # start application
    CMD ["./bin/iot-service", "run"]

  4. Build the docker image as follows:
    • Change the directory to the parent directory of the tarball.
    • Run the following command:
      docker build . -t cst-iot-service:1.3
  5. Start the Docker container using the following command:
    docker run -p 3567:3567 --name iot-service cst-iot-service:1.3

Once the IoT Service is running, you can connect an OpenDOF client or device to port 3567 of the machine hosting the docker container.

Note: To support a large number of connections, ulimits may need to be increased by using the –ulimit option with the docker run command, for example,

docker run -p 3567:3567 --ulimit nofile=50000:50000 --name iot-service cst-iot-service:1.3