Skip to content

Instantly share code, notes, and snippets.

@jcoyne
Last active February 22, 2018 22:58
Show Gist options
  • Save jcoyne/9026acfc60c2f25480780abbcde5566f to your computer and use it in GitHub Desktop.
Save jcoyne/9026acfc60c2f25480780abbcde5566f to your computer and use it in GitHub Desktop.
TACO Sprint 1 Demo script
SERVICES=dynamodb,kinesis,s3 localstack start
# Open new shell
awslocal dynamodb create-table --table-name resources \
--attribute-definitions "AttributeName=id,AttributeType=S" \
--key-schema "AttributeName=id,KeyType=HASH" \
--provisioned-throughput=ReadCapacityUnits=100,WriteCapacityUnits=100
awslocal s3api create-bucket --bucket taco-deposited-files
awslocal kinesis create-stream --stream-name deposit --shard-count 3
localstack web
# Open browser to http://localhost:8080/ to show we have 3 resources created
# Open new shell
HONEYBADGER_API_KEY=cac7b197 AWS_ACCESS_KEY_ID=999999 AWS_SECRET_KEY=1231 go run main.go --port 3000
# Open new shell
curl -X POST -H "Content-Type: application/json" -d@examples/request.json http://localhost:3000/v1/resource | json_pp
# grab id from last response and past into:
curl -H "Content-Type: application/json" http://localhost:3000/v1/resource/
| json_pp
curl -F upFile=@README.md http://localhost:3000/v1/file
# now look at server logs and see where it says "The location of the file is: http://localhost:4572/taco-deposited-files/2108ec88-f6ee-44ab-8c30-ca8e2d2a4abb"
# and get the metadata by grabbing the last id and pasting it to:
curl -H "Content-Type: application/json" http://localhost:3000/v1/resource/
| json_pp
# show that it's type is sdr3-file
# and we have honeybadger working:
https://app.honeybadger.io/projects/54955/faults/36526098#notice-summary
curl -H "Content-Type: application/json" http://taco-dev.sul.stanford.edu/v1/healthcheck
@jcoyne
Copy link
Author

jcoyne commented Feb 22, 2018

For final demo:

  • show on AWS
  • show create in order to show a full object (with file sets)
  • show download of files
  • show stubbed out service
  • show processing framework of some sort (DAG processor)
    • generate purl xml
    • indexer?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment