Update Java on Greengrass devices - use "Install" lifecicle in manifest?


We are in a position that we need to update the Java version on our greengrass devices running Linux. I'm looking at what is the best method to orchestrate this, or some best practice information

The updated java comes as a requirement of one of our custom compoments, so an option is to use the "Install" lifecycle of the artifact in the manifest. Then use the "onpath" or "exists" method to make sure it only runs once, which is a bit clunky. The benefit is that the update is part of the GG deployment which makes it nice and contained.

We also have System manager client running on these devices, so we could use systems manager to do this to.

I'm leading towards using the install lifecycle in the manifest but I'm interested if there are any better ideas, or if it's not the right tool for the job.

Cheers J

asked 15 days ago28 views
2 Answers

Hi Johan,

Since you have SSM Agent on the device, I would advice on using SSM Run Command to perform this kind of operations. You can either run the package manager command directly, or better apply an Ansible Playbook or Chef Recipe.

You could use a component to perform this operation, but you would need to carefully consider all possible failure scenarios that could leave you with an unserviceable device when writing the install and recover script.

Cheers, Massimiliano

answered 14 days ago

To update java, we'd recommend using the bootstrap lifecycle script and exit with code 100 in order to restart the Nucleus with the new version of Java.

answered 10 days ago

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