Created
January 31, 2017 18:06
-
-
Save jimbaker/e74a7b98bc60519033fd455a22163ad2 to your computer and use it in GitHub Desktop.
Craton dev start 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
docker rm -f craton-api || true | |
docker build --pull -t craton-api:latest . | |
docker run -t --name craton-api -p 127.0.0.1:8080:8080 -d craton-api:latest | |
# wait until API server is available by probing it | |
until curl http://127.0.0.1:8080/v1/regions -H "Content-Type: application/json" -H "X-Auth-Token: demo" -H "X-Auth-User: demo" -H "X-Auth-Project: b9f10eca66ac4c279c139d01e65f96b4" | |
do | |
echo "Waiting for API server"; sleep 1 | |
done | |
sleep 1 | |
# run setup | |
python tools/generate_fake_data.py --url http://127.0.0.1:8080/v1 --user demo --project b9f10eca66ac4c279c139d01e65f96b4 --key demo | |
# verify something is now returned | |
curl http://127.0.0.1:8080/v1/regions -H "Content-Type: application/json" -H "X-Auth-Token: demo" -H "X-Auth-User: demo" -H "X-Auth-Project: b9f10eca66ac4c279c139d01e65f96b4" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
New deploy script, after https://review.openstack.org/#/c/443170/ merged:
Usage:
source deploy-craton.sh
Then you can use the
$CRATON_API_KEY
, '$CRATON_USERNAME, and
$CRATON_PROJECT_IDenvironment variables in your cURL commands or
$CRATON_HTTP_HEADERS` if you're using HTTPie.