Last active
February 22, 2018 22:58
-
-
Save jcoyne/9026acfc60c2f25480780abbcde5566f to your computer and use it in GitHub Desktop.
TACO Sprint 1 Demo script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 [email protected] 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 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For final demo: