Skip to content

Instantly share code, notes, and snippets.

@jkutner
Created April 3, 2012 18:51
Show Gist options
  • Select an option

  • Save jkutner/2294633 to your computer and use it in GitHub Desktop.

Select an option

Save jkutner/2294633 to your computer and use it in GitHub Desktop.
$ 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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment