Installation with Docker CE

  • Ensure that our prerequisites are met, paying particular attention to system configuration and mount propagation
  • Run a docker container as follows:
    /usr/bin/docker run \
      --name=storageos \
      --env=HOSTNAME=$(hostname) \
      --env=ADVERTISE_IP= \
      --env=JOIN= \
      --net=host \
      --pid=host \
      --privileged \
      --cap-add=SYS_ADMIN \
      --device=/dev/fuse \
      --volume=/var/lib/storageos:/var/lib/storageos:rshared \
      --volume=/run/docker/plugins:/run/docker/plugins \
      --volume=/sys:/sys \
      storageos/node:1.5.2 server
  • With the StorageOS CLI installed, create a test volume:
    /usr/local/bin/storageos volume create myvol
  • Run a container with the volume presented
    /usr/bin/docker run \
      --interactive \
      --tty \
      --volume-driver=storageos \
      --volume=myvol:/data \
      busybox sh

n.b. StorageOS supports a number of environment variables to tune its behaviour. See the Environment Variables section for more details.

Running as a systemd service

For some deployments, it is useful to run storageos as a service under systemd control. We provide a sample manifest and associated scripts on github to automate this.

# Install StorageOS managed by systemd, using Ansible
git clone storageos
cd storageos/systemd-service/deploy-storageos-ansible

# Update hosts to your hostnames and ip addresses
nano hosts
ansible-playbook -i hosts site.yaml