Raspberrypi Wildfly Cluster

So WildFly 8 is final now.
In this article i like to show how you can create a development/testing wildly cluster with raspberry pis and only one power supply.

I have bought:


The Raspberries are configured with Raspbian Wheezy (wlan auto), JDK 8 and Wildfly 8 Final.
In this combination you have to remove the '-server' from the domain.sh otherwise WildFly won't start.

The WildFly Configuration can be made within 5 minutes.
  1. Master
    1. Create management user admin (./add-user.sh)
    2. Create a management slave user for each of your pi slaves (./add-user.sh)
      • Remember the secret value at the end of this process for each slave (e.g.<secret value="MTIzNDU=" />)
    3. Bind the interfaces to the public interface (e.g. 192.168.0.103) 
  2. Slave
    1. Configure host.xml with the slave name of 1.1
      • <host name="slave1" xmlns="urn:jboss:domain:2.0">
    2. Configure the server identity
      • <server-identities> <secret value="MTIzNDU="/> </server-identities>
    3. Bind the interfaces to master and public interface (e.g. 192.168.0.104)
      • To simply the typing i have written a small script that takes the master-ip and the bind-ip
      • #MasterAdress
        MASTER_ADDRESS=$1
        # Bind Addresses
        BIND_ADDRESS=$2
        JBOSS_BIND_ADDRESS_MANAGEMENT=$BIND_ADDRESS
        JBOSS_BIND_ADDRESS=$BIND_ADDRESS
        JBOSS_BIND_ADDRESS_UNSECURE=$BIND_ADDRESS
        sudo ./domain.sh -Djboss.bind.address.unsecure=$JBOSS_BIND_ADDRESS_UNSECURE -Djboss.bind.address.management=$BOSS_BIND_ADDRESS_MANAGEMENT -Djboss.bind.address=$JBOSS_BIND_ADDRESS -Djboss.domain.master.address=$MASTER_ADDRESS
Ready. Now you can deploy any archive either to main-server-group (just a domain) or other-server-group (full cluster).