This repostiory contains the demonstration for doing failover between different domaincontrollers
- Install Docker
- Download JBoss EAP 6.3 from jboss.org.
- Put the downloaded file: into images/eap-base/software cp ~/Downloads/jboss-eap-6.3.0.zip images/eap/software/
If you are on OS X then see How to use Docker on OS X.
Once you have installed docker and downloaded the JBoss EAP software, you should be able to build the containers via the following command:
$ bin/build-all.sh
If everything goes well you can now move on to Start the container section
Once you have build the continers you can now start the container. For that we have a helps script that can be execute like this
$ bin/start-all.sh
The port for accessing the master domain controllers admin console are allready forwarded, but will be unique. To find out which port is used execute the followding command
$ docker ps
This should list atleast three running instances where similar to below
-
Run the following command from command line to start a docker images with the CLI binaries installed
$ docker run -i -t --link dc-backup:dc_backup eap-base /bin/bash
-
Run the following command to connect to the backup domain controller
$JBOSS_HOME/bin/jboss-cli.sh \ --controller=$DC_BACKUP_PORT_9999_TCP_ADDR:9999 \ --user=admin \ --password=admin-123 \ --connect
-
Then run the following commands
> /host=backup:write-local-domain-controller > reload --host=backup
-
Or Instead of step 2 and 3 run the following command
$JBOSS_HOME/bin/jboss-cli.sh \ --controller=$DC_BACKUP_PORT_9999_TCP_ADDR:9999 \ --user=admin \ --password=admin-123 \ --connect \ --commands="/host=backup:write-local-domain-controller,reload --host=backup"