Merge lp:~allenap/maas/packaging.remove-squashfs into lp:maas/trunk

Proposed by Gavin Panella
Status: Superseded
Proposed branch: lp:~allenap/maas/packaging.remove-squashfs
Merge into: lp:maas/trunk
Diff against target: 2717 lines (+2387/-0)
65 files modified
debian/changelog (+629/-0)
debian/compat (+1/-0)
debian/control (+275/-0)
debian/copyright (+25/-0)
debian/extras/20-maas.conf (+32/-0)
debian/extras/99-maas (+4/-0)
debian/extras/99-maas-sudoers (+3/-0)
debian/extras/isc-dhcp-server.override (+1/-0)
debian/extras/maas (+8/-0)
debian/extras/maas-cli (+2/-0)
debian/extras/maas-provision (+7/-0)
debian/extras/maas-region-celeryd (+50/-0)
debian/extras/maas_remote_syslog_compress (+2/-0)
debian/maas-cli.install (+2/-0)
debian/maas-cluster-controller.config (+31/-0)
debian/maas-cluster-controller.dirs (+1/-0)
debian/maas-cluster-controller.install (+27/-0)
debian/maas-cluster-controller.links (+1/-0)
debian/maas-cluster-controller.logrotate (+9/-0)
debian/maas-cluster-controller.maas-cluster-celery.upstart (+26/-0)
debian/maas-cluster-controller.maas-pserv.upstart (+14/-0)
debian/maas-cluster-controller.postinst (+62/-0)
debian/maas-cluster-controller.postrm (+30/-0)
debian/maas-cluster-controller.prerm (+10/-0)
debian/maas-cluster-controller.templates (+7/-0)
debian/maas-common.install (+2/-0)
debian/maas-common.postinst (+22/-0)
debian/maas-common.postrm (+13/-0)
debian/maas-dhcp.apparmor (+7/-0)
debian/maas-dhcp.install (+1/-0)
debian/maas-dhcp.maas-dhcp-server.upstart (+60/-0)
debian/maas-dhcp.postinst (+22/-0)
debian/maas-dhcp.postrm (+11/-0)
debian/maas-dns.dirs (+1/-0)
debian/maas-dns.postinst (+35/-0)
debian/maas-dns.postrm (+24/-0)
debian/maas-region-controller.apport (+37/-0)
debian/maas-region-controller.config (+45/-0)
debian/maas-region-controller.dirs (+2/-0)
debian/maas-region-controller.install (+33/-0)
debian/maas-region-controller.links (+2/-0)
debian/maas-region-controller.lintian-overrides (+7/-0)
debian/maas-region-controller.logrotate (+18/-0)
debian/maas-region-controller.maas-region-celery.upstart (+26/-0)
debian/maas-region-controller.maas-txlongpoll.upstart (+27/-0)
debian/maas-region-controller.postinst (+295/-0)
debian/maas-region-controller.postrm (+52/-0)
debian/maas-region-controller.prerm (+18/-0)
debian/maas-region-controller.templates (+22/-0)
debian/maintscript (+2/-0)
debian/patches/01-fix-database-settings.patch (+26/-0)
debian/patches/02-pserv-config.patch (+38/-0)
debian/patches/03-txlongpoll-config.patch (+39/-0)
debian/patches/series (+3/-0)
debian/po/POTFILES.in (+2/-0)
debian/po/templates.pot (+82/-0)
debian/python-django-maas.install (+2/-0)
debian/python-maas-client.install (+1/-0)
debian/python-maas-provisioningserver.install (+4/-0)
debian/rules (+65/-0)
debian/source/format (+1/-0)
debian/tests/control (+2/-0)
debian/tests/maas-integration.py (+72/-0)
debian/tests/maas-package-test (+5/-0)
debian/watch (+2/-0)
To merge this branch: bzr merge lp:~allenap/maas/packaging.remove-squashfs
Reviewer Review Type Date Requested Status
Launchpad code reviewers Pending
Review via email: mp+134085@code.launchpad.net

Commit message

Remove all install-via-squashfs support.

Description of the change

To post a comment you must log in.

Unmerged revisions

145. By Gavin Panella

Remove all reference to squashfs installs.

144. By Jeroen T. Vermeulen

[r=andreserl][bug=][author=jtv] Move the import scripts from the region-controller package to the cluster-controller package.

143. By Raphaël Badin

[r=jtv][bug=][author=rvb] Add sudo rule so that the script maas-import-pxe-files can be called by the user 'maas'.

142. By Raphaël Badin

[r=andreserl][bug=1072744][author=rvb] * debian/control: Remove the dependency of maas-cluster-controller on rabbitmq-server.

141. By Julian Edwards

