launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #14267
[Merge] lp:~allenap/maas/packaging.quantal.remove-squashfs into lp:maas
Gavin Panella has proposed merging lp:~allenap/maas/packaging.quantal.remove-squashfs into lp:maas.
Commit message:
Remove all install-via-squashfs support.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #1074167 in MAAS: "maas-import-pxe-files fails to download squashfs ephemeral images."
https://bugs.launchpad.net/maas/+bug/1074167
Bug #1076409 in MAAS: "maas-import-pxe-files fails when run from trunk"
https://bugs.launchpad.net/maas/+bug/1076409
Bug #1077180 in MAAS 1.2: "Not importing Quantal boot images"
https://bugs.launchpad.net/maas/1.2/+bug/1077180
For more details, see:
https://code.launchpad.net/~allenap/maas/packaging.quantal.remove-squashfs/+merge/134463
--
https://code.launchpad.net/~allenap/maas/packaging.quantal.remove-squashfs/+merge/134463
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~allenap/maas/packaging.quantal.remove-squashfs into lp:maas.
=== added directory 'debian'
=== added file 'debian/changelog'
--- debian/changelog 1970-01-01 00:00:00 +0000
+++ debian/changelog 2012-11-15 13:27:28 +0000
@@ -0,0 +1,615 @@
+maas (0.1+bzr1269+dfsg-0ubuntu2) UNRELEASED; urgency=low
+
+ [ Raphaël Badin ]
+ * debian/maas-dns.postinst: fix permissions and group ownership of
+ file /etc/bind/maas/named.conf.rndc.maas. (LP: #1066935)
+
+ [ 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)
+
+ [ Gavin Panella ]
+ * debian/extras/99-maas: squashfs image download is no longer needed.
+ * debian/maas-region-controller.install: maas-import-squashfs and its
+ configuration file are no longer part of upstream.
+
+ -- Julian Edwards <julian.edwards@xxxxxxxxxxxxx> Fri, 26 Oct 2012 12:50:20 +0200
+
+maas (0.1+bzr1269+dfsg-0ubuntu1) quantal-proposed; urgency=low
+
+ * New upstream bugfix release
+ - Fixes commissioning failing to set memory attribute. (LP: #1064638)
+ - Fixes node listing by adding pagination (LP: #1064672)
+ - Changes default bind rndc key which breaks initscripts (LP: #1066938)
+ - Fixes invalid DNS config once node is enlisted (LP: #1066958)
+ - Reference documentation link to correct URL (LP: #1067261)
+
+ [ Andres Rodriguez ]
+ * debian/rules: Change upstream branch.
+
+ [ Gavin Panella ]
+ * debian/maas-dns.postinst: Remove MAAS-related include lines from named's
+ config before adding a new one (LP: #1066929)
+
+ [ Raphael Badin ]
+ * debian/extras/maas-region-celeryd: Remove whitespace that affects DNS
+ rabbitmq queue. (LP: #1067929)
+
+ -- Andres Rodriguez <andreserl@xxxxxxxxxx> Tue, 16 Oct 2012 10:31:37 -0400
+
+maas (0.1+bzr1264+dfsg-0ubuntu2) quantal; urgency=low
+
+ * Fix MAAS not working after CD/preseed install (LP: #1065763)
+ - debian/extras/maas-region-celeryd: Add wrapper to run celery from
+ the upstart job.
+ - debian/extras/maas-region-controller.maas-region-celery.upstart: Create
+ rabbitmq user if it does not exists.
+ * debian/control: Remove unneeded deps on python-txtftp for some binary pkgs.
+ * debian/maas-region-controller.postinst: Minor fix referencing variable.
+
+ -- Andres Rodriguez <andreserl@xxxxxxxxxx> Thu, 11 Oct 2012 17:38:08 -0400
+
+maas (0.1+bzr1264+dfsg-0ubuntu1) quantal; urgency=low
+
+ * New upstream release.
+
+ [ Raphaël Badin ]
+ * debian/maas-region-controller.postinst: Enable proxy_http module.
+ * debian/maas-cluster-controller.postinst: Create /var/lib/maas. (LP: #1065062)
+
+ [ Andres Rodriguez ]
+ * Install maas-provision with python-maas-provisioningserver (LP: #1065171):
+ - debian/python-maas-provisioningserver.install: Install
+ - debian/control: Add Conflicts/Replaces with maas-cluster-controller
+ to handle upgrades.
+ * debian/patches/04-fix-ipmi-enlistment.patch: Drop. Merged Upstream.
+ * debian/control: Depends on maas-region-controller for maas-dns.
+ * debian/maas-region-controller.postinst: Set the correct host for
+ BROKER_URL (LP: #1065080)
+ * Handle creation of user/group in maas-common.
+ * debian/maas-region-controller.config: Always source dbconfig scripts.
+
+ -- Andres Rodriguez <andreserl@xxxxxxxxxx> Wed, 10 Oct 2012 11:17:21 -0400
+
+maas (0.1+bzr1243+dfsg-0ubuntu3) quantal; urgency=low
+
+ * 04-fix-ipmi-enlistment.patch: retry maas-enlist without power parameters
+ on failure. This allows enlistment to continue working with Precise
+ ephemeral images before the Precise SRU for maas-enlist lands.
+ (LP: #1064922).
+
+ -- Robie Basak <robie.basak@xxxxxxxxxxxxx> Wed, 10 Oct 2012 13:29:16 +0000
+
+maas (0.1+bzr1243+dfsg-0ubuntu2) quantal; urgency=low
+
+ * debian/patches/99-ipmi-user-too-long.patch: Fix username too long for
+ IPMI user created on enlistment (LP: #1064832)
+
+ -- Andres Rodriguez <andreserl@xxxxxxxxxx> Wed, 10 Oct 2012 01:00:29 -0400
+
+maas (0.1+bzr1243+dfsg-0ubuntu1) quantal; urgency=low
+
+ * New upstream release. (LP: #1064596)
+ * debian/patches/99-temporary-fix-constraints.patch: Dropped.
+ * debian/control:
+ - ${python:Depends} for maas-common.
+ - Add missing Depends for python-maas-provisioningserver (LP: #1064542)
+ * debian/maas-cluster-controller.postinst: Create /var/log/maas if it
+ doesn't exist (LP: #1064539)
+
+ -- Andres Rodriguez <andreserl@xxxxxxxxxx> Mon, 08 Oct 2012 17:02:56 -0400
+
+maas (0.1+bzr1223+dfsg-0ubuntu1) quantal; urgency=low
+
+ * New upstream release. (LP: #1062518)
+
+ [ Julian Edwards ]
+ * Split packaging of 'maas' into maas-{region,cluster}-controller
+ - debian/control: Update accordingly.
+ - debian/*.install: Move files accordingly
+ - debian/*.{postinst,postrm,preinst}: Move files accordingly.
+ * Ensure isc-dhcp-server is disabled when installing maas-dhcp.
+ * Ensure maas-dns creates the maas user before trying to chown files.
+ * Make maas-cluster-controller autoconfigure itself when upgrading from the
+ old maas package. (LP: #1059416)
+ * Add missing prerm file for maas-cluster-controller so that .pyc files
+ are cleaned up. (LP: #1059973)
+
+ [ Raphaël Badin ]
+ * Install maas_local_celeryconfig.py in /etc/maas and symlink to
+ /usr/share/maas.
+ * debian/maas.postinst: Create rabbitmq celery user/vhost.
+ * debian/maas.postinst: Update BROKER_URL in maas_local_celeryconfig.py.
+ * Use maas_local_celeryconfig_cluster.py as the local celery
+ configuration file for the cluster worker.
+ * debian/maas-region-controller.maas-region-celery.upstart: Add region
+ worker upstart script.
+ * Rename cluster worker upstart script into
+ maas-cluster-controller.maas-clluster-celery.upstart.
+ * maas-cluster-controller.maas-celery.upstart: use "celeryconfig_cluster"
+ as the Celery config module.
+ * debian/maas-common.install: Install celeryconfig_common.py.
+ * debian/maas-cluster-controller.install: Install celeryconfig_cluster.py.
+ * debian/maas-region-controller.install: Install celeryconfig.py.
+ * Split celery config into cluster and region configs.
+ * Add region celeryd upstart config.
+ * Define CELERY_CONFIG_MODULE in
+ maas-cluster-controller.maas-cluster-celery.upstart
+
+ [ Jeroen Vermeulen ]
+ * Make maas_local_celery_config.py non-world readable.
+ * Make maas_local_celeryconfig_cluster.py non-world readable.
+ * Set root:maas ownership of local cluster config only *after*
+ the maas user/group have been created
+
+ [ Andres Rodriguez ]
+ * debian/maas.postinst:
+ - Always restart apache2.
+ - Handle upgrades for new upstream release.
+ - Handle upgrades for celery rabbitmq worker.
+ * Add binary package to install client tool.
+ - debian/extras/maas-cli: Add binary.
+ - debian/maas-cli.install: Add. Install maascli and apiclient.
+ - debian/control: Add binary package.
+ * debian/control:
+ - Depends on freeipmi-tools instead of ipmitool.
+ - Conflicts/Replaces on maas for python-maas-client.
+ - Depends on python-netifaces, python-lxml.
+ * Add python-maas-client binary package:
+ - debian/python-maas-client.install: Add. Install 'apiclient' python module.
+ - debian/control: Add package. python-django-maas and maas-cli now
+ Depend on it.
+ * debian/rules: Install maas-dhcp-server upstart job.
+ * debian/maas.postrm: Remove celery worker rabbitmq user and host.
+ * debian/extras/99-maas-sudoers: Add for maas-dhcp-server upstart job
+ instead of isc-dhcp-server (LP: #1055951)
+ * debian/maas-region-controller.postinst: Cleanup upgrade rules.
+ * debian/maas-cluster-controller.postinst: Fix 'local' usage.
+ * debian/maas-common.install: Install celeryconfig in appropriate location.
+ * debian/maas-cluster-controller.postrm: Add and delete maas user.
+ * debian/maas-dhcp.postinst: Stop isc-dhcp-server not isc_dhcp_server.
+ * debian/maas-region-controller.postinst:
+ - Always update passwords on upgrade. No longer check versioning. (LP: #1060094).
+ - Add MAAS server to allowed mirror in squid-deb-proxy
+ - Source dbconfig conf file for maas-region-controller on upgrade because
+ it writes a new config file and no longer preservers the previous password.
+ * debian/maas-cluster-controller.maas-cluster-celery.upstart: Remove set{uid/gid}.
+ * debian/maas-region-controller.install: Install maas-import-squashfs
+ * Handle removal of non existant files (LP: #1059556):
+ - debian/maintscript: Added to handle removal of conffiles.
+ - debian/control: Add Pre-depends and bump debhelper version.
+ * update po files for the templates.
+ * debian/extras/99-maas: Install in usr/share/maas/conf and symlink to the
+ appropriate etc dir.
+ * debian/maas-cluster-controller.config: Source debconf at the beginning of the
+ script. (LP: #1063857)
+ * debian/patches/99-temporary-fix-constraints.patch: Fix constraints maaping
+ when deploying with juju. Temporary until it gets merged upstream
+
+ [ Robie Basak ]
+ * Add maas-cluster-controller dependency on uuid-runtime, needed for uuidgen
+ by postinst.
+
+ [ Scott Moser ]
+ * debian/maas-dhcp.{install,apparmor,postrm} install apparmor profile into
+ /etc/apparmor.d/dhcpd.d (LP: #1049177), and update apparmor profile for
+ /usr/sbin/dhcpd on install/remove
+ * get the ip address for the dhcp server in config
+
+ [ Diogo Matsubara ]
+ * Add initial tests to be run by autotests:
+ - debian/control: XS-Testsuite: autopkgtest
+ - debian/tests/control: Add
+ - debian/tests/maas-package-test: Add
+ - tests/maas-integration.py: Add
+
+ -- Andres Rodriguez <andreserl@xxxxxxxxxx> Mon, 08 Oct 2012 13:10:23 -0400
+
+maas (0.1+bzr971+dfsg-0ubuntu2) quantal; urgency=low
+
+ * debian/extras/99-maas-sudoers: Add missing rule for
+ maas-provision. (LP: #1046397)
+
+ -- Andres Rodriguez <andreserl@xxxxxxxxxx> Wed, 05 Sep 2012 12:36:58 -0400
+
+maas (0.1+bzr971+dfsg-0ubuntu1) quantal; urgency=low
+
+ * New upstream release (LP: #1044367)
+
+ [ Julian Edwards ]
+ * Fix 02-pserv-config.patch to handle new default tftp directory
+
+ [ Andres Rodriguez ]
+ * debian/maas.postinst:
+ - include '/MAAS' for DEFAULT_MAAS_URL.(LP: #1033956)
+ - Update bzr version to safely upgrade.
+ * Add maas-dns package that configures DNS in MAAS (LP: #1030860)
+ * Remove cobbler related bits
+ - debian/maas.postinst: Drop cobbler configuration
+ - debian/maas.install: Drop installation of snippets/preseeds.
+ - debian/control:
+ + Drop Depends on maas-provision. (LP: #975473)
+ + Depends on bind9utils.
+ + Depends on python-lockfile (LP: #1037400)
+ Add necessary Conflicts/Replaces. Add conflicts to tftpd-hpa and dnsmasq.
+ Depends on isc-dhcp-server for maas-dhcp, and syslinux-common.
+ - debian/extras/maas-provision: Add missing "$@" (LP: #1040462)
+ - debian/patches:
+ + 02-pserv-config.patch: Updated. Do not patch cobbler related bits.
+ patch tftp config to default.
+ * maas-dhcp: Re-add to handle initial configuration of MAAS DHCP server.
+ * Allow restart of 'isc-dhcp-server' by adding a sudoers file:
+ - debian/extras/99-maas-sudoers: Added.
+ - debian/maas.install: Install 99-maas-sudoers
+ * Minor improvements on dbconfig-common handling:
+ - debian/maas.config: Only call dbc_go when scripts present.
+ - debian/maas.postrm: Only call dbc_go when config file exists.
+ * debian/maas.maas-celery.upstart: Enable Beat and set scheduler db file.
+ * debian/maas-dns.postinst: Set correct permissions. (LP: #1042868)
+ * debian/maas-dhcp.config:
+ - Ask whether we want to enable DHCP (LP: #1044229)
+ - Add debconf question for network interfaces
+ * debian/maas.prerm: Stop services before removing database (LP: #1044559)
+
+ -- Andres Rodriguez <andreserl@xxxxxxxxxx> Thu, 02 Aug 2012 09:01:43 -0400
+
+maas (0.1+bzr777+dfsg-0ubuntu1) quantal-proposed; urgency=low
+
+ * New upstream release
+ * Only run 'maas' command as root. (LP: #974046)
+ - debian/extras/maas: Check id.
+ - debian/maas.install: Install in 'sbin'.
+ * debian/maas.postinst:
+ - restart apache2 after everything gets processed.
+ - Update version to handle upgrades.
+ * debian/extras/maas-provision: Add wrapper to access 'maasprovisiong'
+ command line.
+ * debian/patches/99_temporary_fix_path.patch: Dropped. No longer needed.
+
+ -- Andres Rodriguez <andreserl@xxxxxxxxxx> Tue, 17 Jul 2012 08:28:36 -0400
+
+maas (0.1+bzr745+dfsg-0ubuntu2) quantal; urgency=low
+
+ * debian/control: Build-Dep on python-django instead of
+ python-django-configglue
+
+ -- Andres Rodriguez <andreserl@xxxxxxxxxx> Tue, 17 Jul 2012 08:24:25 -0400
+
+maas (0.1+bzr745+dfsg-0ubuntu1) quantal; urgency=low
+
+ * New Upstream Release
+ * debian/patches:
+ - 99_power_fixes.patch: Dropped. Merged Upstream.
+ - 99_enums_js.patch: Dropped. No longer needed.
+ * Automatically build enums.js:
+ - debian/control: Build-Depends on python-django-configglue
+ - debian/rules: Build and install enums.js.
+ * debian/maas.postinst: Update version to handle upgrades
+
+ -- Andres Rodriguez <andreserl@xxxxxxxxxx> Thu, 12 Jul 2012 16:34:11 -0400
+
+maas (0.1+bzr740+dfsg-0ubuntu1) quantal; urgency=low
+
+ * New upstream release
+ * debian/control: Depends on python-txtftp.
+ * debian/rules: Do not ship python-tx-tftp.
+ * debian/maas.postinst: Update version to upgrade successfully.
+ * debian/patches:
+ - 02-pserv-config.patch: Refreshed.
+ - 99_enums_js.patch: Updated.
+ - 99_power_fixes.patch: Added temporarily to enable IPMI
+ - 99_temporary_fix_path.patch: Added temporarily to not fail when
+ importing celeryconfig
+
+ -- Andres Rodriguez <andreserl@xxxxxxxxxx> Tue, 03 Jul 2012 17:54:49 -0400
+
+maas (0.1+bzr709+dfsg-0ubuntu1) quantal; urgency=low
+
+ * New Upstream release
+ * debian/control:
+ - Depends on python-celery, python-tempita, libjs-yui3-{full,min},
+ libjs-raphael
+ * debian/maas.install:
+ - Install apiclient, celeryconfig.py, maas-import-pxe-files, preseeds_v2.
+ - Update to install various files from chroot, rather tha manually copy
+ them from the source.
+ * debian/maas.links: symlink celeryconfig.py
+ * debian/maas.maas-celery.upstart: Add job.
+ * debian/rules:
+ - Install celery upstart job.
+ - Do not install jslibs as packages are now used.
+ - Drop copying of maas_local_settings_sample.py as source now ships
+ a maas_local_settings.py
+ * debian/patches:
+ - 04-maas-http-fix.patch: Drop. Merged upstream.
+ - 01-fix-database-settings.patch: Refreshed.
+ - 99_enums_js.patch: Added until creation of enum.js / build process
+ is fixed.
+ * debian/maas.postinst: Update bzr version to correctly handle upgrades.
+
+ -- Andres Rodriguez <andreserl@xxxxxxxxxx> Tue, 03 Jul 2012 17:42:37 -0400
+
+maas (0.1+bzr482+dfsg-0ubuntu1) precise; urgency=low
+
+ * New upstream release (Fixes LP: #981103)
+ * debian/maas.postinst:
+ - Make sure rabbitmq and postgresql are started on upgrade (LP: #981282)
+ - Handle upgrades from any lower than 0.1+bzr462+dfsg-0ubuntu1 to
+ correctly re-generate passwords, and not have db sync/migrate issues
+ as config has changed upstream.
+ - Correctly set Passwords for PSERV, otherwise it won't set new passwords.
+ * Allow MAAS_DEFAULT_URL reconfiguration. (LP: #980970)
+ - debian/maas.config: Add reconfigure validation to correctly allow it,
+ and ask a question.
+ - debian/maas.postinst: Reconfigure DEFAULT_MAAS_URL as well as cobbler
+ server and next_server for PXE/Provisioning.
+ - debian/maas.templates: Add debconf question and update info.
+ * Do not lose MAAS_DEFAULT_URL settings on upgrade (LP: #984309)
+ * debian/maas.postinst:
+ - Set cobbler password in between quotes (LP: #984427)
+ - Do not change permissions to maas.log (LP: #980915)
+ * no longer use maas-cloudimg2ephemeral, but rather use premade images
+ at http://maas.ubuntu.com
+
+ -- Andres Rodriguez <andreserl@xxxxxxxxxx> Tue, 17 Apr 2012 23:44:46 -0700
+
+maas (0.1+bzr462+dfsg-0ubuntu1) precise; urgency=low
+
+ * New upstream release (LP: #980240)
+
+ [ Scott Moser ]
+ * add dependency on distro-info (LP: #949442)
+ * debian/control: add dependency on tgt for ephemeral iscsi environment
+
+ [ Andres Rodriguez ]
+ * Make package lintian clean:
+ - maas{-dhcp}.lintian-overrides: Add to make lintian clean.
+ - debian/control: Add missing dependencies; correct section and desc.
+ - debian/maas.postinst: Do not use absolute path for rabbitmqctl.
+ - debian/patches: Add headers to all patches.
+ * debian/maas-dhcp.postrm: Added to disable dnsmasq in cobbler on removal.
+ * debian/maas.config: Do not set a password with pwgen as it is not an
+ essential package; allow dbconfig-common to create a password instead by
+ creating an empty question. (LP: #977475)
+ * Run MAAS, pserv, txlongpoll as non-root user. (LP: #975436)
+ - debian/maas.postinst: Create user/group; set correct permissions for
+ directories.
+ - debian/maas.postrm: Remove user/group; restart apache2.
+ - debian/maas.maas-{pserv,txlongpoll}.upstart: Update to run as non-root
+ 'maas' user.
+ * debian/patches/01-fix-database-settings.patch: Remove adding of PSERV_URL.
+ * debian/maas.postinst:
+ - Handle config file upgrade from versions lower than 0.1+bzr445+dfsg-0ubuntu1,
+ by creating new passwords and updating accordingly
+ - use local variables in functions.
+ - Handle maas tgt configuration for upgrades from 0.1+bzr459+dfsg-0ubuntu1.
+ * debian/extras/99-maas: Add squid-deb-proxy file to enable PPAs. (LP: #979383)
+ * debian/maas.install: Install missing commissioning-user-data script.
+
+ [ Dave Walker (Daviey) ]
+ * debian/patches/02-pserv-config.patch: Refreshed to apply to updated config.
+
+ [ Gavin Panella ]
+ * debian/maas.postinst: Update pserv.yaml and maas_local_settings.py to use
+ password.
+
+ -- Andres Rodriguez <andreserl@xxxxxxxxxx> Thu, 12 Apr 2012 16:37:53 -0400
+
+maas (0.1+bzr415+dfsg-0ubuntu2) precise; urgency=low
+
+ * debian/maas-dhcp.{config,postinst}:
+ - Fix not setting new values on fresh install. (LP: #975321)
+ - Fix unsetting domain, otherwise, even if disabled, it will always be set.
+ * debian/control: Depends on maas for maas-dhcp.
+
+ -- Andres Rodriguez <andreserl@xxxxxxxxxx> Fri, 06 Apr 2012 15:30:44 -0400
+
+maas (0.1+bzr415+dfsg-0ubuntu1) precise; urgency=low
+
+ * debian/control: Update package descriptions; Suggests maas-dhcp for maas
+ and add a maas-dhcp binary.
+ * Add maas-dhcp package to configure a DHCP server.
+ - debian/maas-dhcp.config: Add to ask debconf questions about range,
+ gateway, and domain.
+ - debian/maas-dhcp.postinst: Handle update of config values.
+ - debian/maas-dhcp.templates: Debconf questions.
+ * debian/po: Update for templates.
+ * Add message telling MAAS URL after installation.
+ - debian/maas.templates: Add message.
+ - debian/maas.postinst: Display message.
+ * debian/maas.config: Hide dbconfig-install question.
+
+ -- Andres Rodriguez <andreserl@xxxxxxxxxx> Wed, 04 Apr 2012 14:47:13 -0400
+
+maas (0.1+bzr400+dfsg-0ubuntu1) precise; urgency=low
+
+ * debian/patches/{02-pserv-config,03-txlongpoll-config}.patch: Refreshed.
+ * debian/maas.install: Install maas-gc cronjob.
+ * Add apport hook.
+ - debian/maas.apport: Add hook.
+ - debian/rules: Install with apport.
+ * debian/maas.logrotate: Add logrotate for txlongpoll and pserv logs.
+ * Create 'var/lib/media/maas/storage' on postinst to have right permissions.
+ - debian/maas.dirs: Drop dir creation.
+ - debian/maas.postinst: Create dir with correct permissions.
+ - debian/maas.postrm: Remove dir on purge.
+
+ -- Andres Rodriguez <andreserl@xxxxxxxxxx> Tue, 03 Apr 2012 14:50:34 -0400
+
+maas (0.1+bzr378+dfsg-0ubuntu1) precise; urgency=low
+
+ * maas.dirs: Create var/lib/maas/media/storage for juju storage.
+ * maas.postinst:
+ - Give correct permissions to above dir.
+ - stop apache2 before db upgrade, and restart after.
+
+ -- Andres Rodriguez <andreserl@xxxxxxxxxx> Thu, 29 Mar 2012 19:28:13 -0400
+
+maas (0.1+bzr363+dfsg-0ubuntu1) precise; urgency=low
+
+ [ Dave Walker (Daviey) ]
+ * debian/control: Add openssh-server as a Recommends, and wrap-and-sort.
+
+ [ Andres Rodriguez ]
+ * debian/maas.postinst:
+ - Do not start apache with apache2ctl. Use invoke-rc.d instead to not
+ fail in the installer.
+ - For start of postgresql before creating the DB, otherwise it will
+ fail in the installer.
+ - Add check of invoke-rc.d for syslog.
+ - Add check of invoke-rc.d for rabbitmq-server; Add check for rabbitmqctl
+ - Add db_stop, in case invoke-rc.d fails.
+ * debian/control: Tight python-django-maas dependency.
+ * debian/postrm: Add check for rabbitmqctl.
+ * debian/maas.maas-txlongpoll.upstart: Create rabbitmq longpoll user/vhost
+ and set permissions if they don't exist. Start on rabbitmq-server-running.
+
+ -- Andres Rodriguez <andreserl@xxxxxxxxxx> Tue, 27 Mar 2012 14:49:56 -0400
+
+maas (0.1+bzr338+dfsg-0ubuntu1) precise; urgency=low
+
+ [ Dave Walker (Daviey) ]
+ * d/patches/03-txlongpoll-config.patch: Resolve typo error from prior patch.
+ - LP: #961031
+
+ [ Andres Rodriguez ]
+ * debian/maas.config: Don't allow reconfigure.
+ * debian/maas.postinst: Don't allow reconfigure. Run sync/migrate db on
+ all upgrades.
+
+ [ Scott Moser ]
+ * add rsylog config for logging node boots (LP: 960149)
+
+ -- Andres Rodriguez <andreserl@xxxxxxxxxx> Thu, 22 Mar 2012 10:56:58 -0400
+
+maas (0.1+bzr315+dfsg-0ubuntu1) precise; urgency=low
+
+ * New upstream snapshot.
+
+ [ Dave Walker ]
+ * debian/maas.postinst: Do not import ISO's at install time.
+ * debian/control:
+ - Drop run-one, it's not a requirement and currently in universe.
+ - Drop python-setproctitle, no longer required.
+
+ [ Andres Rodriguez ]
+ * debian/control: Depends on python-avahi, python-dbus, and avahi-daemon.
+ * debian/maas.postinst:
+ - Only syncdb if dbconfig db creation was selected.
+ - Set rabbitmq/longpoll settings
+ * debian/patches/03-txlongpoll-config.patch: Updated broker settings for
+ rabbitmq.
+
+ -- Andres Rodriguez <andreserl@xxxxxxxxxx> Tue, 20 Mar 2012 20:10:58 -0400
+
+maas (0.1+bzr300+dfsg-0ubuntu1) precise; urgency=low
+
+ * debian/patches:
+ - 01-fix-database-settings.patch: Update PSERV_URL port.
+ - 02-pserv-config.patch: Update, and set 'maas' as username.
+ - 03-longpoll-config.patch: Update.
+ * debian/maas.install: Install preseeds and snippets.
+ * debian/maas.postinst:
+ - Set password for 'maas' cobbler username (in pserv and cobbler).
+ - Set DEFAULT_MAAS_URL to IP of interface with default gateway.
+
+ -- Andres Rodriguez <andreserl@xxxxxxxxxx> Fri, 16 Mar 2012 14:59:16 -0400
+
+maas (0.1+bzr295+dfsg-0ubuntu2) precise; urgency=low
+
+ * debian/patches:
+ - 01-fix-database-settings.patch: Update to set PSERV_URL.
+ - 02-pserv-config.patch: Set port to 8001.
+ * debian/maas.postinst: Run maas-import-isos on install.
+ * debian/control: Depends on rabbitmq-server.
+
+ -- Andres Rodriguez <andreserl@xxxxxxxxxx> Thu, 15 Mar 2012 18:14:08 -0400
+
+maas (0.1+bzr295+dfsg-0ubuntu1) precise; urgency=low
+
+ * debian/maas.upstart: Specify pidfile and conffile.
+ * debian/maas.postinst:
+ - Only run syncdb if dbconfig postinst file exists.
+ - Fix file permissions.
+ * debian/maas.{postrm,prerm}: Add dbconfig-common support.
+ * Add txlongpoll support for packaging:
+ - debian/control: Depends on python-txlongpoll.
+ - debian/maas.maas-longpoll.upstart: Added to start txlongpoll.
+ - debian/maas.install: Install txlongpoll.yaml
+ * debian/extras/maas: Improvements.
+ * debian/maas.maas.upstart: Moved from debian/maas.upstart.
+ * debian/maas.postinst: Touch logfile to set correct permissions (LP: #955400)
+ * debian/maas.logrotate: Add.
+ * debian/patches/03-txlongpoll-config.patch: Add default settings.
+ * debian/maas.config: Only run dbconfig-common on configure/reconfigure.
+ * Install maas_local_settings.py in /etc/maas and symlink to usr/share/maas
+ * Update references from MaaS to MAAS.
+ * Remove podebconf as templates no longer exist.
+ - debian/po: Remove.
+ - debian/control: Drop Build-Depends on po-debconf
+
+ -- Andres Rodriguez <andreserl@xxxxxxxxxx> Thu, 15 Mar 2012 15:28:14 -0400
+
+maas (0.1+bzr266+dfsg-0ubuntu1) precise; urgency=low
+
+ * Remove support for squid3 and use squid-deb-proxy instead.
+ * debian/extras/maas: Add to handle syncdb and creation of admin user.
+ * Add debconf questions to ask for user/pass:
+ - debian/maas.{template,config}: Add
+ - debian/maas.postinst: Ask debconf questions.
+ - debian/po: Add translation templates.i
+ * debian/maas.postinst: Enable wsgi module; drop squid3 steps.
+ * debian/maas.postrm: removed.
+ * debian/patches/01-fix-database-settings.patch: Custom database settings
+ and static files path.
+ * debian/{rules,maas.install}: Install maas static files in
+ 'usr/share/maas/web/static'.
+ * Integrate cobbler:
+ - debian/maas.install: Install pserv twisted plugin, and config.
+ - debian/maas.upstart: Created to start plugin daemon.
+ - debian/patches/02-pserv-config.patch: Custom pserv config.
+ * Integrate dbconfig-common:
+ - debian/maas.config: Added and default user/pass and database.
+ - debian/maas.{postinst,postrm}: Added handling for dbconfig-common
+ * debian/control: Depends on python-convoy.
+ * debian/rules: Update path to removal of dsfg files.
+ * debian/patches/01-fix-database-settings.patch: Updated.
+
+ -- Andres Rodriguez <andreserl@xxxxxxxxxx> Tue, 13 Mar 2012 14:31:50 -0400
+
+maas (0.1+bzr232+dfsg-0ubuntu1) precise; urgency=low
+
+ * New upstream snapshot.
+
+ [ Dave Walker ]
+ * debian/control:
+ - Changed depends from psycopg2 to python-psycopg2 and dropped versioning.
+ - LP: #937982
+
+ [ Andres Rodriguez ]
+ * debian/maas.install: Install maas-import-isos and related files.
+ * Integrate squid3 as proxy solution:
+ - debian/extras/squid.conf: Added
+ - debian/control: Depend on squid3.
+ - debian/maas.{postinst,postrm}: Handle installation/removal of custom
+ squid config file.
+ * Split into different binary packages (maas,python-django-maas).
+ - debian/maas.postinst: Handle the apache2 configuration.
+
+ -- Andres Rodriguez <andreserl@xxxxxxxxxx> Wed, 07 Mar 2012 12:46:17 -0500
+
+maas (0.1+bzr171+dfsg-0ubuntu1) precise; urgency=low
+
+ * New upstream snapshot, post 0.1 release.
+ * debian/control:
+ - Drop depends on rabbitmq-server, no longer required.
+ * debian/watch: Introduced watch file.
+
+ -- Dave Walker (Daviey) <DaveWalker@xxxxxxxxxx> Thu, 23 Feb 2012 13:08:12 +0000
+
+maas (0.1~bzr146+dfsg-0ubuntu1) precise; urgency=low
+
+ * Initial release
+
+ -- Julian Edwards <julian.edwards@xxxxxxxxxxxxx> Thu, 16 Jan 2012 15:29:07 +0000
=== added file 'debian/compat'
--- debian/compat 1970-01-01 00:00:00 +0000
+++ debian/compat 2012-11-15 13:27:28 +0000
@@ -0,0 +1,1 @@
+7
=== added file 'debian/control'
--- debian/control 1970-01-01 00:00:00 +0000
+++ debian/control 2012-11-15 13:27:28 +0000
@@ -0,0 +1,276 @@
+Source: maas
+Section: net
+Priority: optional
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@xxxxxxxxxxxxxxxx>
+Build-Depends: debhelper (>= 8.1.0~),
+ dh-apport,
+ po-debconf,
+ python (>= 2.7),
+ python-distribute,
+ python-django
+Standards-Version: 3.9.3
+X-Python-Version: >= 2.7
+XS-Testsuite: autopkgtest
+Homepage: https://launchpad.net/maas
+
+Package: maas
+Architecture: all
+Pre-Depends: ${misc:Pre-Depends}
+Depends: maas-cluster-controller, maas-region-controller, python-django-maas
+Conflicts: dnsmasq, maas-provision, tftpd-hpa
+Replaces: maas-provision
+Description: Ubuntu MAAS Server
+ Ubuntu MAAS Server is the successor to Orchestra. It offers a
+ nice UI to provision your Ubuntu servers. Each physical server
+ (“node”) will be commissioned automatically on first boot.
+ During the commissioning process administrators are able to
+ configure hardware settings manually before an automated smoke
+ test and burn-in test are done. Once commissioned, a node can
+ be deployed on demand by name, or allocated to a queue for
+ dynamic allocation to services being deployed on this MAAS.
+ .
+ This package installs a complete MAAS service on a single machine.
+
+Package: maas-common
+Architecture: all
+Depends: ${python:Depends}
+Conflicts: maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 )
+Replaces: maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 )
+Description: Ubuntu MAAS Server
+ Ubuntu MAAS Server is the successor to Orchestra. It offers a
+ nice UI to provision your Ubuntu servers. Each physical server
+ (“node”) will be commissioned automatically on first boot.
+ During the commissioning process administrators are able to
+ configure hardware settings manually before an automated smoke
+ test and burn-in test are done. Once commissioned, a node can
+ be deployed on demand by name, or allocated to a queue for
+ dynamic allocation to services being deployed on this MAAS.
+ .
+ This package contains common files
+
+Package: maas-region-controller
+Architecture: all
+Depends: apache2,
+ avahi-daemon,
+ dbconfig-common,
+ distro-info,
+ libapache2-mod-wsgi,
+ libjs-raphael,
+ libjs-yui3-full,
+ libjs-yui3-min,
+ maas-common (= ${binary:Version}),
+ postgresql-9.1,
+ pwgen,
+ python-django,
+ python-django-maas (= ${binary:Version}),
+ python-django-piston,
+ python-django-south,
+ python-maas-provisioningserver (= ${binary:Version}),
+ rabbitmq-server,
+ rsyslog,
+ squid-deb-proxy,
+ ${misc:Depends},
+ ${python:Depends}
+Recommends: openssh-server
+Suggests: maas-dns
+Conflicts: maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 )
+Replaces: maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 )
+Description: Ubuntu MAAS Server
+ Ubuntu MAAS Server is the successor to Orchestra. It offers a
+ nice UI to provision your Ubuntu servers. Each physical server
+ (“node”) will be commissioned automatically on first boot.
+ During the commissioning process administrators are able to
+ configure hardware settings manually before an automated smoke
+ test and burn-in test are done. Once commissioned, a node can
+ be deployed on demand by name, or allocated to a queue for
+ dynamic allocation to services being deployed on this MAAS.
+ .
+ This package installs the region controller services: the web
+ UI and the database.
+
+Package: python-maas-provisioningserver
+Architecture: all
+Depends: python-celery,
+ python-formencode,
+ python-lockfile,
+ python-lxml,
+ python-maas-client,
+ python-netifaces,
+ python-oops,
+ python-oops-amqp,
+ python-oops-datedir-repo,
+ python-oops-twisted,
+ python-pyparsing,
+ python-tempita,
+ python-twisted-core,
+ python-twisted-web,
+ python-txamqp,
+ python-txtftp,
+ python-yaml,
+ python-zope.interface,
+ ${misc:Depends},
+ ${python:Depends}
+Conflicts: python-django-maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 ), maas-cluster-controller (<= 0.1+bzr1243+dfsg-0ubuntu3)
+Replaces: python-django-maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 ), maas-cluster-controller (<= 0.1+bzr1243+dfsg-0ubuntu3)
+Description: Ubuntu MAAS Server
+ Ubuntu MAAS Server is the successor to Orchestra. It offers a
+ nice UI to provision your Ubuntu servers. Each physical server
+ (“node”) will be commissioned automatically on first boot.
+ During the commissioning process administrators are able to
+ configure hardware settings manually before an automated smoke
+ test and burn-in test are done. Once commissioned, a node can
+ be deployed on demand by name, or allocated to a queue for
+ dynamic allocation to services being deployed on this MAAS.
+ .
+ This package contains the provisioning server libraries.
+
+Package: maas-cli
+Architecture: all
+Depends: python-bzrlib,
+ python-httplib2,
+ python-maas-client (= ${binary:Version}),
+ python-oauth,
+ ${misc:Depends},
+ ${python:Depends}
+Description: Ubuntu MAAS Client Tool
+ Ubuntu MAAS Server is the successor to Orchestra. It offers a
+ nice UI to provision your Ubuntu servers. Each physical server
+ (“node”) will be commissioned automatically on first boot.
+ During the commissioning process administrators are able to
+ configure hardware settings manually before an automated smoke
+ test and burn-in test are done. Once commissioned, a node can
+ be deployed on demand by name, or allocated to a queue for
+ dynamic allocation to services being deployed on this MAAS.
+ .
+ This package contains the client command line tool.
+
+Package: python-maas-client
+Architecture: all
+Depends: python-oauth, ${misc:Depends}, ${python:Depends}
+Conflicts: maas (<= 0.1+bzr971+dfsg-0ubuntu2 )
+Replaces: maas (<= 0.1+bzr971+dfsg-0ubuntu2 )
+Description: Ubuntu MAAS API Client - (python files)
+ Ubuntu MAAS Server is the successor to Orchestra. It offers a
+ nice UI to provision your Ubuntu servers. Each physical server
+ (“node”) will be commissioned automatically on first boot.
+ During the commissioning process administrators are able to
+ configure hardware settings manually before an automated smoke
+ test and burn-in test are done. Once commissioned, a node can
+ be deployed on demand by name, or allocated to a queue for
+ dynamic allocation to services being deployed on this MAAS.
+ .
+ This package contains the client API Python modules.
+
+Package: maas-cluster-controller
+Architecture: all
+Depends: bind9utils,
+ freeipmi-tools,
+ maas-cli (=${binary:Version}),
+ maas-common (=${binary:Version}),
+ python-celery,
+ python-httplib2,
+ python-lockfile,
+ python-maas-provisioningserver (=${binary:Version}),
+ python-netaddr,
+ python-oauth,
+ python-tempita,
+ python-twisted,
+ python-zope.interface,
+ rabbitmq-server,
+ rsyslog,
+ syslinux-common,
+ tgt,
+ uuid-runtime,
+ wget,
+ ${misc:Depends},
+ ${python:Depends}
+Suggests: maas-dhcp (= ${binary:Version})
+Conflicts: maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 )
+Replaces: maas ( <= 0.1+bzr1048+dfsg-0ubuntu1 )
+Description: Ubuntu MAAS Cluster Controller
+ Ubuntu MAAS Server is the successor to Orchestra. It offers a
+ nice UI to provision your Ubuntu servers. Each physical server
+ (“node”) will be commissioned automatically on first boot.
+ During the commissioning process administrators are able to
+ configure hardware settings manually before an automated smoke
+ test and burn-in test are done. Once commissioned, a node can
+ be deployed on demand by name, or allocated to a queue for
+ dynamic allocation to services being deployed on this MAAS.
+ .
+ This package contains the cluster controller, which is
+ responsible for controlling remote DHCP/TFTP instances on their
+ own subnets.
+
+Package: python-django-maas
+Section: python
+Architecture: all
+Depends: python-avahi,
+ python-celery,
+ python-convoy,
+ python-dbus,
+ python-lockfile,
+ python-lxml,
+ python-maas-client (= ${binary:Version}),
+ python-netaddr,
+ python-oops,
+ python-oops-amqp,
+ python-oops-datedir-repo,
+ python-oops-twisted,
+ python-oops-wsgi,
+ python-psycopg2,
+ python-sphinx,
+ python-tempita,
+ python-twisted,
+ python-txamqp,
+ python-txlongpoll,
+ python-zope.interface,
+ ${misc:Depends},
+ ${python:Depends}
+Description: Ubuntu MAAS Server - (django files)
+ Ubuntu MAAS Server is the successor to Orchestra. It offers a
+ nice UI to provision your Ubuntu servers. Each physical server
+ (“node”) will be commissioned automatically on first boot.
+ During the commissioning process administrators are able to
+ configure hardware settings manually before an automated smoke
+ test and burn-in test are done. Once commissioned, a node can
+ be deployed on demand by name, or allocated to a queue for
+ dynamic allocation to services being deployed on this MAAS.
+ .
+ This package contains the Django files.
+
+Package: maas-dhcp
+Architecture: all
+Depends: isc-dhcp-server, ${misc:Depends}
+Conflicts: maas-dhcp (<= 0.1+bzr777+dfsg-0ubuntu1)
+Replaces: maas-dhcp (<= 0.1+bzr777+dfsg-0ubuntu1)
+Description: Ubuntu MAAS Server - DHCP Configuration (meta-package)
+ Ubuntu MAAS Server is the successor to Orchestra. It offers a
+ nice UI to provision your Ubuntu servers. Each physical server
+ (“node”) will be commissioned automatically on first boot.
+ During the commissioning process administrators are able to
+ configure hardware settings manually before an automated smoke
+ test and burn-in test are done. Once commissioned, a node can
+ be deployed on demand by name, or allocated to a queue for
+ dynamic allocation to services being deployed on this MAAS.
+ .
+ This package configures a DHCP that can be used with MAAS.
+
+Package: maas-dns
+Architecture: all
+Depends: bind9,
+ maas-region-controller (= ${binary:Version}),
+ maas-dhcp (= ${binary:Version}),
+ ${misc:Depends}
+Conflicts: maas-dhcp (<= 0.1+bzr777+dfsg-0ubuntu1)
+Replaces: maas-dhcp (<= 0.1+bzr777+dfsg-0ubuntu1)
+Description: Ubuntu MAAS Server - DNS configuration (metapackage)
+ Ubuntu MAAS Server is the successor to Orchestra. It offers a
+ nice UI to provision your Ubuntu servers. Each physical server
+ (“node”) will be commissioned automatically on first boot.
+ During the commissioning process administrators are able to
+ configure hardware settings manually before an automated smoke
+ test and burn-in test are done. Once commissioned, a node can
+ be deployed on demand by name, or allocated to a queue for
+ dynamic allocation to services being deployed on this MAAS.
+ .
+ This package configures a DNS that can be used with MAAS.
=== added file 'debian/copyright'
--- debian/copyright 1970-01-01 00:00:00 +0000
+++ debian/copyright 2012-11-15 13:27:28 +0000
@@ -0,0 +1,25 @@
+Format: http://dep.debian.net/deps/dep5
+Upstream-Name: maas
+Source: https://launchpad.net/maas
+
+Files: *
+Copyright: 2012 Canonical Ltd.
+License: AGPL-3.0+
+
+Files: debian/*
+Copyright: 2012 Canonical Ltd.
+License: AGPL-3.0+
+
+License: AGPL-3.0+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as
+ published by the Free Software Foundation, either version 3 of the
+ License, or (at your option) any later version.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+ .
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
=== 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-15 13:27:28 +0000
@@ -0,0 +1,32 @@
+# Enable the udp server for installation logging
+$ModLoad imudp
+$UDPServerRun 514
+$ModLoad imtcp # load TCP listener
+
+# The following section (certificates) was copied from orchestra, but is
+# not used here. In the future, if we needed secure ssl, then re-enable.
+# These files were created in the orchestra-logging-server's postinst
+#
+## make gtls driver the default
+#$DefaultNetstreamDriver gtls
+#
+## certificate files
+#$DefaultNetstreamDriverCAFile /var/lib/maas/ssl-cert-orchestra-ca.pem
+#$DefaultNetstreamDriverCertFile /var/lib/maas/.ssl/ssl-cert-orchestra.pem
+#$DefaultNetstreamDriverKeyFile /var/lib/maas/.ssl/ssl-cert-orchestra-pk.pem
+#
+#$InputTCPServerStreamDriverMode 1 # run driver in TLS-only mode
+#$InputTCPServerStreamDriverAuthMode anon # client is NOT authenticated
+#$InputTCPServerRun 10514 # start up listener at port 10514
+
+# Reduce message repetition
+$RepeatedMsgReduction on
+##$RepeatedMsgContainsOrigionalMsg on
+
+# Message templating
+$template MAASboot,"/var/log/maas/rsyslog/%HOSTNAME%/%$YEAR%/%$MONTH%/%$DAY%/messages"
+
+:fromhost-ip, !isequal, "127.0.0.1" ?MAASboot
+# Stop messages that came from anywhere else from going into other places
+# like /var/log/syslog. If you want to see these messages there, then comment below
+& ~
=== added file 'debian/extras/99-maas'
--- debian/extras/99-maas 1970-01-01 00:00:00 +0000
+++ debian/extras/99-maas 2012-11-15 13:27:28 +0000
@@ -0,0 +1,4 @@
+# /etc/squid-deb-proxy/mirror-dstdomain.acl.d/99-maas
+#
+# Enable launchpad personal package archives for squid-deb-proxy
+ppa.launchpad.net
=== 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-15 13:27:28 +0000
@@ -0,0 +1,2 @@
+maas ALL= NOPASSWD: /usr/sbin/service maas-dhcp-server restart
+maas ALL= NOPASSWD: /usr/sbin/maas-provision
=== 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-15 13:27:28 +0000
@@ -0,0 +1,1 @@
+manual
=== added file 'debian/extras/maas'
--- debian/extras/maas 1970-01-01 00:00:00 +0000
+++ debian/extras/maas 2012-11-15 13:27:28 +0000
@@ -0,0 +1,8 @@
+#!/bin/sh
+if [ "$(id -u)" != "0" ]; then
+ echo "This utility may only be run as root." 1>&2
+ exit 1
+fi
+export PYTHONPATH="/usr/share/maas${PYTHONPATH:+:}${PYTHONPATH}"
+export DJANGO_SETTINGS_MODULE="maas.settings"
+exec /usr/bin/django-admin "$@"
=== added file 'debian/extras/maas-cli'
--- debian/extras/maas-cli 1970-01-01 00:00:00 +0000
+++ debian/extras/maas-cli 2012-11-15 13:27:28 +0000
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec python -m maascli "$@"
=== added file 'debian/extras/maas-provision'
--- debian/extras/maas-provision 1970-01-01 00:00:00 +0000
+++ debian/extras/maas-provision 2012-11-15 13:27:28 +0000
@@ -0,0 +1,7 @@
+#!/bin/sh
+if [ "$(id -u)" != "0" ]; then
+ echo "This utility may only be run as root." 1>&2
+ exit 1
+fi
+export PYTHONPATH="/usr/share/maas${PYTHONPATH:+:}${PYTHONPATH}"
+exec /usr/bin/python -m provisioningserver "$@"
=== 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-15 13:27:28 +0000
@@ -0,0 +1,50 @@
+#!/usr/bin/python
+import os
+from grp import getgrnam
+from pwd import getpwnam
+
+def start_celery(args):
+ uid = getpwnam(args.user).pw_uid
+ gid = getgrnam(args.group).gr_gid
+
+ env = dict(os.environ, PYTHONPATH="/usr/share/maas")
+
+ command = [
+ 'celeryd',
+ '--logfile=%s' % args.logfile,
+ '--schedule=%s' % args.schedule,
+ '--loglevel=INFO',
+ '--beat',
+ '--queues=celery,master',
+ ]
+
+ # Change gid first, just in case changing the uid might deprive
+ # us of the privileges required to setgid.
+ os.setgid(gid)
+ os.setuid(uid)
+
+ os.execvpe(command[0], command, env=env)
+
+def main():
+ import argparse
+ parser = argparse.ArgumentParser(
+ description='MAAS celery daemon config options')
+ parser.add_argument(
+ '--user', '-u', metavar='USER', default='maas',
+ help="System user identity that should run the cluster controller.")
+ parser.add_argument(
+ '--group', '-g', metavar='GROUP', default='maas',
+ help="System group that should run the cluster controller.")
+ parser.add_argument(
+ '--logfile', '-l', metavar='LOGFILE', default='/var/log/maas/celery-region.log',
+ help="Location of the logfile.")
+ parser.add_argument(
+ '--schedule', '-s', metavar='SCHEDULE', default='/var/lib/maas/celerybeat-region-schedule',
+ help="Location of the beat schedule file.")
+
+ args = args = parser.parse_args()
+
+ start_celery(args)
+
+if __name__ == '__main__':
+ main()
=== 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-15 13:27:28 +0000
@@ -0,0 +1,2 @@
+# Compress log files not changed in more than 48 hours:
+30 4 * * * root find /var/log/maas/rsyslog -type f -mtime +2 -exec bzip2 '{}' \;
=== added file 'debian/maas-cli.install'
--- debian/maas-cli.install 1970-01-01 00:00:00 +0000
+++ debian/maas-cli.install 2012-11-15 13:27:28 +0000
@@ -0,0 +1,2 @@
+debian/extras/maas-cli usr/bin
+debian/tmp/usr/lib/python*/dist-packages/maascli
=== 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-15 13:27:28 +0000
@@ -0,0 +1,31 @@
+#!/bin/sh -e
+
+. /usr/share/debconf/confmodule
+db_version 2.0
+
+# Only ask for new installations and reconfiguring.
+# XXX Fix to not ask when installing from the CD.
+if ([ "$1" = "configure" ] && [ -z "$2" ]); then
+
+ db_get maas-cluster-controller/maas-url || true
+ if [ -n "$RET" ]; then
+ db_set maas-cluster-controller/maas-url "$RET"
+ else
+ # Attempt to pre-populate if installing on the region controller.
+ if [ -e /etc/maas/maas_local_settings.py ]; then
+ url=$(awk '$1 == "DEFAULT_MAAS_URL" { split($0,array,"\"")} END{print array[2] }' /etc/maas/maas_local_settings.py)
+ db_set maas-cluster-controller/maas-url "$url"
+ else
+ # Will only get here if dbconf value not already set, or
+ # /etc/maas/maas_local_settings.py doesn't exist.
+ db_input medium maas-cluster-controller/maas-url || true
+ db_go
+ fi
+ fi
+fi
+
+if [ "$1" = "reconfigure" ]; then
+ db_input high maas-cluster-controller/maas-url || true
+ db_go
+fi
+#DEBHELPER#
=== 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-15 13:27:28 +0000
@@ -0,0 +1,1 @@
+etc/maas
=== 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-15 13:27:28 +0000
@@ -0,0 +1,18 @@
+# Install twisted plugins
+twisted/plugins/maasps.py usr/share/pyshared/twisted/plugins
+
+# Install PSERV config file
+debian/tmp/etc/maas/pserv.yaml
+
+# Install cluster config file
+debian/tmp/etc/maas/maas_cluster.conf
+
+# Install celery config file
+debian/tmp/usr/share/maas/celeryconfig_cluster.py
+
+# Install local celery cluster config file
+debian/tmp/etc/maas/maas_local_celeryconfig_cluster.py
+
+# Install all other stuff
+debian/extras/99-maas-sudoers etc/sudoers.d
+debian/extras/isc-dhcp-server.override etc/init
=== 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-15 13:27:28 +0000
@@ -0,0 +1,1 @@
+etc/maas/maas_local_celeryconfig_cluster.py usr/share/maas/maas_local_celeryconfig_cluster.py
=== 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-15 13:27:28 +0000
@@ -0,0 +1,9 @@
+/var/log/maas/pserv.log {
+ rotate 5
+ weekly
+ compress
+ missingok
+ postrotate
+ [ -r /var/run/maas-pserv.pid ] && kill -s USR2 $(cat /var/run/maas-pserv.pid) || true
+ endscript
+}
=== 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-15 13:27:28 +0000
@@ -0,0 +1,26 @@
+# maas-cluster-controller - provisioning service
+#
+# MAAS Cluster Controller Service
+
+description "MAAS Cluster Controller"
+author "Julian Edwards <julian.edwards@xxxxxxxxxxxxx>"
+
+start on filesystem and net-device-up
+stop on runlevel [016]
+
+env CONFIG_FILE=/etc/maas/maas_cluster.conf
+# Use cluster config.
+env CELERY_CONFIG_MODULE="celeryconfig_cluster"
+
+pre-start script
+ if [ ! -f $CONFIG_FILE ]; then
+ echo "$CONFIG_FILE does not exist. Aborting."
+ stop
+ exit 0
+ fi
+end script
+
+script
+ . $CONFIG_FILE # sets MAAS_URL
+ exec /usr/sbin/maas-provision start-cluster-controller $MAAS_URL -u maas -g maas
+end script
=== 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-15 13:27:28 +0000
@@ -0,0 +1,14 @@
+# maas-pserv - provisioning service
+#
+# MAAS Provisioning Service
+
+description "MAAS"
+author "Andres Rodriguez <andres.rodriguez@xxxxxxxxxxxxx>"
+
+start on filesystem and net-device-up
+stop on runlevel [016]
+
+respawn
+
+# To add options to your daemon, edit the line below:
+exec /usr/bin/twistd -n --uid=maas --gid=maas --pidfile=/run/maas-pserv.pid --logfile=/dev/null maas-pserv --config-file=/etc/maas/pserv.yaml
=== 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-15 13:27:28 +0000
@@ -0,0 +1,51 @@
+#!/bin/sh -e
+
+. /usr/share/debconf/confmodule
+db_version 2.0
+
+create_log_dir() {
+ # create log dir
+ if [ ! -d /var/lib/maas ]; then
+ mkdir -p /var/lib/maas
+ fi
+ if [ ! -d /var/log/maas/oops ]; then
+ mkdir -p /var/log/maas/oops
+ fi
+ # Give appropriate permissions
+ chown -R maas:maas /var/lib/maas/
+ chown -R maas:maas /var/log/maas
+ chmod -R 775 /var/log/maas/oops
+}
+
+if [ "$1" = "configure" ] && [ -z "$2" ]; then
+ # logging
+ create_log_dir
+
+ # The local celery config may contain a private cluster UUID. Only
+ # maas can read it; only root can write it.
+ chown root:maas /etc/maas/maas_local_celeryconfig_cluster.py
+ chmod 0640 /etc/maas/maas_local_celeryconfig_cluster.py
+
+ # Generate cluster UUID.
+ if grep -qs "^CLUSTER_UUID\ \= None$" /etc/maas/maas_local_celeryconfig_cluster.py; then
+ uuid="$(uuidgen)"
+ sed -i "s|^CLUSTER_UUID\ \= None$|CLUSTER_UUID = '"$uuid"'|" \
+ /etc/maas/maas_local_celeryconfig_cluster.py
+ fi
+fi
+
+if ([ "$1" = "configure" ] && [ -z "$2" ]) || [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then
+
+ if dpkg --compare-versions "$2" lt 0.1+bzr1239+dfsg-0ubuntu1; then
+ create_log_dir
+ fi
+
+ # Get the MAAS_URL on configure/reconfigure and write it to the conf file.
+ db_get maas-cluster-controller/maas-url || true
+ if [ -n "$RET" ]; then
+ sed -i "s|MAAS_URL=.*|MAAS_URL="$RET"|" /etc/maas/maas_cluster.conf
+ fi
+fi
+
+#DEBHELPER#
+exit 0
=== 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-15 13:27:28 +0000
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+db_version 2.0
+
+case "$1" in
+ purge)
+ # remove log directory
+ if [ -d /var/log/maas ]; then
+ rm -rf /var/log/maas
+ fi
+ # remove var directory
+ rm -rf /var/lib/maas/celerybeat-cluster-schedule
+ DIR=/var/lib/maas
+ if [ "$(ls -A $DIR 2> /dev/null)" = "" ]; then
+ rm -rf /var/lib/maas
+ fi
+
+esac
+
+#DEBHELPER#
+
+exit 0
=== 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-15 13:27:28 +0000
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+db_version 2.0
+
+#DEBHELPER#
+
+exit 0
=== 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-15 13:27:28 +0000
@@ -0,0 +1,7 @@
+Template: maas-cluster-controller/maas-url
+Type: string
+Default:
+_Description: Ubuntu MAAS API address:
+ The MAAS Cluster Controller needs to contact the MAAS server to
+ register its presence. Set the URL to the MAAS API here, e.g.
+ http://192.168.1.1/MAAS
=== added file 'debian/maas-common.install'
--- debian/maas-common.install 1970-01-01 00:00:00 +0000
+++ debian/maas-common.install 2012-11-15 13:27:28 +0000
@@ -0,0 +1,2 @@
+# Install Celery Config
+debian/tmp/usr/share/maas/celeryconfig_common.py
=== added file 'debian/maas-common.postinst'
--- debian/maas-common.postinst 1970-01-01 00:00:00 +0000
+++ debian/maas-common.postinst 2012-11-15 13:27:28 +0000
@@ -0,0 +1,22 @@
+#!/bin/sh -e
+
+add_user_group(){
+ local user="maas"
+ local group="maas"
+ if ! getent group "$group" >/dev/null; then
+ addgroup --quiet --system "$group" || true
+ fi
+ if ! getent passwd "$user" > /dev/null 2>&1; then
+ adduser --quiet \
+ --system \
+ --group \
+ --no-create-home \
+ "$user" || true
+ fi
+}
+
+if [ "$1" = "configure" ]; then
+ add_user_group
+fi
+
+#DEBHELPER#
=== added file 'debian/maas-common.postrm'
--- debian/maas-common.postrm 1970-01-01 00:00:00 +0000
+++ debian/maas-common.postrm 2012-11-15 13:27:28 +0000
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ purge)
+ # Deleting user/group
+ if getent passwd maas >/dev/null; then
+ deluser maas || true
+ fi
+esac
+
+#DEBHELPER#
=== added file 'debian/maas-dhcp.apparmor'
--- debian/maas-dhcp.apparmor 1970-01-01 00:00:00 +0000
+++ debian/maas-dhcp.apparmor 2012-11-15 13:27:28 +0000
@@ -0,0 +1,7 @@
+/run/maas/dhcp/ r,
+/run/maas/dhcp/** r,
+/run/maas/dhcp/*.pid lrw,
+/run/maas/dhcp/*.trace lrw,
+/run/maas/dhcp/*.leases* lrw,
+/var/lib/maas/dhcp/dhcpd*.leases* lrw,
+/etc/maas/dhcpd.conf r,
=== added file 'debian/maas-dhcp.install'
--- debian/maas-dhcp.install 1970-01-01 00:00:00 +0000
+++ debian/maas-dhcp.install 2012-11-15 13:27:28 +0000
@@ -0,0 +1,1 @@
+/debian/tmp/etc/apparmor.d/dhcpd.d/maas
=== 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-15 13:27:28 +0000
@@ -0,0 +1,60 @@
+description "MAAS instance of ISC DHCP server"
+author "Jeroen Vermeulen <jtv@xxxxxxxxxxxxx>"
+
+start on runlevel [2345]
+stop on runlevel [!2345]
+
+env CONFIG_FILE=/etc/maas/dhcpd.conf
+env PID_DIR=/run/maas/dhcp
+env PID_FILE=/run/maas/dhcp/dhcpd.pid
+env LEASES_DIR=/var/lib/maas/dhcp
+env LEASES_FILE=/var/lib/maas/dhcp/dhcpd.leases
+
+# This is where we write what interfaces dhcpd should listen on.
+env INTERFACES_FILE=/var/lib/maas/dhcpd-interfaces
+
+pre-start script
+ if [ ! -f $CONFIG_FILE ]; then
+ echo "$CONFIG_FILE does not exist. Aborting."
+ stop
+ exit 0
+ fi
+
+ if [ ! -f $INTERFACES_FILE ]; then
+ echo "$INTERFACES_FILE does not exist. Aborting."
+ stop
+ exit 0
+ fi
+
+ if ! /usr/sbin/dhcpd -t -q -4 -cf $CONFIG_FILE > /dev/null 2>&1; then
+ echo "dhcpd self-test failed. Please fix the config file."
+ echo "The error was: "
+ /usr/sbin/dhcpd -t -4 -cf $CONFIG_FILE
+ stop
+ exit 0
+ fi
+end script
+
+respawn
+script
+ INTERFACES=`cat "${INTERFACES_FILE}"`
+
+ # Allow dhcp server to write lease and pid file.
+ mkdir -p $PID_DIR
+ chown dhcpd:dhcpd $PID_DIR
+
+ # As of Quantal, the leases file must be owned by root:root (even though
+ # the daemon will run under an unprivileged user).
+ # In Precise, ownership was supposed to be dhcp:dhcp.
+ mkdir -p $LEASES_DIR
+ chown root:root $LEASES_DIR
+ [ -e $LEASES_FILE ] || touch $LEASES_FILE
+ for LFILE in $LEASES_FILE $LEASES_FILE~; do
+ if [ -e $LFILE ]; then
+ chown root:root $LFILE
+ chmod a+r $LFILE
+ fi
+ done
+
+ exec /usr/sbin/dhcpd -user dhcpd -group dhcpd -f -q -4 -pf $PID_FILE -cf $CONFIG_FILE -lf $LEASES_FILE $INTERFACES
+end script
=== added file 'debian/maas-dhcp.postinst'
--- debian/maas-dhcp.postinst 1970-01-01 00:00:00 +0000
+++ debian/maas-dhcp.postinst 2012-11-15 13:27:28 +0000
@@ -0,0 +1,22 @@
+#!/bin/sh -e
+
+. /usr/share/debconf/confmodule
+db_version 2.0
+
+stop_isc_dhcp_server(){
+ invoke-rc.d isc-dhcp-server stop
+}
+
+
+if [ "$1" = "configure" ]; then
+ stop_isc_dhcp_server
+
+ dhcpd_prof="/etc/apparmor.d/usr.sbin.dhcpd"
+ if [ -f "${dhcpd_prof}" ] &&
+ command -v apparmor_parser >/dev/null 2>&1; then
+ apparmor_parser --replace --write-cache --skip-read-cache "${dhcpd_prof}"
+ fi
+fi
+
+#DEBHELPER#
+exit 0
=== added file 'debian/maas-dhcp.postrm'
--- debian/maas-dhcp.postrm 1970-01-01 00:00:00 +0000
+++ debian/maas-dhcp.postrm 2012-11-15 13:27:28 +0000
@@ -0,0 +1,11 @@
+#!/bin/sh -e
+
+if [ "$1" = "remove" -o "$1" = "purge" ]; then
+ dhcpd_prof="/etc/apparmor.d/usr.sbin.dhcpd"
+ if [ -f "${dhcpd_prof}" ] &&
+ command -v apparmor_parser >/dev/null 2>&1; then
+ apparmor_parser --replace --write-cache --skip-read-cache "${dhcpd_prof}"
+ fi
+fi
+
+#DEBHELPER#
=== added file 'debian/maas-dns.dirs'
--- debian/maas-dns.dirs 1970-01-01 00:00:00 +0000
+++ debian/maas-dns.dirs 2012-11-15 13:27:28 +0000
@@ -0,0 +1,1 @@
+etc/bind/maas
=== added file 'debian/maas-dns.postinst'
--- debian/maas-dns.postinst 1970-01-01 00:00:00 +0000
+++ debian/maas-dns.postinst 2012-11-15 13:27:28 +0000
@@ -0,0 +1,35 @@
+#!/bin/sh -e
+
+if ([ "$1" = "configure" ] && [ -z "$2" ]) || [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then
+ # If /etc/bind/maas is empty, set_up_dns.
+ if [ ! "$(ls -A /etc/bind/maas)" ]; then
+ maas set_up_dns
+ fi
+
+ # Fix permissions.
+ if [ -d /etc/bind/maas ]; then
+ chown -R maas:root /etc/bind/maas
+ fi
+ if [ -f /etc/bind/maas/named.conf.maas ]; then
+ chmod 644 /etc/bind/maas/named.conf.maas
+ fi
+ if [ -f /etc/bind/maas/rndc.conf.maas ]; then
+ chmod 600 /etc/bind/maas/rndc.conf.maas
+ fi
+ if [ -f /etc/bind/maas/named.conf.rndc.maas ]; then
+ chown maas:bind /etc/bind/maas/named.conf.rndc.maas
+ chmod 640 /etc/bind/maas/named.conf.rndc.maas
+ fi
+
+ # Remove any existing MAAS-related include line from
+ # /etc/bind/named.conf.local, then re-add it.
+ sed -i '/^include\s.*maas/d' /etc/bind/named.conf.local
+ maas get_named_conf --edit --config_path /etc/bind/named.conf.local
+
+ if [ -x /usr/sbin/invoke-rc.d ]; then
+ invoke-rc.d bind9 restart || true
+ fi
+fi
+
+#DEBHELPER#
+exit 0
=== added file 'debian/maas-dns.postrm'
--- debian/maas-dns.postrm 1970-01-01 00:00:00 +0000
+++ debian/maas-dns.postrm 2012-11-15 13:27:28 +0000
@@ -0,0 +1,24 @@
+#!/bin/sh -e
+
+if [ "$1" = "remove" ]; then
+ if [ -f /etc/bind/named.conf.local ]; then
+ sed -i '/^include.*\"\/etc\/bind\/maas\/named.conf.maas\"\;$/d' \
+ /etc/bind/named.conf.local
+ fi
+fi
+
+if [ "$1" = "purge" ]; then
+ # Remove zone files
+ if [ -d /etc/bind/maas ]; then
+ rm -rf /etc/bind/maas
+ fi
+fi
+
+if [ -x /usr/sbin/invoke-rc.d ]; then
+ invoke-rc.d bind9 restart || true
+fi
+
+#DEBHELPER#
+
+exit 0
+
=== 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-15 13:27:28 +0000
@@ -0,0 +1,37 @@
+#!/usr/bin/python
+
+'''apport hook for bind9
+
+(c) 2012 Canonical Ltd.
+Author: Andres Rodriguez <andres.rodriguez@xxxxxxxxxxxxx>
+
+This program is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 2 of the License, or (at your
+option) any later version. See http://www.gnu.org/copyleft/gpl.html for
+the full text of the license.
+'''
+
+from apport.hookutils import *
+
+def add_info(report, ui):
+ response = ui.yesno("The contents of your /etc/maas/maas_local_settings.py, "
+ "/etc/maas/txlongpoll.yaml, /etc/maas/pserv.yaml files "
+ "may help developers diagnose your bug more "
+ "quickly. However, it may contain sensitive "
+ "information. Do you want to include it in your "
+ "bug report?")
+
+ if response == None: # user cancelled
+ raise StopIteration
+
+ elif response == True:
+ attach_conffiles(report,'maas')
+
+ # Attaching log files
+ attach_file_if_exists(report, '/var/log/maas/maas.log', 'MAASLog')
+ attach_file_if_exists(report, '/var/log/maas/pserv.log', 'MAASPservLog')
+ attach_file_if_exists(report, '/var/log/maas/txlongpoll.log', 'MAAStxlongpollLog')
+
+ # Attaching related packages info
+ attach_related_packages(report, ['python-django-maas', 'apparmor'])
=== 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-15 13:27:28 +0000
@@ -0,0 +1,45 @@
+#!/bin/sh -e
+
+. /usr/share/debconf/confmodule
+db_version 2.0
+
+# creates question
+set_question() {
+ if ! db_fget "$1" seen; then
+ db_register dbconfig-common/dbconfig-install "$1"
+ db_subst "$1" ID "$1"
+ db_fget "$1" seen
+ fi
+ if [ "$RET" = false ]; then
+ db_set "$1" "$2"
+ db_fset "$1" seen true
+ fi
+}
+
+# source dbconfig-common shell library, and call the hook function
+if [ -f /usr/share/dbconfig-common/dpkg/config.pgsql ]; then
+ . /usr/share/dbconfig-common/dpkg/config.pgsql
+fi
+
+if ([ "$1" = "configure" ] && [ -z "$2" ]); then
+ # Hide maas/dbconfig-install question by setting default.
+ set_question maas-region-controller/dbconfig-install true
+ set_question maas-region-controller/pgsql/app-pass ""
+
+ dbc_dbname="maasdb"
+ dbc_dbuser="maas"
+ dbc_remove="true"
+
+ dbc_go maas-region-controller $@
+
+elif [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then
+ db_get maas/default-maas-url || true
+ if [ -n "$RET" ]; then
+ db_set maas/default-maas-url "$RET"
+ else
+ ipaddr=$(awk '$1 == "DEFAULT_MAAS_URL" { split($0,array,"/")} END{print array[3] }' /etc/maas/maas_local_settings.py)
+ db_set maas/default-maas-url "$ipaddr"
+ fi
+ db_input low maas/default-maas-url || true
+ db_go
+fi
=== 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-15 13:27:28 +0000
@@ -0,0 +1,2 @@
+var/log/maas/oops
+var/lib/maas/tftp
=== 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-15 13:27:28 +0000
@@ -0,0 +1,46 @@
+# Install project
+debian/tmp/usr/lib/python*/dist-packages/maas usr/share/maas
+
+# Install static files
+debian/tmp/usr/share/maas/web/static
+
+# Install Apache Config
+debian/tmp/etc/maas/maas-http.conf
+
+# Install MAAS local settings
+debian/tmp/etc/maas/maas_local_settings.py
+
+# Install celery config file
+debian/tmp/usr/share/maas/celeryconfig.py
+
+# Install local celery region config file
+debian/tmp/etc/maas/maas_local_celeryconfig.py
+
+# Install WSGI
+debian/tmp/usr/share/maas/wsgi.py
+
+# Install txlongpoll config file
+debian/tmp/etc/maas/txlongpoll.yaml
+
+# Install maas-import-pxe-files
+debian/tmp/usr/sbin/maas-import-pxe-files
+
+# Install maas-import-pxe-files and related files
+etc/cron.d/maas-import-pxe-files
+man/maas-import-pxe-files.8 usr/share/man/man8
+debian/tmp/etc/maas/import_pxe_files
+debian/tmp/usr/sbin/maas-import-ephemerals
+debian/tmp/etc/maas/import_ephemerals
+debian/tmp/etc/maas/commissioning-user-data
+# Obsolete, but still available for compatibility:
+scripts/maas-import-isos usr/sbin
+
+# Install new preseed files
+debian/tmp/usr/share/maas/preseeds
+
+# Install all other stuff
+debian/extras/maas usr/sbin
+debian/extras/maas-region-celeryd usr/sbin
+debian/extras/20-maas.conf etc/rsyslog.d
+debian/extras/maas_remote_syslog_compress etc/cron.d
+debian/extras/99-maas usr/share/maas/conf
=== 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-15 13:27:28 +0000
@@ -0,0 +1,2 @@
+etc/maas/maas_local_settings.py usr/share/maas/maas_local_settings.py
+etc/maas/maas_local_celeryconfig.py usr/share/maas/maas_local_celeryconfig.py
=== 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-15 13:27:28 +0000
@@ -0,0 +1,7 @@
+maas-region-controller: embedded-javascript-library usr/share/maas/web/static/jslibs/yui/3.4.1/build/yui/yui-min.js
+maas-region-controller: extra-license-file usr/share/maas/web/static/jslibs/yui/3.4.1/docs/assets/panel/vendor/prettify/COPYING
+maas-region-controller: extra-license-file usr/share/maas/web/static/jslibs/yui/3.4.1/docs/assets/vendor/prettify/COPYING
+maas-region-controller: script-not-executable usr/share/maas/web/static/jslibs/yui/3.4.1/tests/loader/tests/server/server.js
+maas-region-controller: unusual-interpreter usr/share/maas/web/static/jslibs/yui/3.4.1/tests/loader/tests/server/server.js #!node
+maas-region-controller: postinst-uses-db-input
+maas-region-controller: binary-without-manpage usr/bin/maas
=== 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-15 13:27:28 +0000
@@ -0,0 +1,18 @@
+/var/log/maas/maas.log {
+ rotate 5
+ weekly
+ compress
+ copytruncate
+ missingok
+ #create 620 root www-data
+}
+
+/var/log/maas/txlongpoll.log {
+ rotate 5
+ weekly
+ compress
+ missingok
+ postrotate
+ [ -r /var/run/maas-txlongpoll.pid ] && kill -s USR2 $(cat /var/run/maas-txlongpoll.pid) || true
+ endscript
+}
=== 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-15 13:27:28 +0000
@@ -0,0 +1,26 @@
+# maas-celery - celery daemon for the region controller
+#
+# MAAS Region Controller Celery Daemon
+
+description "MAAS"
+author "Raphael Badin <raphael.badin@xxxxxxxxxxxxx>"
+
+start on filesystem and net-device-up and rabbitmq-server-running
+stop on runlevel [016]
+
+respawn
+
+env workers_user="maas_workers"
+env workers_pass=""
+env workers_vhost="/maas_workers"
+
+pre-start script
+ if ! /usr/sbin/rabbitmqctl list_user_permissions $workers_user 1>/dev/null 2>&1; then
+ workers_pass=`grep "maas_workers" /etc/maas/maas_local_celeryconfig.py | cut -d':' -f3 | cut -d'@' -f1`
+ /usr/sbin/rabbitmqctl add_user "$workers_user" "$workers_pass"
+ /usr/sbin/rabbitmqctl add_vhost "$workers_vhost"
+ /usr/sbin/rabbitmqctl set_permissions -p "$workers_vhost" "$workers_user" ".*" ".*" ".*"
+ fi
+end script
+
+exec /usr/sbin/maas-region-celeryd --logfile=/var/log/maas/celery-region.log --schedule=/var/lib/maas/celerybeat-region-schedule --user=maas --group=maas
=== 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-15 13:27:28 +0000
@@ -0,0 +1,27 @@
+# maas - txlongpoll service
+#
+# MAAS Provisioning Service txlongpoll
+
+description "MAAS txlongpoll"
+author "Andres Rodriguez <andres.rodriguez@xxxxxxxxxxxxx>"
+
+start on filesystem and net-device-up and rabbitmq-server-running
+stop on runlevel [016]
+
+respawn
+
+env longpoll_user="maas_longpoll"
+env longpoll_pass=""
+env longpoll_vhost="/maas_longpoll"
+
+pre-start script
+ if ! /usr/sbin/rabbitmqctl list_user_permissions $longpoll_user 1>/dev/null 2>&1; then
+ longpoll_pass=`/bin/grep "password" /etc/maas/txlongpoll.yaml | cut -d'"' -f2`
+ /usr/sbin/rabbitmqctl add_user "$longpoll_user" "$longpoll_pass"
+ /usr/sbin/rabbitmqctl add_vhost "$longpoll_vhost"
+ /usr/sbin/rabbitmqctl set_permissions -p "$longpoll_vhost" "$longpoll_user" ".*" ".*" ".*"
+ fi
+end script
+
+# To add options to your daemon, edit the line below:
+exec /usr/bin/twistd -n --uid=maas --gid=maas --pidfile=/run/maas-txlongpoll.pid --logfile=/dev/null txlongpoll --config-file=/etc/maas/txlongpoll.yaml
=== 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-15 13:27:28 +0000
@@ -0,0 +1,308 @@
+#!/bin/sh -e
+
+. /usr/share/debconf/confmodule
+db_version 2.0
+
+if [ -f /usr/share/dbconfig-common/dpkg/postinst.pgsql ]; then
+ . /usr/share/dbconfig-common/dpkg/postinst.pgsql
+fi
+
+maas_sync_migrate_db(){
+ maas syncdb --noinput
+ maas migrate maasserver --noinput
+ maas migrate metadataserver --noinput
+}
+
+restart_apache2(){
+ if [ -x /usr/sbin/invoke-rc.d ]; then
+ invoke-rc.d apache2 restart || true
+ else
+ /etc/init.d/apache2 restart || true
+ fi
+}
+
+restart_rabbitmq(){
+ if [ -x /usr/sbin/invoke-rc.d ]; then
+ invoke-rc.d rabbitmq-server restart || true
+ else
+ /etc/init.d/rabbitmq-server restart || true
+ fi
+}
+
+restart_postgresql(){
+ if [ -x /usr/sbin/invoke-rc.d ]; then
+ invoke-rc.d --force postgresql restart || true
+ else
+ /etc/init.d/postgresql restart || true
+ fi
+}
+
+restart_squid_deb_proxy() {
+ if [ -x /usr/sbin/invoke-rc.d ]; then
+ invoke-rc.d squid-deb-proxy restart || true
+ else
+ /etc/init.d/squid-deb-proxy restart || true
+ fi
+}
+
+configure_maas_txlongpoll_rabbitmq_user() {
+ local longpoll_user="maas_longpoll"
+ local longpoll_pass=
+ local longpoll_vhost="/maas_longpoll"
+ longpoll_pass="$(pwgen -s 20)"
+ if [ -x /usr/sbin/rabbitmqctl ]; then
+ if ! rabbitmqctl list_users | grep -qs "$longpoll_user"; then
+ rabbitmqctl add_user "$longpoll_user" "$longpoll_pass" || true
+ rabbitmqctl add_vhost "$longpoll_vhost" || true
+ rabbitmqctl set_permissions -p "$longpoll_vhost" "$longpoll_user" ".*" ".*" ".*" || true
+ else
+ rabbitmqctl change_password "$longpoll_user" "$longpoll_pass" || true
+ fi
+ fi
+
+ if grep -qs "^\ \{1,\}password: \"[a-zA-Z0-9]\{0,\}\"$" /etc/maas/txlongpoll.yaml; then
+ sed -i "s/^\ \{1,\}password: \"[a-zA-Z0-9]\{0,\}\"$/ password: \""$longpoll_pass"\"/" \
+ /etc/maas/txlongpoll.yaml
+ fi
+ if grep -qs "^RABBITMQ_PASSWORD\ \= '[a-zA-Z0-9]\{0,\}'$" /etc/maas/maas_local_settings.py; then
+ sed -i "s/^RABBITMQ_PASSWORD\ \= '[a-zA-Z0-9]\{0,\}'$/RABBITMQ_PASSWORD = '"$longpoll_pass"'/" \
+ /etc/maas/maas_local_settings.py
+ fi
+}
+
+configure_maas_workers_rabbitmq_user() {
+ local workers_user="maas_workers"
+ local workers_pass="$(pwgen -s 20)"
+ local workers_vhost="/maas_workers"
+ local amqp_host="$1"
+ if [ -z "$amqp_host" ]; then
+ amqp_host="localhost"
+ fi
+ local amqp_port="5672"
+ if [ -x /usr/sbin/rabbitmqctl ]; then
+ if ! rabbitmqctl list_users | grep -qs "$workers_user"; then
+ rabbitmqctl add_user "$workers_user" "$workers_pass" || true
+ rabbitmqctl add_vhost "$workers_vhost" || true
+ rabbitmqctl set_permissions -p "$workers_vhost" "$workers_user" ".*" ".*" ".*" || true
+ else
+ rabbitmqctl change_password "$workers_user" "$workers_pass" || true
+ fi
+ fi
+
+ if grep -qs "^BROKER_URL\ \= '.*'$" /etc/maas/maas_local_celeryconfig.py; then
+ local broker_url="amqp://$workers_user:$workers_pass@$amqp_host:$amqp_port/$workers_vhost"
+ sed -i "s|^BROKER_URL\ \= '.*'$|BROKER_URL = '"$broker_url"'|" \
+ /etc/maas/maas_local_celeryconfig.py
+ fi
+}
+
+configure_maas_database() {
+ local dbc_dbpass="$1"
+ if grep -qs "^\ \{1,\} 'PASSWORD': '[a-zA-Z0-9]\{0,\}',$" /etc/maas/maas_local_settings.py; then
+ sed -i "s/^\ \{1,\} 'PASSWORD': '[a-zA-Z0-9]\{0,\}',$/ 'PASSWORD': '"$dbc_dbpass"',/" \
+ /etc/maas/maas_local_settings.py
+ fi
+}
+
+configure_maas_tgt(){
+ local tgtcfg="/etc/tgt/targets.conf"
+ [ -d /etc/tgt/conf.d/ ] ||
+ echo "Warning! $tgtcfg did not exist" 1>&2;
+ mkdir -p /etc/tgt/conf.d/ /var/lib/maas/ephemeral/
+ ln -sf /var/lib/maas/ephemeral/tgt.conf /etc/tgt/conf.d/maas.conf
+}
+
+configure_maas_default_url() {
+ local ipaddr="$1"
+
+ if grep -qs "^DEFAULT_MAAS_URL\ \= \"[a-zA-Z0-9:/.]\{0,\}\"$" /etc/maas/maas_local_settings.py; then
+ sed -i "s/^DEFAULT_MAAS_URL\ \= \"[a-zA-Z0-9:/.]\{0,\}\"$/DEFAULT_MAAS_URL = \"http:\/\/"$ipaddr"\/MAAS\"/" \
+ /etc/maas/maas_local_settings.py
+ fi
+}
+
+configure_maas_squid_deb_proxy() {
+ local ipaddr="$1"
+
+ if [ -e /usr/share/maas/conf/99-maas -a \
+ ! -L /etc/squid-deb-proxy/mirror-dstdomain.acl.d/99-maas ]; then
+ ln -sf /usr/share/maas/conf/99-maas \
+ /etc/squid-deb-proxy/mirror-dstdomain.acl.d/99-maas
+ fi
+
+ sed -i "s/\(^[a-zA-Z0-9\.\-].*\) # maasurl$/$ipaddr # maasurl/" \
+ /usr/share/maas/conf/99-maas
+}
+
+if [ "$1" = "configure" ] && [ -z "$2" ]; then
+ #########################################################
+ ################ Folder Permissions ####################
+ #########################################################
+ mkdir -p /var/lib/maas/media/storage
+ chown -R maas:maas /var/lib/maas/
+
+ # Config will contain credentials, so should be readable
+ # by the application but nobody else.
+ chown root:maas \
+ /etc/maas/maas_local_celeryconfig.py \
+ /etc/maas/maas_local_settings.py
+ chmod 0640 \
+ /etc/maas/maas_local_celeryconfig.py \
+ /etc/maas/maas_local_settings.py
+
+ #########################################################
+ ################ Configure Apache2 ####################
+ #########################################################
+ # handle apache configs
+ if [ -e /etc/maas/maas-http.conf -a \
+ ! -e /etc/apache2/conf.d/maas-http.conf ]; then
+ ln -sf /etc/maas/maas-http.conf /etc/apache2/conf.d/maas-http.conf
+ fi
+
+ # enable apache modules needed
+ a2enmod proxy_http
+ a2enmod expires
+ a2enmod wsgi
+
+ #########################################################
+ ########## Configure DEFAULT_MAAS_URL #################
+ #########################################################
+
+ # Obtain IP address of default route and change DEFAULT_MAAS_URL.
+ while read Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT; do
+ [ "$Mask" = "00000000" ] && break
+ done < /proc/net/route
+ interface="$Iface"
+ ipaddr=$(LC_ALL=C /sbin/ip -4 addr list dev "$interface" scope global)
+ ipaddr=${ipaddr#* inet }
+ ipaddr=${ipaddr%%/*}
+ # Set the IP address of the interface with default route
+ if [ -n "$ipaddr" ]; then
+ configure_maas_default_url "$ipaddr"
+ configure_maas_squid_deb_proxy "$ipaddr"
+ db_subst maas/installation-note MAAS_URL "$ipaddr"
+ db_set maas/default-maas-url "$ipaddr"
+ fi
+
+ #########################################################
+ ################ Configure Logging ####################
+ #########################################################
+
+ # Give appropriate permissions
+ if [ ! -f /var/log/maas/maas.log ]; then
+ touch /var/log/maas/maas.log
+ fi
+ chown -R maas:maas /var/log/maas
+ chmod -R 775 /var/log/maas/oops
+
+ # Create log directory base
+ mkdir -p /var/log/maas/rsyslog
+ chown -R syslog:syslog /var/log/maas/rsyslog
+ # Make sure rsyslog reads our config
+ if [ -x /usr/sbin/invoke-rc.d ]; then
+ invoke-rc.d rsyslog restart
+ fi
+
+ #########################################################
+ ################### Squid-deb-proxy ####################
+ #########################################################
+ # Make sure squid-deb-proxy reads our config (99-maas)
+ if [ -x /usr/sbin/invoke-rc.d ]; then
+ invoke-rc.d squid-deb-proxy restart
+ fi
+
+ #########################################################
+ ########## Configure longpoll rabbitmq config ###########
+ #########################################################
+
+ # Handle longpoll/rabbitmq publishing
+ restart_rabbitmq
+ configure_maas_txlongpoll_rabbitmq_user
+
+ #########################################################
+ ########## Configure worker rabbitmq config ###########
+ #########################################################
+
+ # Handle celery/rabbitmq publishing
+ configure_maas_workers_rabbitmq_user "$ipaddr"
+
+ #########################################################
+ ######## add maas.conf to tgt conf.d ####################
+ #########################################################
+ configure_maas_tgt
+
+ #########################################################
+ ################ Configure Database ###################
+ #########################################################
+
+ # Need to for postgresql start so it doesn't fail on the installer
+ restart_postgresql
+
+ # Create the database
+ dbc_go maas-region-controller $@
+ configure_maas_database "$dbc_dbpass"
+
+ # Only syncdb if we have selected to install it with dbconfig-common.
+ db_get maas-region-controller/dbconfig-install
+ if [ "$RET" = "true" ]; then
+ maas_sync_migrate_db
+ fi
+
+ # Display installation note
+ db_input high maas/installation-note || true
+ db_go
+
+elif [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then
+ # Set the IP address of the interface with default route
+ db_get maas/default-maas-url
+ ipaddr="$RET"
+ db_set maas/default-maas-url "$ipaddr"
+ if [ -n "$ipaddr" ]; then
+ configure_maas_default_url "$ipaddr"
+ configure_maas_squid_deb_proxy "$ipaddr"
+ configure_maas_workers_rabbitmq_user "$ipaddr"
+ fi
+
+elif [ "$1" = "configure" ] && dpkg --compare-versions "$2" gt 0.1+bzr266+dfsg-0ubuntu1; then
+ # If upgrading to any later package version, then upgrade db.
+ if [ -x /usr/sbin/invoke-rc.d ]; then
+ invoke-rc.d apache2 stop || true
+ fi
+
+ # make sure postgresql is running
+ restart_postgresql
+
+ # we need to regenerate the passwords and update configs.
+ db_get maas/default-maas-url
+ ipaddr="$RET"
+ configure_maas_default_url "$ipaddr"
+ configure_maas_squid_deb_proxy "$ipaddr"
+ # make sure rabbitmq is running
+ restart_rabbitmq
+ configure_maas_txlongpoll_rabbitmq_user
+ # Handle celery/rabbitmq publishing
+ configure_maas_workers_rabbitmq_user "$ipaddr"
+ # handle database upgrade
+ if [ -f /etc/dbconfig-common/maas-region-controller.conf ]; then
+ # source dbconfig-common db config for maas-region-controller
+ # before upgrading database, otherwise a new config is written
+ # but the password is no longer preserved.
+ . /etc/dbconfig-common/maas-region-controller.conf
+ else
+ dbc_go maas-region-controller $@
+ fi
+ configure_maas_database "$dbc_dbpass"
+
+ maas_sync_migrate_db
+
+fi
+
+restart_apache2
+
+restart_squid_deb_proxy
+
+db_stop
+
+#DEBHELPER#
+
+exit 0
=== 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-15 13:27:28 +0000
@@ -0,0 +1,57 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+if [ -f /etc/dbconfig-common/maas.conf ]; then
+ if [ -f /usr/share/dbconfig-common/dpkg/postrm ]; then
+ . /usr/share/dbconfig-common/dpkg/postrm.pgsql
+ dbc_go maas-region-controller $@
+ fi
+fi
+
+case "$1" in
+ purge)
+ rm -rf /var/log/maas
+ rm -rf /var/lib/maas
+ if [ -h /etc/apache2/conf.d/maas-http.conf ]; then
+ rm -rf /etc/apache2/conf.d/maas-http.conf
+ fi
+
+ # Restarting apache2
+ if [ -x /usr/sbin/invoke-rc.d ]; then
+ invoke-rc.d apache2 restart || true
+ else
+ /etc/init.d/apache2 restart || true
+ fi
+
+ # Delete symlink
+ if [ -L /etc/tgt/conf.d/maas.conf ]; then
+ rm -rf /etc/tgt/conf.d/maas.conf
+ fi
+
+ # Delete symlink
+ if [ -L /etc/squid-deb-proxy/mirror-dstdomain.acl.d/99-maas ]; then
+ rm -rf /etc/squid-deb-proxy/mirror-dstdomain.acl.d/99-maas
+ fi
+
+ # Remove rabbitmq/longpoll/celery
+ longpoll_user="maas_longpoll"
+ longpoll_vhost="/maas_longpoll"
+ workers_user="maas_workers"
+ workers_vhost="/maas_workers"
+ if [ -x /usr/sbin/rabbitmqctl ]; then
+ rabbitmqctl delete_vhost "$longpoll_vhost" || true
+ rabbitmqctl delete_user "$longpoll_user" || true
+
+ rabbitmqctl delete_vhost "$workers_vhost" || true
+ rabbitmqctl delete_user "$workers_user" || true
+ fi
+esac
+
+#DEBHELPER#
+
+db_stop
+
+exit 0
=== 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-15 13:27:28 +0000
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+#DEBHELPER#
+
+if [ -x /usr/sbin/invoke-rc.d ]; then
+ invoke-rc.d apache2 stop || true
+else
+ /etc/init.d/apache2 stop || true
+fi
+
+. /usr/share/dbconfig-common/dpkg/prerm.pgsql
+dbc_go maas-region-controller $@
+
+exit 0
=== 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-15 13:27:28 +0000
@@ -0,0 +1,22 @@
+Template: maas/installation-note
+Type: note
+Default: true
+_Description: Ubuntu MAAS Server
+ The Ubuntu MAAS Server has been installed in your system. You
+ can access the MAAS Web interface here:
+ .
+ http://${MAAS_URL}/MAAS
+ .
+ If the automatically detected address above is not in the same
+ network as the MAAS clients, you need to reconfigure it:
+ .
+ sudo dpkg-reconfigure maas-region-controller
+
+Template: maas/default-maas-url
+Type: string
+_Description: Ubuntu MAAS PXE/Provisioning network address:
+ The Ubuntu MAAS Server automatically detects the IP address
+ that is used for PXE and provisioning. However, it needs to be
+ in the same network as the clients. If the automatically
+ detected address is not in the same network as the clients, it
+ must be changed.
=== added file 'debian/maintscript'
--- debian/maintscript 1970-01-01 00:00:00 +0000
+++ debian/maintscript 2012-11-15 13:27:28 +0000
@@ -0,0 +1,2 @@
+rm_conffile /etc/init/maas-celery.conf 0.1+bzr971+dfsg-0ubuntu2
+rm_conffile /etc/dbconfig-common/maas.conf 0.1+bzr971+dfsg-0ubuntu2
=== 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-15 13:27:28 +0000
@@ -0,0 +1,26 @@
+Index: maas-0.1+bzr702+dfsg.orig/contrib/maas_local_settings.py
+===================================================================
+--- maas-0.1+bzr702+dfsg.orig.orig/contrib/maas_local_settings.py 2012-06-29 12:03:20.000000000 -0400
++++ maas-0.1+bzr702+dfsg.orig/contrib/maas_local_settings.py 2012-06-29 12:17:00.733389757 -0400
+@@ -7,7 +7,7 @@
+ DEFAULT_MAAS_URL = "http://maas.internal.example.com/"
+
+ # Absolute path to the directory static files should be collected to.
+-STATIC_ROOT = '/var/lib/maas/static/'
++STATIC_ROOT = '/usr/share/maas/web/static/'
+
+ # Prefix to use for MAAS's urls.
+ # If FORCE_SCRIPT_NAME is None (the default), all the urls will start with
+@@ -68,9 +68,9 @@
+ 'default': {
+ # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' etc.
+ 'ENGINE': 'django.db.backends.postgresql_psycopg2',
+- 'NAME': '',
+- 'USER': '',
+- 'PASSWORD': '',
++ 'NAME': 'maasdb',
++ 'USER': 'maas',
++ 'PASSWORD': 'maas',
+ 'HOST': 'localhost',
+ }
+ }
=== 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-15 13:27:28 +0000
@@ -0,0 +1,38 @@
+Description: Use default settings for MAAS PSERV
+ Use default settings for MAAS pserv. These default settings
+ include port, logfile, oops directory, cobbler url and username
+Author: Andres Rodriguez <andreserl@xxxxxxxxxx>
+
+Index: maas-0.1+bzr917+dfsg.orig/etc/pserv.yaml
+===================================================================
+--- maas-0.1+bzr917+dfsg.orig.orig/etc/pserv.yaml 2012-08-23 16:22:46.483599114 -0400
++++ maas-0.1+bzr917+dfsg.orig/etc/pserv.yaml 2012-08-23 16:22:56.579599373 -0400
+@@ -6,7 +6,7 @@
+ ## running server.
+ #
+ # logfile: "pserv.log"
+-logfile: "/dev/null"
++logfile: "/var/log/maas/pserv.log"
+
+ ## OOPS configuration (optional).
+ #
+@@ -15,7 +15,7 @@
+ # or directories other than what the oops machinery creates there.
+ #
+ # directory:
+- directory: "logs/oops"
++ directory: "/var/log/maas/oops"
+ # reporter:
+ reporter: "maas-pserv"
+
+@@ -33,10 +33,8 @@
+ tftp:
+ # root: /var/lib/maas/tftp
+ # port: 69
+- port: 5244
+ ## The URL to be contacted to generate PXE configurations.
+ # generator: http://localhost/MAAS/api/1.0/pxeconfig/
+- generator: http://localhost:5243/api/1.0/pxeconfig/
+
+ ## Boot configuration.
+ boot:
=== 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-15 13:27:28 +0000
@@ -0,0 +1,39 @@
+Description: Use default settings for MAAS txlongpoll
+ Use default settings for MAAS txlongpoll. These default settings
+ include oops directory, Message broker configuration, logfile.
+Author: Andres Rodriguez <andreserl@xxxxxxxxxx>
+
+Index: maas-0.1+bzr398+dfsg.orig/etc/txlongpoll.yaml
+===================================================================
+--- maas-0.1+bzr398+dfsg.orig.orig/etc/txlongpoll.yaml 2012-04-03 09:49:48.109427702 -0400
++++ maas-0.1+bzr398+dfsg.orig/etc/txlongpoll.yaml 2012-04-03 09:53:07.276282800 -0400
+@@ -17,7 +17,7 @@
+ # or directories other than what the oops machinery creates there.
+ #
+ # directory: ""
+- directory: "logs/oops"
++ directory: "/var/log/maas/oops"
+ ## The reporter used when generating OOPS reports.
+ # reporter: "LONGPOLL"
+ reporter: "maas-txlongpoll"
+@@ -25,14 +25,14 @@
+ ## Message broker configuration.
+ #
+ broker:
+- # host: "localhost"
+- # port: 5672
+- # username: "guest"
+- # password: "guest"
+- # vhost: "/"
++ host: "localhost"
++ port: 5672
++ username: "maas_longpoll"
++ password: "maaslongpoll"
++ vhost: "/maas_longpoll"
+
+ ## Where to log. This log can be rotated by sending SIGUSR1 to the
+ ## running server.
+ #
+ # logfile: "txlongpoll.log"
+-logfile: "/dev/null"
++logfile: "/var/log/maas/txlongpoll.log"
=== added file 'debian/patches/series'
--- debian/patches/series 1970-01-01 00:00:00 +0000
+++ debian/patches/series 2012-11-15 13:27:28 +0000
@@ -0,0 +1,3 @@
+01-fix-database-settings.patch
+02-pserv-config.patch
+03-txlongpoll-config.patch
=== 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-15 13:27:28 +0000
@@ -0,0 +1,2 @@
+[type: gettext/rfc822deb] maas-region-controller.templates
+[type: gettext/rfc822deb] maas-cluster-controller.templates
=== added file 'debian/po/templates.pot'
--- debian/po/templates.pot 1970-01-01 00:00:00 +0000
+++ debian/po/templates.pot 2012-11-15 13:27:28 +0000
@@ -0,0 +1,82 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: maas\n"
+"Report-Msgid-Bugs-To: maas@xxxxxxxxxxxxxxxxxxx\n"
+"POT-Creation-Date: 2012-10-04 13:40-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@xxxxxx>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../maas-region-controller.templates:1001
+msgid "Ubuntu MAAS Server"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../maas-region-controller.templates:1001
+msgid ""
+"The Ubuntu MAAS Server has been installed in your system. You can access the "
+"MAAS Web interface here:"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../maas-region-controller.templates:1001
+msgid " http://${MAAS_URL}/MAAS"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../maas-region-controller.templates:1001
+msgid ""
+"If the automatically detected address above is not in the same network as "
+"the MAAS clients, you need to reconfigure it:"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../maas-region-controller.templates:1001
+msgid " sudo dpkg-reconfigure maas-region-controller"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../maas-region-controller.templates:2001
+msgid "Ubuntu MAAS PXE/Provisioning network address:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../maas-region-controller.templates:2001
+msgid ""
+"The Ubuntu MAAS Server automatically detects the IP address that is used for "
+"PXE and provisioning. However, it needs to be in the same network as the "
+"clients. If the automatically detected address is not in the same network as "
+"the clients, it must be changed."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../maas-cluster-controller.templates:1001
+msgid "Ubuntu MAAS API address:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../maas-cluster-controller.templates:1001
+msgid ""
+"The MAAS Cluster Controller needs to contact the MAAS server to register its "
+"presence. Set the URL to the MAAS API here, e.g. http://192.168.1.1/MAAS"
+msgstr ""
=== 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-15 13:27:28 +0000
@@ -0,0 +1,2 @@
+debian/tmp/usr/lib/python*/dist-packages/maasserver
+debian/tmp/usr/lib/python*/dist-packages/metadataserver
=== 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-15 13:27:28 +0000
@@ -0,0 +1,1 @@
+debian/tmp/usr/lib/python*/dist-packages/apiclient
=== 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-15 13:27:28 +0000
@@ -0,0 +1,4 @@
+debian/tmp/usr/lib/python*/dist-packages/provisioningserver
+
+# Install other stuff
+debian/extras/maas-provision usr/sbin
=== added file 'debian/rules'
--- debian/rules 1970-01-01 00:00:00 +0000
+++ debian/rules 2012-11-15 13:27:28 +0000
@@ -0,0 +1,65 @@
+#!/usr/bin/make -f
+
+BUILDHOME = $(CURDIR)/debian/build
+PYTHON = $(shell pyversions -d)
+# Python enum modules.
+py_enums := $(wildcard src/*/enum.py)
+
+%:
+ dh $@ --with python2,apport --buildsystem=python_distutils
+
+override_dh_installinit:
+ dh_installinit --name maas-pserv
+ dh_installinit --name maas-txlongpoll
+ dh_installinit --name maas-region-celery
+ dh_installinit --name maas-cluster-celery
+ dh_installinit --name maas-dhcp-server
+
+override_dh_auto_build:
+ dh_auto_build
+
+ mkdir -p $(BUILDHOME)
+ HOME=$(BUILDHOME) PYTHONPATH=$(CURDIR)/src/ $(PYTHON) \
+ $(CURDIR)/src/maasserver/utils/jsenums.py \
+ $(py_enums) > $(BUILDHOME)/enums.js
+
+override_dh_auto_install:
+ dh_auto_install
+
+ # Move static files
+ install -d -m 755 $(CURDIR)/debian/tmp/usr/share/maas/web/static
+ mv $(CURDIR)/debian/tmp/usr/lib/python*/*-packages/maasserver/static \
+ $(CURDIR)/debian/tmp/usr/share/maas/web/
+
+ # Install built enums.js file.
+ cp $(BUILDHOME)/enums.js $(CURDIR)/debian/tmp/usr/share/maas/web/static/js/
+
+ # install the apparmor profile
+ install -d -m 755 $(CURDIR)/debian/tmp/etc/apparmor.d/dhcpd.d
+ install -m 644 $(CURDIR)/debian/maas-dhcp.apparmor \
+ $(CURDIR)/debian/tmp/etc/apparmor.d/dhcpd.d/maas
+
+ dh_install --list-missing
+
+override_dh_auto_clean:
+ dh_auto_clean
+ rm -rf $(BUILDHOME)
+ rm -rf src/*.egg-info
+
+DEB_DEBIAN_DIR=$(dir $(firstword $(MAKEFILE_LIST)))
+REV=$(shell dpkg-parsechangelog -l$(DEB_DEBIAN_DIR)/changelog \
+ | sed -rne 's,^Version: .*[+~]bzr([0-9]+).*,\1,p')
+VER=$(shell dpkg-parsechangelog -l$(DEB_DEBIAN_DIR)/changelog \
+ | sed -rne 's,^Version: ([^-]+).*,\1,p')
+get-orig-source:
+ bzr export -r $(REV) --root=maas-$(VER).orig \
+ maas_$(VER).orig.tar.gz lp:maas/1.2
+ rm -rf maas-$(VER)
+ tar -xf maas_$(VER).orig.tar.gz
+ rm maas_$(VER).orig.tar.gz
+ rm -rf maas-$(VER).orig/src/maasserver/static/jslibs/
+ rm -rf maas-$(VER).orig/contrib/python-tx-tftp
+ GZIP=--best tar -cz --owner root --group root --mode a+rX \
+ -f maas_$(VER).orig.tar.gz \
+ maas-$(VER).orig
+ rm -r maas-$(VER).orig
=== added directory 'debian/source'
=== added file 'debian/source/format'
--- debian/source/format 1970-01-01 00:00:00 +0000
+++ debian/source/format 2012-11-15 13:27:28 +0000
@@ -0,0 +1,1 @@
+3.0 (quilt)
=== added directory 'debian/tests'
=== added file 'debian/tests/control'
--- debian/tests/control 1970-01-01 00:00:00 +0000
+++ debian/tests/control 2012-11-15 13:27:28 +0000
@@ -0,0 +1,2 @@
+Tests: maas-package-test
+Depends: @, python-nose, xvfb, python-pip
=== 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-15 13:27:28 +0000
@@ -0,0 +1,72 @@
+# TODO
+# - send ipmi commands to turn on/off nodes
+# - run import pxe files
+# - check node states once they're on/off
+# - check node state changes (declared -> commissionig -> ready)
+import os
+from subprocess import check_output
+import sys
+from unittest import TestCase
+
+from pyvirtualdisplay import Display
+from sst.actions import (
+ assert_url, assert_text_contains, assert_title_contains, click_button,
+ get_element, go_to, write_textfield)
+
+
+sys.path.insert(0, "/usr/share/maas")
+os.environ['DJANGO_SETTINGS_MODULE'] = 'maas.settings'
+from maasserver.models import User
+
+MAAS_URL = "http://10.98.0.13/MAAS"
+ADMIN_USER = "admin"
+PASSWORD = "test"
+
+
+class TestMAASIntegration(TestCase):
+
+ def setUp(self):
+ self.display = Display(visible=0, size=(1280, 1024))
+ self.display.start()
+
+ def tearDown(self):
+ self.display.stop()
+
+ def createadmin(self):
+ """Run sudo maas createsuperuser."""
+ cmd_output = check_output(
+ ["sudo", "maas", "createsuperuser", "--username=%s" % ADMIN_USER,
+ "--email=example@xxxxxxxxxxxxx", "--noinput"])
+ ## Set password for admin user.
+ try:
+ admin = User.objects.get(username=ADMIN_USER)
+ except User.DoesNotExist:
+ admin = User(username=ADMIN_USER)
+ admin.set_password(PASSWORD)
+ admin.save()
+ return cmd_output
+
+ def installation(self):
+ # Check the installation worked.
+ go_to(MAAS_URL)
+ assert_text_contains(
+ get_element(tag="body"), "No admin user has been created yet")
+
+ def createadmin_and_login(self):
+ ## Creates the admin user.
+ output = self.createadmin()
+ self.assertEqual(output, 'Superuser created successfully.')
+ ## Login with the newly created admin user
+ go_to(MAAS_URL)
+ assert_text_contains(
+ get_element(tag="body"), "Login to lenovo-RD230-01 MAAS")
+ write_textfield("id_username", ADMIN_USER)
+ write_textfield("id_password", PASSWORD)
+ click_button("Login")
+ assert_url("MAAS/")
+ assert_title_contains("Dashboard")
+
+ def test_integration(self):
+ # Run the integration tests in order.
+ self.installation()
+ self.createadmin_and_login()
=== 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-15 13:27:28 +0000
@@ -0,0 +1,5 @@
+#!/bin/sh
+set -e -u
+exec 2>&1
+pip install sst
+nosetests debian/tests/maas-integration.py
=== added file 'debian/watch'
--- debian/watch 1970-01-01 00:00:00 +0000
+++ debian/watch 2012-11-15 13:27:28 +0000
@@ -0,0 +1,2 @@
+version=3
+http://launchpad.net/maas/+download https://launchpad.net/maas/.*/maas-(.*).tar.*