docker-archive / deploykit

A toolkit for creating and managing declarative, self-healing infrastructure.
Apache License 2.0
2.25k stars 262 forks source link

Improve MaaS Plugin #414

Open YujiOshima opened 7 years ago

YujiOshima commented 7 years ago

The MaaS plugin needs to be implemented as a minimum function as a plug-in. Refactor for robustness and current state support only vanilla flavor, so support swarm flavor first. The functions to be planned are as follows.

We should support storage and network resources in the future.

YujiOshima commented 7 years ago

@chungers Umm..I tried to make myself an Assignees, but I did not have the authority to set Assignees.

chungers commented 7 years ago

@YujiOshima -- Can you tell me what you mean by 'Support swarm flavor'?

This instance plugin has only two requirements to satisfy: 1. it should allow the instances to be tagged/ labeled, 2. compute instances should support userdata (e.g. cloudinit) or some scripts that gets executed when instances start up.

As long as an instance plugin can accept these (tags and userdata) and pass them to the platform for provisioning the instance, the Swarm Flavor should be reusable.

I hope this makes sense. You shouldn't have to do anything extra -- or am I missing something? Thanks!

YujiOshima commented 7 years ago

@chungers Thanks! That is more accurate expression. I was going to implement it that way, but as I was not convinced enough that alone, I wrote it as above (I think that support of userdata is sufficient!).

For the others, it is necessary to manipulate MaaS 's web interface only for deployment of MaaS server and enlist of new nodes. I want to be able to operate as easily as possible. My Idea, deploying a MaaS server as a docker container. If user already deployed a MaaS server, run only build/infrakit-maas-plugin --apikey $APIKEY --url http://localhost:8080/MAAS. If user didn't have MaaS server, run build/infrakit-maas-plugin --dockerhost /unix:///var/run/docker.sock. Then, MaaS plugin deploy MaaS server and connect to it.

YujiOshima commented 7 years ago

I updated my comment.

chungers commented 7 years ago

@YujiOshima - if the user didn't have MaaS server running, what would the plugin do? From your comment, it looks like you want it to start a Docker container running MaaS server?

Personally I think it's best to not have the plugin start that and just have the requirement that the MaaS server be running before the instance plugin starts up. What do you think? It's the more common use case anyway right? People generally would have to have MaaS running somewhere as a service already...

YujiOshima commented 7 years ago

@chungers Yes, the plugin runs the MaaS server in the docker container.

I agree with your opinion that users must run MaaS somewhere in general use cases. However, for users who have never used MaaS, the workload from MaaS deployment to APIkey acquisition is expected to increase.

In my opinion, Infrakit's role is to hide VirtualBox and MaaS, etc. specific interfaces. For that reason I would like to be able to deploy BareMetal without knowledge of MaaS. So I think that it is not bad that MaaS Plugin can automatically launch a MaaS server, obtain API key, register new server, and deploy server.