Skip to content

Instantly share code, notes, and snippets.

@mmm
Created March 16, 2012 15:25
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mmm/2050525 to your computer and use it in GitHub Desktop.
Save mmm/2050525 to your computer and use it in GitHub Desktop.
juju rails stack
#!/bin/bash
juju_root=$HOME
juju_env=${1:-"-ecanonical"}
###
echo "deploying stack"
juju bootstrap $juju_env
juju deploy $juju_env --repository "$juju_root/charms" local:mysql
juju deploy $juju_env --repository "$juju_root/charms" --config ~/rails-sample.yaml -n3 local:rails myapp
juju add-relation $juju_env mysql myapp
juju expose $juju_env myapp
juju deploy $juju_env --repository "$juju_root/charms" local:haproxy head
juju add-relation $juju_env myapp head
juju expose $juju_env head
echo "done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment