[greengrass] an API that can get the progress of component installation

0

Is there any API to get the progress of component installation? Hope that customers can see the progress of the deployment in time Thanks!

asked 2 years ago248 views
1 Answer
1

Hi,

Greengrass does not provide any API to check detailed component installation progress, apart from a generic In Progress state. Some information about the progress of a deployment can be obtained from /greengrass/v2/logs/greengrass.log locally on the device, which could be used to understand the when the download of the artifacts is started, finished, and when the different lifecycle scripts are being executed.

What sort of information would you like to see in relation to the installation progress? Just the phase (eg downloading, install, run, etc) or also some sort of progress indicator, if possible, such as the amount of data downloaded so far for an artifact? In this case, how often would you need this information be updated? For a lifecycle script such as install, would you like to have an API so that your installation code can report the current installation progress?

Cheers,
Massimiliano

AWS
EXPERT
answered 2 years ago
  • yes, our team wants users to know the progress of the update on the app, Please let me know if you have any suggestions or progress thanks

  • Feel free to create a feature request for https://github.com/aws-greengrass/aws-greengrass-nucleus detailing your ask for a local IPC API to get the information you desire. You can then write your own component to obtain such information, process it and send to AWS IoT Core where it can then be relayed to the mobile app. At the time being the closest you can get is to write a component that watches and parses the /greengrass/v2/logs/greengrass.log. Enable DEBUG logging on the Nucleus in order to get additional information in the logs, such as the amount of bytes downloaded, but be aware that this will increase the storage needs on the device..

  • For example a line in the log providing information about the progress of the download (see range=bytes)

    2022-08-24T07:31:30.499Z [DEBUG] (pool-2-thread-78) com.aws.greengrass.componentmanager.builtins.S3Downloader: Getting s3 object request. {bucket=<redacted>, s3-key=test.example.com/1.0.0/gateway.js, range=bytes=0-1474, componentIdentifier=test.example.com, artifactUri=<redacted>}
    

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions