Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement single command for all steps of creating OTA update #86

Merged

Conversation

RC-Repositories
Copy link
Contributor

Description

Introduces a new command to tools/scripts/createIoTThings.py that

  1. Creates a Thing and Policy.
  2. Re-builds the target application (if required).
  3. Creates a Bucket, Role, and Update.

This command is documented in aws_tool.md.

The command takes at most 2 command line arguments, with the rest
specified in a .json file, an example of which is also included in This
commit as well as the aws_tool.md documentation.
Only 3 fields in the settings .json need to be filled in.

The command also re-uses AWS entities where possible. E.g. if
the role specified by the .json already exists, it checks it can access the Bucket
name specified before re-using the role.

The motivation for this commit is to make creating OTA updates
easier.

This MR also introduces a new command for cleaning up all
AWS entities specified by the .json config file.
This command is called cleanup-simplified.
It will force-delete everything (including bucket contents). This
is not configurable.

Test Steps

Checklist:

  • I have tested my changes. No regression in existing tests.
  • I have modified and/or added unit-tests to cover the code changes in this Pull Request.

Related Issue

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Introduces a new command to `tools/scripts/createIoTThings.py` that
1. Creates a Thing and Policy.
2. Re-builds the target application (if required).
3. Creates a Bucket, Role, and Update.
This command is documented in `aws_tool.md`.

During application building, the script prints '.' on the same line and
flushes.

The command only takes 2 command line arguments, with the rest
specified in a .json file, an example of which is also included in This
commit as well as the `aws_tool.md` documentation.
Only 3 fields in `aws_tool.md` need to be filled in.

The command also re-uses AWS entities where possible. E.g. if
the Role specified already exists, it checks it can access the Bucket
name provided before re-using the role.
Using Roles not created by your current account is not supported,
as the script may be unable to assume them to check access to the
Bucket.

The motivation for this commit is to make creating OTA updates
easier.

This commit also introduces a new command for cleaning up all
AWS entities specified by the .json config file.
This command is called `cleanup-simplified`.
It will force-delete everything (including bucket contents). This
is not configurable.

Signed-off-by: Reuben Cartwright <Reuben.Cartwright@arm.com>
This commit makes the script correctly ask before overwriting
credentials.
Previously, the script checked for 'dummy_thingname' and the default
endpoint in 'aws_clientcredential.h' and only asked if these defaults
were not present.
These strings occur in more than one place in the header file so so
this check is not sufficient to say the credentials #define'd have not
been modified by the user.
This commit makes the script check the entirety of the #define line.

Signed-off-by: Reuben Cartwright <Reuben.Cartwright@arm.com>
@RC-Repositories RC-Repositories requested a review from a team as a code owner September 13, 2024 13:23
@aggarg aggarg merged commit 177caff into FreeRTOS:main Sep 15, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants