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

Add "fig push" command #467

Closed
wants to merge 2 commits into from
Closed

Conversation

jkingyens
Copy link

This command pushes any docker images that are declared as builds in the fig.yml to a docker repository. You can figure the repository using --repository-name or -r at the command line. This is a good starting point for figuring out how to deploy a fig stack into a production/cluster environment without having to make any assumptions about what this environment looks like.

@dnephin
Copy link

dnephin commented Sep 4, 2014

This is going to heavily conflict with my PR #457.

I think that keeping the fig names as-is (without a repo name) is kind of nice. Wouldn't you want more descriptive names on the images before pushing them?

I could see these working together by just pushing tags instead of the internal names of images.

if self.repository:
return '%s/%s_%s' % (self.repository, self.project, self.name)
else:
return '%s_%s' % (self.project, self.name)
Copy link

Choose a reason for hiding this comment

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

There is a bunch of name parsing code that expects fig images to always be in the form , does this pass the integration tests? Does it cleanup all the images afterward?

Copy link
Author

Choose a reason for hiding this comment

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

I can revert the naming scheme change to just use the existing fig style. Will this be enough to avoid conflicts with your PR? Instead, push could filter for services that define both a "build" AND "image" property. This would allow a more descriptive image since the image name here would be decoupled from the fig service name. The repo could also be specified here. It would also make it possible to limit which build you actually care about pushing (since it would only push builds that also have an image property defined). Does this sound better? other suggestions?

Copy link

Choose a reason for hiding this comment

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

I think using the existing naming scheme will be enough to avoid merge conflicts, yes.

I think the decoupled image name you're talking about is the same as the tags from #457?

I think specifying both build and image maybe be confusing, because you'd be re-using image to mean two things (either source image or destination image) based on the presence of another field. Right now specifying both raises an error.

Copy link
Author

Choose a reason for hiding this comment

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

So to avoid confusion it sounds like it would be best to just have a separate field to track images want to be pushed. Maybe this command is not even needed. It basically reduces to a shortcut around "docker push" for a group of images that each play a role in the current fig file.

Copy link

Choose a reason for hiding this comment

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

Yes, I was thinking that the tags field from #457 would be that extra field. That way docker push could push all of the tags.

Copy link
Author

Choose a reason for hiding this comment

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

That makes sense to me. I'll wait for #457 to land and then I'll update.

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