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:
A tenant in Orchestra Manager: see Tenant.
Edge devices onboarded: your devices added to Orchestra Manager.
Docker Engine installed: each edge device needs Docker Engine. Get it here: Install Docker Engine.
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
Variables gathered: you’ll need values for these variables during the deployment:
WM_SERVICES_MQTT_USERNAMEWM_SERVICES_MQTT_PASSWORDWM_SERVICES_MQTT_HOSTNAMEWM_SERVICES_MQTT_PORTWM_GW_MODELWM_GW_VERSIONWM_GW_IDWM_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:
Open Orchestra Manager: sign in to Orchestra Manager.
Go to Fleets: in the sidebar, click Fleets.
Add a new fleet: click the “+” button in the top right corner.
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.
Step 3: Create the first composition version¶
Each composition can have several versions, so you can manage updates effectively.
Start creating the version: click Create first version on the composition page.
Specify the version: use semantic versioning, for example
1.0.0.Upload the Docker Compose file: click Choose file and select the
docker-compose.ymlfile 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.
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:
Go to fleet variables: on your fleet’s page, open the Variables tab.
Add a new variable: click the “+” button.
Add the MQTT hostname: start with
WM_SERVICES_MQTT_HOSTNAME, enter your actual hostname as the value and click Create.Add the other variables: repeat the process for these variables with their values:
WM_SERVICES_MQTT_USERNAMEWM_SERVICES_MQTT_PASSWORDWM_SERVICES_MQTT_PORTWM_GW_MODELWM_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:
Go to device variables: go to a device in your fleet and open its Variables tab.
Confirm inheritance: check that the variables from the fleet are inherited correctly.
Add the gateway ID: add the
WM_GW_IDvariable, specific to this device.Add the sink port: add the
WM_GW_SINK_UART_PORTvariable. To get its value, runls -l /dev/serial/by-idon the device. Example value:/dev/ttyACM0.Repeat for other devices: assign a unique
WM_GW_IDto each device in your fleet.
Step 7: Release your composition¶
Time to deploy!
Go to Compositions: on your fleet page, open the Compositions tab.
Select and release: choose your Wirepas composition, click Create first release, choose version
1.0.0and click Release.Orchestra starts deploying your composition to all devices in the fleet. For more details, see Make a release.
Checking deployment success¶
Go to device details: on your fleet’s Overview tab, click a device’s ID in the Devices table to see its details.
Open the terminal: in the device details, go to the Terminal tab and click Start session.
List containers: run
docker psto 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.