You can download the latest version of the AWS IoT fleet provisioning plugin from the following location:
• https://d2s8p88vqu9w66.cloudfront.net/releases/aws-greengrass-FleetProvisioningByClaim/
fleetprovisioningbyclaim-latest.jar
NoteThe fleet provisioning plugin is open source. To view its source code, see the AWS IoT fleet provisioning plugin on GitHub.
To download the AWS IoT fleet provisioning plugin
• On your device, download the AWS IoT fleet provisioning plugin to a file named
aws.greengrass.FleetProvisioningByClaim.jar. Replace GreengrassInstaller with the folder that you want to use.
Install with fleet provisioning
Linux or Unix
curl -s
https://d2s8p88vqu9w66.cloudfront.net/releases/aws-greengrass-FleetProvisioningByClaim/fleetprovisioningbyclaim-latest.jar > GreengrassInstaller/
aws.greengrass.FleetProvisioningByClaim.jar
Windows Command Prompt (CMD)
curl -s
https://d2s8p88vqu9w66.cloudfront.net/releases/aws-greengrass-FleetProvisioningByClaim/fleetprovisioningbyclaim-latest.jar > GreengrassInstaller/
aws.greengrass.FleetProvisioningByClaim.jar
PowerShell
iwr -Uri https://d2s8p88vqu9w66.cloudfront.net/releases/awsgreengrassFleetProvisioningByClaim/fleetprovisioningbyclaimlatest.jar
-OutFile GreengrassInstaller/aws.greengrass.FleetProvisioningByClaim.jar
By downloading this software, you agree to the Greengrass Core Software License Agreement.
Install the AWS IoT Greengrass Core software
Run the installer with arguments that specify the following actions:
• Install from a partial configuration file that specifies to use the fleet provisioning plugin to provision AWS resources. The AWS IoT Greengrass Core software uses a configuration file that specifies the configuration of every Greengrass component on the device. The installer creates a complete configuration file from the partial configuration file that you provide and the AWS resources that the fleet provisioning plugin creates.
• Specify to use the ggc_user system user to run software components on the core device. On Linux devices, this command also specifies to use the ggc_group system group, and the installer creates the system user and group for you.
• Set up the AWS IoT Greengrass Core software as a system service that runs as boot. On Linux devices, this requires the Systemd init system.
For more information about the arguments that you can specify, see Installer arguments (p. 136).
Note
If you are running AWS IoT Greengrass on a device with limited memory, you can control the amount of memory that AWS IoT Greengrass Core software uses. To control memory allocation, you can set JVM heap size options in the jvmOptions configuration parameter in your nucleus component. For more information, see Control memory allocation with JVM options (p. 168).
To install the AWS IoT Greengrass Core software
1. Check the version of the AWS IoT Greengrass Core software.
• Replace GreengrassInstaller with the path to the folder that contains the software.
java -jar ./GreengrassInstaller/lib/Greengrass.jar --version
2. Use a text editor to create a configuration file named config.yaml to provide to the installer.
Install with fleet provisioning
For example, on a Linux-based system, you can run the following command to use GNU nano to create the file.
nano GreengrassInstaller/config.yaml
Copy the following YAML content into the file. This partial configuration file specifies parameters for the fleet provisioning plugin. For more information about the options that you can specify, see Configure the AWS IoT fleet provisioning plugin (p. 125).
Linux or Unix
rootPath: "/greengrass/v2"
awsRegion: "us-west-2"
iotDataEndpoint: "device-data-prefix-ats.iot.us-west-2.amazonaws.com"
iotCredentialEndpoint: "device-credentials-prefix.credentials.iot.us-west-2.amazonaws.com"
iotRoleAlias: "GreengrassCoreTokenExchangeRoleAlias"
provisioningTemplate: "GreengrassFleetProvisioningTemplate"
claimCertificatePath: "/greengrass/v2/claim-certs/claim.pem.crt"
claimCertificatePrivateKeyPath: "/greengrass/v2/claim-certs/
claim.private.pem.key"
rootCaPath: "/greengrass/v2/AmazonRootCA1.pem"
templateParameters:
ThingName: "MyGreengrassCore"
ThingGroupName: "MyGreengrassCoreGroup"
Windows
rootPath: "C:\\greengrass\\v2"
awsRegion: "us-west-2"
iotDataEndpoint: "device-data-prefix-ats.iot.us-west-2.amazonaws.com"
iotCredentialEndpoint: "device-credentials-prefix.credentials.iot.us-west-2.amazonaws.com"
iotRoleAlias: "GreengrassCoreTokenExchangeRoleAlias"
provisioningTemplate: "GreengrassFleetProvisioningTemplate"
claimCertificatePath: "C:\\greengrass\\v2\\claim-certs\\claim.pem.crt"
claimCertificatePrivateKeyPath: "C:\\greengrass\\v2\\claim-certs\
\claim.private.pem.key"
rootCaPath: "C:\\greengrass\\v2\\AmazonRootCA1.pem"
templateParameters:
ThingName: "MyGreengrassCore"
ThingGroupName: "MyGreengrassCoreGroup"
Then, do the following:
• Replace 2.5.3 with the version of the AWS IoT Greengrass Core software.
Install with fleet provisioning
• Replace each instance of /greengrass/v2 or C:\greengrass\v2 with the Greengrass root folder.
NoteOn Windows devices, you must specify path separators as double backslashes (\\), such as C:\\greengrass\\v2.
• Replace us-west-2 with the AWS Region where you created the provisioning template and other resources.
• Replace the iotDataEndpoint with your AWS IoT data endpoint.
• Replace the iotCredentialEndpoint with your AWS IoT credentials endpoint.
• Replace GreengrassCoreTokenExchangeRoleAlias with the name of the token exchange role alias.
• Replace GreengrassFleetProvisioningTemplate with the name of the fleet provisioning template.
• Replace the claimCertificatePath with the path to the claim certificate on the device.
• Replace the claimCertificatePrivateKeyPath with the path to the claim certificate private key on the device.
• Replace the template parameters (templateParameters) with the values to use to provision the device. This example refers to the example template (p. 120) that defines ThingName and ThingGroupName parameters.
Note
In this configuration file, you can customize other configuration options such as the ports and network proxy to use, as shown in the following example. For more information, see Greengrass nucleus configuration (p. 191).
Linux or Unix
greengrassDataPlanePort: 443 networkProxy:
noProxyAddresses: "http://192.168.0.1,www.example.com"
proxy:
rootPath: "/greengrass/v2"
awsRegion: "us-west-2"
iotDataEndpoint: "device-data-prefix-ats.iot.us-west-2.amazonaws.com"
iotCredentialEndpoint: "device-credentials-prefix.credentials.iot.us-west-2.amazonaws.com"
iotRoleAlias: "GreengrassCoreTokenExchangeRoleAlias"
provisioningTemplate: "GreengrassFleetProvisioningTemplate"
claimCertificatePath: "/greengrass/v2/claim-certs/claim.pem.crt"
claimCertificatePrivateKeyPath: "/greengrass/v2/claim-certs/
claim.private.pem.key"
rootCaPath: "/greengrass/v2/AmazonRootCA1.pem"
templateParameters:
ThingName: "MyGreengrassCore"
ThingGroupName: "MyGreengrassCoreGroup"
Install with fleet provisioning
mqttPort: 443
proxyUrl: "http://my-proxy-server:1100"
proxyUserName: "Mary_Major"
proxyPassword: "pass@word1357"
Windows
greengrassDataPlanePort: 443 networkProxy:
noProxyAddresses: "http://192.168.0.1,www.example.com"
proxy:
rootPath: "C:\\greengrass\\v2"
awsRegion: "us-west-2"
iotDataEndpoint: "device-data-prefix-ats.iot.us-west-2.amazonaws.com"
iotCredentialEndpoint: "device-credentials-prefix.credentials.iot.us-west-2.amazonaws.com"
iotRoleAlias: "GreengrassCoreTokenExchangeRoleAlias"
provisioningTemplate: "GreengrassFleetProvisioningTemplate"
claimCertificatePath: "C:\\greengrass\\v2\\claim-certs\\claim.pem.crt"
claimCertificatePrivateKeyPath: "C:\\greengrass\\v2\\claim-certs\
\claim.private.pem.key"
rootCaPath: "C:\\greengrass\\v2\\AmazonRootCA1.pem"
templateParameters:
ThingName: "MyGreengrassCore"
ThingGroupName: "MyGreengrassCoreGroup"
mqttPort: 443
proxyUrl: "http://my-proxy-server:1100"
proxyUserName: "Mary_Major"
proxyPassword: "pass@word1357"
3. Run the installer. Specify --trusted-plugin to provide the fleet provisioning plugin, and specify --init-config to provide the configuration file.
• Replace /greengrass/v2 with the Greengrass root folder.
• Replace each instance of GreengrassInstaller with the folder where you unpacked the installer.
Linux or Unix
sudo -E java -Droot="/greengrass/v2" -Dlog.store=FILE \ -jar ./GreengrassInstaller/lib/Greengrass.jar \ --trusted-plugin ./GreengrassInstaller/
aws.greengrass.FleetProvisioningByClaim.jar \ --init-config ./GreengrassInstaller/config.yaml \ --component-default-user ggc_user:ggc_group \ --setup-system-service true
Install with fleet provisioning
Windows Command Prompt (CMD)
java -Droot="C:\greengrass\v2" "-Dlog.store=FILE" ^ -jar ./GreengrassInstaller/lib/Greengrass.jar ^ --trusted-plugin ./GreengrassInstaller/
aws.greengrass.FleetProvisioningByClaim.jar ^ --init-config ./GreengrassInstaller/config.yaml ^ --component-default-user ggc_user ^
--setup-system-service true PowerShell
java -Droot="C:\greengrass\v2" "-Dlog.store=FILE" ` -jar ./GreengrassInstaller/lib/Greengrass.jar ` --trusted-plugin ./GreengrassInstaller/
aws.greengrass.FleetProvisioningByClaim.jar ` --init-config ./GreengrassInstaller/config.yaml ` --component-default-user ggc_user `
--setup-system-service true
If you specify --setup-system-service true, the installer prints Successfully set up Nucleus as a system service if it set up and ran the software as a system service. Otherwise, the installer doesn't output any message if it installs the software successfully.
NoteYou can't use the deploy-dev-tools argument to deploy local development tools when you run the installer without the --provision true argument. For information about deploying the Greengrass CLI directly on your device, see Greengrass Command Line Interface (p. 455).
4. Verify the installation by viewing the files in the root folder.
Linux or Unix
ls /greengrass/v2
Windows Command Prompt (CMD)
dir C:\greengrass\v2 PowerShell
ls C:\greengrass\v2
If the installation succeeded, the root folder contains several folders, such as config, packages, and logs.
If you installed the AWS IoT Greengrass Core software as a system service, the installer runs the software for you. Otherwise, you must run the software manually. For more information, see Run the AWS IoT Greengrass Core software (p. 138).
For more information about how to configure and use the software and AWS IoT Greengrass, see the following:
• Configure the AWS IoT Greengrass Core software (p. 165)
Install with fleet provisioning
• Develop AWS IoT Greengrass components (p. 467)
• Deploy AWS IoT Greengrass components to devices (p. 519)
• Greengrass Command Line Interface (p. 455)