Skip to content

user-guide: Add instructions for custom SOTA client#280

Merged
doanac merged 1 commit intofoundriesio:masterfrom
doanac:custom-client
Oct 18, 2021
Merged

user-guide: Add instructions for custom SOTA client#280
doanac merged 1 commit intofoundriesio:masterfrom
doanac:custom-client

Conversation

@doanac
Copy link
Copy Markdown
Member

@doanac doanac commented Oct 1, 2021

Signed-off-by: Andy Doan [email protected]

@doanac
Copy link
Copy Markdown
Member Author

doanac commented Oct 1, 2021

This PR puts me at the intersection of two things I'm bad at - Bitbaking and Documenting. Apologies in advance.

@doanac
Copy link
Copy Markdown
Member Author

doanac commented Oct 1, 2021

Copy link
Copy Markdown
Collaborator

@angolini angolini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only minor suggestions

LGTM

Comment thread source/user-guide/custom-sota-client.rst Outdated
Comment thread source/user-guide/custom-sota-client.rst Outdated
@doanac
Copy link
Copy Markdown
Member Author

doanac commented Oct 4, 2021

@doanac
Copy link
Copy Markdown
Member Author

doanac commented Oct 4, 2021

@doanac
Copy link
Copy Markdown
Member Author

doanac commented Oct 4, 2021

@doanac doanac requested a review from mike-sul October 4, 2021 15:16
"


The recipe can then be created with only 4 files:
Copy link
Copy Markdown
Contributor

@mike-sul mike-sul Oct 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should add/include this recipe into the default/initial meta-subscriber-overrides.git, but not enable by default, and just refer to it from this doc. The same for main.cc, the doc could reference to the reference implementation in the code, https://github.com/foundriesio/aktualizr-lite/blob/master/examples/custom-client.cc.
In this case, there are more chances that the recipe and the code are in sync with the latest LmP and aklite ( for example, changes to the API won't require to change/adjust this doc).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this makes a lot of sense.

@mike-scott @ricardosalveti - any objects to including this skeleton type code in meta-subscriber-overrides?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having it added by default is nice at first, but can also bit rot over time, as we won't update as we update factories to newer revisions.

Usually I prefer source code examples like this to be available via an external git repository, and only add the repo in SRC_URI instead. It is easier to manage, gets closer to what the developer would do anyway, and we can also keep it in sync with the factory version based on the SRCREV used.

If done purely as a sample and by consuming a public git repo that we host, we can even make it available in meta-lmp, and then make sure it gets tested / tagged as we push newer releases. Customers can then just copy the entire recipe and do their own when they get to create their own client.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

k. Let me summarize what I think we are converging on:

clean up the example code

This change makes it easy to include in a recipe: foundriesio/aktualizr-lite#131 It also continues to be build tested in aklite

create a custom-sota-client recipe PR for meta-lmp

This will be cleaned up from the notes here. I guess the tricky part over time will be keeping the SRCREV here in sync/compatible with the SRCREV in aklite, but that was always going to be the challenge.

Does this make sense?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we have at least one customer for the aklite API and there is an interest from other potential customers then I think it makes sense to include this recipe into the meta-lmp and make sure it gets tested (at least basic sanity test).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the other hand SOTA_CLIENT overriding belongs to the meta-subsc as it's a factory customization. Maybe we just need to extend the test effort to make sure that each new LmP/meta-lmp release is tested in conjunction with the meta-subsc, effectively, emulate a new factory creation.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we can do that as we're already testing the release on a factory anyway. @mwasilew ^^

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rsalveti isn't @mike-sul asking for testing factory creation? AFAIK this isn't systematically tested yet (unless I'm missing something form @doanac's guys).

Comment thread source/user-guide/custom-sota-client.rst Outdated
Comment thread source/user-guide/custom-sota-client.rst Outdated
Comment thread source/user-guide/custom-sota-client.rst Outdated
Comment thread source/user-guide/custom-sota-client.rst Outdated
Comment thread source/user-guide/custom-sota-client.rst Outdated
Comment thread source/user-guide/custom-sota-client.rst Outdated
@doanac
Copy link
Copy Markdown
Member Author

doanac commented Oct 5, 2021

@doanac
Copy link
Copy Markdown
Member Author

doanac commented Oct 5, 2021

Okay - I've just pushed a major overhaul to this document. It becomes a lot easier.

CI link checks will fail until the meta-lmp changes are merged. So ignore that for now.

@doanac
Copy link
Copy Markdown
Member Author

doanac commented Oct 5, 2021

@doanac
Copy link
Copy Markdown
Member Author

doanac commented Oct 7, 2021

ci-retest

@doanac
Copy link
Copy Markdown
Member Author

doanac commented Oct 7, 2021

@doanac
Copy link
Copy Markdown
Member Author

doanac commented Oct 14, 2021

@mike-sul @rsalveti - i think this should be good now.

@doanac doanac merged commit 46c4ff0 into foundriesio:master Oct 18, 2021
@doanac doanac deleted the custom-client branch October 18, 2021 18:21
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.

5 participants