Skip to content

Instantly share code, notes, and snippets.

@theparticleman
Created March 23, 2016 20:04
Show Gist options
  • Save theparticleman/78e64dd4173d089b106f to your computer and use it in GitHub Desktop.
Save theparticleman/78e64dd4173d089b106f to your computer and use it in GitHub Desktop.
3 Node Cassandra Cluster
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
$script = <<-SCRIPT
apt-get update
apt-get install -y python-pip; pip install cql PyYAML
apt-get install git -y
git clone https://github.com/pcmanus/ccm.git
cd ccm; sudo ./setup.py install
apt-get install openjdk-7-jre -y
pip install cqlsh
ccm create test-cluster -v 2.0.9
ccm populate -n 3 -i 192.168.33.13 --vnodes
ccm start
SCRIPT
config.vm.provision "shell", inline: $script
config.vm.network "private_network", ip: "192.168.33.131"
config.vm.network "private_network", ip: "192.168.33.132"
config.vm.network "private_network", ip: "192.168.33.133"
config.vm.provider "virtualbox" do |v|
v.memory = 2048
v.cpus = 2
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment