Skip to content

Instantly share code, notes, and snippets.

@krujos
Last active August 29, 2015 14:25
Show Gist options
  • Save krujos/fb73181bdf232c1c9b09 to your computer and use it in GitHub Desktop.
Save krujos/fb73181bdf232c1c9b09 to your computer and use it in GitHub Desktop.
➜ tmp cat deploy.sh $
#!/bin/sh
cf create-service cleardb spark cities-db
cf push cities-service -p cities-service.jar --random-route --no-start
cf bind-service cities-service cities-db
cf push cities-ui -p cities-ui.jar --random-route --no-start
url=`cf app cities-service | grep urls: | sed -e 's/urls: //'`
cf cups cities-ws -p '{"tag": "cities", "uri": "http://'$url'"}'
cf bind-service cities-ui cities-ws
cf start cities-service
cf start cities-ui
➜ tmp for s in `cf spaces | grep -v Getting | grep -v name | grep "^\w"` ; do
cf target -s $s && sh deploy.sh
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment