Skip to content

Commit

Permalink
Use the right thing
Browse files Browse the repository at this point in the history
  • Loading branch information
sfodagain committed May 28, 2024
1 parent 336408c commit fa15466
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 19 deletions.
10 changes: 3 additions & 7 deletions samples/greengrass/basic_discovery/ci_run_discovery_cfg.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"arguments": [
{
"name": "--cert",
"secret": "ci/Greengrass_Discovery/cert",
"secret": "ci/GreengrassDiscovery/cert",
"filename": "tmp_certificate.pem"
},
{
"name": "--key",
"secret": "ci/Greengrass_Discovery/key",
"secret": "ci/GreengrassDiscovery/key",
"filename": "tmp_key.pem"
},
{
Expand All @@ -28,15 +28,11 @@
},
{
"name": "--topic",
"data": "clients/CI_Greengrass_Discovery_Thing/hello/world"
"data": "clients/CI_Greengrass_Discovery_Thing/hello/world/$INPUT_UUID"
},
{
"name": "--mode",
"data": "publish"
},
{
"name": "--is_ci",
"data": "true"
}
]
}
16 changes: 4 additions & 12 deletions samples/greengrass/basic_discovery/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@ ComponentConfiguration:
- aws.greengrass#PublishToTopic
resources:
- "*"
aws.greengrass.ipc.mqttproxy:
software.amazon.awssdk.sdk-gg-test-discovery:mqttproxy:1:
policyDescription: "Allows access to publish and subscribe to a Greengrass IPC test topic"
operations:
- aws.greengrass#PublishToIoTCore
- aws.greengrass#SubscribeToIoTCore
resources:
- "*"
Manifests:
- Platform:
os: all
Expand All @@ -37,7 +29,7 @@ Manifests:
Lifecycle:
Install: |
echo "GG core:" {iot:thingName}
aws greengrassv2 batch-associate-client-device-with-core-device --core-device-thing-name {iot:thingName} --entries thingName=CI_GreenGrass_Thing
aws greengrassv2 batch-associate-client-device-with-core-device --core-device-thing-name {iot:thingName} --entries thingName=CI_Greengrass_Discovery_Thing
aws greengrassv2 list-client-devices-associated-with-core-device --core-device-thing-name {iot:thingName}
Run: |
UUID=$(python3 -c "import uuid; print (uuid.uuid4())")
Expand All @@ -46,10 +38,10 @@ Manifests:
echo "continuing ..."
sleep 10
echo "starting discovery"
python3 {artifacts:path}/run_in_ci.py --runnable_dir {artifacts:path} --input_uuid ${UUID} --file {artifacts:path}/ci_run_discovery_cfg.local.json
python3 {artifacts:path}/run_in_ci.py --runnable_dir {artifacts:path} --input_uuid ${UUID} --file {artifacts:path}/ci_run_discovery_cfg.json
Shutdown: |
echo "Shutdown step"
aws greengrassv2 batch-disassociate-client-device-from-core-device --core-device-thing-name {iot:thingName} --entries thingName=CI_GreenGrass_Thing
aws greengrassv2 batch-disassociate-client-device-from-core-device --core-device-thing-name {iot:thingName} --entries thingName=CI_Greengrass_Discovery_Thing
Recover: |
echo "Recover step"
aws greengrassv2 batch-disassociate-client-device-from-core-device --core-device-thing-name {iot:thingName} --entries thingName=CI_GreenGrass_Thing
aws greengrassv2 batch-disassociate-client-device-from-core-device --core-device-thing-name {iot:thingName} --entries thingName=CI_Greengrass_Discovery_Thing

0 comments on commit fa15466

Please sign in to comment.