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

New masterless mode for provisioning docker containers #25728

Closed
thedrow opened this issue Jul 26, 2015 · 24 comments
Closed

New masterless mode for provisioning docker containers #25728

thedrow opened this issue Jul 26, 2015 · 24 comments
Assignees
Labels
Feature new functionality including changes to functionality and code refactors, etc. P1 Priority 1 Platform Relates to OS, containers, platform-based utilities like FS, system based apps ZRELEASED - Carbon
Milestone

Comments

@thedrow
Copy link
Contributor

thedrow commented Jul 26, 2015

Docker is now working to decouple the builder from the container engine (See moby/moby#14298).
There's a PoC project that allows you to use client side builds using an enhanced Dockerfile called dockeramp.
We can follow the same API calls that dockeramp is performing in order to provision Docker containers from outside, that is without installing Salt inside the container.
This should work with Docker 1.8 and above as specified by dockeramp's creator.

@jfindlay jfindlay added the info-needed waiting for more info label Jul 27, 2015
@jfindlay jfindlay added this to the Blocked milestone Jul 27, 2015
@jfindlay
Copy link
Contributor

@thedrow, I am unsure what you are asking. You want to provision docker containers with salt, but not use salt?

@thedrow
Copy link
Contributor Author

thedrow commented Jul 28, 2015

@jfindlay Salt would run, but it would run on the host machine and not inside the container.
The purpose of this feature request is to allow Salt to replace dockerfiles with it's own syntax and mechanisms for provisioning docker containers without losing the caching capabilities of docker containers and having to install Salt inside the container.

@Diaoul
Copy link

Diaoul commented Jul 28, 2015

I love Salt for it's provisioning capabilities and Docker for the isolation and caching. A mix of the both is promising.

@jfindlay jfindlay modified the milestones: Approved, Blocked Jul 28, 2015
@jfindlay jfindlay added Feature new functionality including changes to functionality and code refactors, etc. Platform Relates to OS, containers, platform-based utilities like FS, system based apps and removed info-needed waiting for more info labels Jul 28, 2015
@jfindlay
Copy link
Contributor

@thedrow, thanks for having the patience to explain it to me. I also think it would be a great feature. :-)

@DanyC97
Copy link

DanyC97 commented Jul 30, 2015

@thedrow nice suggestion ;)

@thedrow
Copy link
Contributor Author

thedrow commented Jul 30, 2015

@DanyC97 Thanks. I waited with this one for so long because Docker does not support it yet.

@jfindlay jfindlay added the P1 Priority 1 label Aug 11, 2015
@deuscapturus
Copy link
Contributor

Any movement on this? Are there examples on how you could replace or use salt within the dockerfile?

@thedrow
Copy link
Contributor Author

thedrow commented Jan 7, 2016

@deuscapturus This is a lot of work and I'm busy with other open source projects at the moment.
If we can gather a team of developers I'd be happy to join.
Also, since feature is such a gamechanger because nobody else does this, I expect at least one SaltStack developer to be directly involved in the implementation.

@thedrow
Copy link
Contributor Author

thedrow commented Feb 11, 2016

@jfindlay Is there an ETA on when we can start working on this?

@jfindlay
Copy link
Contributor

@thedrow, I know of no time constraints. You are welcome to start on this as soon as you need. We have many extenuating obligations over dozens development activities, so I cannot promise any dedicated resources from SaltStack. If you are able to work on this though, @techhat may be your best contact.

@thedrow
Copy link
Contributor Author

thedrow commented Feb 12, 2016

All of us always needed it but it's a huge amount of work. I don't think it's fair to drop this on an sole unpaid volunteer.
Moreover, SaltStack will use it to their advantage to mark Salt as the only Configuration Management solution that can provision docker containers correctly, with caching and all the goodies that docker provides. This is not just any feature that the community will enjoy. This can be part of a marketing strategy.
So SaltStack has a lot to gain in this case. As for me, I can keep using Dockerfiles and Rockerfiles for the more complex containers and use Salt only for orchestration.
It's a pain, but one I can live with since I'm not a DevOps Engineer. Those who migrate from VMs to containers would feel that pain more because they already have stateconf files that are tested and they work and now they have to rewrite all of them to Dockerfiles.

I really think that in this case, given that this is a huge amount of work and that SaltStack has more to gain than a single volunteer (fame, street credit etc.) this one should be on you guys.
I'm willing to help but I will not implement this on my own.

@thedrow
Copy link
Contributor Author

thedrow commented Feb 12, 2016

If you could enable BountySource and enough people/companies donate I'd be happy to start working on it.

@thatch45
Copy link
Member

@thedrow sorry this one took so long to get the right attention. We get a ton of feature requests and few of them get slated as feature goal projects.

I have slated this feature for the Carbon release and we will dedicate SaltStack resources to it as soon as they are freed up. I can't get it into Boron simply because it is feature frozen.

We will let you know as soon as we start here!

@thedrow
Copy link
Contributor Author

thedrow commented Feb 17, 2016

Great! Thank you.

@terminalmage
Copy link
Contributor

@thedrow I'm afraid I don't understand Go, and I'm not really sure what it is you're asking for. Can you elaborate? How would this be any different from dockerng.build? Salt can already build from the client-side. I'm also not sure why masterless is so important here, since a masterless run would just invoke the execution module, which can be done both masterless and in a normal master/minion setup.

@thatch45
Copy link
Member

@terminalmage I think that the request here is to use salt to build/configure docker containers. So far as I can tell it would be similar to FlyingCloud: https://github.com/cookbrite/flyingcloud

@thedrow
Copy link
Contributor Author

thedrow commented Jun 22, 2016

Yes! Exactly.
Ansible recently provided their own solution called Ansible Container. However I don't think that it uses docker's cache correctly.
It actually flattens the image automatically which may increase container deployment time.
FlyingCloud looks interesting but I'd rather have this maintained by SaltStack because it will ensure that this feature will be maintained for as long as SaltStack exists.
FlyingCloud is an open source project written by a company that may or may not abandon it since it's not their core business.
I'll look into it. It might be useful in the meanwhile.

@bbinet
Copy link
Contributor

bbinet commented Jun 22, 2016

Thanks for mentionning FlyingCloud, interesting solution.

@terminalmage
Copy link
Contributor

I'm still trying to understand what you need, which the dockerng state and execution module don't already do.

@thatch45
Copy link
Member

@terminalmage move on to the next issue, we can do a video chat about it later.

@thedrow
Copy link
Contributor Author

thedrow commented Jun 23, 2016

I want to be able to provision Docker containers using Salt states while utilizing Docker's layers cache.
Salt should run the state command inside a docker container and commit after each state run.

@thatch45
Copy link
Member

Right, the way to do this is to make a salt-thin tarball and then copy that into the container, untar it , and then mount the states directory into the container and run salt-call against them.

@thedrow
Copy link
Contributor Author

thedrow commented Jun 23, 2016

salt-thin cannot commit the container after each state execution from within the container. Am I missing something?
The only way to implement this is to docker exec/nsenter into the container from the host and commit after the state run has completed successfully.

@meggiebot meggiebot modified the milestones: C 8, C 7 Jun 23, 2016
@meggiebot meggiebot modified the milestones: Approved, C 7 Jun 27, 2016
@meggiebot
Copy link

PR: #34484

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature new functionality including changes to functionality and code refactors, etc. P1 Priority 1 Platform Relates to OS, containers, platform-based utilities like FS, system based apps ZRELEASED - Carbon
Projects
None yet
Development

No branches or pull requests

9 participants