$ gem install torquebox-server
Download mod_cluster from here: http://www.jboss.org/mod_cluster/downloads/1-2-0-Final
$ tar xvzf mod_cluster-1.2.0.Final-macosx-x86-ssl.tar.gz
$ ./opt/jboss/httpd/sbin/installhome.sh
Uncomment this line in opt/jboss/httpd/httpd/conf/httpd.conf
AdvertiseSecurityKey secret
Edit this file
$ echo `torquebox env TORQUEBOX_HOME`/jboss/standalone/configuration/standalone-ha.xml
Replace the element with this:
<mod-cluster-config
advertise-socket="modcluster" proxy-list="127.0.0.1:6666" advertise-security-key="secret">
<dynamic-load-provider>
<load-metric type="busyness"/>
</dynamic-load-provider>
</mod-cluster-config>
Start Apache up:
$ ./opt/jboss/httpd/sbin/apachectl start
Start TorqueBox:
$ torquebox run --clustered
Deploy an app to it
$ cd myapp/
$ torquebox deploy
Now check things out. Open a browser like this:
$ open /Applications/Google\ Chrome.app --args --explicitly-allowed-ports=6666
And check these URLs:
-
http://localhost:6666/mod_cluster_manager -- should see the node
-
http://localhost:8000/home/index -- should see the TorqueBox app