How to deploy existing application on AWS IoT Greengrass?

0

I have an existing application for video analysis. It can already run on localhost (e.g. localhost:3000). Now I'm trying to deploy it on AWS IoT Greengrass, and let this application run on a port of Greengrass (e.g. www.greengrass.com:3000).

Is it possible to do so? If yes, can anyone tell me the procedure and what program I need to install?

Thank you very much!!

P.S. I can only deploy it on Linux.

2 Answers
0

You should explore to develop AWS IoT Greengrass components [1] and update your application to be deployed as a component. Every component is composed of a recipe and artifacts. The recipe file defines the component‘s metadata. This includes the component’s configuration parameters, component dependencies, lifestyle, and platform compatibility. The lifecycle defines the commands to install, run, and shut down the component. It can be defined in YAML and JSON format. Artifacts are optional and consist of component binaries and may include scripts, compiled code, static resources, and any other files that a component consumes. Refer to 5 tips to build AWS IoT Greengrass v2 Components [2]

There is also a sample workshop/tutorial which you can refer and see if you can utilize for your app [3]

  1. https://docs.aws.amazon.com/greengrass/v2/developerguide/develop-greengrass-components.html
  2. https://aws.amazon.com/blogs/iot/5-tips-to-build-aws-iot-greengrass-v2-components/
  3. https://catalog.us-east-1.prod.workshops.aws/workshops/5ecc2416-f956-4273-b729-d0d30556013f/en-US/chapter4-createfirstcomp
profile pictureAWS
EXPERT
answered a year ago
  • As I'm unable to use sudo in Linux, is there any other way to do so? Sorry for forgetting to mention that!

0

Hi,

if you have installed Greengrass on the machine, you should be able to run your application as a component with the same permissions and user requirements that you would use in case you were running the application directly from the host.

By default components in Greengrass are executed by ggc_user:ggc_group or whatever user and group was specified during the AWS Greengrass core software installation.

This user and group can also be overridden during deployment on a component by component basis, by specifying an alternative user and group as part of the component configuration (see https://docs.aws.amazon.com/greengrass/v2/developerguide/create-deployments.html - runWith).

In the console (as part of the deployment wizard):

console screenshot for the component configuration page

Cheers,

Massimiliano

AWS
EXPERT
answered a year ago
  • Can you explain how to lauch application from components? I have the same questiong, I'm using zigbee2mqtt aplication on edge, which runs in port 8080, It would like wonderful if we would are able to access in remote mode. Would it be possible? Regards!

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