1 Reply Latest reply on May 28, 2018 12:59 PM by Claudio Miranda

    Managing multi-host domains

    Chris LaMendola Newbie

      Hello,

       

      I'm fairly new to JBoss/WildFly and I'm really struggling wrapping my head around managing the configuration of a multi-host domain. The main issue I have is with the fact that each host has its own host.xml that is the sole record of configurations for that host. My initial thought was that I could use the CLI interface to manage all the config for all the hosts in the domain. I've quickly realized that the DC only shows the host-level configuration if the host is connected to it. Well, that will quickly fall apart if a single remote host-controller is offline while I'm making a config change. As soon as that HC is brought back online it will be out of sync with all the other hosts..

       

      Scenario:

         - I want to add a new server to a server-group that spans HostA & HostB.

                 HostA has the following servers: server1, server 3

                 HostB has the following servers: server2, server4

         - I want to make sure the server's name is unique and not being used on either host in the server-group.

         - When I run the automated script to create the new server (server2 on host A), the HostB host-controller is offline.

         - The script loops through the hosts, only sees HostA, sees that server2 is not used, and creates the server.

         -  HostB is brought back online, and now there are two servers in the server-group named "server2".

       

       

      So then I thought maybe I could manage config changes on each host individually.. Just have some sort of script that would go onto each host and physically modify the xml files. Again I started with the adding-a-server scenario. If I want to add a server-group on a remote host I would have to first log into the DC's server, check the domain.xml to make sure the server-group exists, and then log into every other host in the server-group to validate that the new server name doesn't conflict with an existing server.

       

       

       

      Clearly the way I'm thinking about config management doesn't work with JBoss.. Can anyone explain or point me in the right direction of some good config management practices? How are people handling simply adding a server using through an automated process?

        • 1. Re: Managing multi-host domains
          Claudio Miranda Expert

          > I've quickly realized that the DC only shows the host-level configuration if the host is connected to it. Well, that will quickly fall apart if a single remote host-controller is offline while I'm making a config change.

          > As soon as that HC is brought back online it will be out of sync with all the other hosts..

           

          If the slave hc is offline, you can only change it by manually editing the host.xml file. If the dc and slave hc are online, but dc is not reachable by slave hc, then when hc connects to dc, dc will propagate changes to slave hc (profiles, socket-bindings, deployments, etc.).

           

          Relate to the server naming, I suggest to have some sort of uuid or random names as suffix. If you want meaningful names, suffix it with the hc name.

           

          As for automation processes, I have seen people using ansible to manage many wildfly instances. I am no expert on ansible, so cannot help in this field.