Skip to content
This repository was archived by the owner on Nov 9, 2022. It is now read-only.

Deploying to a Cluster

paxtonhare edited this page May 7, 2012 · 4 revisions

The Roxy Deploy tool can be used to deploy to a cluster, although doing so currently requires working with the deploy/ml-config.xml file and the deploy/build.properties file. In this example, assume the target is a 3-node cluster (named ml1, ml2, and ml3) and we want two forests on each node.

build.properties

Add properties for the host names:

host1=ml1.example.com
host2=ml2.example.com
host3=ml3.example.com

Add properties to name the forests:

content-f11=${app-name}-${host1}-1
content-f12=${app-name}-${host1}-2
content-f21=${app-name}-${host2}-3
content-f22=${app-name}-${host2}-4
content-f31=${app-name}-${host3}-5
content-f32=${app-name}-${host3}-6

The names are arbitrary, call them whatever you want.

ml-config.xml

In the <assignments> section, add these elements:

<assignment>
    <forest-name>@ml.content-f11</forest-name>
    <host>@ml.host1</host>
</assignment>
<assignment>
    <forest-name>@ml.content-f12</forest-name>
    <host>@ml.host1</host>
</assignment>
<assignment>
    <forest-name>@ml.content-f21</forest-name>
    <host>@ml.host2</host>
</assignment>
<assignment>
    <forest-name>@ml.content-f22</forest-name>
    <host>@ml.host2</host>
</assignment>
<assignment>
    <forest-name>@ml.content-f31</forest-name>
    <host>@ml.host3</host>
</assignment>
<assignment>
    <forest-name>@ml.content-f32</forest-name>
    <host>@ml.host3</host>
</assignment>

Note that the ml-config.xml file is not environment specific, so this means the Deploy tool would expect to deploy to a cluster for all environments. One way to work with this is to make sure the forest names are unique independently of the hostname name. Then, in your local.properties file, you could set host1, host2 and host3 all to localhost. You would get six forests on your local box, but this would allow you to develop on a single machine and then deploy to a remote cluster.

Roadmap

We have a better scheme in mind, but we need to get to it. To encourage us to do so, post a comment on the related issue and encourage us to get to it.

Clone this wiki locally