This offer is only addressed to commercial customers including freelancers and entrepreneurs. All prices are exclusive of value added tax (VAT).
  • Share via email
  • Subscribe to blog alert

Rollout an update to many devices

What you will learn

The utilization of several IoT use cases with a large number of connected devices requires a powerful and professional update management. To avoid overloading IT resources, it is essential to rollout updates to all devices with a time delay. Therefore, Bosch IoT Rollouts provides professional campaign management.

In this tutorial, you will learn how to configure and manage complex update distributions with the Bosch IoT Rollouts service.

After booking the service, you will first have to set up some connected demo devices with our Java-based Eclipse hawkBit tool. Then, you will use the Bosch IoT Rollouts service to cluster simulated devices into target groups. Finally, you will create an update that you will rollout to the simulated devices.

Duration of the Tutorial

The tutorial takes approximately two hours.

What you need to install and prepare

  • A Java Development Kit 1.8 (JDK)
  • A web browser
  • Maven
  • Eclipse hawkBit device simulator tool

Tasks to complete

Icon illustrating the registration of a device.

Book and configure the Bosch IoT Rollouts Service

Subscribe to the Bosch IoT Suite Rollouts Service

Subscribe to the Bosch IoT Suite Rollouts Service by following these steps:

  1. Navigate to Service Subscriptions.
  2. Click New Subscription.
  3. Provide an Instance Name.
  4. Click on the Subscribe button.
  5. Confirm your subscription details by clicking the Subscribe button.

The approval of your subscription might take a few seconds.

Bosch IoT Rollouts Service documentation

For more information, have a look at the Bosch IoT Rollouts documentation.

Download and install the Eclipse hawkBit device simulator

Eclipse hawkBit

The Eclipse hawkBit device simulator is an open source tool, developed by the Eclipse IoT working group. It is used to simulate a large amount of devices. This is highly useful to simulate a realistic update-rollout scenario, wherein you can experience most features of Bosch IoT Rollouts.

Download the Eclipse hawkBit repository

You can either clone or download the git repository of the Eclipse hawkBit device simulator as .zip file to your computer.

Find the repository here: https://github.com/eclipse/hawkbit-examples.

Install and build the Eclipse hawkBit Java application with Maven

During the Maven building process, you need to include your specific Bosch IoT Rollouts credentials in the Eclipse hawkBit device simulator application. In order to do so, follow these steps.

Apache Maven

Apache Maven is a software project management and comprehension tool. It will build the device simulator java application based on the project files in the repository.

Copy your tenant ID from your Bosch IoT Rollouts subscription

  1. Navigate to Subscriptions.
  2. Click Show Credentials in the specific row of the subscription.
  3. For the tenant ID, scroll down in the Binding Credentials section.
Tenant of your Bosch IoT Rollouts service subscription

Modify the application.properties file

  1. Navigate to: ../hawkbit-examples/hawkbit-device-simulator/src/main/resources/application.properties.
  2. Open the application.properties file.
  3. Modify the following three lines of the code as follows (remember to delete the brackets):
    hawkbit.device.simulator.amqp.enabled=false
    ...
    hawkbit.device.simulator.default-tenant=<your_tenant>
  4. Open your console and navigate to the Eclipse hawkBit project directory.
  5. Run the command:
    mvn install

Maven starts searching and installing all project files (pom.xml). This might take a few moments.

Run Eclipse hawkBit

To run the Eclipse hawkBit device simulator application on your computer, you need to open your console and navigate to the project directory. Depending on your system and network setup, you have the following options to proceed:

  1. If you are not working behind a proxy server, use the following command without any modifications:
    java -jar hawkbit-device-simulator/target/hawkbit-device-simulator-0.3.0-SNAPSHOT.jar
  2. If you are behind a proxy server, modify the following command by replacing your port (make sure to delete the pointy brackets):
    java -Dhttps.proxyHost=localhost -Dhttps.proxyPort=<####> -Dhttps.proxySet=true  -jar hawkbit-device-simulator/target/hawkbit-device-simulator-0.3.0-SNAPSHOT.jar

Attention: Matching version numbers

The version of the project changes from time to time. Make sure that the version number in the command (hawkbit-device-simulator-0.3.0-SNAPSHOT) matches the current version number of the repository.

Setup the simulated devices using a web browser

In this step, you will build a simulation environment with several demo devices. You will use a web browser to interact with your already running Eclipse hawkBit device simulator application by entering URLs such as:

http://localhost:8083/start?amount=##&name=ABCdevice&api=ddi&gatewaytoken=<xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>&polldelay=10&endpoint=https://device.eu1.bosch-iot-rollouts.com

