Skip to content
This repository was archived by the owner on Jan 4, 2026. It is now read-only.

Deploying a single node

waldner edited this page Sep 28, 2015 · 4 revisions

Here we'll see how to deploy a single node using aloja.

The first thing to do is to decide the name for the new node; it doesn't have to match its DNS name, although that is of course possible if you prefer. Since single nodes in aloja typically serve as web servers or file servers, for this example we'll assume a name of "aloja-web".

Nodes are configured using a configuration file named node_<nodename>.conf, so in this example it woud be node_aloja-web.conf. Configuration files are just plain shell (bash) code, so you can put almost anything in them, as long as the syntax is valid. Normally, a configuration file is just a set of variable assignments which define node characteristics. Every variable has default values, so only the values that we want to override need to be specified in the config. Keep in mind that how many and which variables are defined depends on several factors, such as whether the machine is physical or virtual, who the cloud provider is, whether local storage is available and so on.

Let's see an example for our node, which is an azure cloud VM:

# load node defaults, this must be present
source "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/node_defaults.conf"

defaultProvider="azure"

# without domain
dnsName='aloja-web'

# VM config
vm_name="aloja-web"
vm_ssh_port=22122

vmSize='ExtraLarge'

attachedVolumes="1"
diskSize="1023"

#endpoints=(80:80 8080:8080 4306:3306)
endpoints=(80:80)

cloud_drive_letters="c"

extraLocalCommands="
  vm_install_webserver;
  vm_install_repo prod;
  install_percona /scratch/attached/1/mysql '' '' '' slave 3 'replicate-ignore-db=aloja_logs';
  install_ssh_tunnel '*minerva-mysql -o StrictHostKeyChecking=no -o ServerAliveInterval=30 -L 33306:127.0.0.1:3306 pristine@minerva-101'
  install_R;
  install_ganglia_gmond;
  config_ganglia_gmond 'aloja-web-azure-us' 'aloja-web';
  install_ganglia_gmetad;
  config_ganglia_gmetad 'aloja-web-azure-us localhost:8649';
  install_ganglia_web;
"

Clone this wiki locally