Package Management

Package Management

What is the package in Greengrass?

A package in Greengrass refers to the software embedded within the hardware devices connected to the platform. It acts as the operating system for these devices. It provides them the necessary functionality to interact with other devices and the cloud. Package in Greengrass manages communication protocols, data processing, security, and other essential tasks. It is crucial for ensuring the smooth and efficient operation of the connected devices in the Greengrass ecosystem.

Artifacts in package refer to any traces, remnants, or evidence left behind by the development or use of package. These artifacts can include files, logs, temporary data, configuration settings, or any other non-volatile information stored in the package. These artifacts can be important for forensic analysis, reverse engineering, or troubleshooting. They can provide insights into the package’s development process, configuration settings, or potential security vulnerabilities. Proper management and handling of artifacts in the package is crucial for ensuring embedded systems’ integrity, security, and reliability.

Overview

Package management in Greengrass involves two main components: components and deployments.

To begin, a user can create a component using artifacts and a recipe. Artifacts are the files and dependencies needed for the component, while a recipe describes how these artifacts are used to build the component.

To create a package, the user needs to select a template, which serves as the starting point for the package. This template includes predefined components that can be customized or replaced with custom components created by the user.

Once the components are finalized, they can be published and available for deployment. Deployments allow the user to push the package to the desired devices securely and efficiently.

Create a component

To create a component:

  • From the left navigation, mouseover the Devices Click Greengrass Device. In the middle and toward the down, select Package.
  • Along the top and toward the right, select Components.
  • Enter data in the following fields:
  • Recipe : A set of instructions for updating the package in a device. It involves copying files to memory and executing commands to update the package. You can upload files in .json and .yaml formats.
  • Click Save to create a component.

Required fields have a red asterisk on the upper-right side of every field name.

The component list will reflect your component.

Components List

The components list comes right under the Create Component section:

The components list displays a component name, latest version, artifact file number, updated on with the date and time, and actions.

Create Package

To create a package:

  • From the left navigation, mouseover the Devices Click Greengrass Device. In the middle and toward the down, select Package.
  • Along the top and toward the right, select Create Package.
  • Enter data in the following fields:
    • Name: Enter a unique name for the package.
    • Template: Select the template from the dropdown list.
    • Custom Components: Select the custom components from the dropdown list.
    • Public Components: By utilizing the public components provided by AWS, package developers can foster collaboration and modularity, making integration and customization of the package smoother. These pre-built public components enable developers to easily incorporate and tailor their package to meet their needs.
    • /IOTCONNECT™ Default Component: It is a custom-built component for AWS IoT Greengrass. It accompanies /IOTCONNECT™ Greengrass SDK.
  • Click Save to create a package.

Deployments

To deploy:

  • From the left navigation, mouseover the Devices Click Greengrass Device. In the middle and toward the down, select Package.
  • Along the top and toward the right, select Deployments.
  • Enter data in the following fields:
    • Deployment: Enter a unique name for deployment.
    • Package: Select package from the drop down which you want to deploy. When your selected package has multiple components, it will appear on the right side with the checkbox to select. You can choose one or more components to deploy.
    • Components: Select one or more components from the available list that you want to include in your deployment. Components will be displayed with checkboxes when your selected package contains multiple components. You can choose specific components based on your deployment requirements.
    • Configuration : Simply the set of input parameters/settings that control how that component behaves on the device.
    • Target type: You can select the target type from the drop down.
    • Target: You will get a created device list in the target drop down.
  • Click Deploy to deploy a package.