Installation

  • 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=127.0.0.1 \
      --env=JOIN=127.0.0.1 \
      --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.0.0-rc4 server
    
  • With the StorageOS CLI installed, create a test volume:
    export STORAGEOS_USERNAME=storageos STORAGEOS_PASSWORD=storageos STORAGEOS_HOST=127.0.0.1
    /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 https://github.com/storageos/deploy.git storageos
cd storageos/systemd-service/deploy-storageos-ansible

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