Skip to content
This repository has been archived by the owner on Jun 13, 2021. It is now read-only.

[Feature Request] Support downloading service images with "pull" command #789

Open
doanac opened this issue Jan 8, 2020 · 4 comments · May be fixed by #791
Open

[Feature Request] Support downloading service images with "pull" command #789

doanac opened this issue Jan 8, 2020 · 4 comments · May be fixed by #791

Comments

@doanac
Copy link
Contributor

doanac commented Jan 8, 2020

Description

We've encountered users of our system that like to separate the downloading of an update from the applying of an update. I would like to add an optional flag to the docker app pull command to tell it to also pull down each of the app's service images. I have no strong opinion of what the flag would be, perhaps: docker app pull --include-services?

I don't have a complete implementation, but adding logic to pull down the images is pretty simple:
doanac@d808721

@silvin-lubecki
Copy link
Contributor

Hello @doanac , thank you for filling this feature request.
I'll put here some thoughts about it:

This feature will have sense only if you target a single engine with swarm enabled (which is your case I guess), or which would be the case for a developer running the app on her own host.
But regarding a cluster, only one daemon will pull the images, not all the nodes, so this may not be what's expected (as you don't know which node will execute the workload, so all the nodes but the one targeted will pull the images). A workaround would be to run the docker app pull --include-services on all the nodes 🤔.
Another "issue" is when you have 2 contexts (using --installer-context flag), one to execute the invocation image and the one where you actually run the app itself. It means that only the context running the invocation image (usually the local host and the current context) would have pull the images, which is pretty useless 😅 .

That being said, this feature looks a lot like docker-compose pull, and as it's an optional flag and not the default behavior, I guess it's OK to assume the user has the responsibility to check which node is actually pulling the images 👍 Maybe could we make it a little more explicit with an output explaining which node/context is actually pulling? @thaJeztah any thoughts?

@doanac
Copy link
Contributor Author

doanac commented Jan 9, 2020

Good point about multi nodes and contexts. I guess we have a bit of an edge case. I'm happy to put notes on the flag saying its a little weird. And if its really too awkward for your team to carry this change, I think I could find away to keep this patch in our OE recipe for build docker-app. That said- pushing upstream is always more desirable from my end :)

@silvin-lubecki
Copy link
Contributor

silvin-lubecki commented Jan 10, 2020

@doanac Please open a PR with your code changes 👍
It would be great to add a test somehow, maybe an e2e test? Please reach me if need help for that!

doanac added a commit to doanac/app that referenced this issue Jan 10, 2020
This allows users in a single node configuration to optionally pull
down the service images defined in an app bundle with:

 docker app pull --service-images [your app]

Fixes: fixes docker#789

Signed-off-by: Andy Doan <andy@foundries.io>
@doanac doanac linked a pull request Jan 10, 2020 that will close this issue
doanac added a commit to doanac/app that referenced this issue Jan 10, 2020
This allows users in a single node configuration to optionally pull
down the service images defined in an app bundle with:

 docker app pull --service-images [your app]

Fixes: fixes docker#789

Signed-off-by: Andy Doan <andy@foundries.io>
doanac added a commit to doanac/app that referenced this issue Jan 15, 2020
This allows users in a single node configuration to optionally pull
down the service images defined in an app bundle with:

 docker app pull --service-images [your app]

Fixes: fixes docker#789

Signed-off-by: Andy Doan <andy@foundries.io>
@dberardo
Copy link

i dont know if this links to a problem i am having, but basically when i run the application, the stack is created properly, but the service dont fire up because they dont find their respective images.

The solution is to manually pull each single image for the individual services manually, so i am wondering ... is it possible to automate this process like it would happen normally in swarm? i cannot understand why this does not happen already

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants