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
|
function cflogin() {
ENDPOINT=`juju status haproxy/0 |grep public-address|cut -f 2 -d : `
IP=`dig +short $ENDPOINT`
# get the _IP_ of the public address
cf api http://api.${IP}.xip.io
cf auth admin admin
cf create-space -o juju-org my-space
cf target -o juju-org -s my-space
}
function cfdeploy() {
if [ -d trusty ] ; then
mkdir trusty
bzr branch lp:~cf-charmers/charms/trusty/cloudfoundry/trunk trusty/cloudfoundry
fi
export ADMIN_PASS=`cat ${JUJU_HOME:-~/.juju}/environments/$(juju switch).jenv|grep admin-secret|awk '{print $2;}'`
cat << EOF > cf.yaml
cloudfoundry:
admin_secret: $ADMIN_PASS
placement: ${1:-dense}
cf_version: latest
EOF
juju deploy --config=cf.yaml local:trusty/cloudfoundry
}
|