As a user of Flocker you will need to install the flocker-cli package which provides command line tools to control the cluster. This should be installed on a machine with SSH credentials to control the cluster nodes (e.g., if you use our Vagrant setup then the machine which is running Vagrant).
There is also a flocker-node package which is installed on each node in the cluster. It contains the flocker-changestate, flocker-reportstate, and flocker-volume utilities. These utilities are called by flocker-deploy (via SSH) to install and migrate Docker containers and their data volumes.
For now the flocker-node package is pre-installed by the Vagrant configuration in the tutorial.
If you’re interested in developing Flocker (as opposed to simply using it) see Contributing to Flocker.
Before you install flocker-cli you will need a compiler, Python 2.7, and the virtualenv Python utility installed. On Fedora 20 you can install these by running:
[email protected]:~$ sudo yum install @buildsys-build python python-devel python-virtualenv
On Ubuntu or Debian you can run:
[email protected]:~$ sudo apt-get install gcc python2.7 python-virtualenv python2.7-dev
Then run the following script to install flocker-cli:
#!/bin/sh # Create a virtualenv, an isolated Python environment, in a new directory called # "flocker-tutorial": virtualenv --python=/usr/bin/python2.7 flocker-tutorial # Upgrade the pip Python package manager to its latest version inside the # virtualenv. Some older versions of pip have issues installing Python wheel # packages. flocker-tutorial/bin/pip install --upgrade pip # Install flocker-cli and dependencies inside the virtualenv: echo "Installing Flocker and dependencies, this may take a few minutes with no output to the terminal..." flocker-tutorial/bin/pip install --quiet https://storage.googleapis.com/archive.clusterhq.com/downloads/flocker/Flocker-0.3.0-py2-none-any.whl echo "Done!"
Save the script to a file and then run it:
The flocker-deploy command line program will now be available in flocker-tutorial/bin/:
If you want to omit the prefix path you can add the appropriate directory to your $PATH. You’ll need to do this every time you start a new shell.
Install the Homebrew package manager.
Make sure Homebrew has no issues:
Fix anything which brew doctor recommends that you fix by following the instructions it outputs.
Add the ClusterHQ/flocker tap to Homebrew and install flocker:
You can see the Homebrew recipe in the homebrew-tap repository.
The flocker-deploy command line program will now be available: