aboutsummaryrefslogtreecommitdiff
path: root/docs/gettingstarted.rst
diff options
context:
space:
mode:
authorchrislusf <chris.lu@gmail.com>2014-07-25 08:11:52 -0700
committerchrislusf <chris.lu@gmail.com>2014-07-25 08:11:52 -0700
commit78ccbbf3d0766e1ececf91fa00766d1ed33050cc (patch)
tree25ffd0a110301c9aeeb67f8bfb200db6a8e50f83 /docs/gettingstarted.rst
parente67afa87159b00925cfd61166b2e4218e0690acc (diff)
parentb5c89b9a738ff0924401ff4603ba41d1d255a5d0 (diff)
downloadseaweedfs-78ccbbf3d0766e1ececf91fa00766d1ed33050cc.tar.xz
seaweedfs-78ccbbf3d0766e1ececf91fa00766d1ed33050cc.zip
Merge pull request #10 from ernado/master
Added docker example to docs
Diffstat (limited to 'docs/gettingstarted.rst')
-rw-r--r--docs/gettingstarted.rst36
1 files changed, 36 insertions, 0 deletions
diff --git a/docs/gettingstarted.rst b/docs/gettingstarted.rst
index 59387be6b..0b598a2bf 100644
--- a/docs/gettingstarted.rst
+++ b/docs/gettingstarted.rst
@@ -76,3 +76,39 @@ This command would recursively upload all files. Or you can specify what files y
Then, you can simply check "du -m -s /some/big/folder" to see the actual disk usage by OS, and compare it with the file size under "/data". Usually if you are uploading a lot of textual files, the consumed disk size would be much smaller since textual files are gzipped automatically.
Now you can use your tools to hit weed-fs as hard as you can.
+
+Using Weed-Fs in docker
+####################################
+
+You can use image "cydev/weed" or build your own with `dockerfile <https://github.com/chrislusf/weed-fs/blob/master/Dockerfile>`_ in the root of repo.
+
+.. code-block:: bash
+
+ docker run --name weed cydev/weed server
+
+And in another terminal
+
+.. code-block:: bash
+
+ IP=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' weed)
+ curl "http://$IP:9333/cluster/status?pretty=y"
+ {
+ "IsLeader": true,
+ "Leader": "localhost:9333"
+ }
+ # use $IP as host for api queries
+
+In production
+**************************************************************
+
+To gain persistency you can use docker volumes.
+
+.. code-block:: bash
+
+ # start our weed server daemonized
+ docker run --name weed -d -p 9333:9333 -p 8080:8080 \
+ -v /opt/weedfs/data:/data cydev/weed server -dir="/data" \
+ -publicIp="$(curl -s cydev.ru/ip)"
+
+Now our weed-fs server will be persistent and accessible by localhost:9333 and :8080 on host machine.
+Dont forget to specify "-publicIp" for correct connectivity. \ No newline at end of file