Using ota-http-client, mos.yml variables

#1

If you are asking a question, please follow this template:

  1. My goal is: perform field OTA updates via AWS S3 bucket while minimizing download size. I’d like more information on how the actual OTA process works, from the perspective of optimal cloud infrastructure setup as well as minimizing my AWS S3 or CDN data transfer costs.
  2. My actions are: I have a metadata JSON file of roughly 600 bytes that describes the zip archive of the OTA update. Every hour my device downloads this JSON file and checks if the version in the JSON is different than the current running version. This saves me from downloading the entire zip archive just to find out it is the same version as I am currently running. If the versions are different I call mgos_ota_http_start() passing it a struct mgos_ota_opts. T
  3. The result I see is: I can successfully update my device and I call mgos_ota_commit() when the running system is stable, preventing the automatic roll-back. But it’s not clear what is happening during the download. I also don’t know how to optimize the variables in mos.yml to get what I need.
  4. My expectation & question is:
  • in ota-http-client mos.yml, [“update.url”] is this the path to the zip archive?
  • Is the entire zip archive downloaded before checking the version?
  • What are the restrictions or recommendations on the zip filename for “update.url”?
  • Are there any recommendations to achieve my goals?
#2

I forgot one question:

  • in order to successfully call mgos_ota_http_start() over a TLS connection with a client certificate, I need to set these variables, correct?
    • [“update.ssl_ca_file”, “s”, “ca.pem”, {title : “TLS CA file”}]
    • [“update.ssl_client_cert_file”, “s”, {title: “TLS client cert file”}]
#3

The second var is required only for two-way SSL.

#4

i also want to do the same can you please share your project