Running docker containers in virtualbox which is maintained by Vagrant.
These docker templates is the quick way to setup your development environments including: Zookeeper, Kafka, Spark, or your custom application.
- Hello world
- Zookeeper
- Kafka with zookeeper
- Java application template
- Spark standalone for development
Run commands at the current git repo dir, it will be mounted to /vagrant dir in guest machine
vagrant init precise64 http://files.vagrantup.com/precise64.box
vagrant up
vagrant reload
vagrant plugin install vagrant-vbguest
vagrant ssh
sudo apt-get update
sudo apt-get install linux-image-generic-lts-raring linux-headers-generic-lts-raring curl
sudo reboot
sudo sh -c "curl https://get.docker.io/gpg | apt-key add -"
sudo sh -c "echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
sudo apt-get update
sudo apt-get install lxc-docker
vagrant ssh
cd /vagrant/zookeeper
sudo docker build -t bruce/zookeeper .
./start.sh OR
sudo docker run -d -p 2181:2181 bruce/zookeeper
vagrant ssh
cd /vagrant/kafka
sudo docker build -t bruce/kafka .
./start.sh OR
sudo docker run -d -p 2181:2181 -p 9092:9092 bruce/kafka
The spark UI will be available at 8081 at your machine.
vagrant ssh
cd /vagrant/spark
sudo docker build -t bruce/spark .
./start.sh OR
sudo docker run -d -p 7077:7077 -p 8080:8080 bruce/spark
sudo docker ps
sudo docker images
sudo docker tag xxxxxxxx bruce/kafka
sudo docker run -t -i xxxxxxxx bash
sudo docker build -t bruce/hello .
sudo docker stop xxxxxxxx