From d2b1a71887f8af8afe8bb8da6bc6c1680c23d533 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Mon, 20 Jun 2011 19:42:30 -0700 Subject: [PATCH] website: update scripts/run-blobserver to use a config file also include the example blobs in the git repo Change-Id: Iaf24cf8ddb32505dcaa5753dc38479b1247a3645 --- .../example-blobserver-config.json | 14 ++++++++++++++ ...071fda36c1bd9e4595ed16ab5e2a46d44491f708.dat | 7 +++++++ ...0e5e60f367cc8156ae48198c496b2b2ebdf5313d.dat | 17 +++++++++++++++++ ...3dc1d1cfe92fce5f09d194ba73a0b023102c9b25.dat | 1 + ...91c66602c5cff5bb7162de9f6cda88fcd37415ea.dat | 7 +++++++ website/scripts/run-blobserver | 13 ++++++------- 6 files changed, 52 insertions(+), 7 deletions(-) create mode 100644 website/blobserver-example/example-blobserver-config.json create mode 100644 website/blobserver-example/root/sha1/071/fda/sha1-071fda36c1bd9e4595ed16ab5e2a46d44491f708.dat create mode 100644 website/blobserver-example/root/sha1/0e5/e60/sha1-0e5e60f367cc8156ae48198c496b2b2ebdf5313d.dat create mode 100644 website/blobserver-example/root/sha1/3dc/1d1/sha1-3dc1d1cfe92fce5f09d194ba73a0b023102c9b25.dat create mode 100644 website/blobserver-example/root/sha1/91c/666/sha1-91c66602c5cff5bb7162de9f6cda88fcd37415ea.dat diff --git a/website/blobserver-example/example-blobserver-config.json b/website/blobserver-example/example-blobserver-config.json new file mode 100644 index 000000000..73ddea03e --- /dev/null +++ b/website/blobserver-example/example-blobserver-config.json @@ -0,0 +1,14 @@ +{ "_for-emacs": "-*- mode: js2;-*-", + "baseURL": ["_env", "http://camlistore.org:3179"], + "password": ["_env", "${CAMLI_PASSWORD}"], + + "prefixes": { + "/": { + "handler": "storage-filesystem", + "handlerArgs": { + "path": ["_env", "${CAMLI_ROOT}"] + } + } + } +} + diff --git a/website/blobserver-example/root/sha1/071/fda/sha1-071fda36c1bd9e4595ed16ab5e2a46d44491f708.dat b/website/blobserver-example/root/sha1/071/fda/sha1-071fda36c1bd9e4595ed16ab5e2a46d44491f708.dat new file mode 100644 index 000000000..9a1ad1cd4 --- /dev/null +++ b/website/blobserver-example/root/sha1/071/fda/sha1-071fda36c1bd9e4595ed16ab5e2a46d44491f708.dat @@ -0,0 +1,7 @@ +{"camliVersion": 1, + "authType": "haveref", + "camliSigner": "sha1-f019d17dd308eebbd49fd94536eb67214c2f0587", + "camliType": "share", + "target": "sha1-0e5e60f367cc8156ae48198c496b2b2ebdf5313d", + "transitive": true +,"camliSig":"iQEcBAABAgAGBQJNQJGuAAoJEIUeCLJL7Fq1EuAIAL/nGoX8caGaANnam0bcIQT7C61wXMRW4qCCaFW+w67ys5z4ztfnTPKwL9ErzMF8Hd32Xe/bVcF6ZL38x/axqI7ehxN8lneKGQNoEdZDA9i752aAr0fkAba6eDehoOj9F4XxOzk3iVrq445jEXtu/+twamHV3UfRozWK1ZQb57dM+cRff47M/Y6VIBRSgW2BrABjuBs8G6PiKxycgh1mb+RL8f9KG+HB/yFuK37YJqZ0zU2OTRp6ELiOgTxbeg99koV9Duy4f4mQgxQgli46077Sv/ujzIeVbmdFL3OenGEzQnyKG0fhf8fa5WkED0XfH7zibAHLiSq3O7x11Q0406U==ANug"} diff --git a/website/blobserver-example/root/sha1/0e5/e60/sha1-0e5e60f367cc8156ae48198c496b2b2ebdf5313d.dat b/website/blobserver-example/root/sha1/0e5/e60/sha1-0e5e60f367cc8156ae48198c496b2b2ebdf5313d.dat new file mode 100644 index 000000000..c671fed87 --- /dev/null +++ b/website/blobserver-example/root/sha1/0e5/e60/sha1-0e5e60f367cc8156ae48198c496b2b2ebdf5313d.dat @@ -0,0 +1,17 @@ +{"camliVersion": 1, + "camliType": "file", + "contentParts": [ + { + "blobRef": "sha1-3dc1d1cfe92fce5f09d194ba73a0b023102c9b25", + "size": 14 + } + ], + "fileName": "Hi.txt", + "size": 14, + "unixGroup": "camli", + "unixGroupId": 1000, + "unixMtime": "2011-01-26T21:11:22.152868825Z", + "unixOwner": "camli", + "unixOwnerId": 1000, + "unixPermission": "0644" +} \ No newline at end of file diff --git a/website/blobserver-example/root/sha1/3dc/1d1/sha1-3dc1d1cfe92fce5f09d194ba73a0b023102c9b25.dat b/website/blobserver-example/root/sha1/3dc/1d1/sha1-3dc1d1cfe92fce5f09d194ba73a0b023102c9b25.dat new file mode 100644 index 000000000..27af85fff --- /dev/null +++ b/website/blobserver-example/root/sha1/3dc/1d1/sha1-3dc1d1cfe92fce5f09d194ba73a0b023102c9b25.dat @@ -0,0 +1 @@ +Hello, Camli! diff --git a/website/blobserver-example/root/sha1/91c/666/sha1-91c66602c5cff5bb7162de9f6cda88fcd37415ea.dat b/website/blobserver-example/root/sha1/91c/666/sha1-91c66602c5cff5bb7162de9f6cda88fcd37415ea.dat new file mode 100644 index 000000000..db0de29cf --- /dev/null +++ b/website/blobserver-example/root/sha1/91c/666/sha1-91c66602c5cff5bb7162de9f6cda88fcd37415ea.dat @@ -0,0 +1,7 @@ +{"camliVersion": 1, + "authType": "haveref", + "camliSigner": "sha1-f019d17dd308eebbd49fd94536eb67214c2f0587", + "camliType": "share", + "target": "sha1-0e5e60f367cc8156ae48198c496b2b2ebdf5313d", + "transitive": true +,"camliSig":"iQEcBAABAgAGBQJNQJBmAAoJEIUeCLJL7Fq1WTcH/RAqjIkij769LpbmPneDNvDzAS7WjIebnhH54PqzGl++HNUAMalTVWhOX6gJ34juszc7hF4JhhZoC/MX7n9W4TTgsoE/W1d1thfhsk+Cxh9KEpJ+kppNLlCPE1ldA5G0ZF+A3oit/bHFaiXIL2bKz2SHDuJcUrcRPDsWCUqdRInB8ZzCToPmvTOxKOIOW5xXH4DqQEBjimElt9VHNRPbBNqHOa3QluWVMnMPXsOWh4FjmnplysAEjkuNrjYal1beBeVlCO2xDLmWQxLHPBPgoY4yLfDTTW3opS4INB7hxv2+JP2lDHSa7HlmnrOacVmVAoTR6ocYF9ZKm2UJNefO+Lk==vP6t"} diff --git a/website/scripts/run-blobserver b/website/scripts/run-blobserver index 3c725ab43..2b9443954 100755 --- a/website/scripts/run-blobserver +++ b/website/scripts/run-blobserver @@ -3,12 +3,11 @@ set -e Bin=$(dirname $( readlink -f $0)) -ROOT=$HOME/blobroot -if [ ! -d $ROOT ]; then - mkdir $ROOT -fi -chmod 0700 $ROOT - export CAMLI_PASSWORD=`cat $HOME/.camli/camorg-blobserver.pass` +export CAMLI_ROOT=$Bin/../blobserver-example/root + +$Bin/../../build.pl server/go/camlistored && \ + $Bin/../../server/go/camlistored/camlistored \ + -configfile=$Bin/../blobserver-example/example-blobserver-config.json \ + -listen=:3179 "$@" -$Bin/../../build.pl server/go/camlistored && $Bin/../../server/go/camlistored/camlistored -root=$ROOT -listen=:3179 "$@"