Greengrass StreamManager dependency - edit LOG_LEVEL

0

I would like to configure the LOG_LEVEL parameter of the aws.greengrass.StreamManager component.

StreamManager is pulled in as a dependency in a recipe:

{
  "RecipeFormatVersion": "2020-01-25",
  "ComponentName": "com.custom.KinesisStream",
  "ComponentVersion": "1.0.0",
  "ComponentDescription": "Uses stream manager to stream data to Kinesis",
  "ComponentPublisher": "MyCompany",
  "ComponentDependencies": {
    "aws.greengrass.StreamManager": {
      "VersionRequirement": "^2.0.0"
    }
  },
  "Manifests": [
    {
      "Platform": {
        "os": "linux"
      },
      "Lifecycle": {
        "Run": "python3 {artifacts:path}/stream_manager_kinesis.py"
      }
    }
  ]
}

Could someone provide the syntax for editing the LOG_LEVEL parameter in this recipe, if that is even possible?

I wasn't able to find an example of doing this specifically.

Thanks

ttnickb
asked 2 years ago242 views
2 Answers
1
Accepted Answer

Hi @ttnickb,

You cannot change the configuration of your dependencies using your recipe. Instead, you do this in a deployment. Please review the available configuration for Stream manager here: https://docs.aws.amazon.com/greengrass/v2/developerguide/stream-manager-component.html#stream-manager-component-configuration and how to set configurations in a deployment here: https://docs.aws.amazon.com/greengrass/v2/developerguide/update-component-configurations.html#merge-configuration-update.

Cheers, Michael

AWS
EXPERT
answered 2 years ago
  • Thanks Michael. I created a merge config file update.json as follows:

    {
      "aws.greengrass.StreamManager": {
        "MERGE": {
          "LOG_LEVEL": "TRACE"
        }
      }
    }
    

    And issued the following command: sudo /home/user/greengrass/v2/bin/greengrass-cli deployment create --recipeDir /home/user/recipes --artifactDir /home/user/artifacts --merge "com.custom.KinesisStream=1.0.0" --update-config update.json

    However, I am still seeing the default LOG_LEVEL config of "INFO" for aws.greengrass.StreamManager.

    Do you see anything incorrect with my above workflow?

  • You did not include stream manager in your deployment. Include --merge "aws.greengrass.StreamManager=<version>"

  • Hi @MichaelDombrowski-AWS, is there a way to set a configuration for dependency during deployment through AWS console?

0

Thanks Michael, that worked.

ttnickb
answered 2 years 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