Wirepas services deployment (GUI)

With CALM, you can deploy the Wirepas gateway services to all your gateways at once, instead of setting up each gateway separately. This guide walks you step by step through deploying the Wirepas stack to a fleet of edge devices with Orchestra.

Before you begin

Make sure you have the following:

  1. A tenant in Orchestra Manager: see Tenant.

  2. Edge devices onboarded: your devices added to Orchestra Manager.

  3. Docker Engine installed: each edge device needs Docker Engine. Get it here: Install Docker Engine.

  4. Docker Compose file prepared: save the following YAML configuration as docker-compose.yml. You’ll use it shortly.

docker-compose.yml
version: "3.7"

volumes:
    dbus-volume:
        driver: local

services:
    dbus-service:
        image: wirepas/gateway_dbus_service:v1.6.1
        container_name: dbus-service
        restart: always
        volumes:
            - dbus-volume:/var/run/dbus
        logging:
            driver: journald
    transport-wbs-service:
        image: wirepas/gateway_transport_service:v1.6.1
        container_name: transport-wbs-service
        environment:
            WM_GW_ID: --will-be-overridden--
            WM_GW_MODEL: --will-be-overridden--
            WM_GW_VERSION: --will-be-overridden--
            WM_SERVICES_MQTT_HOSTNAME: --will-be-overridden--
            WM_SERVICES_MQTT_PORT: --will-be-overridden--
            WM_SERVICES_MQTT_USERNAME: --will-be-overridden--
            WM_SERVICES_MQTT_PASSWORD: --will-be-overridden--
        restart: always
        depends_on:
            - dbus-service
        volumes:
            - dbus-volume:/var/run/dbus
        logging:
            driver: journald
    sink-service:
        image: wirepas/gateway_sink_service:v1.6.1
        container_name: sink-service
        restart: always
        privileged: true
        depends_on:
            - dbus-service
        environment:
            WM_GW_SINK_BAUDRATE: 125000
            WM_GW_SINK_ID: 1
            WM_GW_SINK_UART_PORT: --will-be-overridden--
        volumes:
            - dbus-volume:/var/run/dbus
            - /dev/serial:/dev/serial
        logging:
            driver: journald
  1. Variables gathered: you’ll need values for these variables during the deployment:

    • WM_SERVICES_MQTT_USERNAME

    • WM_SERVICES_MQTT_PASSWORD

    • WM_SERVICES_MQTT_HOSTNAME

    • WM_SERVICES_MQTT_PORT

    • WM_GW_MODEL

    • WM_GW_VERSION

    • WM_GW_ID

    • WM_GW_SINK_UART_PORT

Deployment steps

The deployment is divided into several stages.

Step 1: Create a new fleet

Fleets group your devices for easier management. To set one up:

  1. Open Orchestra Manager: sign in to Orchestra Manager.

  2. Go to Fleets: in the sidebar, click Fleets.

    Fleets page
  3. Add a new fleet: click the “+” button in the top right corner.

  4. Configure the fleet: give your fleet a descriptive name, select the target devices for your Wirepas deployment and click Create.

    The fleet’s Overview opens. For more details, see Create a fleet.

Step 2: Create a composition

Think of a composition as the blueprint for your application.

  1. Go to Compositions: in the sidebar, click Compositions.

    Compositions page
  2. Create a composition: click the “+” button in the top right corner, enter a name for your composition in the window and click Create.

Step 3: Create the first composition version

Each composition can have several versions, so you can manage updates effectively.

  1. Start creating the version: click Create first version on the composition page.

  2. Specify the version: use semantic versioning, for example 1.0.0.

  3. Upload the Docker Compose file: click Choose file and select the docker-compose.yml file you prepared earlier, or drag it into the window. Then click Create.

    The composition page now shows its details and the uploaded Docker Compose file. For more details, see Create a composition.

Step 4: Add the composition to the fleet

Now, link your composition to the target fleet of devices.

  1. Go to your fleet: go back to the fleet you created in Step 1 and open the Compositions tab.

  2. Add the composition: click Add first composition.

    Compositions tab of a fleet with the Add first composition button
  3. Select the composition: choose your new composition from the list and click Add.

Step 5: Set fleet-level variables

Variables customize your deployment.

  • Variable levels in Orchestra:

    • Device: unique to a single device

    • Fleet: applies to all devices in a fleet

    • Global: applies to all fleets and devices

  • Inheritance: variables inherit values from broader levels: Global > Fleet > Device. More specific settings override broader ones.

Set the variables common to all gateways in the fleet:

  1. Go to fleet variables: on your fleet’s page, open the Variables tab.

  2. Add a new variable: click the “+” button.

  3. Add the MQTT hostname: start with WM_SERVICES_MQTT_HOSTNAME, enter your actual hostname as the value and click Create.

  4. Add the other variables: repeat the process for these variables with their values:

    • WM_SERVICES_MQTT_USERNAME

    • WM_SERVICES_MQTT_PASSWORD

    • WM_SERVICES_MQTT_PORT

    • WM_GW_MODEL

    • WM_GW_VERSION

Note

If several fleets use the same MQTT broker, you can add the WM_SERVICES_MQTT_* variables as global variables instead (sidebar > Variables).

Step 6: Set device-level variables

Set the variables that are different on each device:

  1. Go to device variables: go to a device in your fleet and open its Variables tab.

  2. Confirm inheritance: check that the variables from the fleet are inherited correctly.

  3. Add the gateway ID: add the WM_GW_ID variable, specific to this device.

  4. Add the sink port: add the WM_GW_SINK_UART_PORT variable. To get its value, run ls -l /dev/serial/by-id on the device. Example value: /dev/ttyACM0.

  5. Repeat for other devices: assign a unique WM_GW_ID to each device in your fleet.

Step 7: Release your composition

Time to deploy!

  1. Go to Compositions: on your fleet page, open the Compositions tab.

  2. Select and release: choose your Wirepas composition, click Create first release, choose version 1.0.0 and click Release.

    Orchestra starts deploying your composition to all devices in the fleet. For more details, see Make a release.

Checking deployment success

  1. Go to device details: on your fleet’s Overview tab, click a device’s ID in the Devices table to see its details.

  2. Open the terminal: in the device details, go to the Terminal tab and click Start session.

  3. List containers: run docker ps to view the active containers. This confirms that the deployment succeeded.

Next steps

Next, you can configure the sink via CLI.

Need help?

Contact us through our support portal or at support@cthings.co if you run into any issues.