.. _calm-wirepas-example:
Wirepas Services Tutorial
=======================================
Here we will show you step-by-step how to deploy wirepas stack to a fleet of edge devices.
Video Tutorial
-------------------
.. raw:: html
Pre-requisites
------------------
1. Have Orchestra subscription (:ref:`more `).
2. Add all your edge devices to Orchestra Manager (:ref:`more `) or make sure the Orchestra Daemon (orchestrad) installed is version 1.4.13 or above (:ref:`updating-orchestra-daemon`).
3. Install Docker Engine on your edge devices (`Install Docker Engine `_).
4. Make sure your Docker Compose file ``docker-compose.yml`` is ready and correct before proceeding. Copy the docker file from here.
.. include:: ../../../shared/wirepas-docker-compose.rst
5. Prepare variables:
- 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
Steps
----------
Step 1: List All Fleets
^^^^^^^^^^^^^^^^^^^^^^^
Begin by listing all the fleets in your system. This helps you identify existing fleets before proceeding to create a new one (more: :ref:`ocli-calm-fleet-list`).
.. tab-set::
.. tab-item:: Command
.. code:: console
$ ocli calm fleet list
.. tab-item:: Output
.. code:: console
:class: no-copybutton
$ ocli calm fleet list
╒════════════════╤════════════════╤═════════╤═════════════╤═══════════════════════════╤════════════════╤════════════════╤═══════════════╤════════════════╕
│ created_at │ updated_at │ name │ description │ devices │ compositions │ id │ status │ deployment_inf │
│ │ │ │ │ │ │ │ │ o │
├────────────────┼────────────────┼─────────┼─────────────┼───────────────────────────┼────────────────┼────────────────┼───────────────┼────────────────┤
│ 2024-09-12 │ 2024-09-12 │ Wirepas │ Wirepas │ ['66ea8308ad532faa0af547c │ ['66e989e25cdb │ 66e2bf8b0b7415 │ RECONFIGURING │ {'devices': │
│ 10:16:43+00:00 │ 10:16:43+00:00 │ │ demo │ d - SIDO Lyon GW'] │ 6ddb736f4702 - │ 3243c451dc │ │ [{'status': │
│ │ │ │ │ │ Wirepas │ │ │ 'OK', 'count': │
│ │ │ │ │ │ stack:1.4.0'] │ │ │ 1}, {'status': │
│ │ │ │ │ │ │ │ │ 'TOTAL', │
│ │ │ │ │ │ │ │ │ 'count': 1}], │
│ │ │ │ │ │ │ │ │ 'compositions' │
│ │ │ │ │ │ │ │ │ : [{'status': │
│ │ │ │ │ │ │ │ │ 'RECONFIGURING │
│ │ │ │ │ │ │ │ │ ', 'count': │
│ │ │ │ │ │ │ │ │ 1}]} │
╘════════════════╧════════════════╧═════════╧═════════════╧═══════════════════════════╧════════════════╧════════════════╧═══════════════╧════════════════╛
Step 2: Create a New Fleet
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Now, create a fleet where you will deploy your compositions. Include all of the devices you want to deploy wirepas application on (more: :ref:`ocli-calm-fleet-create`).
.. tab-set::
.. tab-item:: Command
.. code:: console
$ ocli calm fleet create --name "name" --description "desc"
.. tab-item:: Output
.. code:: console
:class: no-copybutton
$ ocli calm fleet create --name "Carrots fleet" --description "Fleet of carrots doing carrots' things."
╒════════════════╤════════════════╤═════════╤═════════════╤═════════╤══════════════╤══════════════════════════╤═════════╤═════════════════╕
│ created_at │ updated_at │ name │ description │ devices │ compositions │ id │ status │ deployment_info │
├────────────────┼────────────────┼─────────┼─────────────┼─────────┼──────────────┼──────────────────────────┼─────────┼─────────────────┤
│ 2024-09-30 │ 2024-09-30 │ Carrots │ Fleet of │ [] │ [] │ 66fa8912b4c08769d7c6a140 │ UNKNOWN │ │
│ 11:18:42+00:00 │ 11:18:42+00:00 │ fleet │ carrots │ │ │ │ │ │
│ │ │ │ doing │ │ │ │ │ │
│ │ │ │ carrots' │ │ │ │ │ │
│ │ │ │ things. │ │ │ │ │ │
╘════════════════╧════════════════╧═════════╧═════════════╧═════════╧══════════════╧══════════════════════════╧═════════╧═════════════════╛
Step 3: Create a Composition
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Next, create a composition. It defines your app and will store the versioning of this app (more: :ref:`ocli-calm-composition-create`).
.. tab-set::
.. tab-item:: Command
.. code:: console
$ ocli calm composition create -n "name"
.. tab-item:: Output
.. code:: console
:class: no-copybutton
$ ocli calm composition create -n "Wirepas for carrots app"
╒════════════════╤════════════════╤═════════╤══════════════════════════╤════════════════╕
│ created_at │ updated_at │ name │ id │ latest_version │
├────────────────┼────────────────┼─────────┼──────────────────────────┼────────────────┤
│ 2024-09-30 │ 2024-09-30 │ Wirepas │ 66fa8ae6aa1888819c7d9662 │ │
│ 11:26:30+00:00 │ 11:26:30+00:00 │ for │ │ │
│ │ │ carrots │ │ │
│ │ │ app │ │ │
╘════════════════╧════════════════╧═════════╧══════════════════════════╧════════════════╛
Step 4: Create a Composition Version
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
After creating the composition, create a composition version for it. This version will be linked to specific configurations in your compose file. (more: :ref:`ocli-calm-composition-version-create`).
.. note:: Make sure your Docker Compose file ``docker-compose.yml`` is ready and correct before proceeding.
.. tab-set::
.. tab-item:: Command
.. code:: console
$ ocli calm composition-version create -f -v -d "description"
.. tab-item:: Output
.. code:: console
:class: no-copybutton
$ ocli calm composition-version create -f docker_compose.yaml -v 1.0.0 -d "This is an initial version of Wirepas for carrots app" 66fa8ae6aa1888819c7d9662
╒════════════════╤════════════════╤══════════════════════════╤═════════╤═════════════╤══════════════╤══════════════════════════╤══════════════════╕
│ created_at │ updated_at │ composition_id │ version │ description │ compose_file │ id │ composition_name │
├────────────────┼────────────────┼──────────────────────────┼─────────┼─────────────┼──────────────┼──────────────────────────┼──────────────────┤
│ 2024-09-30 │ 2024-09-30 │ 66fa8ae6aa1888819c7d9662 │ 1.0.0 │ This is an │ OK │ 66fa9e1964270b4e5ea32f75 │ Wirepas for │
│ 12:48:25+00:00 │ 12:48:25+00:00 │ │ │ initial │ │ │ carrots app │
│ │ │ │ │ version of │ │ │ │
│ │ │ │ │ Wirepas for │ │ │ │
│ │ │ │ │ carrots app │ │ │ │
╘════════════════╧════════════════╧══════════════════════════╧═════════╧═════════════╧══════════════╧══════════════════════════╧══════════════════╛
Step 5: Attach Composition to the Fleet
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Now, attach the composition you just created to your fleet. This step ensures that the fleet is ready to deploy the specified services (more: :ref:`ocli-calm-fleet-attach`).
.. tab-set::
.. tab-item:: Command
.. code:: console
$ ocli calm fleet attach composition -r
.. tab-item:: Output
.. code:: console
:class: no-copybutton
$ ocli calm fleet attach composition -r 66fa8ae6aa1888819c7d9662 66fa8912b4c08769d7c6a140
╒════════════════╤════════════════╤═════════╤═════════════╤═════════╤════════════════════════════╤══════════════════════════╤═════════╤═════════════════╕
│ created_at │ updated_at │ name │ description │ devices │ compositions │ id │ status │ deployment_info │
├────────────────┼────────────────┼─────────┼─────────────┼─────────┼────────────────────────────┼──────────────────────────┼─────────┼─────────────────┤
│ 2024-09-30 │ 2024-09-30 │ Carrots │ Fleet of │ [] │ ['66fa9e1964270b4e5ea32f75 │ 66fa8912b4c08769d7c6a140 │ UNKNOWN │ {'devices': │
│ 11:18:42+00:00 │ 11:18:42+00:00 │ fleet │ carrots │ │ - Wirepas for carrots │ │ │ [{'status': │
│ │ │ │ doing │ │ app:1.0.0'] │ │ │ 'TOTAL', │
│ │ │ │ carrots' │ │ │ │ │ 'count': 0}], │
│ │ │ │ things. │ │ │ │ │ 'compositions': │
│ │ │ │ │ │ │ │ │ [{'status': │
│ │ │ │ │ │ │ │ │ 'UNKNOWN', │
│ │ │ │ │ │ │ │ │ 'count': 1}]} │
╘════════════════╧════════════════╧═════════╧═════════════╧═════════╧════════════════════════════╧══════════════════════════╧═════════╧═════════════════╛
Step 6: Attach Devices to Your Fleet
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Add the required devices to your fleet. These devices will run the services defined in your composition (more: :ref:`ocli-calm-fleet-attach`).
.. note:: Use the arrow keys to navigate the list of devices, press Space to select devices, and hit Enter to confirm your selections.
.. tab-set::
.. tab-item:: Command
.. code:: console
$ ocli calm fleet attach device
.. tab-item:: Output
.. code:: console
:class: no-copybutton
$ ocli calm fleet attach device 66fa8912b4c08769d7c6a140
[?] Pick devices you want to attach to fleet 66fa8912b4c08769d7c6a140 - Carrots fleet:
[ ] 66e13e6c2bc2262a5d5876e2 - test_adam_arm3
[ ] 66e13e994366760572c806f7 - test_adam_amd3
[X] 66e96c91b053f8dea450c2c0 - Harry-Test-GW #1
> [X] 66e96d25d72d0d4c0ff1962b - Harry-Test-GW #2
[ ] 66ea8308ad532faa0af547cd - SIDO Lyon GW
╒════════════════╤════════════════╤═════════╤═════════════╤════════════════════════════╤════════════════════════════╤══════════════════════════╤═════════╤══════════════════╕
│ created_at │ updated_at │ name │ description │ devices │ compositions │ id │ status │ deployment_info │
├────────────────┼────────────────┼─────────┼─────────────┼────────────────────────────┼────────────────────────────┼──────────────────────────┼─────────┼──────────────────┤
│ 2024-09-30 │ 2024-09-30 │ Carrots │ Fleet of │ ['66e96c91b053f8dea450c2c0 │ ['66fa9e1964270b4e5ea32f75 │ 66fa8912b4c08769d7c6a140 │ UNKNOWN │ {'devices': │
│ 11:18:42+00:00 │ 11:18:42+00:00 │ fleet │ carrots │ - Harry-Test-GW #1', │ - Wirepas for carrots │ │ │ [{'status': │
│ │ │ │ doing │ '66e96d25d72d0d4c0ff1962b │ app:1.0.0'] │ │ │ 'RECONFIGURING', │
│ │ │ │ carrots' │ - Harry-Test-GW #2'] │ │ │ │ 'count': 2}, │
│ │ │ │ things. │ │ │ │ │ {'status': │
│ │ │ │ │ │ │ │ │ 'TOTAL', │
│ │ │ │ │ │ │ │ │ 'count': 2}], │
│ │ │ │ │ │ │ │ │ 'compositions': │
│ │ │ │ │ │ │ │ │ [{'status': │
│ │ │ │ │ │ │ │ │ 'UNKNOWN', │
│ │ │ │ │ │ │ │ │ 'count': 1}]} │
╘════════════════╧════════════════╧═════════╧═════════════╧════════════════════════════╧════════════════════════════╧══════════════════════════╧═════════╧══════════════════╛
Step 7: Choose Composition Version
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
List all versions of your composition to select the one to be released.
.. tab-set::
.. tab-item:: Command
.. code:: console
$ ocli calm composition-version list
.. tab-item:: Output
.. code:: console
:class: no-copybutton
$ ocli calm composition-version list 66fa8ae6aa1888819c7d9662
╒════════════════╤════════════════╤══════════════════════════╤═════════╤═════════════╤══════════════╤══════════════════════════╤══════════════════╕
│ created_at │ updated_at │ composition_id │ version │ description │ compose_file │ id │ composition_name │
├────────────────┼────────────────┼──────────────────────────┼─────────┼─────────────┼──────────────┼──────────────────────────┼──────────────────┤
│ 2024-09-30 │ 2024-09-30 │ 66fa8ae6aa1888819c7d9662 │ 1.0.0 │ This is an │ OK │ 66fa9e1964270b4e5ea32f75 │ Wirepas for │
│ 12:48:25+00:00 │ 12:48:25+00:00 │ │ │ initial │ │ │ carrots app │
│ │ │ │ │ version of │ │ │ │
│ │ │ │ │ Wirepas for │ │ │ │
│ │ │ │ │ carrots app │ │ │ │
╘════════════════╧════════════════╧══════════════════════════╧═════════╧═════════════╧══════════════╧══════════════════════════╧══════════════════╛
Step 8: Set Up Required Variables for the Composition
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Configure the necessary environment variables for your composition. Input each variable one by one as needed for your application (more: :ref:`ocli-calm-variable-create`).
.. tip:: Double-check each variable to ensure it's correct before proceeding.
First variable:
- WM_SERVICES_MQTT_PASSWORD
.. tab-set::
.. tab-item:: Command
.. code:: console
$ ocli calm variable create -k -v -d -r composition
.. tab-item:: Output
.. code:: console
:class: no-copybutton
$ ocli calm variable create -k WM_SERVICES_MQTT_PASSWORD -v ************** -d "mqtt pass" -r 66fa8912b4c08769d7c6a140 composition
╒════════════════╤════════════════╤═══════════════════════════╤══════════════════════════╤═════════════╤═════════════╤═════════════════╤════════╤═════════════════╤═════════════════╤═════════════════╕
│ created_at │ updated_at │ key │ value │ description │ kind │ resource_id │ masked │ expand_referenc │ id │ overridden_vari │
│ │ │ │ │ │ │ │ │ e │ │ able │
├────────────────┼────────────────┼───────────────────────────┼──────────────────────────┼─────────────┼─────────────┼─────────────────┼────────┼─────────────────┼─────────────────┼─────────────────┤
│ 2024-10-01 │ 2024-10-01 │ WM_SERVICES_MQTT_PASSWORD │ ************************ │ mqtt pass │ composition │ 66fa8912b4c0876 │ false │ false │ 66fbb7bef951624 │ │
│ 08:50:06+00:00 │ 08:50:06+00:00 │ │ ***** │ │ │ 9d7c6a140 │ │ │ 647fa8e38 │ │
╘════════════════╧════════════════╧═══════════════════════════╧══════════════════════════╧═════════════╧═════════════╧═════════════════╧════════╧═════════════════╧═════════════════╧═════════════════╛
Second variable:
- WM_SERVICES_MQTT_USERNAME
.. tab-set::
.. tab-item:: Command
.. code:: console
$ ocli calm variable create -k -v -d "description" -r composition
.. tab-item:: Output
.. code:: console
:class: no-copybutton
$ oocli calm variable create -k WM_SERVICES_MQTT_USERNAME -v mosquittouser -d "mqtt user" -r 66fa8912b4c08769d7c6a140 composition
╒════════════════╤════════════════╤═══════════════════════════╤═══════════════╤═════════════╤═════════════╤══════════════════════════╤════════╤══════════════════╤══════════════════╤═════════════════╕
│ created_at │ updated_at │ key │ value │ description │ kind │ resource_id │ masked │ expand_reference │ id │ overridden_vari │
│ │ │ │ │ │ │ │ │ │ │ able │
├────────────────┼────────────────┼───────────────────────────┼───────────────┼─────────────┼─────────────┼──────────────────────────┼────────┼──────────────────┼──────────────────┼─────────────────┤
│ 2024-10-01 │ 2024-10-01 │ WM_SERVICES_MQTT_USERNAME │ mosquittouser │ mqtt user │ composition │ 66fa8912b4c08769d7c6a140 │ false │ false │ 66fbbcd54b187c07 │ │
│ 09:11:49+00:00 │ 09:11:49+00:00 │ │ │ │ │ │ │ │ e8a1aef0 │ │
╘════════════════╧════════════════╧═══════════════════════════╧═══════════════╧═════════════╧═════════════╧══════════════════════════╧════════╧══════════════════╧══════════════════╧═════════════════╛
Continue inputting each variable:
- WM_SERVICES_MQTT_HOSTNAME
- WM_SERVICES_MQTT_PORT
- WM_GW_MODEL
- WM_GW_VERSION
Last variable:
- WM_GW_ID
Unlike other variables, ``WM_GW_ID`` is device-specific and cannot be set at the composition level. Each device must have a unique ``WM_GW_ID``.
Let's create this device-specific variable now:
.. tab-set::
.. tab-item:: Command
.. code:: console
$ ocli calm variable create -k -v -d "description" -r device
.. tab-item:: Output
.. code:: console
:class: no-copybutton
$ ocli calm variable create -k WM_GW_ID -v btdoffice -d "gateway id" -r 66fa8912b4c08769d7c6a140 device
╒════════════════╤════════════════╤═══════════════════════════╤═══════════════╤═════════════╤═════════════╤══════════════════════════╤════════╤══════════════════╤══════════════════╤═════════════════╕
│ created_at │ updated_at │ key │ value │ description │ kind │ resource_id │ masked │ expand_reference │ id │ overridden_vari │
│ │ │ │ │ │ │ │ │ │ │ able │
├────────────────┼────────────────┼───────────────────────────┼───────────────┼─────────────┼─────────────┼──────────────────────────┼────────┼──────────────────┼──────────────────┼─────────────────┤
│ 2024-10-01 │ 2024-10-01 │ WM_GW_ID │ btdoffice │ gateway id │ composition │ 66fa8912b4c08769d7c6a140 │ false │ false │ 66fbbcd54b187c07 │ │
│ 09:11:49+00:00 │ 09:11:49+00:00 │ │ │ │ │ │ │ │ e8a1aef0 │ │
╘════════════════╧════════════════╧═══════════════════════════╧═══════════════╧═════════════╧═════════════╧══════════════════════════╧════════╧══════════════════╧══════════════════╧═════════════════╛
.. note:: If you adding more devices to fleet at once you have to configure WM_GW_ID for each device.
Once all variables are added, verify that everything is correctly configured (more: :ref:`ocli-calm-variable-list`).
.. tab-set::
.. tab-item:: Command
.. code:: console
$ ocli calm variable list composition -r
.. tab-item:: Output
.. code:: console
:class: no-copybutton
$ ocli calm variable list composition -r 66fa8912b4c08769d7c6a140
╒════════════════╤════════════════╤═══════════════════════════╤══════════════════════════╤═════════════╤═════════════╤═════════════════╤════════╤═════════════════╤═════════════════╤═════════════════╕
│ created_at │ updated_at │ key │ value │ description │ kind │ resource_id │ masked │ expand_referenc │ id │ overridden_vari │
│ │ │ │ │ │ │ │ │ e │ │ able │
├────────────────┼────────────────┼───────────────────────────┼──────────────────────────┼─────────────┼─────────────┼─────────────────┼────────┼─────────────────┼─────────────────┼─────────────────┤
│ 2024-10-01 │ 2024-10-01 │ WM_GW_MODEL │ cthingsco-5gedgegw │ gateway │ composition │ 66fa8912b4c0876 │ false │ false │ 66fbbe4685fa368 │ │
│ 09:17:58+00:00 │ 09:17:58+00:00 │ │ │ model │ │ 9d7c6a140 │ │ │ 9bbf3ec59 │ │
├────────────────┼────────────────┼───────────────────────────┼──────────────────────────┼─────────────┼─────────────┼─────────────────┼────────┼─────────────────┼─────────────────┼─────────────────┤
│ 2024-10-01 │ 2024-10-01 │ WM_GW_VERSION │ ctgwra │ gateway │ composition │ 66fa8912b4c0876 │ false │ false │ 66fbbe11f951624 │ │
│ 09:17:05+00:00 │ 09:17:05+00:00 │ │ │ version │ │ 9d7c6a140 │ │ │ 647fa8e39 │ │
├────────────────┼────────────────┼───────────────────────────┼──────────────────────────┼─────────────┼─────────────┼─────────────────┼────────┼─────────────────┼─────────────────┼─────────────────┤
│ 2024-10-01 │ 2024-10-01 │ WM_SERVICES_MQTT_HOSTNAME │ clasp-wirepas- │ mqtt host │ composition │ 66fa8912b4c0876 │ false │ false │ 66fbbdca7334027 │ │
│ 09:15:54+00:00 │ 09:15:54+00:00 │ │ wnt-4.cthings.co │ │ │ 9d7c6a140 │ │ │ 019388547 │ │
├────────────────┼────────────────┼───────────────────────────┼──────────────────────────┼─────────────┼─────────────┼─────────────────┼────────┼─────────────────┼─────────────────┼─────────────────┤
│ 2024-10-01 │ 2024-10-01 │ WM_SERVICES_MQTT_PORT │ 8883 │ mqtt port │ composition │ 66fa8912b4c0876 │ false │ false │ 66fbbd878586b62 │ │
│ 09:14:47+00:00 │ 09:14:47+00:00 │ │ │ │ │ 9d7c6a140 │ │ │ 7788367c4 │ │
├────────────────┼────────────────┼───────────────────────────┼──────────────────────────┼─────────────┼─────────────┼─────────────────┼────────┼─────────────────┼─────────────────┼─────────────────┤
│ 2024-10-01 │ 2024-10-01 │ WM_SERVICES_MQTT_USERNAME │ mosquittouser │ mqtt user │ composition │ 66fa8912b4c0876 │ false │ false │ 66fbbcd54b187c0 │ │
│ 09:11:49+00:00 │ 09:11:49+00:00 │ │ │ │ │ 9d7c6a140 │ │ │ 7e8a1aef0 │ │
├────────────────┼────────────────┼───────────────────────────┼──────────────────────────┼─────────────┼─────────────┼─────────────────┼────────┼─────────────────┼─────────────────┼─────────────────┤
│ 2024-10-01 │ 2024-10-01 │ WM_SERVICES_MQTT_PASSWORD │ ************************ │ mqtt pass │ composition │ 66fa8912b4c0876 │ false │ false │ 66fbb7bef951624 │ │
│ 08:50:06+00:00 │ 08:50:06+00:00 │ │ │ │ │ 9d7c6a140 │ │ │ 647fa8e38 │ │
╘════════════════╧════════════════╧═══════════════════════════╧══════════════════════════╧═════════════╧═════════════╧═════════════════╧════════╧═════════════════╧═════════════════╧═════════════════╛
And you can verify devices variables:
.. tab-set::
.. tab-item:: Command
.. code:: console
$ ocli calm variable list device -r
.. tab-item:: Output
.. code:: console
:class: no-copybutton
$ ocli calm variable list device -r 66fa8912b4c08769d7c6a140
╒════════════════╤════════════════╤═══════════════════════════╤══════════════════════════╤═════════════╤═════════════╤═════════════════╤════════╤═════════════════╤═════════════════╤═════════════════╕
│ created_at │ updated_at │ key │ value │ description │ kind │ resource_id │ masked │ expand_referenc │ id │ overridden_vari │
│ │ │ │ │ │ │ │ │ e │ │ able │
├────────────────┼────────────────┼───────────────────────────┼──────────────────────────┼─────────────┼─────────────┼─────────────────┼────────┼─────────────────┼─────────────────┼─────────────────┤
│ 2024-10-01 │ 2024-10-01 │ WM_GW_ID │ btdoffice │ gateway id │ composition │ 66fa8912b4c0876 │ false │ false │ 66fbb7bef951624 │ │
│ 08:50:06+00:00 │ 08:50:06+00:00 │ │ │ │ │ 9d7c6a140 │ │ │ 647fa8e38 │ │
╘════════════════╧════════════════╧═══════════════════════════╧══════════════════════════╧═════════════╧═════════════╧═════════════════╧════════╧═════════════════╧═════════════════╧═════════════════╛
Step 9: List All Composition Versions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
List all versions of your composition. This helps you identify the correct version to release (more: :ref:`ocli-calm-composition-version-list`).
.. tab-set::
.. tab-item:: Command
.. code:: console
$ ocli calm composition-version list
.. tab-item:: Output
.. code:: console
:class: no-copybutton
$ ocli calm composition-version list 66fa8ae6aa1888819c7d9662
╒════════════════╤════════════════╤══════════════════════════╤═════════╤═════════════╤══════════════╤══════════════════════════╤══════════════════╕
│ created_at │ updated_at │ composition_id │ version │ description │ compose_file │ id │ composition_name │
├────────────────┼────────────────┼──────────────────────────┼─────────┼─────────────┼──────────────┼──────────────────────────┼──────────────────┤
│ 2024-09-30 │ 2024-09-30 │ 66fa8ae6aa1888819c7d9662 │ 1.0.0 │ This is an │ OK │ 66fa9e1964270b4e5ea32f75 │ Wirepas for │
│ 12:48:25+00:00 │ 12:48:25+00:00 │ │ │ initial │ │ │ carrots app │
│ │ │ │ │ version of │ │ │ │
│ │ │ │ │ Wirepas for │ │ │ │
│ │ │ │ │ carrots app │ │ │ │
╘════════════════╧════════════════╧══════════════════════════╧═════════╧═════════════╧══════════════╧══════════════════════════╧══════════════════╛
Step 10: Release Your Composition
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Finally, release the desired composition version to your fleet. This will deploy the services across the devices in the fleet (more: :ref:`ocli-calm-release-create`).
.. tab-set::
.. tab-item:: Command
.. code:: console
$ ocli calm release create -v -f
.. tab-item:: Output
.. code:: console
:class: no-copybutton
$ ocli calm release create -v 66fa9e1964270b4e5ea32f75 -f 66fa8912b4c08769d7c6a140
Release successfully requested.
Check your fleet in a few minutes.
Step 11: Check The Release
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
After few minutes let's check if the release succeeded. Use the fleet get command (more: :ref:`ocli-calm-fleet-get`).
.. tab-set::
.. tab-item:: Command
.. code:: console
$ ocli calm fleet get
.. tab-item:: Output
.. code:: console
:class: no-copybutton
$ ocli calm fleet get 66fa8912b4c08769d7c6a140
╒════════════════╤════════════════╤═════════╤═════════════╤════════════════════════════╤════════════════════════════╤══════════════════════════╤═══════════════╤══════════════════╕
│ created_at │ updated_at │ name │ description │ devices │ compositions │ id │ status │ deployment_info │
├────────────────┼────────────────┼─────────┼─────────────┼────────────────────────────┼────────────────────────────┼──────────────────────────┼───────────────┼──────────────────┤
│ 2024-09-30 │ 2024-09-30 │ Carrots │ Fleet of │ ['66e96c91b053f8dea450c2c0 │ ['66fa9e1964270b4e5ea32f75 │ 66fa8912b4c08769d7c6a140 │ OK │ {'devices': │
│ 11:18:42+00:00 │ 11:18:42+00:00 │ fleet │ carrots │ - Harry-Test-GW #1', │ - Wirepas for carrots │ │ │ [{'status': │
│ │ │ │ doing │ '66e96d25d72d0d4c0ff1962b │ app:1.0.0'] │ │ │ 'OK', │
│ │ │ │ carrots' │ - Harry-Test-GW #2'] │ │ │ │ 'count': 2}, │
│ │ │ │ things. │ │ │ │ │ {'status': │
│ │ │ │ │ │ │ │ │ 'TOTAL', │
│ │ │ │ │ │ │ │ │ 'count': 2}], │
│ │ │ │ │ │ │ │ │ 'compositions': │
│ │ │ │ │ │ │ │ │ [{'status': │
│ │ │ │ │ │ │ │ │ 'OK', │
│ │ │ │ │ │ │ │ │ 'count': 1}]} │
╘════════════════╧════════════════╧═════════╧═════════════╧════════════════════════════╧════════════════════════════╧══════════════════════════╧═══════════════╧══════════════════╛
You Wirepas application is running!
.. note:: If you are facing any problems or have suggestions please contact us through our `Customer Portal `_.
Next steps
--------------
Next, you can :ref:`configuring-sink-via-cli`.