1 Reply Latest reply on Nov 10, 2016 4:53 AM by mbabacek

    Standalone cluster Using Fig/Docker-compose

    amitkrdutta

      Hi All,

      I am trying to build a test cluster of wildfly.

       

      I am using docker compose for orchestration.

      Following is my docker-compose.yml file

       

      node:
        image: wildfly-mgmt
        links:
          - lb:lb
      lb:
        image: wildfly-cluster-httpd
        ports:
         - "9090:80"
      

       

      After running docker-compose up

      I can not see the nodes in the mod cluster Management page.

      http://localhost:9090/mod_cluster_manager

      It is blank, somehow mod_cluster manager not able to see the nodes...

      Docker file for mod cluster:

      FROM fedora:latest
      
      RUN yum -y update
      RUN yum -y install httpd mod_cluster
      RUN yum clean all
      
      RUN sed -i 's|LoadModule proxy_balancer_module|# LoadModule proxy_balancer_module|' /etc/httpd/conf.modules.d/00-proxy.conf
      
      ADD mod_cluster.conf /etc/httpd/conf.d/mod_cluster.conf
      
      EXPOSE 80
      
      CMD ["/sbin/httpd", "-DFOREGROUND"]
      

       

      Mod_cluster.conf

       

      LoadModule slotmem_module       modules/mod_slotmem.so
      LoadModule proxy_cluster_module modules/mod_proxy_cluster.so
      LoadModule advertise_module     modules/mod_advertise.so
      LoadModule manager_module       modules/mod_manager.so
      
      
      <IfModule manager_module>
        Maxhost 100
        ServerName localhost
        <VirtualHost *:80>
      
      
          <Directory />
            Require all granted
          </Directory>
      
      
          <Location /mod_cluster_manager>
            SetHandler mod_cluster-manager
            Require all granted
          </Location>
      
      
          KeepAliveTimeout 60
          ManagerBalancerName mycluster
          EnableMCPMReceive On
          ServerAdvertise On
      
      
        </VirtualHost>
      </IfModule>
      

       

       

      I can see the servers running

      node_1  | 19:43:23,828 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://0.0.0.0:9990/management

      node_1  | 19:43:23,828 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://0.0.0.0:9990

      node_1  | 19:43:23,829 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) started in 75208ms - Started 331 of 577 services (393 services are lazy, passive or on-demand)

       

      Can anyone please point out what is wrong here. I am really new to this...

       

       

        • 1. Re: Standalone cluster Using Fig/Docker-compose
          mbabacek

          Hi, amitkrdutta,

          the problem is that one needs to either

          - enable udp multicast (switching to host network, or be using Rancher, Weave on DockerDcloud, Docker Multi-host networking) on the right interface

          or

          - use static configuration where worker nodes know the hostname of balancer(s) during runtime

          Lemme try to run the compose and paste a valid config for you.

           

          -K-