Add more store for machine #913
Comments
I think the direction we are leaning towards is a declarative syntax (see #773). This would replace the store and would itself be the source of truth. What are your thoughts for something like that? |
@Fangfenghua yeah i see where you are going but having a distributed state is something more along the lines of machine server I think. It makes sense in Swarm because it's orchestrating and is continuously active. In machine, you bring up a machine and then pass it on. I'm not sure in it's current state, that it fits our usage. |
@ehazlett If the node we create the machine is going down,then how can we stop it or kill it? |
Right now there is no way even if we had a backend with zk. Since Machine has to be run by the user (we have no persistent running server instance to monitor) there is no way to react from an event like that from the machine side yet. I think having a declaration of what the machines should look like and then having machine make that happen is a better way. There is less to keep in sync. Perhaps some sort of integration between swarm and machine to act on node events would be something -- this sounds like a good plugin to me. |
@ehazlett You mean docker-machine didn't maintaining the state of the machine wo had create? So I don't know why we need the cmd stop or kill? By the way, i didn't mean the node running machine down,I mean the node we execute docker-machine cli cmd node going down,then we can't access the local file record! |
You mentioned having machine access information from zk or etcd. I'm assuming this is for other things to access it. If those things change the state of the machines, things start to get out of sync. Yes, machine knows what it creates -- unless that data is changed from outside of machine. The failure upon create is a different issue not related to the store. We have refactored the creation so that as soon as the driver says it's created we persist it. That way we can always get to it. In that case, it wouldn't matter if the store is local or zk -- if it doesn't persist it won't persist anywhere. Like I said, this sounds like a good integration with Swarm I'm just not sure where it fits in "today's" machine -- it seems better suited for a machine server. |
From now on,the storage part of machines create by docker-machine is in local file.In simple use-case it sufficient.But in use case need high reliability it's unsufficient. That mybe have problem are:
--If the host we execute the docker-machine CMD is going down, we will can't find out the machine we have create.
--We wiil can't share machines info between different node;
So, we want add more backend store like etcd、cosful、zk. There is a default storage solution for machine but also pluggable backends if the store is operated by the user.
Will add a dir include all store backends:
Every storage backend must implement interface:
The text was updated successfully, but these errors were encountered: