~ce-infrastructure/capomastro/deploy-mojo-jumpstart

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
                
echo "Deploying into juju environment..."

JUJU_ENV=${JUJU_ENV:-"local"}

./helpers/build.sh
mv capomastro.tar.gz charms/precise/capomastro/files/
# DO NOT CHANGE DEPLOY ORDER.  OTHER SCRIPTS RELY ON THIS ORDERING
cheetah fill --env -p templates/devel_conf.tmpl > config/devel.yaml
juju deploy --config=config/devel.yaml --repository=charms local:capomastro
juju deploy --repository=charms local:gunicorn
juju deploy rabbitmq-server
# XXX: Bandaid... I think
if [[ "${JUJU_ENV}" == "local" ]]; then
    juju deploy --config=config/postgresql-local.yaml --repository=charms local:postgresql
else
    juju deploy --repository=charms local:postgresql
fi
juju add-relation rabbitmq-server capomastro
juju add-relation postgresql:db capomastro:db
juju add-relation gunicorn capomastro
juju expose capomastro

juju deploy --repository=charms local:jenkins
juju set jenkins password=testing
juju expose jenkins