Skip to content

Initial prototype of OSTree-based Compose Apps#110

Merged
mike-sul merged 13 commits intofoundriesio:masterfrom
mike-sul:feat/ostree-for-apps-prototype
Feb 2, 2021
Merged

Initial prototype of OSTree-based Compose Apps#110
mike-sul merged 13 commits intofoundriesio:masterfrom
mike-sul:feat/ostree-for-apps-prototype

Conversation

@mike-sul
Copy link
Copy Markdown
Contributor

@mike-sul mike-sul commented Dec 9, 2020

No description provided.

@mike-sul mike-sul force-pushed the feat/ostree-for-apps-prototype branch from c424a07 to ed3c624 Compare December 10, 2020 10:36
@mike-sul mike-sul requested a review from doanac December 10, 2020 10:40
@mike-sul
Copy link
Copy Markdown
Contributor Author

mike-sul commented Dec 10, 2020

@doanac effectively this is the implementation of item #1.1 of the implementation plan https://docs.google.com/document/d/1lQs5Sas0WwVFzcaH4v-UYelgvaYn6_PBkEGs-Ndop5I/edit#heading=h.e4bsxuh2k3zs

Part 1.2 foundriesio/meta-lmp#240
Part 1.3 foundriesio/aktualizr-lite#43

I think it can even be deployed without impacting existing devices and customers, just the container job (publish run) will take a bit longer and an ostree repo will be used for the preloading.

@mike-sul mike-sul force-pushed the feat/ostree-for-apps-prototype branch 8 times, most recently from 852fd28 to 946845b Compare December 25, 2020 11:42
@mike-sul mike-sul force-pushed the feat/ostree-for-apps-prototype branch 10 times, most recently from 589c2db to 97fd8e7 Compare January 5, 2021 13:29
@mike-sul mike-sul marked this pull request as ready for review January 5, 2021 16:49
@mike-sul
Copy link
Copy Markdown
Contributor Author

mike-sul commented Jan 5, 2021

@doanac This is an implementation of part 1.1 and 1.2 of the implementation plan https://docs.google.com/document/d/1lQs5Sas0WwVFzcaH4v-UYelgvaYn6_PBkEGs-Ndop5I/edit#heading=h.e4bsxuh2k3zs.

I tested basic use-cases and I think it's good enough for review and dev testing.

Copy link
Copy Markdown
Member

@doanac doanac left a comment

Choose a reason for hiding this comment

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

looking good.

Comment thread apps/ostree_store.py Outdated
Comment thread apps/ostree_store.py Outdated
Comment thread apps/publish.sh Outdated
--targets-file "${TUF_REPO}/roles/unsigned/targets.json" \
--targets-to-publish "${ARCHIVE}/targets-created.json" \
--fetch-dir "${PRELOAD_DIR}" \
--repo-dir "${OSTREE_REPO_DIR}"
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.

Should we make this configurable/optional for now? Or maybe we go all-in and avoid making us all do factory-config changes to try?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It doesn't require any changes to factory-config to try it out, those params have default definition at the beginning of the script.

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.

but since its not optional, this means that all factories will start producing this new content once merged, correct?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes, what should not impact their existing workflow. We can make it optional, but then another question arises - how to do preload?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

so, I am making it OFF by default, just do exactly as it does now, COMPOSE_APP_USE_OSTREE set in factory-config.yml turns the ostree usage ON.
The only question is in regard to 'fioctl target image' command since it doesn't have access to factory-config.yml.

Comment thread apps/publish_apps_to_ostree.py Outdated
Comment thread assemble.py
Comment thread apps/publish.sh
@mike-sul
Copy link
Copy Markdown
Contributor Author

I need to rebase it on the latest master and then retest it again.

@mike-sul mike-sul force-pushed the feat/ostree-for-apps-prototype branch from 97fd8e7 to ca26aed Compare January 25, 2021 18:44
@mike-sul mike-sul force-pushed the feat/ostree-for-apps-prototype branch from ca26aed to ccc9382 Compare January 26, 2021 11:54
@mike-sul mike-sul force-pushed the feat/ostree-for-apps-prototype branch 4 times, most recently from d22ab0d to f8b4acc Compare January 27, 2021 10:59
It turned out that it's possible to refer to an ostree commit by
specifying both a branch and a commit hash in a single URI.
If such composite URI is specified to `ostree pull` command then
the ostree repo will update corresponding ref automaticaly so it
points to the commit that has been pulled.

Signed-off-by: Mike Sul <[email protected]>
Simultaneous support of the current non-ostree based apps preloading and
an ostree based apps, the later supports/implies the preloading support
by default.

Signed-off-by: Mike Sul <[email protected]>
Make sure that files stored in the apps' ostree repo are checked out by
using hardlinks.

Signed-off-by: Mike Sul <[email protected]>
@mike-sul mike-sul force-pushed the feat/ostree-for-apps-prototype branch from f8b4acc to 3b61862 Compare February 2, 2021 09:45
@mike-sul mike-sul force-pushed the feat/ostree-for-apps-prototype branch from 8277400 to 95d3cd4 Compare February 2, 2021 12:09
@mike-sul mike-sul force-pushed the feat/ostree-for-apps-prototype branch from 95d3cd4 to 650f0c8 Compare February 2, 2021 12:17
@mike-sul mike-sul merged commit adbbe37 into foundriesio:master Feb 2, 2021
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.

2 participants