Skip to content

Files

Latest commit

a36f4a0 · Jul 26, 2016

History

History

api

Sample Usage Demo

This demo has Hoarder running locally

create some thing

dd if=/dev/urandom of=thing bs=1M count=10

tell slurp about new build

curl -k -H "X-AUTH-TOKEN: secret" https://localhost:1566/stages -d '{"new-id": "test"}'

sync files

rsync -v --delete -aR . -e 'ssh -p 1567' test@127.0.0.1:test/

commit update (done syncing)

curl -k -H "X-AUTH-TOKEN: secret" https://localhost:1566/stages/test -X PUT

delete temp build dir

curl -k -H "X-AUTH-TOKEN: secret" https://localhost:1566/stages/test -X DELETE

*get build from hoarder

curl localhost:7410/blobs/test | tar -zxf -
du -h thing
# 10M thing

make changes

echo '{things"}' > file

tell slurp about new build

curl -k -H "X-AUTH-TOKEN: secret" https://localhost:1566/stages -d '{"old-id": "test", "new-id": "test2"}'

sync files

rsync --delete -aR . -e 'ssh -p 1567' test2@127.0.0.1:this-location-really-doesnt-matter

commit update (done syncing)

curl -k -H "X-AUTH-TOKEN: secret" https://localhost:1566/stages/test2 -X PUT

*get build from hoarder

curl localhost:7410/blobs/test2 | tar -zxf -
ls
# file thing
  • *new directory