Find and copy your gateway security token

  1. Navigate to your booked Bosch IoT Rollouts service by clicking Go to dashboard in your subscribed Bosch IoT Rollouts instance.
  2. Click System Config on the left navigation bar.
  3. Activate the Allow a gateway to authenticate and manage multiple targets through a gateway security token checkbox.
  4. Copy the security token.
  5. To confirm your changes, click the Save icon.

Adding devices to your Bosch IoT Rollouts instance

In the next steps, you will add 45 devices in three groups (emea_devices, apac_devices and amer_devices) to your Bosch IoT Rollouts instance.

  1. To do so, modify the following URLs by replacing all <XXXX> with your security token:
    http://localhost:8083/start?amount=15&name=emea_device&api=ddi&gatewaytoken=<XXXX>&polldelay=10&endpoint=https://device.eu1.bosch-iot-rollouts.com
    http://localhost:8083/start?amount=15&name=apac_device&api=ddi&gatewaytoken=<XXXX>&polldelay=10&endpoint=https://device.eu1.bosch-iot-rollouts.com
    http://localhost:8083/start?amount=15&name=amer_device&api=ddi&gatewaytoken=<XXXX>&polldelay=10&endpoint=https://device.eu1.bosch-iot-rollouts.com
  2. Copy each URL and paste it in your web browser. You will receive the following response after confirming the URL:
    “Updated 15 DDI_HTTP connected targets!”

Check the Bosch IoT Rollouts instance

  1. Navigate to Subscriptions.
  2. To open the Bosch IoT Rollouts service, click Go to Dashboard.
  3. Navigate to the Deployment Management section.

All 45 devices are visible in the Deployment Management section of your Bosch IoT Rollouts instance.

Cluster demo devices with the Eclipse hawkBit device simulator

In the next steps, you will define target groups for your Bosch IoT Rollouts campaign.

  1. Within your Bosch IoT Rollouts instance, navigate to Target Filters.
  2. To create a filter for each of the following four groups, click the + icon.
  3. Provide a name and the appropriate query for each new filter as listed below:
    Name Query
    All_devices
    description==Plug*
    group_EMEA
    name==emea*
    group_APAC
    name==apac*
    group_AMER
    name==amer*
  4. To save each filter, click the Save icon.

Further information on queries

For further information, refer to the How to Filter documentation.

Create an update in the Bosch IoT Rollouts service

In the next steps, you will configure the update you want to send or deploy to your simulated devices.

  1. Navigate to the Upload Management section.
  2. In the Software Module pane, click the + icon.
  3. Choose OS from the Type drop-down list.
  4. Name the software module, e.g. update1.
  5. Type in the version (e.g. 1.0) in the Version field.
  6. Optionally, fill in the Vendor field with, e.g. your name.
  7. Optionally, add a description to your new module.
  8. To save the input, click the Save icon.

Adding a software package

Additionally, you can upload and assign specific files, which your software package should contain. This is not required in this tutorial. For further information, refer to the documentation.

Icon illustrating the generation of firmware.

Create a distribution in the Bosch IoT Rollouts service

A distribution can contain several software modules. In the next steps, you will configure the distribution, which will contain the previously created update.

  1. Navigate to the Distributions Management section.
  2. Click on the + icon in the Distributions pane.
  3. Choose OS only from the Type drop-down list.
  4. Name the distribution, e.g. distribution1.
  5. Type in the version (e.g. 1.0) Version field.
  6. Optionally, add a description to your new distribution.
  7. To save your input, click the Save icon.
  8. To assign the previously created update, drag it from the Software Module section to the Distributions section.

All assigned software modules are highlighted green when you click the Distribution section next time.

Create a rollout in the Bosch IoT Rollouts service

In the next steps, you will create a rollout campaign by assigning distributions to targets (devices) or to target groups (clusters of devices).

  1. Navigate to the Rollout section.
  2. To create a new rollout campaign, click the + icon.
  3. Name your new campaign, e.g. Rollout1.
  4. Choose the previously created distribution from the Distribution set drop-down list.
  5. Choose All devices from the Custom Target Filter drop-down list.
  6. Select Forced from the Action type selection.
  7. Select Manual from the Start type selection.
  8. Click Advanced Group definition.
  9. Add all three groups you previously added and name them.

Additionally, you can define thresholds.

Run the rollout in Bosch IoT Rollouts service

During the final step, you will run the rollout campaign.

  1. Navigate to your Rollout Management section.
  2. Click the Play icon.
  3. Watch the progression on your rollouts.

The service will distribute the update group-wise. It will start with the first group in the list. Depending on the defined thresholds, the service will begin starting the rollout for the next group.