contiv-experimental / demo

Easy cut demos to try contiv [DEPRECATED]
Other
6 stars 25 forks source link

Add master/worker role to the inventory data #133

Closed neelimamukiri closed 7 years ago

neelimamukiri commented 7 years ago

Specify role: master to allow using host vars, instead of playbook level vars to select nodes to user as master/worker. Playbook vars can still be used to override these.

gaurav-dalvi commented 7 years ago

I prefer this to be done in ansible, so that we have less dependency on this python file.

neelimamukiri commented 7 years ago

@gaurav-dalvi, as this is a per-host configuration, it has to be done at a host level. We have two options: 1) Create 2 sections one for master and one for worker in the generated contiv_hosts file 2) Add an additional per host variable run_as. I opted for option 2 as it is a way to get this info into the hosts file, without impacting the existing netdemo installer. If there is a reason to go with option 1, we can discuss that.

Update: After further discussion and realizing that etcd role needs a list of masters for the peers list, I changed this to option 1, to create two sections. Now the inventory has netplugin-master and netplugin-worker sections, followed by netplugin-node which is a parent of both netplugin-master & netplugin-worker, and hence a superset of all the nodes.

neelimamukiri commented 7 years ago

@jojimt, can you take a look at this when you get a chance and let me know if any changes are required, or else merge the changes. Thanks in advance!