I propose in this post to go through the local deployment of the snooze cluster and show how it can be used to run multiple snoozenode on multiple machines.
Requirements
- Multicast-routing enabled switch
- Hardware supporting the KVM/XEN hypervisor
- Linux based operating system
1 Snooze on one machine
First follow the local deployment tutorial in the documentation. This will guide you through the set-up of your local cluster.
2 Snooze on three machines
If you have successfully set up Snooze on a single machine, installing Snooze on three machines is pretty straightforward. In order to have a realistic deployment only one local controller instance must run on each server. We propose the following topology for the deployment.
Scenario :
- machine 1 : 1 BS, 2 GMs, snoozeimage, snoozeec2, Cassandra, Rabbitmq
- machine 2 : 1 LC
- machine 3 : 1 LC
Setup of the machine 1
You’ve done all the configuration in the first part of the tutorial ! If you decide to run a Local Controller on this machine, we suggest to not activate the energy management…
Setup of machines 2
Install the snooze-deploy-localcluster scripts on this machine.
In the config file (by default /usr/share/snoozenode/configs/snooze_node.cfg) fill the following lines with the appropriate IP or hostname of machine 1. In the latter case be sure to have a DNS (or /etc/hosts) properly configured :
# Zookeeper faultTolerance.zookeeper.hosts = machine1:2181 # Image repository imageRepository.address = machine1 # Database database.type = cassandra # if "memory" you don't need the following line database.cassandra.hosts = machine1:9160 # Rabbitmq external.notifier.address = machine1
Setup of machines 3
It’s the same configuration as machine 2.
NFS
The Local Controller nodes get the images disks through an NFS shared directory. So you will have to configure a NFS share between your 3 machines. We propose the following scenario :
Scenario :
- machine 1 : Nfs server, exports /var/lib/libvirt/images (default libvirt pool)
- machine 2 : Nfs client, mount the exported directory in /var/lib/libvirt/images
- machine 3 : Nfs client, mount the exported directory in /var/lib/libvirt/images
On machine 1
Configure the nfs-server.
Check the snoozeimages configuration to be sure that the pool configured is a directory pool using /var/lib/libvirt/images/ as backend.
On machine 2 & 3
Mount the NFS shared directory.
Check the snoozenode configuration file :
imageRepository.manager.source = /var/lib/libvirt/images imageRepository.manager.destination = /var/lib/libvirt/images
3 Launch snooze
On each machine, you’ll have to launch the following two commands (from the root of the local deployment script):
start_local_cluster.sh -l start_local_cluster.sh -s