From 2163f1cfaa76d43d0b256799626ba1e4c2bcb58e Mon Sep 17 00:00:00 2001 From: Sheng Yang Date: Fri, 14 Apr 2017 16:16:53 -0700 Subject: [PATCH] Update README.md --- README.md | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 65d1578..00e1898 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,60 @@ -# longhorn -We put storage on cows and move them around +# Longhorn + +Longhorn is a microservice based distribution storage system. + +It's in experimental stage now. Comments are welcome! + +See [wiki](https://github.com/rancher/longhorn/wiki) for more details. + +# Requirements + +Longhorn requires one or more hosts running the following software: + +1. We have tested with Ubuntu 16.04. Other Linux distros, including CentOS and RancherOS, will be tested in the future. +2. Make sure `open-iscsi` package is installed on the host. If `open-iscsi` package is installed, the `iscsiadm` executable should be available. Ubuntu Server install by default includes `open-iscsi`. Ubuntu Desktop doesn't. + +# Single node setup + +You can setup all the components required to run Longhorn on a single Linux host. In this case Longhorn will create multiple replicas for the same volume on the same host. This is therefore not a production-grade setup. + +You can setup Longhorn by running a single script: +``` +git clone https://github.com/rancher/longhorn +cd longhorn/deploy +./longhorn-setup-single-node-env.sh +``` +The script will setup all the components required to run Longhorn, including the etcd server, longhorn-manager, and longhorn-ui automatically. + +After the script completes, it produces output like this: +``` +Longhorn is up at port 8080 +``` +Congratulation! Now you have Longhorn running on the host and can access the UI at `http://:8080`. + +#### Setup example NFS server for backupstore +Longhorn's backup feature requires an NFS server or an S3 endpoint. You can setup a simple NFS server on the same host and use that to store backups. +``` +# Make sure you have nfs-kernel-server package installed. +sudo apt-get install nfs-kernel-server +./deploy-example-nfs.sh +``` +This NFS server won't save any data after you delete the container. It's for development and testing only. + +After this script completes, you will see: +``` +Use the following URL as the Backup Target in the Longhorn UI: +nfs://10.0.0.5:/opt/backupstore +``` +Open Longhorn UI, go to `Setting`, fill the `Backup Target` field with the URL above, click `Save`. Now you should able to use the backup feature of Longhorn. + +# Test volume creation and use + +You can now create a persistent Longhorn volume from Docker CLI using the Longhorn volume driver and use the volume in Docker containers. + +Docker volume driver is `longhorn`. + +You can run the following on any of the Longhorn hosts: +``` +docker volume create -d longhorn vol1 +docker run -it --volume-driver longhorn -v vol1:/vol1 ubuntu bash +```