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

Proposed by Nicolas Thomas
Status: Merged
Merged at revision: 53
Proposed branch: lp:~thomnico/orange-box-examples/cloudfoundry
Merge into: lp:orange-box-examples
Diff against target: 108 lines (+84/-0)
3 files modified
.bzrignore (+1/-0)
cloudfoundry/01-deploy.sh (+18/-0)
cloudfoundry/orange-box-local-xip-io (+65/-0)
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+239896@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.bzrignore'
2--- .bzrignore 2014-10-21 10:16:20 +0000
3+++ .bzrignore 2014-10-28 18:43:07 +0000
4@@ -1,3 +1,4 @@
5 precise
6 telco/precise
7 telco/trusty
8+cloudfoundry/trusty
9
10=== modified file 'cloudfoundry/01-deploy.sh'
11--- cloudfoundry/01-deploy.sh 2014-10-28 09:07:20 +0000
12+++ cloudfoundry/01-deploy.sh 2014-10-28 18:43:07 +0000
13@@ -1,5 +1,23 @@
14 #!/bin/bash
15
16+#
17+# 01-deploy.sh
18+# Copyright (C) 2014 Canonical Ltd.
19+#
20+# Authors: Darryl Weaver <darryl.weaver@canonical.com>
21+# Nicolas Thomas <nicolas.thomas@canonical.com>
22+#
23+# This program is free software: you can redistribute it and/or modify
24+# it under the terms of the GNU General Public License as published by
25+# the Free Software Foundation, version 3 of the License.
26+#
27+# This program is distributed in the hope that it will be useful,
28+# but WITHOUT ANY WARRANTY; without even the implied warranty of
29+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30+# GNU General Public License for more details.
31+#
32+# You should have received a copy of the GNU General Public License
33+# along with this program. If not, see <http://www.gnu.org/licenses/>.
34
35 set -e
36
37
38=== added file 'cloudfoundry/orange-box-local-xip-io'
39--- cloudfoundry/orange-box-local-xip-io 1970-01-01 00:00:00 +0000
40+++ cloudfoundry/orange-box-local-xip-io 2014-10-28 18:43:07 +0000
41@@ -0,0 +1,65 @@
42+#!/bin/bash
43+#
44+# orange-box-local-xip-io
45+# Copyright (C) 2014 Canonical Ltd.
46+#
47+# Authors: Nicolas Thomas <nicolas.thomas@canonical.com>
48+#
49+# This program is free software: you can redistribute it and/or modify
50+# it under the terms of the GNU General Public License as published by
51+# the Free Software Foundation, version 3 of the License.
52+#
53+# This program is distributed in the hope that it will be useful,
54+# but WITHOUT ANY WARRANTY; without even the implied warranty of
55+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
56+# GNU General Public License for more details.
57+#
58+# You should have received a copy of the GNU General Public License
59+# along with this program. If not, see <http://www.gnu.org/licenses/>.
60+
61+set -e
62+
63+fgrep "/etc/bind/named.conf.xip.io" /etc/bind/named.conf > /dev/null && (echo "already applied" ; exit 2)
64+
65+if [ "$(id -u)" != "0" ]; then
66+ echo "Must be run with sudo or by root"
67+ exit 77
68+fi
69+
70+cat > /etc/bind/named.conf.xip.io <<EOF
71+# Zone declarations.
72+zone "xip.io" {
73+ type master;
74+ file "/etc/bind/zones.xip.io";
75+};
76+EOF
77+
78+echo '$TTL 300' > /etc/bind/zones.xip.io
79+cat >> /etc/bind/zones.xip.io <<EOF
80+@ IN SOA xip.io. io. (
81+ 666 ; serial
82+ 600 ; Refresh
83+ 1800 ; Retry
84+ 604800 ; Expire
85+ 300 ; TTL
86+ )
87+
88+ IN NS xip.io
89+
90+io IN A 10.14.4.1
91+xip.io IN A 10.14.4.1
92+
93+ns IN CNAME xip.io
94+
95+EOF
96+
97+#doing it for 10.14.100.* and 10.14.200.* which are the supposed used range
98+for i in `seq 1 1 254`
99+do
100+ echo "*.10.14.100.$i IN A 10.14.100.$i" >> /etc/bind/zones.xip.io
101+ echo "*.10.14.200.$i IN A 10.14.200.$i" >> /etc/bind/zones.xip.io
102+done
103+
104+
105+echo 'include "/etc/bind/named.conf.xip.io";' >> /etc/bind/named.conf
106+service bind9 restart
107
108=== removed directory 'cloudfoundry/trusty'

Subscribers

People subscribed via source and target branches