Synchronous Updates

Hello

How can I set up the Synchronous Update? I want to deploy a Torizon OS image together with one or more container applications. What files do I need to add to the OS to achieve this?

These two pages don’t explain the technical details to implement the Synchronous Update:

Software summary
------------------------------------------------------------
Bootloader:               U-Boot
Kernel version:           6.6.54-7.1.0-g3493ccd66900 #1-Torizon SMP PREEMPT Tue Dec 17 21:04:41 UTC 2024
Kernel command line:      root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 ostree=/ostree/boot.1/torizon/500611918e07c8fe1cf9b3cc8f76327936d80d93ad461d3fe0da9c30624ff84b/0 clk-imx8mp.mcore_booted=1
Distro name:              NAME="Torizon OS"
Distro version:           VERSION_ID=7.1.0-build.4
Distro variant:           VARIANT="Docker"
Hostname:                 verdin-imx8mp-15139674
------------------------------------------------------------

Hardware info
------------------------------------------------------------
HW model:                 Toradex Verdin iMX8M Plus WB on Verdin Development Board
Toradex version:          0058 V1.1A
Serial number:            15139674
Processor arch:           aarch64
------------------------------------------------------------

Cheers
Ian

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello Ian,

Setting up Synchronous Updates on Torizon OS allows you to update both the operating system and your container applications simultaneously, ensuring they succeed or fail together. This is particularly useful when your applications depend on specific OS features or drivers.

To achieve this, you will need to use Torizon Cloud, which manages these updates. Here’s a concise guide to help you set it up:

  1. Prepare Your OS and Application Packages:

    • If you’re using a custom Torizon OS image, ensure it is built and ready for deployment. This might involve using Yocto to customize the OS image.
    • Prepare your Docker Compose YAML files that define your containerized applications. These files specify how your containers should be configured and run.
  2. Upload to Torizon Cloud:

    • Sign and upload your custom OS image to Torizon Cloud if applicable.
    • Upload your Docker Compose files to Torizon Cloud. This allows the cloud service to manage and deploy your container applications.
  3. Configure Synchronous Updates:

    • In Torizon Cloud, create a deployment package that includes both the OS image and the Docker Compose files. This package will be used to perform the synchronous update.
    • Ensure the deployment package is configured to treat the OS and application updates as a single unit, meaning they must both succeed or fail together.
  4. Deploy the Update:

    • Use Torizon Cloud to deploy the synchronous update to your devices. The cloud service will handle the update process, ensuring that both the OS and applications are updated in a coordinated manner.

By following these steps, you can achieve a reliable and consistent update process for both your Torizon OS and container applications. This setup helps prevent issues that might arise from mismatched OS and application versions.

If you have any further questions, feel free to ask!

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

Deploying Container Images to Torizon OS | Toradex Developer Center.

How can I create a deployment package in Torizon Cloud?

Greetings @i.staehli,

Just to understand, have you performed any kind of update yet with our Torizon Cloud system?

Performing a synchronous update does not require any special files on the OS to do so. When you create an update on our Web UI you just simply select OS update package and a application/docker-compose update package at the same time. The act of creating an update with both of these package types results in a synchronous update.

Best Regards,
Jeremias

Hi @i.staehli !

From the “file preparation” side, you will still need to have your Torizon OS package and your Application package (docker compose) uploaded to Torizon Cloud independently.

Then, on Torizon Cloud, when triggering the update, you will select the packages that will be part of your Synchronous Update.

So, the Synchronous Update can be understood as something that happens between the Torizon Cloud and your device and it doesn’t have a direct relation with e.g. TorizonCore Builder.

If something is not clear enough, let me know. :slight_smile:

Best regards,

Thanks for the input

I was wondering if there is an option to have a single file that updates OS + multiple container applications + cortex-m in one go. I think it’s quite error prone if each image has to be selected manually with the correct version.

Also, is there an option to update everything (OS + multiple container applications + cortex-m) to the latest “daily” build without using Torizon Cloud (for example via SSH)?

Just to understand your perspective I have some questions and comments about your feedback.

I was wondering if there is an option to have a single file that updates OS + multiple container applications + cortex-m in one go. I think it’s quite error prone if each image has to be selected manually with the correct version.

First of all there is no “single file” option that can update multiple components at once. It’s also highly use-case dependent on whether this hypothetical “single file” approach is better or not.

Regarding your concern about the process being “error prone”. Could you elaborate on that?

Compared to the hypothetical “single file” approach I imagine the same margin for error. For the single file approach at some point you would still need to select and configure what versions of each component go into this single file. In which case we would face the same concern of having to select the correct version for each component.

If your concern is the “manual” part of the process, then I should inform you that our Torizon Cloud system has a REST API. Using this API it should be possible to script and automate the process of performing updates. This would address the margin for error that comes with doing the updates manually.

Also, is there an option to update everything (OS + multiple container applications + cortex-m) to the latest “daily” build without using Torizon Cloud (for example via SSH)?

I’m not sure what your expectation here would be. It sounds like you’re essentially just asking for a completely different update mechanism, correct?

If that is so, could I ask what would a theoretical “ssh update mechanism” have compared to our Torizon Cloud option? Is there something about Torizon Cloud you are not fond of, or wish was different?

Best Regards,
Jeremias

1 Like

Hi @i.staehli !

Did you have time to go though @jeremias.tx’s considerations above?

Let us know if you have any open questions :slight_smile:

Best regards,

Hello @henrique.tx!

Yes, @jeremias.tx was able to answer my questions. The synchronous update together with the Cloud API should give me enough tools to automate the update process.

Hi @i.staehli !

Thank you for the feedback!

Could you please mark @jeremias.tx’s answer as the solution? It is very important for Community to signalize that a thread is solved :slight_smile:

Best regards,

@henrique.tx I already marked it a couple of days ago. Maybe I did something wrong?

I am sorry, @i.staehli !

I didn’t see the notification. All good! Thanks! :slight_smile: