Running the Calico tutorials on Ubuntu using Vagrant and VirtualBox
These instructions allow you to set up an Ubuntu cluster ready to network Docker containers with Calico using Vagrant.
1. Streamlined setup of the VMs
1.1 Install dependencies
1.2 Download the source files
mkdir demo; cd demo curl -O http://docs.projectcalico.org/master/getting-started/docker/installation/vagrant-ubuntu/Vagrantfile
1.3 Startup and SSH
For Calico as a Docker network plugin
To connect to your servers
- Linux/Mac OS X
vagrant ssh <hostname>
- Follow instructions from https://github.com/nickryand/vagrant-multi-putty
vagrant putty <hostname>
1.4 Verify environment
You should now have two Ubuntu servers, with Etcd running on the first server.
At this point, it’s worth checking that your servers can ping each other.
If you see ping failures, the likely culprit is a problem with the VirtualBox network between the VMs. You should
check that each host is connected to the same virtual network adapter in VirtualBox and rebooting the host may also
help. Remember to shut down the VMs with
vagrant halt before you reboot.
You should also verify each host can access etcd. The following will return an error if etcd is not available.
curl -L http://172.17.8.101:2379/version
And finally check that Docker is running on both hosts by running
2. Install Calico
With your VMs running, and connectivity between them established,
it is time to launch
The Vagrant machines already have
calicoctl installed. Use it to launch
sudo ETCD_ENDPOINTS=http://172.17.8.101:2379 calicoctl node run --node-image=quay.io/calico/node:master
This will start the
calico/node container on this host. Check it is running:
You should see output like this on each node
vagrant@calico-01:~$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 408bd2b9ba53 quay.io/calico/node:master "start_runit" About an hour ago Up About an hour calico-node
Now that you have a basic two node Ubuntu cluster setup, see Security using Calico Profiles