Create a gist now

Instantly share code, notes, and snippets.

@mmm /gist:1406018
Last active Sep 28, 2015

decent-sized juju stack
echo "deploying stack"
deploy_ha_mysql() {
juju deploy mysql masterdb
juju deploy mysql slavedb -n2
juju add-relation masterdb:master slavedb:slave
deploy_common_services() {
juju deploy nfs uploadstore
juju deploy memcached
juju deploy ganglia
juju expose ganglia
deploy_wiki() {
local wiki_name=$1
juju deploy mediawiki $wiki_name -n4
juju deploy varnish ${wiki_name}head
juju add-relation ganglia $wiki_name
juju add-relation masterdb:db ${wiki_name}:db
juju add-relation slavedb:db ${wiki_name}:slave
juju add-relation uploadstore $wiki_name
juju add-relation memcached $wiki_name
juju add-relation $wiki_name ${wiki_name}head
juju expose ${wiki_name}head
deploy_wiki "wiki1"
deploy_wiki "wiki2"
echo "done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment