sujiar37 / AWX-HA-InstanceGroup

Build AWX clustering on Docker Standalone Installation
MIT License
107 stars 39 forks source link

Support for more than one web host #1

Closed tamirshaul closed 5 years ago

tamirshaul commented 5 years ago

Hey! Iv'e been looking for a decent clustering solution for AWX for a while now. This playbook works as a charm!

Currently I noticed the awx-web-ha container is only deploying on the first host in awx_instance_group_master inventory group.

Is there any change to add support for another hosts to run the awx-web-ha container?

Thanks for your work!

sujiar37 commented 5 years ago

@tamirshaul , thank you. Yes, this could be possible. Multiple web containers aren't necessary for enabling instance group, however it will be good if we put LB in front and route the web traffic accordingly.

If you had noticed both roles, the filtering is happening for the tasks where I have mentioned groups['awx_instance_group_master'][0], due to that it only brings the first value from that inventory group. This is what I would plan to write as an enhancement for this feature,

  1. Update the inventory/hosts like below
    
    $ cat inventory/hosts

[all]

[awx_instance_group_master] Primary_Node_A Primary_Node_B

[awx_instance_group_agent] Primary_Node_C Primary_Node_D


2. Then replace this entry  `groups['awx_instance_group_master'][0]` wherever I mentioned and update it as `groups['awx_instance_group_master']`. It basically force the playbook to enable the web container in all hosts under the `awx_instance_group_master` group.

Again, this needs to be tested !!! 
sujiar37 commented 5 years ago

@tamirshaul The requested feature is added and closing this issue.