Angel Hadzhiev
Angel Hadzhiev

Reputation: 966

Why does the AWS fleet provisioning plugin does not create a Greengrass Core device in the cloud?

I am following the documentation in "Set up AWS IoT fleet provisioning for Greengrass core devices" and "Install AWS IoT Greengrass Core software with AWS IoT fleet provisioning" for AWS.

I made sure that I am following it correctly. All policies and roles are attached as described, but at the end I manage to download and install the Greengrass Core software on my Linux device but that does not become visible in the AWS cloud. What I mean by that is that no Greengrass Core Device is created in the cloud, and I have it only locally.

Can someone tell me why that is the case? Or it is not supposed to create it in the cloud? If that is the case, how do I get it to be in the cloud as well so I can deploy components to it?

I used this command to execute the installation:

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

Upvotes: 0

Views: 479

Answers (2)

Sunitha
Sunitha

Reputation: 21

If you could paste the logs from your Greengrass core device, I can see if I can troubleshoot the problem or give some pointers.

On the cloud side, create these:

  1. Token role (TES) - this should have trust policy and access policy.
  2. Create a alias for this tes - this is not mandatory but recommended.
  3. Create iot policy to let device communicate to aws using certificate.
  4. Create fleet provisioning template and a role for this-make sure you have the correct parameternames, i made few mistakes in this and this solved many errors when the parameters and reference name are proper.
  5. Create certificates for the device authentication and authorization and add a policy to this.

Device side:

  1. Copy those certificates (crt and private key files) to the device.

  2. Download Greengrass nucleus softwares and fleet provisioning plugins.

  3. Define the config file - this is important and may make mistakes here. Make sure you have all the config values added properly.

  4. Start the Greengrass software with this command:

     sudo -E java -Droot=*"/greengrass/v2"* -Dlog.store=FILE \
     -jar /home/pi/ggc/installer/lib/Greengrass.jar \
     --trusted-plugin /home/pi/ggc/installer/aws.greengrass.FleetProvisioningByClaim.jar \
     --init-config /home/pi/ggc/installer/config.yaml \
     --component-default-user ggc_user:ggc_group \
     --setup-system-service true
    

    Change the directory to yours.

  5. If it is a success, you should see this registered on things in AWS IoT core and also under Greengrass core devices.

Upvotes: 1

Sunitha
Sunitha

Reputation: 21

Yes, once you have started the Greengrass core software, you should see a thing registered, and it should be listed under things in the AWS IoT console and also in the Greengrass core device list.

Check the Greengrass logs on your device. I just finished setting it up, and it works for me.

Upvotes: 1

Related Questions