[r=julian-edwards][bug=1052805][author=julian-edwards] [ Julian Edwards ]
  * debian/maas-region-controller.install: Remove installation of maas-gc; it
    is no longer required as upstream no longer stores files in the filesystem.
    (LP: #1069734)

140. By Raphaël Badin

[r=julian-edwards][bug=1066935][author=rvb] Fix permissions and group ownership of file /etc/bind/maas/named.conf.rndc.maas.

139. By Andres Rodriguez

[r=julian-edwards][bug=1064638,1064672,1066938,1066958,1067261,1067929][author=andreserl] 0.1+bzr1269+dfsg-0ubuntu1
0.1+bzr1269+dfsg-0ubuntu2

138. By Gavin Panella

[r=andreserl,rvb][bug=1066929][author=allenap] Missing changelog entry for "Remove MAAS-related include lines from named's config before adding new".

137. By Andres Rodriguez

[r=andreserl][bug=][author=andreserl] Releasing 0.1+bzr1264+dfsg-0ubuntu2
Opening 0.1+bzr1264+dfsg-0ubuntu3

136. By Gavin Panella

[r=rvb][bug=1066929][author=allenap] Remove MAAS-related include lines from named's config before adding new.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added directory 'debian'
=== added file 'debian/changelog'
--- debian/changelog 1970-01-01 00:00:00 +0000
+++ debian/changelog 2012-11-13 12:12:21 +0000
@@ -0,0 +1,629 @@
1maas (0.1+bzr1269+dfsg-0ubuntu2) UNRELEASED; urgency=low
2
3 [ Raphaël Badin ]
4 * debian/maas-dns.postinst: fix permissions and group ownership of
5 file /etc/bind/maas/named.conf.rndc.maas. (LP: #1066935)
6 * debian/control: Remove the dependency of maas-cluster-controller
7 on rabbitmq-server. (LP: #1072744)
8 * debian/extras/99-maas-sudoers: Add sudo rule for script
9 /usr/sbin/maas-import-pxe-files.
10
11 [ Julian Edwards ]
12 * debian/maas-region-controller.install: Remove installation of maas-gc; it
13 is no longer required as upstream no longer stores files in the filesystem.
14 (LP: #1069734)
15
16 [ Jeroen Vermeulen ]
17 * debian/maas-cluster-controller.install: Install import scripts.
18 * debian/maas-cluster-controller.postinst: Configure tgt (the iSCSI server)
19 so the import script can install files to it.
20 * debian/maas-cluster-controller.postrm: Clean up tgt config.
21 * debian/maas-region-controller.install: Move import scripts out to the
22 cluster controller, and drop the maas-import-isos compatibility script.
23 * debian/maas-region-controller.postinst: Remove tgt config.
24 * debian/maas-region-controller.postrm: Remove tgt config cleanup.
25
26 [ Gavin Panella ]
27 * debian/extras/99-maas: squashfs image download is no longer needed.
28 * debian/maas-cluster-controller.install: maas-import-squashfs and its
29 configuration file are no longer part of upstream.
30
31 -- Julian Edwards <julian.edwards@canonical.com> Fri, 26 Oct 2012 12:50:20 +0200
32
33maas (0.1+bzr1269+dfsg-0ubuntu1) quantal-proposed; urgency=low
34
35 * New upstream bugfix release
36 - Fixes commissioning failing to set memory attribute. (LP: #1064638)
37 - Fixes node listing by adding pagination (LP: #1064672)
38 - Changes default bind rndc key which breaks initscripts (LP: #1066938)
39 - Fixes invalid DNS config once node is enlisted (LP: #1066958)
40 - Reference documentation link to correct URL (LP: #1067261)
41
42 [ Andres Rodriguez ]
43 * debian/rules: Change upstream branch.
44
45 [ Gavin Panella ]
46 * debian/maas-dns.postinst: Remove MAAS-related include lines from named's
47 config before adding a new one (LP: #1066929)
48
49 [ Raphael Badin ]
50 * debian/extras/maas-region-celeryd: Remove whitespace that affects DNS
51 rabbitmq queue. (LP: #1067929)
52
53 -- Andres Rodriguez <andreserl@ubuntu.com> Tue, 16 Oct 2012 10:31:37 -0400
54
55maas (0.1+bzr1264+dfsg-0ubuntu2) quantal; urgency=low
56
57 * Fix MAAS not working after CD/preseed install (LP: #1065763)
58 - debian/extras/maas-region-celeryd: Add wrapper to run celery from
59 the upstart job.
60 - debian/extras/maas-region-controller.maas-region-celery.upstart: Create
61 rabbitmq user if it does not exists.
62 * debian/control: Remove unneeded deps on python-txtftp for some binary pkgs.
63 * debian/maas-region-controller.postinst: Minor fix referencing variable.
64
65 -- Andres Rodriguez <andreserl@ubuntu.com> Thu, 11 Oct 2012 17:38:08 -0400
66
67maas (0.1+bzr1264+dfsg-0ubuntu1) quantal; urgency=low
68
69 * New upstream release.
70
71 [ Raphaël Badin ]
72 * debian/maas-region-controller.postinst: Enable proxy_http module.
73 * debian/maas-cluster-controller.postinst: Create /var/lib/maas. (LP: #1065062)
74
75 [ Andres Rodriguez ]
76 * Install maas-provision with python-maas-provisioningserver (LP: #1065171):
77 - debian/python-maas-provisioningserver.install: Install
78 - debian/control: Add Conflicts/Replaces with maas-cluster-controller
79 to handle upgrades.
80 * debian/patches/04-fix-ipmi-enlistment.patch: Drop. Merged Upstream.
81 * debian/control: Depends on maas-region-controller for maas-dns.
82 * debian/maas-region-controller.postinst: Set the correct host for
83 BROKER_URL (LP: #1065080)
84 * Handle creation of user/group in maas-common.
85 * debian/maas-region-controller.config: Always source dbconfig scripts.
86
87 -- Andres Rodriguez <andreserl@ubuntu.com> Wed, 10 Oct 2012 11:17:21 -0400
88
89maas (0.1+bzr1243+dfsg-0ubuntu3) quantal; urgency=low
90
91 * 04-fix-ipmi-enlistment.patch: retry maas-enlist without power parameters
92 on failure. This allows enlistment to continue working with Precise
93 ephemeral images before the Precise SRU for maas-enlist lands.
94 (LP: #1064922).
95
96 -- Robie Basak <robie.basak@canonical.com> Wed, 10 Oct 2012 13:29:16 +0000
97
98maas (0.1+bzr1243+dfsg-0ubuntu2) quantal; urgency=low
99
100 * debian/patches/99-ipmi-user-too-long.patch: Fix username too long for
101 IPMI user created on enlistment (LP: #1064832)
102
103 -- Andres Rodriguez <andreserl@ubuntu.com> Wed, 10 Oct 2012 01:00:29 -0400
104
105maas (0.1+bzr1243+dfsg-0ubuntu1) quantal; urgency=low
106
107 * New upstream release. (LP: #1064596)
108 * debian/patches/99-temporary-fix-constraints.patch: Dropped.
109 * debian/control:
110 - ${python:Depends} for maas-common.
111 - Add missing Depends for python-maas-provisioningserver (LP: #1064542)
112 * debian/maas-cluster-controller.postinst: Create /var/log/maas if it
113 doesn't exist (LP: #1064539)
114
115 -- Andres Rodriguez <andreserl@ubuntu.com> Mon, 08 Oct 2012 17:02:56 -0400
116
117maas (0.1+bzr1223+dfsg-0ubuntu1) quantal; urgency=low
118
119 * New upstream release. (LP: #1062518)
120
121 [ Julian Edwards ]
122 * Split packaging of 'maas' into maas-{region,cluster}-controller
123 - debian/control: Update accordingly.
124 - debian/*.install: Move files accordingly
125 - debian/*.{postinst,postrm,preinst}: Move files accordingly.
126 * Ensure isc-dhcp-server is disabled when installing maas-dhcp.
127 * Ensure maas-dns creates the maas user before trying to chown files.
128 * Make maas-cluster-controller autoconfigure itself when upgrading from the
129 old maas package. (LP: #1059416)
130 * Add missing prerm file for maas-cluster-controller so that .pyc files
131 are cleaned up. (LP: #1059973)
132
133 [ Raphaël Badin ]
134 * Install maas_local_celeryconfig.py in /etc/maas and symlink to
135 /usr/share/maas.
136 * debian/maas.postinst: Create rabbitmq celery user/vhost.
137 * debian/maas.postinst: Update BROKER_URL in maas_local_celeryconfig.py.
138 * Use maas_local_celeryconfig_cluster.py as the local celery
139 configuration file for the cluster worker.
140 * debian/maas-region-controller.maas-region-celery.upstart: Add region
141 worker upstart script.
142 * Rename cluster worker upstart script into
143 maas-cluster-controller.maas-clluster-celery.upstart.
144 * maas-cluster-controller.maas-celery.upstart: use "celeryconfig_cluster"
145 as the Celery config module.
146 * debian/maas-common.install: Install celeryconfig_common.py.
147 * debian/maas-cluster-controller.install: Install celeryconfig_cluster.py.
148 * debian/maas-region-controller.install: Install celeryconfig.py.
149 * Split celery config into cluster and region configs.
150 * Add region celeryd upstart config.
151 * Define CELERY_CONFIG_MODULE in
152 maas-cluster-controller.maas-cluster-celery.upstart
153
154 [ Jeroen Vermeulen ]
155 * Make maas_local_celery_config.py non-world readable.
156 * Make maas_local_celeryconfig_cluster.py non-world readable.
157 * Set root:maas ownership of local cluster config only *after*
158 the maas user/group have been created
159
160 [ Andres Rodriguez ]
161 * debian/maas.postinst:
162 - Always restart apache2.
163 - Handle upgrades for new upstream release.
164 - Handle upgrades for celery rabbitmq worker.
165 * Add binary package to install client tool.
166 - debian/extras/maas-cli: Add binary.
167 - debian/maas-cli.install: Add. Install maascli and apiclient.
168 - debian/control: Add binary package.
169 * debian/control:
170 - Depends on freeipmi-tools instead of ipmitool.
171 - Conflicts/Replaces on maas for python-maas-client.
172 - Depends on python-netifaces, python-lxml.
173 * Add python-maas-client binary package:
174 - debian/python-maas-client.install: Add. Install 'apiclient' python module.
175 - debian/control: Add package. python-django-maas and maas-cli now
176 Depend on it.
177 * debian/rules: Install maas-dhcp-server upstart job.
178 * debian/maas.postrm: Remove celery worker rabbitmq user and host.
179 * debian/extras/99-maas-sudoers: Add for maas-dhcp-server upstart job
180 instead of isc-dhcp-server (LP: #1055951)
181 * debian/maas-region-controller.postinst: Cleanup upgrade rules.
182 * debian/maas-cluster-controller.postinst: Fix 'local' usage.
183 * debian/maas-common.install: Install celeryconfig in appropriate location.
184 * debian/maas-cluster-controller.postrm: Add and delete maas user.
185 * debian/maas-dhcp.postinst: Stop isc-dhcp-server not isc_dhcp_server.
186 * debian/maas-region-controller.postinst:
187 - Always update passwords on upgrade. No longer check versioning. (LP: #1060094).
188 - Add MAAS server to allowed mirror in squid-deb-proxy
189 - Source dbconfig conf file for maas-region-controller on upgrade because
190 it writes a new config file and no longer preservers the previous password.
191 * debian/maas-cluster-controller.maas-cluster-celery.upstart: Remove set{uid/gid}.
192 * debian/maas-region-controller.install: Install maas-import-squashfs
193 * Handle removal of non existant files (LP: #1059556):
194 - debian/maintscript: Added to handle removal of conffiles.
195 - debian/control: Add Pre-depends and bump debhelper version.
196 * update po files for the templates.
197 * debian/extras/99-maas: Install in usr/share/maas/conf and symlink to the
198 appropriate etc dir.
199 * debian/maas-cluster-controller.config: Source debconf at the beginning of the
200 script. (LP: #1063857)
201 * debian/patches/99-temporary-fix-constraints.patch: Fix constraints maaping
202 when deploying with juju. Temporary until it gets merged upstream
203
204 [ Robie Basak ]
205 * Add maas-cluster-controller dependency on uuid-runtime, needed for uuidgen
206 by postinst.
207
208 [ Scott Moser ]
209 * debian/maas-dhcp.{install,apparmor,postrm} install apparmor profile into
210 /etc/apparmor.d/dhcpd.d (LP: #1049177), and update apparmor profile for
211 /usr/sbin/dhcpd on install/remove
212 * get the ip address for the dhcp server in config
213
214 [ Diogo Matsubara ]
215 * Add initial tests to be run by autotests:
216 - debian/control: XS-Testsuite: autopkgtest
217 - debian/tests/control: Add
218 - debian/tests/maas-package-test: Add
219 - tests/maas-integration.py: Add
220
221 -- Andres Rodriguez <andreserl@ubuntu.com> Mon, 08 Oct 2012 13:10:23 -0400
222
223maas (0.1+bzr971+dfsg-0ubuntu2) quantal; urgency=low
224
225 * debian/extras/99-maas-sudoers: Add missing rule for
226 maas-provision. (LP: #1046397)
227
228 -- Andres Rodriguez <andreserl@ubuntu.com> Wed, 05 Sep 2012 12:36:58 -0400
229
230maas (0.1+bzr971+dfsg-0ubuntu1) quantal; urgency=low
231
232 * New upstream release (LP: #1044367)
233
234 [ Julian Edwards ]
235 * Fix 02-pserv-config.patch to handle new default tftp directory
236
237 [ Andres Rodriguez ]
238 * debian/maas.postinst:
239 - include '/MAAS' for DEFAULT_MAAS_URL.(LP: #1033956)
240 - Update bzr version to safely upgrade.
241 * Add maas-dns package that configures DNS in MAAS (LP: #1030860)
242 * Remove cobbler related bits
243 - debian/maas.postinst: Drop cobbler configuration
244 - debian/maas.install: Drop installation of snippets/preseeds.
245 - debian/control:
246 + Drop Depends on maas-provision. (LP: #975473)
247 + Depends on bind9utils.
248 + Depends on python-lockfile (LP: #1037400)
249 Add necessary Conflicts/Replaces. Add conflicts to tftpd-hpa and dnsmasq.
250 Depends on isc-dhcp-server for maas-dhcp, and syslinux-common.
251 - debian/extras/maas-provision: Add missing "$@" (LP: #1040462)
252 - debian/patches:
253 + 02-pserv-config.patch: Updated. Do not patch cobbler related bits.
254 patch tftp config to default.
255 * maas-dhcp: Re-add to handle initial configuration of MAAS DHCP server.
256 * Allow restart of 'isc-dhcp-server' by adding a sudoers file:
257 - debian/extras/99-maas-sudoers: Added.
258 - debian/maas.install: Install 99-maas-sudoers
259 * Minor improvements on dbconfig-common handling:
260 - debian/maas.config: Only call dbc_go when scripts present.
261 - debian/maas.postrm: Only call dbc_go when config file exists.
262 * debian/maas.maas-celery.upstart: Enable Beat and set scheduler db file.
263 * debian/maas-dns.postinst: Set correct permissions. (LP: #1042868)
264 * debian/maas-dhcp.config:
265 - Ask whether we want to enable DHCP (LP: #1044229)
266 - Add debconf question for network interfaces
267 * debian/maas.prerm: Stop services before removing database (LP: #1044559)
268
269 -- Andres Rodriguez <andreserl@ubuntu.com> Thu, 02 Aug 2012 09:01:43 -0400
270
271maas (0.1+bzr777+dfsg-0ubuntu1) quantal-proposed; urgency=low
272
273 * New upstream release
274 * Only run 'maas' command as root. (LP: #974046)
275 - debian/extras/maas: Check id.
276 - debian/maas.install: Install in 'sbin'.
277 * debian/maas.postinst:
278 - restart apache2 after everything gets processed.
279 - Update version to handle upgrades.
280 * debian/extras/maas-provision: Add wrapper to access 'maasprovisiong'
281 command line.
282 * debian/patches/99_temporary_fix_path.patch: Dropped. No longer needed.
283
284 -- Andres Rodriguez <andreserl@ubuntu.com> Tue, 17 Jul 2012 08:28:36 -0400
285
286maas (0.1+bzr745+dfsg-0ubuntu2) quantal; urgency=low
287
288 * debian/control: Build-Dep on python-django instead of
289 python-django-configglue
290
291 -- Andres Rodriguez <andreserl@ubuntu.com> Tue, 17 Jul 2012 08:24:25 -0400
292
293maas (0.1+bzr745+dfsg-0ubuntu1) quantal; urgency=low
294
295 * New Upstream Release
296 * debian/patches:
297 - 99_power_fixes.patch: Dropped. Merged Upstream.
298 - 99_enums_js.patch: Dropped. No longer needed.
299 * Automatically build enums.js:
300 - debian/control: Build-Depends on python-django-configglue
301 - debian/rules: Build and install enums.js.
302 * debian/maas.postinst: Update version to handle upgrades
303
304 -- Andres Rodriguez <andreserl@ubuntu.com> Thu, 12 Jul 2012 16:34:11 -0400
305
306maas (0.1+bzr740+dfsg-0ubuntu1) quantal; urgency=low
307
308 * New upstream release
309 * debian/control: Depends on python-txtftp.
310 * debian/rules: Do not ship python-tx-tftp.
311 * debian/maas.postinst: Update version to upgrade successfully.
312 * debian/patches:
313 - 02-pserv-config.patch: Refreshed.
314 - 99_enums_js.patch: Updated.
315 - 99_power_fixes.patch: Added temporarily to enable IPMI
316 - 99_temporary_fix_path.patch: Added temporarily to not fail when
317 importing celeryconfig
318
319 -- Andres Rodriguez <andreserl@ubuntu.com> Tue, 03 Jul 2012 17:54:49 -0400
320
321maas (0.1+bzr709+dfsg-0ubuntu1) quantal; urgency=low
322
323 * New Upstream release
324 * debian/control:
325 - Depends on python-celery, python-tempita, libjs-yui3-{full,min},
326 libjs-raphael
327 * debian/maas.install:
328 - Install apiclient, celeryconfig.py, maas-import-pxe-files, preseeds_v2.
329 - Update to install various files from chroot, rather tha manually copy
330 them from the source.
331 * debian/maas.links: symlink celeryconfig.py
332 * debian/maas.maas-celery.upstart: Add job.
333 * debian/rules:
334 - Install celery upstart job.
335 - Do not install jslibs as packages are now used.
336 - Drop copying of maas_local_settings_sample.py as source now ships
337 a maas_local_settings.py
338 * debian/patches:
339 - 04-maas-http-fix.patch: Drop. Merged upstream.
340 - 01-fix-database-settings.patch: Refreshed.
341 - 99_enums_js.patch: Added until creation of enum.js / build process
342 is fixed.
343 * debian/maas.postinst: Update bzr version to correctly handle upgrades.
344
345 -- Andres Rodriguez <andreserl@ubuntu.com> Tue, 03 Jul 2012 17:42:37 -0400
346
347maas (0.1+bzr482+dfsg-0ubuntu1) precise; urgency=low
348
349 * New upstream release (Fixes LP: #981103)
350 * debian/maas.postinst:
351 - Make sure rabbitmq and postgresql are started on upgrade (LP: #981282)
352 - Handle upgrades from any lower than 0.1+bzr462+dfsg-0ubuntu1 to
353 correctly re-generate passwords, and not have db sync/migrate issues
354 as config has changed upstream.
355 - Correctly set Passwords for PSERV, otherwise it won't set new passwords.
356 * Allow MAAS_DEFAULT_URL reconfiguration. (LP: #980970)
357 - debian/maas.config: Add reconfigure validation to correctly allow it,
358 and ask a question.
359 - debian/maas.postinst: Reconfigure DEFAULT_MAAS_URL as well as cobbler
360 server and next_server for PXE/Provisioning.
361 - debian/maas.templates: Add debconf question and update info.
362 * Do not lose MAAS_DEFAULT_URL settings on upgrade (LP: #984309)
363 * debian/maas.postinst:
364 - Set cobbler password in between quotes (LP: #984427)
365 - Do not change permissions to maas.log (LP: #980915)
366 * no longer use maas-cloudimg2ephemeral, but rather use premade images
367 at http://maas.ubuntu.com
368
369 -- Andres Rodriguez <andreserl@ubuntu.com> Tue, 17 Apr 2012 23:44:46 -0700
370
371maas (0.1+bzr462+dfsg-0ubuntu1) precise; urgency=low
372
373 * New upstream release (LP: #980240)
374
375 [ Scott Moser ]
376 * add dependency on distro-info (LP: #949442)
377 * debian/control: add dependency on tgt for ephemeral iscsi environment
378
379 [ Andres Rodriguez ]
380 * Make package lintian clean:
381 - maas{-dhcp}.lintian-overrides: Add to make lintian clean.
382 - debian/control: Add missing dependencies; correct section and desc.
383 - debian/maas.postinst: Do not use absolute path for rabbitmqctl.
384 - debian/patches: Add headers to all patches.
385 * debian/maas-dhcp.postrm: Added to disable dnsmasq in cobbler on removal.
386 * debian/maas.config: Do not set a password with pwgen as it is not an
387 essential package; allow dbconfig-common to create a password instead by
388 creating an empty question. (LP: #977475)
389 * Run MAAS, pserv, txlongpoll as non-root user. (LP: #975436)
390 - debian/maas.postinst: Create user/group; set correct permissions for
391 directories.
392 - debian/maas.postrm: Remove user/group; restart apache2.
393 - debian/maas.maas-{pserv,txlongpoll}.upstart: Update to run as non-root
394 'maas' user.
395 * debian/patches/01-fix-database-settings.patch: Remove adding of PSERV_URL.
396 * debian/maas.postinst:
397 - Handle config file upgrade from versions lower than 0.1+bzr445+dfsg-0ubuntu1,
398 by creating new passwords and updating accordingly
399 - use local variables in functions.
400 - Handle maas tgt configuration for upgrades from 0.1+bzr459+dfsg-0ubuntu1.
401 * debian/extras/99-maas: Add squid-deb-proxy file to enable PPAs. (LP: #979383)
402 * debian/maas.install: Install missing commissioning-user-data script.
403
404 [ Dave Walker (Daviey) ]
405 * debian/patches/02-pserv-config.patch: Refreshed to apply to updated config.
406
407 [ Gavin Panella ]
408 * debian/maas.postinst: Update pserv.yaml and maas_local_settings.py to use
409 password.
410
411 -- Andres Rodriguez <andreserl@ubuntu.com> Thu, 12 Apr 2012 16:37:53 -0400
412
413maas (0.1+bzr415+dfsg-0ubuntu2) precise; urgency=low
414
415 * debian/maas-dhcp.{config,postinst}:
416 - Fix not setting new values on fresh install. (LP: #975321)
417 - Fix unsetting domain, otherwise, even if disabled, it will always be set.
418 * debian/control: Depends on maas for maas-dhcp.
419
420 -- Andres Rodriguez <andreserl@ubuntu.com> Fri, 06 Apr 2012 15:30:44 -0400
421
422maas (0.1+bzr415+dfsg-0ubuntu1) precise; urgency=low
423
424 * debian/control: Update package descriptions; Suggests maas-dhcp for maas
425 and add a maas-dhcp binary.
426 * Add maas-dhcp package to configure a DHCP server.
427 - debian/maas-dhcp.config: Add to ask debconf questions about range,
428 gateway, and domain.
429 - debian/maas-dhcp.postinst: Handle update of config values.
430 - debian/maas-dhcp.templates: Debconf questions.
431 * debian/po: Update for templates.
432 * Add message telling MAAS URL after installation.
433 - debian/maas.templates: Add message.
434 - debian/maas.postinst: Display message.
435 * debian/maas.config: Hide dbconfig-install question.
436
437 -- Andres Rodriguez <andreserl@ubuntu.com> Wed, 04 Apr 2012 14:47:13 -0400
438
439maas (0.1+bzr400+dfsg-0ubuntu1) precise; urgency=low
440
441 * debian/patches/{02-pserv-config,03-txlongpoll-config}.patch: Refreshed.
442 * debian/maas.install: Install maas-gc cronjob.
443 * Add apport hook.
444 - debian/maas.apport: Add hook.
445 - debian/rules: Install with apport.
446 * debian/maas.logrotate: Add logrotate for txlongpoll and pserv logs.
447 * Create 'var/lib/media/maas/storage' on postinst to have right permissions.
448 - debian/maas.dirs: Drop dir creation.
449 - debian/maas.postinst: Create dir with correct permissions.
450 - debian/maas.postrm: Remove dir on purge.
451
452 -- Andres Rodriguez <andreserl@ubuntu.com> Tue, 03 Apr 2012 14:50:34 -0400
453
454maas (0.1+bzr378+dfsg-0ubuntu1) precise; urgency=low
455
456 * maas.dirs: Create var/lib/maas/media/storage for juju storage.
457 * maas.postinst:
458 - Give correct permissions to above dir.
459 - stop apache2 before db upgrade, and restart after.
460
461 -- Andres Rodriguez <andreserl@ubuntu.com> Thu, 29 Mar 2012 19:28:13 -0400
462
463maas (0.1+bzr363+dfsg-0ubuntu1) precise; urgency=low
464
465 [ Dave Walker (Daviey) ]
466 * debian/control: Add openssh-server as a Recommends, and wrap-and-sort.
467
468 [ Andres Rodriguez ]
469 * debian/maas.postinst:
470 - Do not start apache with apache2ctl. Use invoke-rc.d instead to not
471 fail in the installer.
472 - For start of postgresql before creating the DB, otherwise it will
473 fail in the installer.
474 - Add check of invoke-rc.d for syslog.
475 - Add check of invoke-rc.d for rabbitmq-server; Add check for rabbitmqctl
476 - Add db_stop, in case invoke-rc.d fails.
477 * debian/control: Tight python-django-maas dependency.
478 * debian/postrm: Add check for rabbitmqctl.
479 * debian/maas.maas-txlongpoll.upstart: Create rabbitmq longpoll user/vhost
480 and set permissions if they don't exist. Start on rabbitmq-server-running.
481
482 -- Andres Rodriguez <andreserl@ubuntu.com> Tue, 27 Mar 2012 14:49:56 -0400
483
484maas (0.1+bzr338+dfsg-0ubuntu1) precise; urgency=low
485
486 [ Dave Walker (Daviey) ]
487 * d/patches/03-txlongpoll-config.patch: Resolve typo error from prior patch.
488 - LP: #961031
489
490 [ Andres Rodriguez ]
491 * debian/maas.config: Don't allow reconfigure.
492 * debian/maas.postinst: Don't allow reconfigure. Run sync/migrate db on
493 all upgrades.
494
495 [ Scott Moser ]
496 * add rsylog config for logging node boots (LP: 960149)
497
498 -- Andres Rodriguez <andreserl@ubuntu.com> Thu, 22 Mar 2012 10:56:58 -0400
499
500maas (0.1+bzr315+dfsg-0ubuntu1) precise; urgency=low
501
502 * New upstream snapshot.
503
504 [ Dave Walker ]
505 * debian/maas.postinst: Do not import ISO's at install time.
506 * debian/control:
507 - Drop run-one, it's not a requirement and currently in universe.
508 - Drop python-setproctitle, no longer required.
509
510 [ Andres Rodriguez ]
511 * debian/control: Depends on python-avahi, python-dbus, and avahi-daemon.
512 * debian/maas.postinst:
513 - Only syncdb if dbconfig db creation was selected.
514 - Set rabbitmq/longpoll settings
515 * debian/patches/03-txlongpoll-config.patch: Updated broker settings for
516 rabbitmq.
517
518 -- Andres Rodriguez <andreserl@ubuntu.com> Tue, 20 Mar 2012 20:10:58 -0400
519
520maas (0.1+bzr300+dfsg-0ubuntu1) precise; urgency=low
521
522 * debian/patches:
523 - 01-fix-database-settings.patch: Update PSERV_URL port.
524 - 02-pserv-config.patch: Update, and set 'maas' as username.
525 - 03-longpoll-config.patch: Update.
526 * debian/maas.install: Install preseeds and snippets.
527 * debian/maas.postinst:
528 - Set password for 'maas' cobbler username (in pserv and cobbler).
529 - Set DEFAULT_MAAS_URL to IP of interface with default gateway.
530
531 -- Andres Rodriguez <andreserl@ubuntu.com> Fri, 16 Mar 2012 14:59:16 -0400
532
533maas (0.1+bzr295+dfsg-0ubuntu2) precise; urgency=low
534
535 * debian/patches:
536 - 01-fix-database-settings.patch: Update to set PSERV_URL.
537 - 02-pserv-config.patch: Set port to 8001.
538 * debian/maas.postinst: Run maas-import-isos on install.
539 * debian/control: Depends on rabbitmq-server.
540
541 -- Andres Rodriguez <andreserl@ubuntu.com> Thu, 15 Mar 2012 18:14:08 -0400
542
543maas (0.1+bzr295+dfsg-0ubuntu1) precise; urgency=low
544
545 * debian/maas.upstart: Specify pidfile and conffile.
546 * debian/maas.postinst:
547 - Only run syncdb if dbconfig postinst file exists.
548 - Fix file permissions.
549 * debian/maas.{postrm,prerm}: Add dbconfig-common support.
550 * Add txlongpoll support for packaging:
551 - debian/control: Depends on python-txlongpoll.
552 - debian/maas.maas-longpoll.upstart: Added to start txlongpoll.
553 - debian/maas.install: Install txlongpoll.yaml
554 * debian/extras/maas: Improvements.
555 * debian/maas.maas.upstart: Moved from debian/maas.upstart.
556 * debian/maas.postinst: Touch logfile to set correct permissions (LP: #955400)
557 * debian/maas.logrotate: Add.
558 * debian/patches/03-txlongpoll-config.patch: Add default settings.
559 * debian/maas.config: Only run dbconfig-common on configure/reconfigure.
560 * Install maas_local_settings.py in /etc/maas and symlink to usr/share/maas
561 * Update references from MaaS to MAAS.
562 * Remove podebconf as templates no longer exist.
563 - debian/po: Remove.
564 - debian/control: Drop Build-Depends on po-debconf
565
566 -- Andres Rodriguez <andreserl@ubuntu.com> Thu, 15 Mar 2012 15:28:14 -0400
567
568maas (0.1+bzr266+dfsg-0ubuntu1) precise; urgency=low
569
570 * Remove support for squid3 and use squid-deb-proxy instead.
571 * debian/extras/maas: Add to handle syncdb and creation of admin user.
572 * Add debconf questions to ask for user/pass:
573 - debian/maas.{template,config}: Add
574 - debian/maas.postinst: Ask debconf questions.
575 - debian/po: Add translation templates.i
576 * debian/maas.postinst: Enable wsgi module; drop squid3 steps.
577 * debian/maas.postrm: removed.
578 * debian/patches/01-fix-database-settings.patch: Custom database settings
579 and static files path.
580 * debian/{rules,maas.install}: Install maas static files in
581 'usr/share/maas/web/static'.
582 * Integrate cobbler:
583 - debian/maas.install: Install pserv twisted plugin, and config.
584 - debian/maas.upstart: Created to start plugin daemon.
585 - debian/patches/02-pserv-config.patch: Custom pserv config.
586 * Integrate dbconfig-common:
587 - debian/maas.config: Added and default user/pass and database.
588 - debian/maas.{postinst,postrm}: Added handling for dbconfig-common
589 * debian/control: Depends on python-convoy.
590 * debian/rules: Update path to removal of dsfg files.
591 * debian/patches/01-fix-database-settings.patch: Updated.
592
593 -- Andres Rodriguez <andreserl@ubuntu.com> Tue, 13 Mar 2012 14:31:50 -0400
594
595maas (0.1+bzr232+dfsg-0ubuntu1) precise; urgency=low
596
597 * New upstream snapshot.
598
599 [ Dave Walker ]
600 * debian/control:
601 - Changed depends from psycopg2 to python-psycopg2 and dropped versioning.
602 - LP: #937982
603
604 [ Andres Rodriguez ]
605 * debian/maas.install: Install maas-import-isos and related files.
606 * Integrate squid3 as proxy solution:
607 - debian/extras/squid.conf: Added
608 - debian/control: Depend on squid3.
609 - debian/maas.{postinst,postrm}: Handle installation/removal of custom
610 squid config file.
611 * Split into different binary packages (maas,python-django-maas).
612 - debian/maas.postinst: Handle the apache2 configuration.
613
614 -- Andres Rodriguez <andreserl@ubuntu.com> Wed, 07 Mar 2012 12:46:17 -0500
615
616maas (0.1+bzr171+dfsg-0ubuntu1) precise; urgency=low
617
618 * New upstream snapshot, post 0.1 release.
619 * debian/control:
620 - Drop depends on rabbitmq-server, no longer required.
621 * debian/watch: Introduced watch file.
622
623 -- Dave Walker (Daviey) <DaveWalker@ubuntu.com> Thu, 23 Feb 2012 13:08:12 +0000
624
625maas (0.1~bzr146+dfsg-0ubuntu1) precise; urgency=low
626
627 * Initial release
628
629 -- Julian Edwards <julian.edwards@canonical.com> Thu, 16 Jan 2012 15:29:07 +0000
0630
=== added file 'debian/compat'
--- debian/compat 1970-01-01 00:00:00 +0000
+++ debian/compat 2012-11-13 12:12:21 +0000
@@ -0,0 +1,1 @@
17
02
=== added file 'debian/control'
--- debian/control 1970-01-01 00:00:00 +0000
+++ debian/control 2012-11-13 12:12:21 +0000
@@ -0,0 +1,275 @@
1Source: maas
2Section: net
3Priority: optional
4Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
5Build-Depends: debhelper (>= 8.1.0~),
6 dh-apport,
7 po-debconf,
8 python (>= 2.7),
9 python-distribute,
10 python-django
11Standards-Version: 3.9.3
12X-Python-Version: >= 2.7
13XS-Testsuite: autopkgtest
14Homepage: https://launchpad.net/maas
15
16Package: maas
17Architecture: all
18Pre-Depends: ${misc:Pre-Depends}
19Depends: maas-cluster-controller, maas-region-controller, python-django-maas
20Conflicts: dnsmasq, maas-provision, tftpd-hpa
21Replaces: maas-provision
22Description: Ubuntu MAAS Server
23 Ubuntu MAAS Server is the successor to Orchestra. It offers a
24 nice UI to provision your Ubuntu servers. Each physical server
25 (“node”) will be commissioned automatically on first boot.
26 During the commissioning process administrators are able to
27 configure hardware settings manually before an automated smoke
28 test and burn-in test are done. Once commissioned, a node can
29 be deployed on demand by name, or allocated to a queue for
30 dynamic allocation to services being deployed on this MAAS.
31 .
32 This package installs a complete MAAS service on a single machine.
33
34Package: maas-common
35Architecture: all
36Depends: ${python:Depends}
37Conflicts: maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 )
38Replaces: maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 )
39Description: Ubuntu MAAS Server
40 Ubuntu MAAS Server is the successor to Orchestra. It offers a
41 nice UI to provision your Ubuntu servers. Each physical server
42 (“node”) will be commissioned automatically on first boot.
43 During the commissioning process administrators are able to
44 configure hardware settings manually before an automated smoke
45 test and burn-in test are done. Once commissioned, a node can
46 be deployed on demand by name, or allocated to a queue for
47 dynamic allocation to services being deployed on this MAAS.
48 .
49 This package contains common files
50
51Package: maas-region-controller
52Architecture: all
53Depends: apache2,
54 avahi-daemon,
55 dbconfig-common,
56 distro-info,
57 libapache2-mod-wsgi,
58 libjs-raphael,
59 libjs-yui3-full,
60 libjs-yui3-min,
61 maas-common (= ${binary:Version}),
62 postgresql-9.1,
63 pwgen,
64 python-django,
65 python-django-maas (= ${binary:Version}),
66 python-django-piston,
67 python-django-south,
68 python-maas-provisioningserver (= ${binary:Version}),
69 rabbitmq-server,
70 rsyslog,
71 squid-deb-proxy,
72 ${misc:Depends},
73 ${python:Depends}
74Recommends: openssh-server
75Suggests: maas-dns
76Conflicts: maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 )
77Replaces: maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 )
78Description: Ubuntu MAAS Server
79 Ubuntu MAAS Server is the successor to Orchestra. It offers a
80 nice UI to provision your Ubuntu servers. Each physical server
81 (“node”) will be commissioned automatically on first boot.
82 During the commissioning process administrators are able to
83 configure hardware settings manually before an automated smoke
84 test and burn-in test are done. Once commissioned, a node can
85 be deployed on demand by name, or allocated to a queue for
86 dynamic allocation to services being deployed on this MAAS.
87 .
88 This package installs the region controller services: the web
89 UI and the database.
90
91Package: python-maas-provisioningserver
92Architecture: all
93Depends: python-celery,
94 python-formencode,
95 python-lockfile,
96 python-lxml,
97 python-maas-client,
98 python-netifaces,
99 python-oops,
100 python-oops-amqp,
101 python-oops-datedir-repo,
102 python-oops-twisted,
103 python-pyparsing,
104 python-tempita,
105 python-twisted-core,
106 python-twisted-web,
107 python-txamqp,
108 python-txtftp,
109 python-yaml,
110 python-zope.interface,
111 ${misc:Depends},
112 ${python:Depends}
113Conflicts: python-django-maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 ), maas-cluster-controller (<= 0.1+bzr1243+dfsg-0ubuntu3)
114Replaces: python-django-maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 ), maas-cluster-controller (<= 0.1+bzr1243+dfsg-0ubuntu3)
115Description: Ubuntu MAAS Server
116 Ubuntu MAAS Server is the successor to Orchestra. It offers a
117 nice UI to provision your Ubuntu servers. Each physical server
118 (“node”) will be commissioned automatically on first boot.
119 During the commissioning process administrators are able to
120 configure hardware settings manually before an automated smoke
121 test and burn-in test are done. Once commissioned, a node can
122 be deployed on demand by name, or allocated to a queue for
123 dynamic allocation to services being deployed on this MAAS.
124 .
125 This package contains the provisioning server libraries.
126
127Package: maas-cli
128Architecture: all
129Depends: python-bzrlib,
130 python-httplib2,
131 python-maas-client (= ${binary:Version}),
132 python-oauth,
133 ${misc:Depends},
134 ${python:Depends}
135Description: Ubuntu MAAS Client Tool
136 Ubuntu MAAS Server is the successor to Orchestra. It offers a
137 nice UI to provision your Ubuntu servers. Each physical server
138 (“node”) will be commissioned automatically on first boot.
139 During the commissioning process administrators are able to
140 configure hardware settings manually before an automated smoke
141 test and burn-in test are done. Once commissioned, a node can
142 be deployed on demand by name, or allocated to a queue for
143 dynamic allocation to services being deployed on this MAAS.
144 .
145 This package contains the client command line tool.
146
147Package: python-maas-client
148Architecture: all
149Depends: python-oauth, ${misc:Depends}, ${python:Depends}
150Conflicts: maas (<= 0.1+bzr971+dfsg-0ubuntu2 )
151Replaces: maas (<= 0.1+bzr971+dfsg-0ubuntu2 )
152Description: Ubuntu MAAS API Client - (python files)
153 Ubuntu MAAS Server is the successor to Orchestra. It offers a
154 nice UI to provision your Ubuntu servers. Each physical server
155 (“node”) will be commissioned automatically on first boot.
156 During the commissioning process administrators are able to
157 configure hardware settings manually before an automated smoke
158 test and burn-in test are done. Once commissioned, a node can
159 be deployed on demand by name, or allocated to a queue for
160 dynamic allocation to services being deployed on this MAAS.
161 .
162 This package contains the client API Python modules.
163
164Package: maas-cluster-controller
165Architecture: all
166Depends: bind9utils,
167 freeipmi-tools,
168 maas-cli (=${binary:Version}),
169 maas-common (=${binary:Version}),
170 python-celery,
171 python-httplib2,
172 python-lockfile,
173 python-maas-provisioningserver (=${binary:Version}),
174 python-netaddr,
175 python-oauth,
176 python-tempita,
177 python-twisted,
178 python-zope.interface,
179 rsyslog,
180 syslinux-common,
181 tgt,
182 uuid-runtime,
183 wget,
184 ${misc:Depends},
185 ${python:Depends}
186Suggests: maas-dhcp (= ${binary:Version})
187Conflicts: maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 )
188Replaces: maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 )
189Description: Ubuntu MAAS Cluster Controller
190 Ubuntu MAAS Server is the successor to Orchestra. It offers a
191 nice UI to provision your Ubuntu servers. Each physical server
192 (“node”) will be commissioned automatically on first boot.
193 During the commissioning process administrators are able to
194 configure hardware settings manually before an automated smoke
195 test and burn-in test are done. Once commissioned, a node can
196 be deployed on demand by name, or allocated to a queue for
197 dynamic allocation to services being deployed on this MAAS.
198 .
199 This package contains the cluster controller, which is
200 responsible for controlling remote DHCP/TFTP instances on their
201 own subnets.
202
203Package: python-django-maas
204Section: python
205Architecture: all
206Depends: python-avahi,
207 python-celery,
208 python-convoy,
209 python-dbus,
210 python-lockfile,
211 python-lxml,
212 python-maas-client (= ${binary:Version}),
213 python-netaddr,
214 python-oops,
215 python-oops-amqp,
216 python-oops-datedir-repo,
217 python-oops-twisted,
218 python-oops-wsgi,
219 python-psycopg2,
220 python-sphinx,
221 python-tempita,
222 python-twisted,
223 python-txamqp,
224 python-txlongpoll,
225 python-zope.interface,
226 ${misc:Depends},
227 ${python:Depends}
228Description: Ubuntu MAAS Server - (django files)
229 Ubuntu MAAS Server is the successor to Orchestra. It offers a
230 nice UI to provision your Ubuntu servers. Each physical server
231 (“node”) will be commissioned automatically on first boot.
232 During the commissioning process administrators are able to
233 configure hardware settings manually before an automated smoke
234 test and burn-in test are done. Once commissioned, a node can
235 be deployed on demand by name, or allocated to a queue for
236 dynamic allocation to services being deployed on this MAAS.
237 .
238 This package contains the Django files.
239
240Package: maas-dhcp
241Architecture: all
242Depends: isc-dhcp-server, ${misc:Depends}
243Conflicts: maas-dhcp (<= 0.1+bzr777+dfsg-0ubuntu1)
244Replaces: maas-dhcp (<= 0.1+bzr777+dfsg-0ubuntu1)
245Description: Ubuntu MAAS Server - DHCP Configuration (meta-package)
246 Ubuntu MAAS Server is the successor to Orchestra. It offers a
247 nice UI to provision your Ubuntu servers. Each physical server
248 (“node”) will be commissioned automatically on first boot.
249 During the commissioning process administrators are able to
250 configure hardware settings manually before an automated smoke
251 test and burn-in test are done. Once commissioned, a node can
252 be deployed on demand by name, or allocated to a queue for
253 dynamic allocation to services being deployed on this MAAS.
254 .
255 This package configures a DHCP that can be used with MAAS.
256
257Package: maas-dns
258Architecture: all
259Depends: bind9,
260 maas-region-controller (= ${binary:Version}),
261 maas-dhcp (= ${binary:Version}),
262 ${misc:Depends}
263Conflicts: maas-dhcp (<= 0.1+bzr777+dfsg-0ubuntu1)
264Replaces: maas-dhcp (<= 0.1+bzr777+dfsg-0ubuntu1)
265Description: Ubuntu MAAS Server - DNS configuration (metapackage)
266 Ubuntu MAAS Server is the successor to Orchestra. It offers a
267 nice UI to provision your Ubuntu servers. Each physical server
268 (“node”) will be commissioned automatically on first boot.
269 During the commissioning process administrators are able to
270 configure hardware settings manually before an automated smoke
271 test and burn-in test are done. Once commissioned, a node can
272 be deployed on demand by name, or allocated to a queue for
273 dynamic allocation to services being deployed on this MAAS.
274 .
275 This package configures a DNS that can be used with MAAS.
0276
=== added file 'debian/copyright'
--- debian/copyright 1970-01-01 00:00:00 +0000
+++ debian/copyright 2012-11-13 12:12:21 +0000
@@ -0,0 +1,25 @@
1Format: http://dep.debian.net/deps/dep5
2Upstream-Name: maas
3Source: https://launchpad.net/maas
4
5Files: *
6Copyright: 2012 Canonical Ltd.
7License: AGPL-3.0+
8
9Files: debian/*
10Copyright: 2012 Canonical Ltd.
11License: AGPL-3.0+
12
13License: AGPL-3.0+
14 This program is free software: you can redistribute it and/or modify
15 it under the terms of the GNU Affero General Public License as
16 published by the Free Software Foundation, either version 3 of the
17 License, or (at your option) any later version.
18 .
19 This program is distributed in the hope that it will be useful,
20 but WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 GNU Affero General Public License for more details.
23 .
24 You should have received a copy of the GNU Affero General Public License
25 along with this program. If not, see <http://www.gnu.org/licenses/>.
026
=== added directory 'debian/extras'
=== added file 'debian/extras/20-maas.conf'
--- debian/extras/20-maas.conf 1970-01-01 00:00:00 +0000
+++ debian/extras/20-maas.conf 2012-11-13 12:12:21 +0000
@@ -0,0 +1,32 @@
1# Enable the udp server for installation logging
2$ModLoad imudp
3$UDPServerRun 514
4$ModLoad imtcp # load TCP listener
5
6# The following section (certificates) was copied from orchestra, but is
7# not used here. In the future, if we needed secure ssl, then re-enable.
8# These files were created in the orchestra-logging-server's postinst
9#
10## make gtls driver the default
11#$DefaultNetstreamDriver gtls
12#
13## certificate files
14#$DefaultNetstreamDriverCAFile /var/lib/maas/ssl-cert-orchestra-ca.pem
15#$DefaultNetstreamDriverCertFile /var/lib/maas/.ssl/ssl-cert-orchestra.pem
16#$DefaultNetstreamDriverKeyFile /var/lib/maas/.ssl/ssl-cert-orchestra-pk.pem
17#
18#$InputTCPServerStreamDriverMode 1 # run driver in TLS-only mode
19#$InputTCPServerStreamDriverAuthMode anon # client is NOT authenticated
20#$InputTCPServerRun 10514 # start up listener at port 10514
21
22# Reduce message repetition
23$RepeatedMsgReduction on
24##$RepeatedMsgContainsOrigionalMsg on
25
26# Message templating
27$template MAASboot,"/var/log/maas/rsyslog/%HOSTNAME%/%$YEAR%/%$MONTH%/%$DAY%/messages"
28
29:fromhost-ip, !isequal, "127.0.0.1" ?MAASboot
30# Stop messages that came from anywhere else from going into other places
31# like /var/log/syslog. If you want to see these messages there, then comment below
32& ~
033
=== added file 'debian/extras/99-maas'
--- debian/extras/99-maas 1970-01-01 00:00:00 +0000
+++ debian/extras/99-maas 2012-11-13 12:12:21 +0000
@@ -0,0 +1,4 @@
1# /etc/squid-deb-proxy/mirror-dstdomain.acl.d/99-maas
2#
3# Enable launchpad personal package archives for squid-deb-proxy
4ppa.launchpad.net
05
=== added file 'debian/extras/99-maas-sudoers'
--- debian/extras/99-maas-sudoers 1970-01-01 00:00:00 +0000
+++ debian/extras/99-maas-sudoers 2012-11-13 12:12:21 +0000
@@ -0,0 +1,3 @@
1maas ALL= NOPASSWD: /usr/sbin/service maas-dhcp-server restart
2maas ALL= NOPASSWD: /usr/sbin/maas-provision
3maas ALL= NOPASSWD: /usr/sbin/maas-import-pxe-files
04
=== added file 'debian/extras/isc-dhcp-server.override'
--- debian/extras/isc-dhcp-server.override 1970-01-01 00:00:00 +0000
+++ debian/extras/isc-dhcp-server.override 2012-11-13 12:12:21 +0000
@@ -0,0 +1,1 @@
1manual
02
=== added file 'debian/extras/maas'
--- debian/extras/maas 1970-01-01 00:00:00 +0000
+++ debian/extras/maas 2012-11-13 12:12:21 +0000
@@ -0,0 +1,8 @@
1#!/bin/sh
2if [ "$(id -u)" != "0" ]; then
3 echo "This utility may only be run as root." 1>&2
4 exit 1
5fi
6export PYTHONPATH="/usr/share/maas${PYTHONPATH:+:}${PYTHONPATH}"
7export DJANGO_SETTINGS_MODULE="maas.settings"
8exec /usr/bin/django-admin "$@"
09
=== added file 'debian/extras/maas-cli'
--- debian/extras/maas-cli 1970-01-01 00:00:00 +0000
+++ debian/extras/maas-cli 2012-11-13 12:12:21 +0000
@@ -0,0 +1,2 @@
1#!/bin/sh
2exec python -m maascli "$@"
03
=== added file 'debian/extras/maas-provision'
--- debian/extras/maas-provision 1970-01-01 00:00:00 +0000
+++ debian/extras/maas-provision 2012-11-13 12:12:21 +0000
@@ -0,0 +1,7 @@
1#!/bin/sh
2if [ "$(id -u)" != "0" ]; then
3 echo "This utility may only be run as root." 1>&2
4 exit 1
5fi
6export PYTHONPATH="/usr/share/maas${PYTHONPATH:+:}${PYTHONPATH}"
7exec /usr/bin/python -m provisioningserver "$@"
08
=== added file 'debian/extras/maas-region-celeryd'
--- debian/extras/maas-region-celeryd 1970-01-01 00:00:00 +0000
+++ debian/extras/maas-region-celeryd 2012-11-13 12:12:21 +0000
@@ -0,0 +1,50 @@
1#!/usr/bin/python
2import os
3from grp import getgrnam
4from pwd import getpwnam
5
6def start_celery(args):
7 uid = getpwnam(args.user).pw_uid
8 gid = getgrnam(args.group).gr_gid
9
10 env = dict(os.environ, PYTHONPATH="/usr/share/maas")
11
12 command = [
13 'celeryd',
14 '--logfile=%s' % args.logfile,
15 '--schedule=%s' % args.schedule,
16 '--loglevel=INFO',
17 '--beat',
18 '--queues=celery,master',
19 ]
20
21 # Change gid first, just in case changing the uid might deprive
22 # us of the privileges required to setgid.
23 os.setgid(gid)
24 os.setuid(uid)
25
26 os.execvpe(command[0], command, env=env)
27
28def main():
29 import argparse
30 parser = argparse.ArgumentParser(
31 description='MAAS celery daemon config options')
32 parser.add_argument(
33 '--user', '-u', metavar='USER', default='maas',
34 help="System user identity that should run the cluster controller.")
35 parser.add_argument(
36 '--group', '-g', metavar='GROUP', default='maas',
37 help="System group that should run the cluster controller.")
38 parser.add_argument(
39 '--logfile', '-l', metavar='LOGFILE', default='/var/log/maas/celery-region.log',
40 help="Location of the logfile.")
41 parser.add_argument(
42 '--schedule', '-s', metavar='SCHEDULE', default='/var/lib/maas/celerybeat-region-schedule',
43 help="Location of the beat schedule file.")
44
45 args = args = parser.parse_args()
46
47 start_celery(args)
48
49if __name__ == '__main__':
50 main()
051
=== added file 'debian/extras/maas_remote_syslog_compress'
--- debian/extras/maas_remote_syslog_compress 1970-01-01 00:00:00 +0000
+++ debian/extras/maas_remote_syslog_compress 2012-11-13 12:12:21 +0000
@@ -0,0 +1,2 @@
1# Compress log files not changed in more than 48 hours:
230 4 * * * root find /var/log/maas/rsyslog -type f -mtime +2 -exec bzip2 '{}' \;
03
=== added file 'debian/maas-cli.install'
--- debian/maas-cli.install 1970-01-01 00:00:00 +0000
+++ debian/maas-cli.install 2012-11-13 12:12:21 +0000
@@ -0,0 +1,2 @@
1debian/extras/maas-cli usr/bin
2debian/tmp/usr/lib/python*/dist-packages/maascli
03
=== added file 'debian/maas-cluster-controller.config'
--- debian/maas-cluster-controller.config 1970-01-01 00:00:00 +0000
+++ debian/maas-cluster-controller.config 2012-11-13 12:12:21 +0000
@@ -0,0 +1,31 @@
1#!/bin/sh -e
2
3. /usr/share/debconf/confmodule
4db_version 2.0
5
6# Only ask for new installations and reconfiguring.
7# XXX Fix to not ask when installing from the CD.
8if ([ "$1" = "configure" ] && [ -z "$2" ]); then
9
10 db_get maas-cluster-controller/maas-url || true
11 if [ -n "$RET" ]; then
12 db_set maas-cluster-controller/maas-url "$RET"
13 else
14 # Attempt to pre-populate if installing on the region controller.
15 if [ -e /etc/maas/maas_local_settings.py ]; then
16 url=$(awk '$1 == "DEFAULT_MAAS_URL" { split($0,array,"\"")} END{print array[2] }' /etc/maas/maas_local_settings.py)
17 db_set maas-cluster-controller/maas-url "$url"
18 else
19 # Will only get here if dbconf value not already set, or
20 # /etc/maas/maas_local_settings.py doesn't exist.
21 db_input medium maas-cluster-controller/maas-url || true
22 db_go
23 fi
24 fi
25fi
26
27if [ "$1" = "reconfigure" ]; then
28 db_input high maas-cluster-controller/maas-url || true
29 db_go
30fi
31#DEBHELPER#
032
=== added file 'debian/maas-cluster-controller.dirs'
--- debian/maas-cluster-controller.dirs 1970-01-01 00:00:00 +0000
+++ debian/maas-cluster-controller.dirs 2012-11-13 12:12:21 +0000
@@ -0,0 +1,1 @@
1etc/maas
02
=== added file 'debian/maas-cluster-controller.install'
--- debian/maas-cluster-controller.install 1970-01-01 00:00:00 +0000
+++ debian/maas-cluster-controller.install 2012-11-13 12:12:21 +0000
@@ -0,0 +1,27 @@
1# Install twisted plugins
2twisted/plugins/maasps.py usr/share/pyshared/twisted/plugins
3
4# Install PSERV config file
5debian/tmp/etc/maas/pserv.yaml
6
7# Install cluster config file
8debian/tmp/etc/maas/maas_cluster.conf
9
10# Install celery config file
11debian/tmp/usr/share/maas/celeryconfig_cluster.py
12
13# Install local celery cluster config file
14debian/tmp/etc/maas/maas_local_celeryconfig_cluster.py
15
16# Install maas-import-pxe-files and related files
17debian/tmp/usr/sbin/maas-import-pxe-files
18etc/cron.d/maas-import-pxe-files
19man/maas-import-pxe-files.8 usr/share/man/man8
20debian/tmp/etc/maas/import_pxe_files
21debian/tmp/usr/sbin/maas-import-ephemerals
22debian/tmp/etc/maas/import_ephemerals
23debian/tmp/etc/maas/commissioning-user-data
24
25# Install all other stuff
26debian/extras/99-maas-sudoers etc/sudoers.d
27debian/extras/isc-dhcp-server.override etc/init
028
=== added file 'debian/maas-cluster-controller.links'
--- debian/maas-cluster-controller.links 1970-01-01 00:00:00 +0000
+++ debian/maas-cluster-controller.links 2012-11-13 12:12:21 +0000
@@ -0,0 +1,1 @@
1etc/maas/maas_local_celeryconfig_cluster.py usr/share/maas/maas_local_celeryconfig_cluster.py
02
=== added file 'debian/maas-cluster-controller.logrotate'
--- debian/maas-cluster-controller.logrotate 1970-01-01 00:00:00 +0000
+++ debian/maas-cluster-controller.logrotate 2012-11-13 12:12:21 +0000
@@ -0,0 +1,9 @@
1/var/log/maas/pserv.log {
2 rotate 5
3 weekly
4 compress
5 missingok
6 postrotate
7 [ -r /var/run/maas-pserv.pid ] && kill -s USR2 $(cat /var/run/maas-pserv.pid) || true
8 endscript
9}
010
=== added file 'debian/maas-cluster-controller.maas-cluster-celery.upstart'
--- debian/maas-cluster-controller.maas-cluster-celery.upstart 1970-01-01 00:00:00 +0000
+++ debian/maas-cluster-controller.maas-cluster-celery.upstart 2012-11-13 12:12:21 +0000
@@ -0,0 +1,26 @@
1# maas-cluster-controller - provisioning service
2#
3# MAAS Cluster Controller Service
4
5description "MAAS Cluster Controller"
6author "Julian Edwards <julian.edwards@canonical.com>"
7
8start on filesystem and net-device-up
9stop on runlevel [016]
10
11env CONFIG_FILE=/etc/maas/maas_cluster.conf
12# Use cluster config.
13env CELERY_CONFIG_MODULE="celeryconfig_cluster"
14
15pre-start script
16 if [ ! -f $CONFIG_FILE ]; then
17 echo "$CONFIG_FILE does not exist. Aborting."
18 stop
19 exit 0
20 fi
21end script
22
23script
24 . $CONFIG_FILE # sets MAAS_URL
25 exec /usr/sbin/maas-provision start-cluster-controller $MAAS_URL -u maas -g maas
26end script
027
=== added file 'debian/maas-cluster-controller.maas-pserv.upstart'
--- debian/maas-cluster-controller.maas-pserv.upstart 1970-01-01 00:00:00 +0000
+++ debian/maas-cluster-controller.maas-pserv.upstart 2012-11-13 12:12:21 +0000
@@ -0,0 +1,14 @@
1# maas-pserv - provisioning service
2#
3# MAAS Provisioning Service
4
5description "MAAS"
6author "Andres Rodriguez <andres.rodriguez@canonical.com>"
7
8start on filesystem and net-device-up
9stop on runlevel [016]
10
11respawn
12
13# To add options to your daemon, edit the line below:
14exec /usr/bin/twistd -n --uid=maas --gid=maas --pidfile=/run/maas-pserv.pid --logfile=/dev/null maas-pserv --config-file=/etc/maas/pserv.yaml
015
=== added file 'debian/maas-cluster-controller.postinst'
--- debian/maas-cluster-controller.postinst 1970-01-01 00:00:00 +0000
+++ debian/maas-cluster-controller.postinst 2012-11-13 12:12:21 +0000
@@ -0,0 +1,62 @@
1#!/bin/sh -e
2
3. /usr/share/debconf/confmodule
4db_version 2.0
5
6create_log_dir() {
7 # create log dir
8 if [ ! -d /var/lib/maas ]; then
9 mkdir -p /var/lib/maas
10 fi
11 if [ ! -d /var/log/maas/oops ]; then
12 mkdir -p /var/log/maas/oops
13 fi
14 # Give appropriate permissions
15 chown -R maas:maas /var/lib/maas/
16 chown -R maas:maas /var/log/maas
17 chmod -R 775 /var/log/maas/oops
18}
19
20configure_maas_tgt(){
21 # Set up iSCSI: add maas.conf to tgt conf.d.
22 local tgtcfg="/etc/tgt/targets.conf"
23 [ -d /etc/tgt/conf.d/ ] ||
24 echo "Warning! $tgtcfg did not exist" 1>&2;
25 mkdir -p /etc/tgt/conf.d/ /var/lib/maas/ephemeral/
26 ln -sf /var/lib/maas/ephemeral/tgt.conf /etc/tgt/conf.d/maas.conf
27}
28
29if [ "$1" = "configure" ] && [ -z "$2" ]; then
30 # logging
31 create_log_dir
32
33 # The local celery config may contain a private cluster UUID. Only
34 # maas can read it; only root can write it.
35 chown root:maas /etc/maas/maas_local_celeryconfig_cluster.py
36 chmod 0640 /etc/maas/maas_local_celeryconfig_cluster.py
37
38 # Generate cluster UUID.
39 if grep -qs "^CLUSTER_UUID\ \= None$" /etc/maas/maas_local_celeryconfig_cluster.py; then
40 uuid="$(uuidgen)"
41 sed -i "s|^CLUSTER_UUID\ \= None$|CLUSTER_UUID = '"$uuid"'|" \
42 /etc/maas/maas_local_celeryconfig_cluster.py
43 fi
44
45 configure_maas_tgt
46fi
47
48if ([ "$1" = "configure" ] && [ -z "$2" ]) || [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then
49
50 if dpkg --compare-versions "$2" lt 0.1+bzr1239+dfsg-0ubuntu1; then
51 create_log_dir
52 fi
53
54 # Get the MAAS_URL on configure/reconfigure and write it to the conf file.
55 db_get maas-cluster-controller/maas-url || true
56 if [ -n "$RET" ]; then
57 sed -i "s|MAAS_URL=.*|MAAS_URL="$RET"|" /etc/maas/maas_cluster.conf
58 fi
59fi
60
61#DEBHELPER#
62exit 0
063
=== added file 'debian/maas-cluster-controller.postrm'
--- debian/maas-cluster-controller.postrm 1970-01-01 00:00:00 +0000
+++ debian/maas-cluster-controller.postrm 2012-11-13 12:12:21 +0000
@@ -0,0 +1,30 @@
1#!/bin/sh
2
3set -e
4
5. /usr/share/debconf/confmodule
6db_version 2.0
7
8case "$1" in
9 purge)
10 # remove log directory
11 if [ -d /var/log/maas ]; then
12 rm -rf /var/log/maas
13 fi
14 # remove var directory
15 rm -rf /var/lib/maas/celerybeat-cluster-schedule
16 DIR=/var/lib/maas
17 if [ "$(ls -A $DIR 2> /dev/null)" = "" ]; then
18 rm -rf /var/lib/maas
19 fi
20
21 # Delete symlink for iSCSI config.
22 if [ -L /etc/tgt/conf.d/maas.conf ]; then
23 rm -rf /etc/tgt/conf.d/maas.conf
24 fi
25
26esac
27
28#DEBHELPER#
29
30exit 0
031
=== added file 'debian/maas-cluster-controller.prerm'
--- debian/maas-cluster-controller.prerm 1970-01-01 00:00:00 +0000
+++ debian/maas-cluster-controller.prerm 2012-11-13 12:12:21 +0000
@@ -0,0 +1,10 @@
1#!/bin/sh
2
3set -e
4
5. /usr/share/debconf/confmodule
6db_version 2.0
7
8#DEBHELPER#
9
10exit 0
011
=== added file 'debian/maas-cluster-controller.templates'
--- debian/maas-cluster-controller.templates 1970-01-01 00:00:00 +0000
+++ debian/maas-cluster-controller.templates 2012-11-13 12:12:21 +0000
@@ -0,0 +1,7 @@
1Template: maas-cluster-controller/maas-url
2Type: string
3Default:
4_Description: Ubuntu MAAS API address:
5 The MAAS Cluster Controller needs to contact the MAAS server to
6 register its presence. Set the URL to the MAAS API here, e.g.
7 http://192.168.1.1/MAAS
08
=== added file 'debian/maas-common.install'
--- debian/maas-common.install 1970-01-01 00:00:00 +0000
+++ debian/maas-common.install 2012-11-13 12:12:21 +0000
@@ -0,0 +1,2 @@
1# Install Celery Config
2debian/tmp/usr/share/maas/celeryconfig_common.py
03
=== added file 'debian/maas-common.postinst'
--- debian/maas-common.postinst 1970-01-01 00:00:00 +0000
+++ debian/maas-common.postinst 2012-11-13 12:12:21 +0000
@@ -0,0 +1,22 @@
1#!/bin/sh -e
2
3add_user_group(){
4 local user="maas"
5 local group="maas"
6 if ! getent group "$group" >/dev/null; then
7 addgroup --quiet --system "$group" || true
8 fi
9 if ! getent passwd "$user" > /dev/null 2>&1; then
10 adduser --quiet \
11 --system \
12 --group \
13 --no-create-home \
14 "$user" || true
15 fi
16}
17
18if [ "$1" = "configure" ]; then
19 add_user_group
20fi
21
22#DEBHELPER#
023
=== added file 'debian/maas-common.postrm'
--- debian/maas-common.postrm 1970-01-01 00:00:00 +0000
+++ debian/maas-common.postrm 2012-11-13 12:12:21 +0000
@@ -0,0 +1,13 @@
1#!/bin/sh
2
3set -e
4
5case "$1" in
6 purge)
7 # Deleting user/group
8 if getent passwd maas >/dev/null; then
9 deluser maas || true
10 fi
11esac
12
13#DEBHELPER#
014
=== added file 'debian/maas-dhcp.apparmor'
--- debian/maas-dhcp.apparmor 1970-01-01 00:00:00 +0000
+++ debian/maas-dhcp.apparmor 2012-11-13 12:12:21 +0000
@@ -0,0 +1,7 @@
1/run/maas/dhcp/ r,
2/run/maas/dhcp/** r,
3/run/maas/dhcp/*.pid lrw,
4/run/maas/dhcp/*.trace lrw,
5/run/maas/dhcp/*.leases* lrw,
6/var/lib/maas/dhcp/dhcpd*.leases* lrw,
7/etc/maas/dhcpd.conf r,
08
=== added file 'debian/maas-dhcp.install'
--- debian/maas-dhcp.install 1970-01-01 00:00:00 +0000
+++ debian/maas-dhcp.install 2012-11-13 12:12:21 +0000
@@ -0,0 +1,1 @@
1/debian/tmp/etc/apparmor.d/dhcpd.d/maas
02
=== added file 'debian/maas-dhcp.maas-dhcp-server.upstart'
--- debian/maas-dhcp.maas-dhcp-server.upstart 1970-01-01 00:00:00 +0000
+++ debian/maas-dhcp.maas-dhcp-server.upstart 2012-11-13 12:12:21 +0000
@@ -0,0 +1,60 @@
1description "MAAS instance of ISC DHCP server"
2author "Jeroen Vermeulen <jtv@canonical.com>"
3
4start on runlevel [2345]
5stop on runlevel [!2345]
6
7env CONFIG_FILE=/etc/maas/dhcpd.conf
8env PID_DIR=/run/maas/dhcp
9env PID_FILE=/run/maas/dhcp/dhcpd.pid
10env LEASES_DIR=/var/lib/maas/dhcp
11env LEASES_FILE=/var/lib/maas/dhcp/dhcpd.leases
12
13# This is where we write what interfaces dhcpd should listen on.
14env INTERFACES_FILE=/var/lib/maas/dhcpd-interfaces
15
16pre-start script
17 if [ ! -f $CONFIG_FILE ]; then
18 echo "$CONFIG_FILE does not exist. Aborting."
19 stop
20 exit 0
21 fi
22
23 if [ ! -f $INTERFACES_FILE ]; then
24 echo "$INTERFACES_FILE does not exist. Aborting."
25 stop
26 exit 0
27 fi
28
29 if ! /usr/sbin/dhcpd -t -q -4 -cf $CONFIG_FILE > /dev/null 2>&1; then
30 echo "dhcpd self-test failed. Please fix the config file."
31 echo "The error was: "
32 /usr/sbin/dhcpd -t -4 -cf $CONFIG_FILE
33 stop
34 exit 0
35 fi
36end script
37
38respawn
39script
40 INTERFACES=`cat "${INTERFACES_FILE}"`
41
42 # Allow dhcp server to write lease and pid file.
43 mkdir -p $PID_DIR
44 chown dhcpd:dhcpd $PID_DIR
45
46 # As of Quantal, the leases file must be owned by root:root (even though
47 # the daemon will run under an unprivileged user).
48 # In Precise, ownership was supposed to be dhcp:dhcp.
49 mkdir -p $LEASES_DIR
50 chown root:root $LEASES_DIR
51 [ -e $LEASES_FILE ] || touch $LEASES_FILE
52 for LFILE in $LEASES_FILE $LEASES_FILE~; do
53 if [ -e $LFILE ]; then
54 chown root:root $LFILE
55 chmod a+r $LFILE
56 fi
57 done
58
59 exec /usr/sbin/dhcpd -user dhcpd -group dhcpd -f -q -4 -pf $PID_FILE -cf $CONFIG_FILE -lf $LEASES_FILE $INTERFACES
60end script
061
=== added file 'debian/maas-dhcp.postinst'
--- debian/maas-dhcp.postinst 1970-01-01 00:00:00 +0000
+++ debian/maas-dhcp.postinst 2012-11-13 12:12:21 +0000
@@ -0,0 +1,22 @@
1#!/bin/sh -e
2
3. /usr/share/debconf/confmodule
4db_version 2.0
5
6stop_isc_dhcp_server(){
7 invoke-rc.d isc-dhcp-server stop
8}
9
10
11if [ "$1" = "configure" ]; then
12 stop_isc_dhcp_server
13
14 dhcpd_prof="/etc/apparmor.d/usr.sbin.dhcpd"
15 if [ -f "${dhcpd_prof}" ] &&
16 command -v apparmor_parser >/dev/null 2>&1; then
17 apparmor_parser --replace --write-cache --skip-read-cache "${dhcpd_prof}"
18 fi
19fi
20
21#DEBHELPER#
22exit 0
023
=== added file 'debian/maas-dhcp.postrm'
--- debian/maas-dhcp.postrm 1970-01-01 00:00:00 +0000
+++ debian/maas-dhcp.postrm 2012-11-13 12:12:21 +0000
@@ -0,0 +1,11 @@
1#!/bin/sh -e
2
3if [ "$1" = "remove" -o "$1" = "purge" ]; then
4 dhcpd_prof="/etc/apparmor.d/usr.sbin.dhcpd"
5 if [ -f "${dhcpd_prof}" ] &&
6 command -v apparmor_parser >/dev/null 2>&1; then
7 apparmor_parser --replace --write-cache --skip-read-cache "${dhcpd_prof}"
8 fi
9fi
10
11#DEBHELPER#
012
=== added file 'debian/maas-dns.dirs'
--- debian/maas-dns.dirs 1970-01-01 00:00:00 +0000
+++ debian/maas-dns.dirs 2012-11-13 12:12:21 +0000
@@ -0,0 +1,1 @@
1etc/bind/maas
02
=== added file 'debian/maas-dns.postinst'
--- debian/maas-dns.postinst 1970-01-01 00:00:00 +0000
+++ debian/maas-dns.postinst 2012-11-13 12:12:21 +0000
@@ -0,0 +1,35 @@
1#!/bin/sh -e
2
3if ([ "$1" = "configure" ] && [ -z "$2" ]) || [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then
4 # If /etc/bind/maas is empty, set_up_dns.
5 if [ ! "$(ls -A /etc/bind/maas)" ]; then
6 maas set_up_dns
7 fi
8
9 # Fix permissions.
10 if [ -d /etc/bind/maas ]; then
11 chown -R maas:root /etc/bind/maas
12 fi
13 if [ -f /etc/bind/maas/named.conf.maas ]; then
14 chmod 644 /etc/bind/maas/named.conf.maas
15 fi
16 if [ -f /etc/bind/maas/rndc.conf.maas ]; then
17 chmod 600 /etc/bind/maas/rndc.conf.maas
18 fi
19 if [ -f /etc/bind/maas/named.conf.rndc.maas ]; then
20 chown maas:bind /etc/bind/maas/named.conf.rndc.maas
21 chmod 640 /etc/bind/maas/named.conf.rndc.maas
22 fi
23
24 # Remove any existing MAAS-related include line from
25 # /etc/bind/named.conf.local, then re-add it.
26 sed -i '/^include\s.*maas/d' /etc/bind/named.conf.local
27 maas get_named_conf --edit --config_path /etc/bind/named.conf.local
28
29 if [ -x /usr/sbin/invoke-rc.d ]; then
30 invoke-rc.d bind9 restart || true
31 fi
32fi
33
34#DEBHELPER#
35exit 0
036
=== added file 'debian/maas-dns.postrm'
--- debian/maas-dns.postrm 1970-01-01 00:00:00 +0000
+++ debian/maas-dns.postrm 2012-11-13 12:12:21 +0000
@@ -0,0 +1,24 @@
1#!/bin/sh -e
2
3if [ "$1" = "remove" ]; then
4 if [ -f /etc/bind/named.conf.local ]; then
5 sed -i '/^include.*\"\/etc\/bind\/maas\/named.conf.maas\"\;$/d' \
6 /etc/bind/named.conf.local
7 fi
8fi
9
10if [ "$1" = "purge" ]; then
11 # Remove zone files
12 if [ -d /etc/bind/maas ]; then
13 rm -rf /etc/bind/maas
14 fi
15fi
16
17if [ -x /usr/sbin/invoke-rc.d ]; then
18 invoke-rc.d bind9 restart || true
19fi
20
21#DEBHELPER#
22
23exit 0
24
025
=== added file 'debian/maas-region-controller.apport'
--- debian/maas-region-controller.apport 1970-01-01 00:00:00 +0000
+++ debian/maas-region-controller.apport 2012-11-13 12:12:21 +0000
@@ -0,0 +1,37 @@
1#!/usr/bin/python
2
3'''apport hook for bind9
4
5(c) 2012 Canonical Ltd.
6Author: Andres Rodriguez <andres.rodriguez@canonical.com>
7
8This program is free software; you can redistribute it and/or modify it
9under the terms of the GNU General Public License as published by the
10Free Software Foundation; either version 2 of the License, or (at your
11option) any later version. See http://www.gnu.org/copyleft/gpl.html for
12the full text of the license.
13'''
14
15from apport.hookutils import *
16
17def add_info(report, ui):
18 response = ui.yesno("The contents of your /etc/maas/maas_local_settings.py, "
19 "/etc/maas/txlongpoll.yaml, /etc/maas/pserv.yaml files "
20 "may help developers diagnose your bug more "
21 "quickly. However, it may contain sensitive "
22 "information. Do you want to include it in your "
23 "bug report?")
24
25 if response == None: # user cancelled
26 raise StopIteration
27
28 elif response == True:
29 attach_conffiles(report,'maas')
30
31 # Attaching log files
32 attach_file_if_exists(report, '/var/log/maas/maas.log', 'MAASLog')
33 attach_file_if_exists(report, '/var/log/maas/pserv.log', 'MAASPservLog')
34 attach_file_if_exists(report, '/var/log/maas/txlongpoll.log', 'MAAStxlongpollLog')
35
36 # Attaching related packages info
37 attach_related_packages(report, ['python-django-maas', 'apparmor'])
038
=== added file 'debian/maas-region-controller.config'
--- debian/maas-region-controller.config 1970-01-01 00:00:00 +0000
+++ debian/maas-region-controller.config 2012-11-13 12:12:21 +0000
@@ -0,0 +1,45 @@
1#!/bin/sh -e
2
3. /usr/share/debconf/confmodule
4db_version 2.0
5
6# creates question
7set_question() {
8 if ! db_fget "$1" seen; then
9 db_register dbconfig-common/dbconfig-install "$1"
10 db_subst "$1" ID "$1"
11 db_fget "$1" seen
12 fi
13 if [ "$RET" = false ]; then
14 db_set "$1" "$2"
15 db_fset "$1" seen true
16 fi
17}
18
19# source dbconfig-common shell library, and call the hook function
20if [ -f /usr/share/dbconfig-common/dpkg/config.pgsql ]; then
21 . /usr/share/dbconfig-common/dpkg/config.pgsql
22fi
23
24if ([ "$1" = "configure" ] && [ -z "$2" ]); then
25 # Hide maas/dbconfig-install question by setting default.
26 set_question maas-region-controller/dbconfig-install true
27 set_question maas-region-controller/pgsql/app-pass ""
28
29 dbc_dbname="maasdb"
30 dbc_dbuser="maas"
31 dbc_remove="true"
32
33 dbc_go maas-region-controller $@
34
35elif [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then
36 db_get maas/default-maas-url || true
37 if [ -n "$RET" ]; then
38 db_set maas/default-maas-url "$RET"
39 else
40 ipaddr=$(awk '$1 == "DEFAULT_MAAS_URL" { split($0,array,"/")} END{print array[3] }' /etc/maas/maas_local_settings.py)
41 db_set maas/default-maas-url "$ipaddr"
42 fi
43 db_input low maas/default-maas-url || true
44 db_go
45fi
046
=== added file 'debian/maas-region-controller.dirs'
--- debian/maas-region-controller.dirs 1970-01-01 00:00:00 +0000
+++ debian/maas-region-controller.dirs 2012-11-13 12:12:21 +0000
@@ -0,0 +1,2 @@
1var/log/maas/oops
2var/lib/maas/tftp
03
=== added file 'debian/maas-region-controller.install'
--- debian/maas-region-controller.install 1970-01-01 00:00:00 +0000
+++ debian/maas-region-controller.install 2012-11-13 12:12:21 +0000
@@ -0,0 +1,33 @@
1# Install project
2debian/tmp/usr/lib/python*/dist-packages/maas usr/share/maas
3
4# Install static files
5debian/tmp/usr/share/maas/web/static
6
7# Install Apache Config
8debian/tmp/etc/maas/maas-http.conf
9
10# Install MAAS local settings
11debian/tmp/etc/maas/maas_local_settings.py
12
13# Install celery config file
14debian/tmp/usr/share/maas/celeryconfig.py
15
16# Install local celery region config file
17debian/tmp/etc/maas/maas_local_celeryconfig.py
18
19# Install WSGI
20debian/tmp/usr/share/maas/wsgi.py
21
22# Install txlongpoll config file
23debian/tmp/etc/maas/txlongpoll.yaml
24
25# Install new preseed files
26debian/tmp/usr/share/maas/preseeds
27
28# Install all other stuff
29debian/extras/maas usr/sbin
30debian/extras/maas-region-celeryd usr/sbin
31debian/extras/20-maas.conf etc/rsyslog.d
32debian/extras/maas_remote_syslog_compress etc/cron.d
33debian/extras/99-maas usr/share/maas/conf
034
=== added file 'debian/maas-region-controller.links'
--- debian/maas-region-controller.links 1970-01-01 00:00:00 +0000
+++ debian/maas-region-controller.links 2012-11-13 12:12:21 +0000
@@ -0,0 +1,2 @@
1etc/maas/maas_local_settings.py usr/share/maas/maas_local_settings.py
2etc/maas/maas_local_celeryconfig.py usr/share/maas/maas_local_celeryconfig.py
03
=== added file 'debian/maas-region-controller.lintian-overrides'
--- debian/maas-region-controller.lintian-overrides 1970-01-01 00:00:00 +0000
+++ debian/maas-region-controller.lintian-overrides 2012-11-13 12:12:21 +0000
@@ -0,0 +1,7 @@
1maas-region-controller: embedded-javascript-library usr/share/maas/web/static/jslibs/yui/3.4.1/build/yui/yui-min.js
2maas-region-controller: extra-license-file usr/share/maas/web/static/jslibs/yui/3.4.1/docs/assets/panel/vendor/prettify/COPYING
3maas-region-controller: extra-license-file usr/share/maas/web/static/jslibs/yui/3.4.1/docs/assets/vendor/prettify/COPYING
4maas-region-controller: script-not-executable usr/share/maas/web/static/jslibs/yui/3.4.1/tests/loader/tests/server/server.js
5maas-region-controller: unusual-interpreter usr/share/maas/web/static/jslibs/yui/3.4.1/tests/loader/tests/server/server.js #!node
6maas-region-controller: postinst-uses-db-input
7maas-region-controller: binary-without-manpage usr/bin/maas
08
=== added file 'debian/maas-region-controller.logrotate'
--- debian/maas-region-controller.logrotate 1970-01-01 00:00:00 +0000
+++ debian/maas-region-controller.logrotate 2012-11-13 12:12:21 +0000
@@ -0,0 +1,18 @@
1/var/log/maas/maas.log {
2 rotate 5
3 weekly
4 compress
5 copytruncate
6 missingok
7 #create 620 root www-data
8}
9
10/var/log/maas/txlongpoll.log {
11 rotate 5
12 weekly
13 compress
14 missingok
15 postrotate
16 [ -r /var/run/maas-txlongpoll.pid ] && kill -s USR2 $(cat /var/run/maas-txlongpoll.pid) || true
17 endscript
18}
019
=== added file 'debian/maas-region-controller.maas-region-celery.upstart'
--- debian/maas-region-controller.maas-region-celery.upstart 1970-01-01 00:00:00 +0000
+++ debian/maas-region-controller.maas-region-celery.upstart 2012-11-13 12:12:21 +0000
@@ -0,0 +1,26 @@
1# maas-celery - celery daemon for the region controller
2#
3# MAAS Region Controller Celery Daemon
4
5description "MAAS"
6author "Raphael Badin <raphael.badin@canonical.com>"
7
8start on filesystem and net-device-up and rabbitmq-server-running
9stop on runlevel [016]
10
11respawn
12
13env workers_user="maas_workers"
14env workers_pass=""
15env workers_vhost="/maas_workers"
16
17pre-start script
18 if ! /usr/sbin/rabbitmqctl list_user_permissions $workers_user 1>/dev/null 2>&1; then
19 workers_pass=`grep "maas_workers" /etc/maas/maas_local_celeryconfig.py | cut -d':' -f3 | cut -d'@' -f1`
20 /usr/sbin/rabbitmqctl add_user "$workers_user" "$workers_pass"
21 /usr/sbin/rabbitmqctl add_vhost "$workers_vhost"
22 /usr/sbin/rabbitmqctl set_permissions -p "$workers_vhost" "$workers_user" ".*" ".*" ".*"
23 fi
24end script
25
26exec /usr/sbin/maas-region-celeryd --logfile=/var/log/maas/celery-region.log --schedule=/var/lib/maas/celerybeat-region-schedule --user=maas --group=maas
027
=== added file 'debian/maas-region-controller.maas-txlongpoll.upstart'
--- debian/maas-region-controller.maas-txlongpoll.upstart 1970-01-01 00:00:00 +0000
+++ debian/maas-region-controller.maas-txlongpoll.upstart 2012-11-13 12:12:21 +0000
@@ -0,0 +1,27 @@
1# maas - txlongpoll service
2#
3# MAAS Provisioning Service txlongpoll
4
5description "MAAS txlongpoll"
6author "Andres Rodriguez <andres.rodriguez@canonical.com>"
7
8start on filesystem and net-device-up and rabbitmq-server-running
9stop on runlevel [016]
10
11respawn
12
13env longpoll_user="maas_longpoll"
14env longpoll_pass=""
15env longpoll_vhost="/maas_longpoll"
16
17pre-start script
18 if ! /usr/sbin/rabbitmqctl list_user_permissions $longpoll_user 1>/dev/null 2>&1; then
19 longpoll_pass=`/bin/grep "password" /etc/maas/txlongpoll.yaml | cut -d'"' -f2`
20 /usr/sbin/rabbitmqctl add_user "$longpoll_user" "$longpoll_pass"
21 /usr/sbin/rabbitmqctl add_vhost "$longpoll_vhost"
22 /usr/sbin/rabbitmqctl set_permissions -p "$longpoll_vhost" "$longpoll_user" ".*" ".*" ".*"
23 fi
24end script
25
26# To add options to your daemon, edit the line below:
27exec /usr/bin/twistd -n --uid=maas --gid=maas --pidfile=/run/maas-txlongpoll.pid --logfile=/dev/null txlongpoll --config-file=/etc/maas/txlongpoll.yaml
028
=== added file 'debian/maas-region-controller.postinst'
--- debian/maas-region-controller.postinst 1970-01-01 00:00:00 +0000
+++ debian/maas-region-controller.postinst 2012-11-13 12:12:21 +0000
@@ -0,0 +1,295 @@
1#!/bin/sh -e
2
3. /usr/share/debconf/confmodule
4db_version 2.0
5
6if [ -f /usr/share/dbconfig-common/dpkg/postinst.pgsql ]; then
7 . /usr/share/dbconfig-common/dpkg/postinst.pgsql
8fi
9
10maas_sync_migrate_db(){
11 maas syncdb --noinput
12 maas migrate maasserver --noinput
13 maas migrate metadataserver --noinput
14}
15
16restart_apache2(){
17 if [ -x /usr/sbin/invoke-rc.d ]; then
18 invoke-rc.d apache2 restart || true
19 else
20 /etc/init.d/apache2 restart || true
21 fi
22}
23
24restart_rabbitmq(){
25 if [ -x /usr/sbin/invoke-rc.d ]; then
26 invoke-rc.d rabbitmq-server restart || true
27 else
28 /etc/init.d/rabbitmq-server restart || true
29 fi
30}
31
32restart_postgresql(){
33 if [ -x /usr/sbin/invoke-rc.d ]; then
34 invoke-rc.d --force postgresql restart || true
35 else
36 /etc/init.d/postgresql restart || true
37 fi
38}
39
40restart_squid_deb_proxy() {
41 if [ -x /usr/sbin/invoke-rc.d ]; then
42 invoke-rc.d squid-deb-proxy restart || true
43 else
44 /etc/init.d/squid-deb-proxy restart || true
45 fi
46}
47
48configure_maas_txlongpoll_rabbitmq_user() {
49 local longpoll_user="maas_longpoll"
50 local longpoll_pass=
51 local longpoll_vhost="/maas_longpoll"
52 longpoll_pass="$(pwgen -s 20)"
53 if [ -x /usr/sbin/rabbitmqctl ]; then
54 if ! rabbitmqctl list_users | grep -qs "$longpoll_user"; then
55 rabbitmqctl add_user "$longpoll_user" "$longpoll_pass" || true
56 rabbitmqctl add_vhost "$longpoll_vhost" || true
57 rabbitmqctl set_permissions -p "$longpoll_vhost" "$longpoll_user" ".*" ".*" ".*" || true
58 else
59 rabbitmqctl change_password "$longpoll_user" "$longpoll_pass" || true
60 fi
61 fi
62
63 if grep -qs "^\ \{1,\}password: \"[a-zA-Z0-9]\{0,\}\"$" /etc/maas/txlongpoll.yaml; then
64 sed -i "s/^\ \{1,\}password: \"[a-zA-Z0-9]\{0,\}\"$/ password: \""$longpoll_pass"\"/" \
65 /etc/maas/txlongpoll.yaml
66 fi
67 if grep -qs "^RABBITMQ_PASSWORD\ \= '[a-zA-Z0-9]\{0,\}'$" /etc/maas/maas_local_settings.py; then
68 sed -i "s/^RABBITMQ_PASSWORD\ \= '[a-zA-Z0-9]\{0,\}'$/RABBITMQ_PASSWORD = '"$longpoll_pass"'/" \
69 /etc/maas/maas_local_settings.py
70 fi
71}
72
73configure_maas_workers_rabbitmq_user() {
74 local workers_user="maas_workers"
75 local workers_pass="$(pwgen -s 20)"
76 local workers_vhost="/maas_workers"
77 local amqp_host="$1"
78 if [ -z "$amqp_host" ]; then
79 amqp_host="localhost"
80 fi
81 local amqp_port="5672"
82 if [ -x /usr/sbin/rabbitmqctl ]; then
83 if ! rabbitmqctl list_users | grep -qs "$workers_user"; then
84 rabbitmqctl add_user "$workers_user" "$workers_pass" || true
85 rabbitmqctl add_vhost "$workers_vhost" || true
86 rabbitmqctl set_permissions -p "$workers_vhost" "$workers_user" ".*" ".*" ".*" || true
87 else
88 rabbitmqctl change_password "$workers_user" "$workers_pass" || true
89 fi
90 fi
91
92 if grep -qs "^BROKER_URL\ \= '.*'$" /etc/maas/maas_local_celeryconfig.py; then
93 local broker_url="amqp://$workers_user:$workers_pass@$amqp_host:$amqp_port/$workers_vhost"
94 sed -i "s|^BROKER_URL\ \= '.*'$|BROKER_URL = '"$broker_url"'|" \
95 /etc/maas/maas_local_celeryconfig.py
96 fi
97}
98
99configure_maas_database() {
100 local dbc_dbpass="$1"
101 if grep -qs "^\ \{1,\} 'PASSWORD': '[a-zA-Z0-9]\{0,\}',$" /etc/maas/maas_local_settings.py; then
102 sed -i "s/^\ \{1,\} 'PASSWORD': '[a-zA-Z0-9]\{0,\}',$/ 'PASSWORD': '"$dbc_dbpass"',/" \
103 /etc/maas/maas_local_settings.py
104 fi
105}
106
107configure_maas_default_url() {
108 local ipaddr="$1"
109
110 if grep -qs "^DEFAULT_MAAS_URL\ \= \"[a-zA-Z0-9:/.]\{0,\}\"$" /etc/maas/maas_local_settings.py; then
111 sed -i "s/^DEFAULT_MAAS_URL\ \= \"[a-zA-Z0-9:/.]\{0,\}\"$/DEFAULT_MAAS_URL = \"http:\/\/"$ipaddr"\/MAAS\"/" \
112 /etc/maas/maas_local_settings.py
113 fi
114}
115
116configure_maas_squid_deb_proxy() {
117 local ipaddr="$1"
118
119 if [ -e /usr/share/maas/conf/99-maas -a \
120 ! -L /etc/squid-deb-proxy/mirror-dstdomain.acl.d/99-maas ]; then
121 ln -sf /usr/share/maas/conf/99-maas \
122 /etc/squid-deb-proxy/mirror-dstdomain.acl.d/99-maas
123 fi
124
125 sed -i "s/\(^[a-zA-Z0-9\.\-].*\) # maasurl$/$ipaddr # maasurl/" \
126 /usr/share/maas/conf/99-maas
127}
128
129if [ "$1" = "configure" ] && [ -z "$2" ]; then
130 #########################################################
131 ################ Folder Permissions ####################
132 #########################################################
133 mkdir -p /var/lib/maas/media/storage
134 chown -R maas:maas /var/lib/maas/
135
136 # Config will contain credentials, so should be readable
137 # by the application but nobody else.
138 chown root:maas \
139 /etc/maas/maas_local_celeryconfig.py \
140 /etc/maas/maas_local_settings.py
141 chmod 0640 \
142 /etc/maas/maas_local_celeryconfig.py \
143 /etc/maas/maas_local_settings.py
144
145 #########################################################
146 ################ Configure Apache2 ####################
147 #########################################################
148 # handle apache configs
149 if [ -e /etc/maas/maas-http.conf -a \
150 ! -e /etc/apache2/conf.d/maas-http.conf ]; then
151 ln -sf /etc/maas/maas-http.conf /etc/apache2/conf.d/maas-http.conf
152 fi
153
154 # enable apache modules needed
155 a2enmod proxy_http
156 a2enmod expires
157 a2enmod wsgi
158
159 #########################################################
160 ########## Configure DEFAULT_MAAS_URL #################
161 #########################################################
162
163 # Obtain IP address of default route and change DEFAULT_MAAS_URL.
164 while read Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT; do
165 [ "$Mask" = "00000000" ] && break
166 done < /proc/net/route
167 interface="$Iface"
168 ipaddr=$(LC_ALL=C /sbin/ip -4 addr list dev "$interface" scope global)
169 ipaddr=${ipaddr#* inet }
170 ipaddr=${ipaddr%%/*}
171 # Set the IP address of the interface with default route
172 if [ -n "$ipaddr" ]; then
173 configure_maas_default_url "$ipaddr"
174 configure_maas_squid_deb_proxy "$ipaddr"
175 db_subst maas/installation-note MAAS_URL "$ipaddr"
176 db_set maas/default-maas-url "$ipaddr"
177 fi
178
179 #########################################################
180 ################ Configure Logging ####################
181 #########################################################
182
183 # Give appropriate permissions
184 if [ ! -f /var/log/maas/maas.log ]; then
185 touch /var/log/maas/maas.log
186 fi
187 chown -R maas:maas /var/log/maas
188 chmod -R 775 /var/log/maas/oops
189
190 # Create log directory base
191 mkdir -p /var/log/maas/rsyslog
192 chown -R syslog:syslog /var/log/maas/rsyslog
193 # Make sure rsyslog reads our config
194 if [ -x /usr/sbin/invoke-rc.d ]; then
195 invoke-rc.d rsyslog restart
196 fi
197
198 #########################################################
199 ################### Squid-deb-proxy ####################
200 #########################################################
201 # Make sure squid-deb-proxy reads our config (99-maas)
202 if [ -x /usr/sbin/invoke-rc.d ]; then
203 invoke-rc.d squid-deb-proxy restart
204 fi
205
206 #########################################################
207 ########## Configure longpoll rabbitmq config ###########
208 #########################################################
209
210 # Handle longpoll/rabbitmq publishing
211 restart_rabbitmq
212 configure_maas_txlongpoll_rabbitmq_user
213
214 #########################################################
215 ########## Configure worker rabbitmq config ###########
216 #########################################################
217
218 # Handle celery/rabbitmq publishing
219 configure_maas_workers_rabbitmq_user "$ipaddr"
220
221 #########################################################
222 ################ Configure Database ###################
223 #########################################################
224
225 # Need to for postgresql start so it doesn't fail on the installer
226 restart_postgresql
227
228 # Create the database
229 dbc_go maas-region-controller $@
230 configure_maas_database "$dbc_dbpass"
231
232 # Only syncdb if we have selected to install it with dbconfig-common.
233 db_get maas-region-controller/dbconfig-install
234 if [ "$RET" = "true" ]; then
235 maas_sync_migrate_db
236 fi
237
238 # Display installation note
239 db_input high maas/installation-note || true
240 db_go
241
242elif [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then
243 # Set the IP address of the interface with default route
244 db_get maas/default-maas-url
245 ipaddr="$RET"
246 db_set maas/default-maas-url "$ipaddr"
247 if [ -n "$ipaddr" ]; then
248 configure_maas_default_url "$ipaddr"
249 configure_maas_squid_deb_proxy "$ipaddr"
250 configure_maas_workers_rabbitmq_user "$ipaddr"
251 fi
252
253elif [ "$1" = "configure" ] && dpkg --compare-versions "$2" gt 0.1+bzr266+dfsg-0ubuntu1; then
254 # If upgrading to any later package version, then upgrade db.
255 if [ -x /usr/sbin/invoke-rc.d ]; then
256 invoke-rc.d apache2 stop || true
257 fi
258
259 # make sure postgresql is running
260 restart_postgresql
261
262 # we need to regenerate the passwords and update configs.
263 db_get maas/default-maas-url
264 ipaddr="$RET"
265 configure_maas_default_url "$ipaddr"
266 configure_maas_squid_deb_proxy "$ipaddr"
267 # make sure rabbitmq is running
268 restart_rabbitmq
269 configure_maas_txlongpoll_rabbitmq_user
270 # Handle celery/rabbitmq publishing
271 configure_maas_workers_rabbitmq_user "$ipaddr"
272 # handle database upgrade
273 if [ -f /etc/dbconfig-common/maas-region-controller.conf ]; then
274 # source dbconfig-common db config for maas-region-controller
275 # before upgrading database, otherwise a new config is written
276 # but the password is no longer preserved.
277 . /etc/dbconfig-common/maas-region-controller.conf
278 else
279 dbc_go maas-region-controller $@
280 fi
281 configure_maas_database "$dbc_dbpass"
282
283 maas_sync_migrate_db
284
285fi
286
287restart_apache2
288
289restart_squid_deb_proxy
290
291db_stop
292
293#DEBHELPER#
294
295exit 0
0296
=== added file 'debian/maas-region-controller.postrm'
--- debian/maas-region-controller.postrm 1970-01-01 00:00:00 +0000
+++ debian/maas-region-controller.postrm 2012-11-13 12:12:21 +0000
@@ -0,0 +1,52 @@
1#!/bin/sh
2
3set -e
4
5. /usr/share/debconf/confmodule
6
7if [ -f /etc/dbconfig-common/maas.conf ]; then
8 if [ -f /usr/share/dbconfig-common/dpkg/postrm ]; then
9 . /usr/share/dbconfig-common/dpkg/postrm.pgsql
10 dbc_go maas-region-controller $@
11 fi
12fi
13
14case "$1" in
15 purge)
16 rm -rf /var/log/maas
17 rm -rf /var/lib/maas
18 if [ -h /etc/apache2/conf.d/maas-http.conf ]; then
19 rm -rf /etc/apache2/conf.d/maas-http.conf
20 fi
21
22 # Restarting apache2
23 if [ -x /usr/sbin/invoke-rc.d ]; then
24 invoke-rc.d apache2 restart || true
25 else
26 /etc/init.d/apache2 restart || true
27 fi
28
29 # Delete symlink
30 if [ -L /etc/squid-deb-proxy/mirror-dstdomain.acl.d/99-maas ]; then
31 rm -rf /etc/squid-deb-proxy/mirror-dstdomain.acl.d/99-maas
32 fi
33
34 # Remove rabbitmq/longpoll/celery
35 longpoll_user="maas_longpoll"
36 longpoll_vhost="/maas_longpoll"
37 workers_user="maas_workers"
38 workers_vhost="/maas_workers"
39 if [ -x /usr/sbin/rabbitmqctl ]; then
40 rabbitmqctl delete_vhost "$longpoll_vhost" || true
41 rabbitmqctl delete_user "$longpoll_user" || true
42
43 rabbitmqctl delete_vhost "$workers_vhost" || true
44 rabbitmqctl delete_user "$workers_user" || true
45 fi
46esac
47
48#DEBHELPER#
49
50db_stop
51
52exit 0
053
=== added file 'debian/maas-region-controller.prerm'
--- debian/maas-region-controller.prerm 1970-01-01 00:00:00 +0000
+++ debian/maas-region-controller.prerm 2012-11-13 12:12:21 +0000
@@ -0,0 +1,18 @@
1#!/bin/sh
2
3set -e
4
5. /usr/share/debconf/confmodule
6
7#DEBHELPER#
8
9if [ -x /usr/sbin/invoke-rc.d ]; then
10 invoke-rc.d apache2 stop || true
11else
12 /etc/init.d/apache2 stop || true
13fi
14
15. /usr/share/dbconfig-common/dpkg/prerm.pgsql
16dbc_go maas-region-controller $@
17
18exit 0
019
=== added file 'debian/maas-region-controller.templates'
--- debian/maas-region-controller.templates 1970-01-01 00:00:00 +0000
+++ debian/maas-region-controller.templates 2012-11-13 12:12:21 +0000
@@ -0,0 +1,22 @@
1Template: maas/installation-note
2Type: note
3Default: true
4_Description: Ubuntu MAAS Server
5 The Ubuntu MAAS Server has been installed in your system. You
6 can access the MAAS Web interface here:
7 .
8 http://${MAAS_URL}/MAAS
9 .
10 If the automatically detected address above is not in the same
11 network as the MAAS clients, you need to reconfigure it:
12 .
13 sudo dpkg-reconfigure maas-region-controller
14
15Template: maas/default-maas-url
16Type: string
17_Description: Ubuntu MAAS PXE/Provisioning network address:
18 The Ubuntu MAAS Server automatically detects the IP address
19 that is used for PXE and provisioning. However, it needs to be
20 in the same network as the clients. If the automatically
21 detected address is not in the same network as the clients, it
22 must be changed.
023
=== added file 'debian/maintscript'
--- debian/maintscript 1970-01-01 00:00:00 +0000
+++ debian/maintscript 2012-11-13 12:12:21 +0000
@@ -0,0 +1,2 @@
1rm_conffile /etc/init/maas-celery.conf 0.1+bzr971+dfsg-0ubuntu2
2rm_conffile /etc/dbconfig-common/maas.conf 0.1+bzr971+dfsg-0ubuntu2
03
=== added directory 'debian/patches'
=== added file 'debian/patches/01-fix-database-settings.patch'
--- debian/patches/01-fix-database-settings.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/01-fix-database-settings.patch 2012-11-13 12:12:21 +0000
@@ -0,0 +1,26 @@
1Index: maas-0.1+bzr702+dfsg.orig/contrib/maas_local_settings.py
2===================================================================
3--- maas-0.1+bzr702+dfsg.orig.orig/contrib/maas_local_settings.py 2012-06-29 12:03:20.000000000 -0400
4+++ maas-0.1+bzr702+dfsg.orig/contrib/maas_local_settings.py 2012-06-29 12:17:00.733389757 -0400
5@@ -7,7 +7,7 @@
6 DEFAULT_MAAS_URL = "http://maas.internal.example.com/"
7
8 # Absolute path to the directory static files should be collected to.
9-STATIC_ROOT = '/var/lib/maas/static/'
10+STATIC_ROOT = '/usr/share/maas/web/static/'
11
12 # Prefix to use for MAAS's urls.
13 # If FORCE_SCRIPT_NAME is None (the default), all the urls will start with
14@@ -68,9 +68,9 @@
15 'default': {
16 # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' etc.
17 'ENGINE': 'django.db.backends.postgresql_psycopg2',
18- 'NAME': '',
19- 'USER': '',
20- 'PASSWORD': '',
21+ 'NAME': 'maasdb',
22+ 'USER': 'maas',
23+ 'PASSWORD': 'maas',
24 'HOST': 'localhost',
25 }
26 }
027
=== added file 'debian/patches/02-pserv-config.patch'
--- debian/patches/02-pserv-config.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/02-pserv-config.patch 2012-11-13 12:12:21 +0000
@@ -0,0 +1,38 @@
1Description: Use default settings for MAAS PSERV
2 Use default settings for MAAS pserv. These default settings
3 include port, logfile, oops directory, cobbler url and username
4Author: Andres Rodriguez <andreserl@ubuntu.com>
5
6Index: maas-0.1+bzr917+dfsg.orig/etc/pserv.yaml
7===================================================================
8--- maas-0.1+bzr917+dfsg.orig.orig/etc/pserv.yaml 2012-08-23 16:22:46.483599114 -0400
9+++ maas-0.1+bzr917+dfsg.orig/etc/pserv.yaml 2012-08-23 16:22:56.579599373 -0400
10@@ -6,7 +6,7 @@
11 ## running server.
12 #
13 # logfile: "pserv.log"
14-logfile: "/dev/null"
15+logfile: "/var/log/maas/pserv.log"
16
17 ## OOPS configuration (optional).
18 #
19@@ -15,7 +15,7 @@
20 # or directories other than what the oops machinery creates there.
21 #
22 # directory:
23- directory: "logs/oops"
24+ directory: "/var/log/maas/oops"
25 # reporter:
26 reporter: "maas-pserv"
27
28@@ -33,10 +33,8 @@
29 tftp:
30 # root: /var/lib/maas/tftp
31 # port: 69
32- port: 5244
33 ## The URL to be contacted to generate PXE configurations.
34 # generator: http://localhost/MAAS/api/1.0/pxeconfig/
35- generator: http://localhost:5243/api/1.0/pxeconfig/
36
37 ## Boot configuration.
38 boot:
039
=== added file 'debian/patches/03-txlongpoll-config.patch'
--- debian/patches/03-txlongpoll-config.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/03-txlongpoll-config.patch 2012-11-13 12:12:21 +0000
@@ -0,0 +1,39 @@
1Description: Use default settings for MAAS txlongpoll
2 Use default settings for MAAS txlongpoll. These default settings
3 include oops directory, Message broker configuration, logfile.
4Author: Andres Rodriguez <andreserl@ubuntu.com>
5
6Index: maas-0.1+bzr398+dfsg.orig/etc/txlongpoll.yaml
7===================================================================
8--- maas-0.1+bzr398+dfsg.orig.orig/etc/txlongpoll.yaml 2012-04-03 09:49:48.109427702 -0400
9+++ maas-0.1+bzr398+dfsg.orig/etc/txlongpoll.yaml 2012-04-03 09:53:07.276282800 -0400
10@@ -17,7 +17,7 @@
11 # or directories other than what the oops machinery creates there.
12 #
13 # directory: ""
14- directory: "logs/oops"
15+ directory: "/var/log/maas/oops"
16 ## The reporter used when generating OOPS reports.
17 # reporter: "LONGPOLL"
18 reporter: "maas-txlongpoll"
19@@ -25,14 +25,14 @@
20 ## Message broker configuration.
21 #
22 broker:
23- # host: "localhost"
24- # port: 5672
25- # username: "guest"
26- # password: "guest"
27- # vhost: "/"
28+ host: "localhost"
29+ port: 5672
30+ username: "maas_longpoll"
31+ password: "maaslongpoll"
32+ vhost: "/maas_longpoll"
33
34 ## Where to log. This log can be rotated by sending SIGUSR1 to the
35 ## running server.
36 #
37 # logfile: "txlongpoll.log"
38-logfile: "/dev/null"
39+logfile: "/var/log/maas/txlongpoll.log"
040
=== added file 'debian/patches/series'
--- debian/patches/series 1970-01-01 00:00:00 +0000
+++ debian/patches/series 2012-11-13 12:12:21 +0000
@@ -0,0 +1,3 @@
101-fix-database-settings.patch
202-pserv-config.patch
303-txlongpoll-config.patch
04
=== added directory 'debian/po'
=== added file 'debian/po/POTFILES.in'
--- debian/po/POTFILES.in 1970-01-01 00:00:00 +0000
+++ debian/po/POTFILES.in 2012-11-13 12:12:21 +0000
@@ -0,0 +1,2 @@
1[type: gettext/rfc822deb] maas-region-controller.templates
2[type: gettext/rfc822deb] maas-cluster-controller.templates
03
=== added file 'debian/po/templates.pot'
--- debian/po/templates.pot 1970-01-01 00:00:00 +0000
+++ debian/po/templates.pot 2012-11-13 12:12:21 +0000
@@ -0,0 +1,82 @@
1# SOME DESCRIPTIVE TITLE.
2# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3# This file is distributed under the same license as the PACKAGE package.
4# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5#
6#, fuzzy
7msgid ""
8msgstr ""
9"Project-Id-Version: maas\n"
10"Report-Msgid-Bugs-To: maas@packages.debian.org\n"
11"POT-Creation-Date: 2012-10-04 13:40-0400\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"
15"Language: \n"
16"MIME-Version: 1.0\n"
17"Content-Type: text/plain; charset=CHARSET\n"
18"Content-Transfer-Encoding: 8bit\n"
19
20#. Type: note
21#. Description
22#: ../maas-region-controller.templates:1001
23msgid "Ubuntu MAAS Server"
24msgstr ""
25
26#. Type: note
27#. Description
28#: ../maas-region-controller.templates:1001
29msgid ""
30"The Ubuntu MAAS Server has been installed in your system. You can access the "
31"MAAS Web interface here:"
32msgstr ""
33
34#. Type: note
35#. Description
36#: ../maas-region-controller.templates:1001
37msgid " http://${MAAS_URL}/MAAS"
38msgstr ""
39
40#. Type: note
41#. Description
42#: ../maas-region-controller.templates:1001
43msgid ""
44"If the automatically detected address above is not in the same network as "
45"the MAAS clients, you need to reconfigure it:"
46msgstr ""
47
48#. Type: note
49#. Description
50#: ../maas-region-controller.templates:1001
51msgid " sudo dpkg-reconfigure maas-region-controller"
52msgstr ""
53
54#. Type: string
55#. Description
56#: ../maas-region-controller.templates:2001
57msgid "Ubuntu MAAS PXE/Provisioning network address:"
58msgstr ""
59
60#. Type: string
61#. Description
62#: ../maas-region-controller.templates:2001
63msgid ""
64"The Ubuntu MAAS Server automatically detects the IP address that is used for "
65"PXE and provisioning. However, it needs to be in the same network as the "
66"clients. If the automatically detected address is not in the same network as "
67"the clients, it must be changed."
68msgstr ""
69
70#. Type: string
71#. Description
72#: ../maas-cluster-controller.templates:1001
73msgid "Ubuntu MAAS API address:"
74msgstr ""
75
76#. Type: string
77#. Description
78#: ../maas-cluster-controller.templates:1001
79msgid ""
80"The MAAS Cluster Controller needs to contact the MAAS server to register its "
81"presence. Set the URL to the MAAS API here, e.g. http://192.168.1.1/MAAS"
82msgstr ""
083
=== added file 'debian/python-django-maas.install'
--- debian/python-django-maas.install 1970-01-01 00:00:00 +0000
+++ debian/python-django-maas.install 2012-11-13 12:12:21 +0000
@@ -0,0 +1,2 @@
1debian/tmp/usr/lib/python*/dist-packages/maasserver
2debian/tmp/usr/lib/python*/dist-packages/metadataserver
03
=== added file 'debian/python-maas-client.install'
--- debian/python-maas-client.install 1970-01-01 00:00:00 +0000
+++ debian/python-maas-client.install 2012-11-13 12:12:21 +0000
@@ -0,0 +1,1 @@
1debian/tmp/usr/lib/python*/dist-packages/apiclient
02
=== added file 'debian/python-maas-provisioningserver.install'
--- debian/python-maas-provisioningserver.install 1970-01-01 00:00:00 +0000
+++ debian/python-maas-provisioningserver.install 2012-11-13 12:12:21 +0000
@@ -0,0 +1,4 @@
1debian/tmp/usr/lib/python*/dist-packages/provisioningserver
2
3# Install other stuff
4debian/extras/maas-provision usr/sbin
05
=== added file 'debian/rules'
--- debian/rules 1970-01-01 00:00:00 +0000
+++ debian/rules 2012-11-13 12:12:21 +0000
@@ -0,0 +1,65 @@
1#!/usr/bin/make -f
2
3BUILDHOME = $(CURDIR)/debian/build
4PYTHON = $(shell pyversions -d)
5# Python enum modules.
6py_enums := $(wildcard src/*/enum.py)
7
8%:
9 dh $@ --with python2,apport --buildsystem=python_distutils
10
11override_dh_installinit:
12 dh_installinit --name maas-pserv
13 dh_installinit --name maas-txlongpoll
14 dh_installinit --name maas-region-celery
15 dh_installinit --name maas-cluster-celery
16 dh_installinit --name maas-dhcp-server
17
18override_dh_auto_build:
19 dh_auto_build
20
21 mkdir -p $(BUILDHOME)
22 HOME=$(BUILDHOME) PYTHONPATH=$(CURDIR)/src/ $(PYTHON) \
23 $(CURDIR)/src/maasserver/utils/jsenums.py \
24 $(py_enums) > $(BUILDHOME)/enums.js
25
26override_dh_auto_install:
27 dh_auto_install
28
29 # Move static files
30 install -d -m 755 $(CURDIR)/debian/tmp/usr/share/maas/web/static
31 mv $(CURDIR)/debian/tmp/usr/lib/python*/*-packages/maasserver/static \
32 $(CURDIR)/debian/tmp/usr/share/maas/web/
33
34 # Install built enums.js file.
35 cp $(BUILDHOME)/enums.js $(CURDIR)/debian/tmp/usr/share/maas/web/static/js/
36
37 # install the apparmor profile
38 install -d -m 755 $(CURDIR)/debian/tmp/etc/apparmor.d/dhcpd.d
39 install -m 644 $(CURDIR)/debian/maas-dhcp.apparmor \
40 $(CURDIR)/debian/tmp/etc/apparmor.d/dhcpd.d/maas
41
42 dh_install --list-missing
43
44override_dh_auto_clean:
45 dh_auto_clean
46 rm -rf $(BUILDHOME)
47 rm -rf src/*.egg-info
48
49DEB_DEBIAN_DIR=$(dir $(firstword $(MAKEFILE_LIST)))
50REV=$(shell dpkg-parsechangelog -l$(DEB_DEBIAN_DIR)/changelog \
51 | sed -rne 's,^Version: .*[+~]bzr([0-9]+).*,\1,p')
52VER=$(shell dpkg-parsechangelog -l$(DEB_DEBIAN_DIR)/changelog \
53 | sed -rne 's,^Version: ([^-]+).*,\1,p')
54get-orig-source:
55 bzr export -r $(REV) --root=maas-$(VER).orig \
56 maas_$(VER).orig.tar.gz lp:maas/1.2
57 rm -rf maas-$(VER)
58 tar -xf maas_$(VER).orig.tar.gz
59 rm maas_$(VER).orig.tar.gz
60 rm -rf maas-$(VER).orig/src/maasserver/static/jslibs/
61 rm -rf maas-$(VER).orig/contrib/python-tx-tftp
62 GZIP=--best tar -cz --owner root --group root --mode a+rX \
63 -f maas_$(VER).orig.tar.gz \
64 maas-$(VER).orig
65 rm -r maas-$(VER).orig
066
=== added directory 'debian/source'
=== added file 'debian/source/format'
--- debian/source/format 1970-01-01 00:00:00 +0000
+++ debian/source/format 2012-11-13 12:12:21 +0000
@@ -0,0 +1,1 @@
13.0 (quilt)
02
=== added directory 'debian/tests'
=== added file 'debian/tests/control'
--- debian/tests/control 1970-01-01 00:00:00 +0000
+++ debian/tests/control 2012-11-13 12:12:21 +0000
@@ -0,0 +1,2 @@
1Tests: maas-package-test
2Depends: @, python-nose, xvfb, python-pip
03
=== added file 'debian/tests/maas-integration.py'
--- debian/tests/maas-integration.py 1970-01-01 00:00:00 +0000
+++ debian/tests/maas-integration.py 2012-11-13 12:12:21 +0000
@@ -0,0 +1,72 @@
1# TODO
2# - send ipmi commands to turn on/off nodes
3# - run import pxe files
4# - check node states once they're on/off
5# - check node state changes (declared -> commissionig -> ready)
6import os
7from subprocess import check_output
8import sys
9from unittest import TestCase
10
11from pyvirtualdisplay import Display
12from sst.actions import (
13 assert_url, assert_text_contains, assert_title_contains, click_button,
14 get_element, go_to, write_textfield)
15
16
17sys.path.insert(0, "/usr/share/maas")
18os.environ['DJANGO_SETTINGS_MODULE'] = 'maas.settings'
19from maasserver.models import User
20
21MAAS_URL = "http://10.98.0.13/MAAS"
22ADMIN_USER = "admin"
23PASSWORD = "test"
24
25
26class TestMAASIntegration(TestCase):
27
28 def setUp(self):
29 self.display = Display(visible=0, size=(1280, 1024))
30 self.display.start()
31
32 def tearDown(self):
33 self.display.stop()
34
35 def createadmin(self):
36 """Run sudo maas createsuperuser."""
37 cmd_output = check_output(
38 ["sudo", "maas", "createsuperuser", "--username=%s" % ADMIN_USER,
39 "--email=example@canonical.com", "--noinput"])
40 ## Set password for admin user.
41 try:
42 admin = User.objects.get(username=ADMIN_USER)
43 except User.DoesNotExist:
44 admin = User(username=ADMIN_USER)
45 admin.set_password(PASSWORD)
46 admin.save()
47 return cmd_output
48
49 def installation(self):
50 # Check the installation worked.
51 go_to(MAAS_URL)
52 assert_text_contains(
53 get_element(tag="body"), "No admin user has been created yet")
54
55 def createadmin_and_login(self):
56 ## Creates the admin user.
57 output = self.createadmin()
58 self.assertEqual(output, 'Superuser created successfully.')
59 ## Login with the newly created admin user
60 go_to(MAAS_URL)
61 assert_text_contains(
62 get_element(tag="body"), "Login to lenovo-RD230-01 MAAS")
63 write_textfield("id_username", ADMIN_USER)
64 write_textfield("id_password", PASSWORD)
65 click_button("Login")
66 assert_url("MAAS/")
67 assert_title_contains("Dashboard")
68
69 def test_integration(self):
70 # Run the integration tests in order.
71 self.installation()
72 self.createadmin_and_login()
073
=== added file 'debian/tests/maas-package-test'
--- debian/tests/maas-package-test 1970-01-01 00:00:00 +0000
+++ debian/tests/maas-package-test 2012-11-13 12:12:21 +0000
@@ -0,0 +1,5 @@
1#!/bin/sh
2set -e -u
3exec 2>&1
4pip install sst
5nosetests debian/tests/maas-integration.py
06
=== added file 'debian/watch'
--- debian/watch 1970-01-01 00:00:00 +0000
+++ debian/watch 2012-11-13 12:12:21 +0000
@@ -0,0 +1,2 @@
1version=3
2http://launchpad.net/maas/+download https://launchpad.net/maas/.*/maas-(.*).tar.*