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

Docker compose revamp #2439

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

TheMeaningfulEngineer
Copy link
Contributor

@TheMeaningfulEngineer TheMeaningfulEngineer commented Aug 20, 2024

Copy link
Contributor

@estenberg estenberg left a comment

Choose a reason for hiding this comment

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

Thanks for updating this, it's overdue. :)

Have you seen that we already have a tutorial here: https://docs.mender.io/artifact-creation/create-an-artifact/docker-compose?

I think that one is mis-placed, and we should remove it after you add yours to Get started.

There is also another one on Kubernetes I think we should remove: https://docs.mender.io/artifact-creation/create-an-artifact/kubernetes. Perhaps you can just add a note that it's possible to use Kubernetes too at the end of your tutorial instead?

01.Get-started/04.Deploy-a-docker-compose-update/docs.md Outdated Show resolved Hide resolved
01.Get-started/04.Deploy-a-docker-compose-update/docs.md Outdated Show resolved Hide resolved
01.Get-started/04.Deploy-a-docker-compose-update/docs.md Outdated Show resolved Hide resolved
01.Get-started/04.Deploy-a-docker-compose-update/docs.md Outdated Show resolved Hide resolved
01.Get-started/04.Deploy-a-docker-compose-update/docs.md Outdated Show resolved Hide resolved
# 28M traefik-composition-v2.10.mender
```

So in this case we're seeing a ~28% decrease in size.
Copy link
Contributor

Choose a reason for hiding this comment

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

size, though the size savings of deltas vary depending on the changes between Artifact as well as parameters used and can go up to 90% in some cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will expand the text but want do go with:

So in this case we are seeing a ~28% decrease in size, though the size savings of deltas vary depending on the changes between Artifacts and can go up to 90% in some cases.

Not clear what parameters are you referring to.
If it's the delta parameters I don't know a way to customize these for this update type.

01.Get-started/04.Deploy-a-docker-compose-update/docs.md Outdated Show resolved Hide resolved
01.Get-started/04.Deploy-a-docker-compose-update/docs.md Outdated Show resolved Hide resolved
--software-version="$VERSION"
```

!!! For Raspberry pi 3 use `DEVICE_TYPE="raspberrypi3"`
Copy link
Contributor

Choose a reason for hiding this comment

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

It's possible to supply --device-type twice to avoid this issue, it seems: https://github.com/mendersoftware/app-update-module/blob/master/gen/app-gen#L33. Mender Artifacts support a list of device types compatible.

So if --device-type raspberrypi3 --device-type raspberrypi4 is supplied this should work in both cases.

In this tutorial we can remove the DEVICE_TYPE and PLATFORM variables and have them inline in the command because we are explicitly targetting Raspberry Pi only here (otherwise supplying device-type multiple times may become difficult?).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call.
If QEMU ever becomes Debian based we can revisit.
Will change and retest.

@estenberg
Copy link
Contributor

Sorry to expand the scope here so much, but we should also consider the Mender Hub Update Module section:

In particular there is a "competing" Kubernetes implementation that we made: https://hub.mender.io/t/kubernetes/1939

The problem is that it will confuse customers if we provide multiple Update Modules for the same update type.

@estenberg
Copy link
Contributor

@kjaskiewiczz FYI, ref the QA discussion.

My opinion is that we need to move the app-update module to https://github.com/mendersoftware/mender-update-modules, add a Mender Hub Update Module tutorial (maybe one for Docker-Compose and another for Kubernetes).

I don't understand why the app-update module was done separate? Was this a more "strategic" decision to split out the update modules we support or was it just done oneoff?

@kjaskiewiczz
Copy link
Contributor

Thanks for the info.

I don't understand why the app-update module was done separate? Was this a more "strategic" decision to split out the update modules we support or was it just done oneoff?

I don't know, but maybe @merlin-northern knows something about it?

@merlin-northern
Copy link
Contributor

Thanks for the info.

I don't understand why the app-update module was done separate? Was this a more "strategic" decision to split out the update modules we support or was it just done oneoff?

I don't know, but maybe @merlin-northern knows something about it?

who me? let's face it my knowledge is a bit on a low level.
so it was a decision that was made, to keep it separate:

  1. app-update-module is really an answer to the Mender for Applications, implemented as an update module, true, but we had in mind the release and it had been decided to release from a separate repo
  2. it goes a bit beyond the update modules as it introduces so-called submodules
  3. the mender-update-modules has or had slightly different idea

I can dig further. if you want to move it to the other repo we can discuss.

@TheMeaningfulEngineer
Copy link
Contributor Author

@estenberg

Thanks for the review, will go through it.

Have you seen that we already have a tutorial here: https://docs.mender.io/artifact-creation/create-an-artifact/docker-compose?
I think that one is mis-placed, and we should remove it after you add yours to Get started.

I've used that one as the base and describe the high level changes in the commit messages.
The current PR changes are doing the move.

@oldgiova
Copy link
Contributor

The app-update-module 1.1.0 has been released. The links has been updated already

Port forwarding expects the evaluator to both install mender-cli and figure out a device ID.
Those are extra steps that risk confusion and preventing the reader to
reach a working example for the docker compose update.
I've instead just replaced that with the Remote terminal for all client
shell interactions.

The versioning was hardcoded and the confusions between composition
version vs container version were left to the user to wrestle with.
Added a section to clarify this and adjusted the snippets.

For this case the benefits aren't spectacular, but that is heavy content
specific. I wanted to show there is indeed an improvement and give a
quick snippet for the evaluator to test it. If they have the question
"Is delta beneficial for this composition I want to use?" they can
easily use the same approach.

Ticket: None
Changelog: None

Signed-off-by: Alan <[email protected]>
supported one

Ticket: None
Changelog: None

Signed-off-by: Alan <[email protected]>
@TheMeaningfulEngineer TheMeaningfulEngineer force-pushed the docker-compose-revamp branch 2 times, most recently from 38f4a92 to 4e837eb Compare September 27, 2024 14:30
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