Vagrant/Ansible scripts for big data mining and analytics course
Shell Batchfile HTML CSS XSLT
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

CINF 401: Big data mining and analytics, Vagrant setup


  • Vagrant (tested 1.9.1)
  • Ansible (tested
  • qemu (tested 2.8.0)
  • libvirt (tested 2.4.0)
  • apt-cache-ng (tested v2-1)

Host configuration


Cmnd_Alias MUNIN_RESTART = /sbin/service munin-node restart

Run as a user in the wheel group.

libvirt configuration

sudo mkdir /usr/local/virtimages/cinf401
virsh -c qemu:///system
pool-create-as cinf401 dir --target /usr/local/virtimages/cinf401

Save the resulting XML definition with:

virsh -c qemu:///system pool-dumpxml > cinf401.xml

Add to /etc/libvirt/storage and symlink to /etc/libvirt/storage/autostart. The XML contents should be something like (here called 'delenn' instead of 'cinf401'):

<pool type='dir'>
  <capacity unit='bytes'>14765979877376</capacity>
  <allocation unit='bytes'>10438474686464</allocation>
  <available unit='bytes'>4327505190912</available>


Install the libvirt plugin: vagrant plugin install vagrant-libvirt

Add missing files:

#       ansible/hadoop-2.7.3.tar.gz
#       ansible/hadoop-users.txt
#       ansible/id_rsa
#       ansible/
#       ansible/jdk-7u71-linux-x64.tar.gz
#       ansible/known_hosts

On the host, add a cinf401 user and add the contents of to cinf401's authorized_keys.

Generate known_hosts by bringing up, say namenode, and the ssh'ing using vagrant. Now try to connect to the parent:

ssh -p 2222 -N -L3142: cinf401@

The known_hosts file will be generated.

vagrant up --no-parallel

Then merge hosts with /etc/hosts

Apache config

Requires 2.2+

If you see:

Permission denied: proxy: HTTP: attempt to connect ...

then SELinux is preventing Apache httpd from making network connections. Run this:

sudo /usr/sbin/setsebool httpd_can_network_connect 1

Also SELinux may prevent a symlink to the www directory. Fix this:

sudo chcon -R -t httpd_sys_content_t /home/jeckroth/

(I'm not sure how far up the tree you need to run this command.)