Merge lp:~thomnico/orange-box-examples/cloudfoundry into lp:orange-box-examples

Proposed by Nicolas Thomas
Status: Merged
Merged at revision: 51
Proposed branch: lp:~thomnico/orange-box-examples/cloudfoundry
Merge into: lp:orange-box-examples
Diff against target: 100 lines (+47/-20)
4 files modified
cloudfoundry/00-demo-prep.sh (+13/-4)
cloudfoundry/01-deploy.sh (+26/-2)
cloudfoundry/README (+8/-3)
cloudfoundry/cloudfoundry-ob.yaml (+0/-11)
To merge this branch: bzr merge lp:~thomnico/orange-box-examples/cloudfoundry
Reviewer Review Type Date Requested Status
Darryl Weaver Pending
Review via email: mp+239797@code.launchpad.net
To post a comment you must log in.
52. By Nicolas Thomas

Typo

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cloudfoundry/00-demo-prep.sh'
2--- cloudfoundry/00-demo-prep.sh 2014-10-23 15:55:08 +0000
3+++ cloudfoundry/00-demo-prep.sh 2014-10-28 09:08:09 +0000
4@@ -3,10 +3,19 @@
5
6 set -e
7
8-mkdir -p trusty
9+CHARM="trusty/cloudfoundry"
10
11-#Grab the cloudfoundry charm to the local charm repo
12-bzr branch lp:~cf-charmers/charms/trusty/cloudfoundry/trunk trusty/cloudfoudry
13+ if [ -d $CHARM ]
14+ then
15+ cd $CHARM
16+ bzr pull
17+ cd ..
18+ else
19+ mkdir -p trusty
20+ bzr branch lp:~cf-charmers/charms/trusty/cloudfoundry/trunk $CHARM
21+ fi
22
23 #Install the cloud foundry client
24-wget http://go-cli.s3-website-us-east-1.amazonaws.com/releases/latest/cf-cli_amd64.deb && sudo dpkg -i cf-cli_amd64.deb
25+
26+PKGS="cf-cli"
27+dpkg -l $PKGS > /dev/null || (wget http://go-cli.s3-website-us-east-1.amazonaws.com/releases/latest/cf-cli_amd64.deb && sudo dpkg -i cf-cli_amd64.deb )
28
29=== modified file 'cloudfoundry/01-deploy.sh'
30--- cloudfoundry/01-deploy.sh 2014-10-23 15:55:08 +0000
31+++ cloudfoundry/01-deploy.sh 2014-10-28 09:08:09 +0000
32@@ -3,7 +3,31 @@
33
34 set -e
35
36-juju set-constraints tags=
37-juju-deployer -c cloudfoundry-ob.yaml
38+juju set-constraints mem=2048
39+JUJU_TYPE=`cat ${JUJU_HOME:-~/.juju}/environments/$(juju switch).jenv|grep type|awk '{print $2;}'`
40+
41+export ADMIN_PASS=`cat ${JUJU_HOME:-~/.juju}/environments/$(juju switch).jenv|grep admin-secret|awk '{print $2;}'`
42+ cat << EOF > cf-bundle.yaml
43+cloudfoundry:
44+ series: trusty
45+ services:
46+ cloudfoundry:
47+ branch: trusty/cloudfoundry
48+ constraints: mem=2048
49+ options:
50+ admin_secret: $ADMIN_PASS
51+ placement: ${1:-dense}
52+ cf_version: latest
53+EOF
54+
55+
56+export JUJU_REPOSITORY=$PWD
57+juju-deployer -c cf-bundle.yaml
58+
59+
60+## need to IP or dns of the domain but need to know haproxy IP to do so
61+API_IP=`juju-pprint |grep haproxy |awk '{ print $3 }' |xargs dig +short`
62+juju set cloudfoundry domain=$API_IP.xip.io
63
64 echo "Deployment completed"
65+echo "run cflogin in a few minutes"
66
67=== modified file 'cloudfoundry/README'
68--- cloudfoundry/README 2014-10-23 15:55:08 +0000
69+++ cloudfoundry/README 2014-10-28 09:08:09 +0000
70@@ -13,6 +13,11 @@
71 This will first deploy the cloudfoundry orchestration charm, which then deploys all the CF services.
72 This will look messy in the GUI as it lays them out in a single line.
73
74-TODO:
75-Once login problem is solved, create app deployment script.
76-
77+Once it is done run:
78+cflogin
79+
80+If command not found you need to source:
81+source trusty/cloudfoundry/helpers.sh
82+
83+For more details READ:
84+ trusty/cloudfoundry/README.rst
85
86=== removed file 'cloudfoundry/cloudfoundry-ob.yaml'
87--- cloudfoundry/cloudfoundry-ob.yaml 2014-10-23 15:55:08 +0000
88+++ cloudfoundry/cloudfoundry-ob.yaml 1970-01-01 00:00:00 +0000
89@@ -1,11 +0,0 @@
90-cloudfoundry:
91- series: trusty
92- services:
93- cloudfoundry:
94- branch: lp:~cf-charmers/charms/trusty/cloudfoundry/trunk
95- constraints: mem=2048
96- options:
97- admin_secret: admin
98- placement: dense
99- cf_version: latest
100-

Subscribers

People subscribed via source and target branches