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

Subscribers

People subscribed via source and target branches