maas-2.0.0~beta3+bzr4941.orig/.coveragerc0000644000000000000000000000033412705726641016102 0ustar 00000000000000[run] data_file = coverage.data [report] exclude_lines = # Have to re-enable the standard pragma pragma: no cover # Don't complain if tests don't hit defensive assertion code: raise NotImplementedError maas-2.0.0~beta3+bzr4941.orig/.ctags0000644000000000000000000000007112705726641015061 0ustar 00000000000000--python-kinds=-iv --exclude=*.js --extra=+f --links=yes maas-2.0.0~beta3+bzr4941.orig/.gitignore0000644000000000000000000000127512705726641015756 0ustar 00000000000000*.egg *.egg-info *.log *.DS_Store /.db.lock /.hypothesis /.idea /.idea/scopes /.idea/workspace.xml /.installed.cfg /.noseids /acceptance/*.build /acceptance/*.changes /acceptance/*.deb /acceptance/build /acceptance/source /bin /build /coverage /coverage.data /coverage.xml /db /develop-eggs /dist /docs/api.rst /docs/_autosummary /docs/_build /eggs /etc/maas/rackd.conf /etc/maas/regiond.conf /include /lib /local /logs/* /man/.doctrees /media/demo/* /media/development /parts /run-e2e/* /run-e2e/etc/* /run-e2e/etc/maas/* /run/* /run/etc/* /run/etc/maas/* /services/*/supervise /src/maasserver/data/templates.py /src/maasserver/static/js/enums.js /TAGS /tags dropin.cache /src/**/*.pyc /etc/**/*.pyc maas-2.0.0~beta3+bzr4941.orig/.idea/0000755000000000000000000000000012705726641014741 5ustar 00000000000000maas-2.0.0~beta3+bzr4941.orig/CHANGELOG0000755000000000000000000000000012705726641020575 2docs/changelog.rstustar 00000000000000maas-2.0.0~beta3+bzr4941.orig/HACKING.txt0000644000000000000000000004402712705726641015575 0ustar 00000000000000.. -*- mode: rst -*- ************ Hacking MAAS ************ Coding style ============ MAAS follows the `Launchpad Python Style Guide`_, except where it gets Launchpad specific, and where it talks about `method naming`_. MAAS instead adopts `PEP-8`_ naming in all cases, so method names should usually use the ``lowercase_with_underscores`` form. .. _Launchpad Python Style Guide: https://dev.launchpad.net/PythonStyleGuide .. _method naming: https://dev.launchpad.net/PythonStyleGuide#Naming .. _PEP-8: http://www.python.org/dev/peps/pep-0008/ Prerequisites ============= You can grab MAAS's code manually from Launchpad but Bazaar_ makes it easy to fetch the last version of the code. First of all, install Bazaar:: $ sudo apt-get install bzr .. _Bazaar: http://bazaar.canonical.com/ Then go into the directory where you want the code to reside and run:: $ bzr branch lp:maas maas && cd maas MAAS depends on Postgres 9.1, Apache 2, daemontools, pyinotify, and many other packages. To install everything that's needed for running and developing MAAS, run:: $ make install-dependencies Careful: this will ``apt-get install`` many packages on your system, via ``sudo``. It may prompt you for your password. This will install ``bind9``. As a result you will have an extra daemon running. If you are a developer and don't intend to run BIND locally, you can disable the daemon by inserting ``exit 1`` at the top of ``/etc/default/bind9``. The package still needs to be installed for tests though. Python development dependencies are pulled automatically from `PyPI`_ when ``buildout`` runs. (``buildout`` will be automatically configured to create a cache, in order to improve build times. See ``utilities/configure-buildout``.) Javascript development dependencies are pulled automatically from `npm`_ when ``make`` runs. (``npm`` will be automatically configured to use a cache, in order to improve build times.) .. _PyPI: http://pypi.python.org/ .. _npm: https://www.npmjs.com/ Optional ^^^^^^^^ The PyCharm_ IDE is a useful tool when developing MAAS. The MAAS team does not endorse any particular IDE, but ``.idea`` `project files are included with MAAS`_, so PyCharm_ is an easy choice. .. _PyCharm: https://www.jetbrains.com/pycharm/ .. _project files are included with MAAS: https://intellij-support.jetbrains.com/entries/23393067-How-to-manage-projects-under-Version-Control-Systems Running tests ============= To run the whole suite:: $ make test To run tests at a lower level of granularity:: $ ./bin/test.region src/maasserver/tests/test_api.py $ ./bin/test.region src/maasserver/tests/test_api.py:AnonymousEnlistmentAPITest The test runner is `nose`_, so you can pass in options like ``--with-coverage`` and ``--nocapture`` (short option: ``-s``). The latter is essential when using ``pdb`` so that stdout is not adulterated. .. _nose: http://readthedocs.org/docs/nose/en/latest/ .. Note:: When running ``make test`` through ssh from a machine with locales that are not set up on the machine that runs the tests, some tests will fail with a ``MismatchError`` and an "unsupported locale setting" message. Running ``locale-gen`` for the missing locales or changing your locales on your workstation to ones present on the server will solve the issue. Running JavaScript tests ^^^^^^^^^^^^^^^^^^^^^^^^ The JavaScript tests are run using Karma_. Chromium and PhantomJS are the default browser but any browser supported by Karma can be used to run the tests.:: $ ./bin/test.js If you want to run the JavaScript tests in debug mode so you can inspect the code inside of a running browser you can launch Karma_ manually.:: $ ./bin/karma start src/maastesting/karma.conf.js --browsers Chrome --no-single-run .. _Karma: http://karma-runner.github.io/ Production MAAS server debugging ================================ When MAAS is installed from packaging it can help to enable debugging features to triage issues. Log all API and UI exceptions ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ By default MAAS only logs HTTP 500 - INTERNAL_SERVER_ERROR into the regiond.log. To enable logging of all exceptions even exceptions where MAAS will return the correct HTTP status code.:: $ sudo sed -i 's/DEBUG = False/DEBUG = True/g' /usr/share/maas/maas/settings.py $ sudo service maas-regiond restart Run regiond in foreground ^^^^^^^^^^^^^^^^^^^^^^^^^ It can help when debugging to run regiond a foreground process so you can interact with the regiond by placing a breakpoint in the code. Once you have placed a breakpoint into the code you want to inspect you can start the regiond process in the foreground.:: $ sudo service maas-regiond stop $ sudo -u maas -H DJANGO_SETTINGS_MODULE=maas.settings PYTHONPATH=/usr/share/maas twistd3 --nodaemon --pidfile= maas-regiond .. Note:: By default a MAAS installation runs 4 regiond processes at the same time. This will change it to only run 1 process in the foreground. This should only be used for debugging. Once finished the breakpoint should be removed and maas-regiond service should be started. Run rackd in foreground ^^^^^^^^^^^^^^^^^^^^^^^^^ It can help when debugging to run rackd a foreground process so you can interact with the rackd by placing a breakpoint in the code. Once you have placed a breakpoint into the code you want to inspect you can start the rackd process in the foreground.:: $ sudo service maas-rackd stop $ sudo -u maas -H /usr/bin/authbind --deep /usr/bin/twistd3 --nodaemon --pidfile= maas-rackd Development MAAS server setup ============================= Access to the database is configured in ``src/maas/development.py``. The ``Makefile`` or the test suite sets up a development database cluster inside your branch. It lives in the ``db`` directory, which gets created on demand. You'll want to shut it down before deleting a branch; see below. First, set up the project. This fetches all the required dependencies and sets up some useful commands in ``bin/``:: $ make Create the database cluster and initialise the development database:: $ make syncdb Optionally, populate your database with the sample data:: $ make sampledata By default, the snippet ``maas_proxy`` includes a definition for an http proxy running on port 8000 on the same host as the MAAS server. This means you can *either* install ``squid-deb-proxy``:: $ sudo apt-get install squid-deb-proxy *or* you can edit ``contrib/snippets_v2/generic`` to remove the proxy definition. Set the iSCSI config to include the MAAS configs:: $ sudo tee -a /etc/tgt/targets.conf < contrib/tgt.conf The http_proxy variable is only needed if you're downloading through a proxy; "sudo" wouldn't pass it on to the script without the assignment. Or if you don't have it set but do want to download through a proxy, pass your proxy's URL: "http_proxy=http://proxy.example.com/" Run the development webserver and watch all the logs go by:: $ make run Point your browser to http://localhost:5240/MAAS/ If you've populated your instance with the sample data, you can login as a simple user using the test account (username: 'test', password: 'test') or the admin account (username: 'admin', password: 'test'). At this point you may also want to `download PXE boot resources`_. .. _`download PXE boot resources`: `Downloading PXE boot resources`_ To shut down the database cluster and clean up all other generated files in your branch:: $ make distclean Downloading PXE boot resources ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ To use PXE booting, each cluster controller needs to download several files relating to PXE booting. This process is automated, but it does not start by default. First create a superuser and start all MAAS services:: $ bin/maas-region createadmin $ make run Substitute your own email. The command will prompt for a choice of password. Next, get the superuser's API key on the `account preferences`_ page in the web UI, and use it to log into MAAS at the command-line:: $ bin/maas login dev http://localhost:5240/MAAS/ .. _`account preferences`: http://localhost:5240/MAAS/account/prefs/ Start downloading PXE boot resources:: $ bin/maas dev node-groups import-boot-images This sends jobs to each cluster controller, asking each to download the boot resources they require. This may download dozens or hundreds of megabytes, so it may take a while. To save bandwidth, set an HTTP proxy beforehand:: $ bin/maas dev maas set-config name=http_proxy value=http://... Running the built-in TFTP server ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ You will need to run the built-in TFTP server on the real TFTP port (69) if you want to boot some real hardware. By default, it's set to start up on port 5244 for testing purposes. Make these changes:: * Use ``bin/maas-rack`` to change the tftp-port setting to 69 * Install the ``authbind``package: $ sudo apt-get install authbind * Create a file ``/etc/authbind/byport/69`` that is *executable* by the user running MAAS. $ sudo touch /etc/authbind/byport/69 $ sudo chmod a+x /etc/authbind/byport/69 Now when starting up the MAAS development webserver, "make run" and "make start" will detect authbind's presence and use it automatically. Running the BIND daemon for real ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ There's a BIND daemon that is started up as part of the development service but it runs on port 5246 by default. If you want to make it run as a real DNS server on the box then edit ``services/dns/run`` and change the port declaration there so it says:: port=53 Then as for TFTP above, create an authbind authorisation:: $ sudo touch /etc/authbind/byport/53 $ sudo chmod a+x /etc/authbind/byport/53 and run as normal. Running the cluster worker ^^^^^^^^^^^^^^^^^^^^^^^^^^ The cluster also needs authbind as it needs to bind a socket on UDP port 68 for DHCP probing:: $ sudo touch /etc/authbind/byport/68 $ sudo chmod a+x /etc/authbind/byport/68 If you omit this, nothing else will break, but you will get an error in the cluster log because it can't bind to the port. Configuring DHCP ^^^^^^^^^^^^^^^^ MAAS requires a properly configured DHCP server so it can boot machines using PXE. MAAS can work with its own instance of the ISC DHCP server, if you install the maas-dhcp package:: $ sudo apt-get install maas-dhcp If you choose to run your own ISC DHCP server, there is a bit more configuration to do. First, run this tool to generate a configuration that will work with MAAS:: $ maas-rack generate-dhcp-config [options] Run ``maas-rack generate-dhcp-config -h`` to see the options. You will need to provide various IP details such as the range of IP addresses to assign to clients. You can use the generated output to configure your system's ISC DHCP server, by inserting the configuration in the ``/var/lib/maas/dhcpd.conf`` file. Also, edit /etc/default/isc-dhcp-server to set the INTERFACES variable to just the network interfaces that should be serviced by this DHCP server. Now restart dhcpd:: $ sudo service isc-dhcp-server restart None of this work is needed if you let MAAS run its own DHCP server by installing ``maas-dhcp``. Development services ==================== The development environment uses *daemontools* to manage the various services that are required. These are all defined in subdirectories in ``services/``. There are familiar service-like commands:: $ make start $ make status $ make restart $ make stop The latter is a dependency of ``distclean`` so just running ``make distclean`` when you've finished with your branch is enough to stop everything. Individual services can be manipulated too:: $ make services/rackd/@start The ``@`` pattern works for any of the services. There's an additional special action, ``run``:: $ make run This starts all services up and tails their log files. When you're done, kill ``tail`` (e.g. Ctrl-c), and all the services will be stopped. However, when used with individual services:: $ make services/regiond/@run it does something even cooler. First it shuts down the service, then it restarts it in the foreground so you can see the logs in the console. More importantly, it allows you to use ``pdb``, for example. A note of caution: some of the services have slightly different behaviour when run in the foreground: * regiond (the *webapp* service) will be run with its auto-reloading enabled. There's a convenience target for hacking regiond that starts everything up, but with regiond in the foreground:: $ make run+regiond Apparently Django needs a lot of debugging ;) Adding new dependencies ======================= Since MAAS is distributed mainly as an Ubuntu package, all runtime dependencies should be packaged, and we should develop with the packaged version if possible. All dependencies, from a package or not, need to be added to ``setup.py`` and ``buildout.cfg``, and the version specified in ``versions.cfg`` (``allowed-picked-version`` is disabled, hence ``buildout`` must be given precise version information). If it is a development-only dependency (i.e. only needed for the test suite, or for developers' convenience), simply running ``buildout`` like this will make the necessary updates to ``versions.cfg``:: $ ./bin/buildout -v buildout:allow-picked-versions=true Adding new source files ======================= When creating a new source file, a Python module or test for example, always start with the appropriate template from the ``templates`` directory. Database information ==================== MAAS uses Django_ to manage changes to the database schema. .. _Django: https://www.djangoproject.com/ Be sure to have a look at `Django's migration documentation`_ before you make any change. .. _Django's migration documentation: https://docs.djangoproject.com/en/1.8/topics/migrations/ Changing the schema ^^^^^^^^^^^^^^^^^^^ Once you've made a model change (i.e. a change to a file in ``src//models/*.py``) you have to run Django's `makemigrations`_ command to create a migration file that will be stored in ``src//migrations/builtin/``. Note that if you want to add a new model class you'll need to import it in ``src//models/__init__.py`` .. _makemigrations: https://docs.djangoproject.com/en/1.8/ref/django-admin/#django-admin-makemigrations Generate the migration script with:: $ ./bin/maas-region makemigrations --name description_of_the_change maasserver This will generate a migration module named ``src/maasserver/migrations/builtin/_description_of_the_change.py``. Don't forget to add that file to the project with:: $ bzr add src/maasserver/migrations/builtin/_description_of_the_change.py To apply that migration, run:: $ make syncdb Performing data migration ^^^^^^^^^^^^^^^^^^^^^^^^^ If you need to perform data migration, very much in the same way, you will need to run Django's `makemigrations`_ command. For instance, if you want to perform changes to the ``maasserver`` application, run:: $ ./bin/maas-region makemigrations --empty --name description_of_the_change maasserver This will generate a migration module named ``src/maasserver/migrations/builtin/_description_of_the_change.py``. You will need to edit that file and fill the ``operations`` list with the options that need to be performed. Again, don't forget to add that file to the project:: $ bzr add src/maasserver/migrations/builtin/_description_of_the_change.py Once the operations have been added, apply that migration with:: $ make syncdb Migrations before MAAS 2.0 ^^^^^^^^^^^^^^^^^^^^^^^^^^ Previous version before MAAS 2.0 used South_ to perform database migrations. To support upgrading from any previous version of MAAS before 2.0 the South_ migrations are run. On upgrade of MAAS those migrations will be run before the new Django_ migrations are run. On a fresh installation of MAAS the South_ migrations will be skipped because the Django_ migrations already provide the entire schema in the initial migration. All of this logic is performed on upgrade by the `dbupgrade` command.:: $ bin/maas-region dbupgrade In some testing case you might need to always run the South_ migrations before the Django_ migrations on a clean database. Using the `always-south` option on the `dbupgrade` command allows this testing scenario.:: $ bin/maas-region dbupgrade --always-south .. Note:: When the South_ migrations run they are actually being ran under Django 1.6 and South that is provided in the MAAS source code in a tarball. Located at ``src/maasserver/migrations/south/django16_south.tar.gz`` this file is extracted into a temporary folder and imported by MAAS to run the South migrations. .. _South: http://south.aeracode.org/ Examining the database manually ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If you need to get an interactive ``psql`` prompt, you can use `dbshell`_:: $ bin/maas-region dbshell .. _dbshell: https://docs.djangoproject.com/en/dev/ref/django-admin/#dbshell If you need to do the same thing with a version of MAAS you have installed from the package, you can use:: $ sudo maas-region dbshell --installed You can use the ``\dt`` command to list the tables in the MAAS database. You can also execute arbitrary SQL. For example::: maasdb=# select system_id, hostname from maasserver_node; system_id | hostname -------------------------------------------+-------------------- node-709703ec-c304-11e4-804c-00163e32e5b5 | gross-debt.local node-7069401a-c304-11e4-a64e-00163e32e5b5 | round-attack.local (2 rows) Documentation ============= Use `reST`_ with the `convention for headings as used in the Python documentation`_. .. _reST: http://sphinx.pocoo.org/rest.html .. _convention for headings as used in the Python documentation: http://sphinx.pocoo.org/rest.html#sections Updating copyright notices ^^^^^^^^^^^^^^^^^^^^^^^^^^ Use the `Bazaar Copyright Updater`_:: bzr branch lp:bzr-update-copyright ~/.bazaar/plugins/update_copyright make copyright Then commit any changes. .. _Bazaar Copyright Updater: https://launchpad.net/bzr-update-copyright maas-2.0.0~beta3+bzr4941.orig/INSTALL.txt0000644000000000000000000003070512705726641015635 0ustar 00000000000000.. -*- mode: rst -*- Installing MAAS =============== There are two main ways to install MAAS: * :ref:`From a package repository. ` * :ref:`As a fresh install from Ubuntu Server install media. ` MAAS Packages and Repositories ------------------------------ MAAS Packages ^^^^^^^^^^^^^ Installing MAAS from packages is straightforward. There are actually several packages that go into making up a working MAAS install, but for convenience, many of these have been gathered into a virtual package called 'maas' which will install the necessary components for a 'seed cloud', that is a single server that will directly control a group of nodes. The main packages are: * ``maas`` - seed cloud setup, which includes both the region controller and the rack controller below. * ``maas-region-controller`` - includes the web UI, API and database. * ``maas-rack-controller`` - controls a group of machines under a rack or multiple racks, including DHCP management. * ``maas-dhcp``/``maas-dns`` - required when managing dhcp/dns. * ``maas-proxy`` - required to provide a MAAS proxy. If you need to separate these services or want to deploy an additional rack controller, you should install the corresponding packages individually (see :ref:`the description of a typical setup ` for more background on how a typical hardware setup might be arranged). There are two suggested additional packages 'maas-dhcp' and 'maas-dns'. These set up MAAS-controlled DHCP and DNS services which greatly simplify deployment if you are running a typical setup where the MAAS controller can run the network (Note: These **must** be installed if you later set the options in the web interface to have MAAS manage DHCP/DNS). MAAS Package Repositories ^^^^^^^^^^^^^^^^^^^^^^^^^ While MAAS is available in the Ubuntu Archives per each release of Ubuntu, the version might not be the latest. However, if you would like to install a newer version of MAAS (the latest stable release), this is available in the following PPA: * `ppa:maas/stable`_ .. Note:: The MAAS team also releases the latest development release of MAAS. The development release is available in `ppa:maas/next`_. However, this is meant to be used for testing and at your own risk. Adding MAAS package repository is simple. At the command line, type:: $ sudo add-apt-repository ppa:maas/stable You will be asked to confirm whether you would like to add this repository, and its key. Upon configumation, the following needs to be typed at the command line:: $ sudo apt-get update .. _ppa:maas/stable: https://launchpad.net/~maas/+archive/ubuntu/stable .. _ppa:maas/next: https://launchpad.net/~maas/+archive/ubuntu/next .. _pkg-install: Installing MAAS from the command line ------------------------------------- Installing a Single Node MAAS ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ At the command line, type:: $ sudo apt-get install maas This will install both the MAAS Region Controller and the MAAS Rack Controller, and will select sane defaults for the communication between the Rack Controller and the Region Controller. After installation, you can access the Web Interface. Then, there are just a few more setup steps :ref:`post_install` Reconfiguring a MAAS Installation ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ You will see a list of packages and a confirmation message to proceed. The exact list will obviously depend on what you already have installed on your server, but expect to add about 200MB of files. The configuration for the MAAS controller will automatically run and pop up this config screen: .. image:: media/install_cluster-config.* Here you will need to enter the hostname for where the region controller can be contacted. In many scenarios, you may be running the region controller (i.e. the web and API interface) from a different network address, for example where a server has several network interfaces. Adding Rack Controllers ^^^^^^^^^^^^^^^^^^^^^^^ If you would like to add additional MAAS Rack Controllers to your MAAS setup, you can do so by following the instructions in :doc:`rack-configuration`. .. _disc-install: Installing MAAS from Ubuntu Server boot media --------------------------------------------- If you are installing MAAS as part of a fresh install it is easiest to choose the "Multiple Server install with MAAS" option from the installer and have pretty much everything set up for you. Boot from the Ubuntu Server media and you will be greeted with the usual language selection screen: .. image:: media/install_01.* On the next screen, you will see there is an entry in the menu called "Multiple server install with MAAS". Use the cursor keys to select this and then press Enter. .. image:: media/install_02.* The installer then runs through the usual language and keyboard options. Make your selections using Tab/Cursor keys/Enter to proceed through the install. The installer will then load various drivers, which may take a moment or two. .. image:: media/install_03.* The next screen asks for the hostname for this server. Choose something appropriate for your network. .. image:: media/install_04.* Finally we get to the MAAS part! Here there are just two options. We want to "Create a new MAAS on this server" so go ahead and choose that one. .. image:: media/install_05.* The install now continues as usual. Next you will be prompted to enter a username. This will be the admin user for the actual server that MAAS will be running on (not the same as the MAAS admin user!) .. image:: media/install_06.* As usual you will have the chance to encrypt your home directory. Continue to make selections based on whatever settings suit your usage. .. image:: media/install_07.* After making selections and partitioning storage, the system software will start to be installed. This part should only take a few minutes. .. image:: media/install_09.* Various packages will now be configured, including the package manager and update manager. It is important to set these up appropriately so you will receive timely updates of the MAAS server software, as well as other essential services that may run on this server. .. image:: media/install_10.* The configuration for MAAS will ask you to configure the host address of the server. This should be the IP address you will use to connect to the server (you may have additional interfaces e.g. to run node subnets) .. image:: media/install_cluster-config.* The next screen will confirm the web address that will be used to the web interface. .. image:: media/install_controller-config.* After configuring any other packages the installer will finally come to and end. At this point you should eject the boot media. .. image:: media/install_14.* After restarting, you should be able to login to the new server with the information you supplied during the install. The MAAS software will run automatically. .. image:: media/install_15.* **NOTE:** The maas-dhcp and maas-dns packages should be installed by default, but on older releases of MAAS they won't be. If you want to have MAAS run DHCP and DNS services, you should install these packages. Check whether they are installed with:: $ dpkg -l maas-dhcp maas-dns If they are missing, then:: $ sudo apt-get install maas-dhcp maas-dns And then proceed to the post-install setup below. .. _post_install: Post-Install tasks ================== Your MAAS is now installed, but there are a few more things to be done. If you now use a web browser to connect to the region controller, you should see that MAAS is running, but there will also be some errors on the screen: .. image:: media/install_web-init.* The on screen messages will tell you that there are no boot images present, and that you can't login because there is no admin user. Create a superuser account -------------------------- Once MAAS is installed, you'll need to create an administrator account:: $ sudo maas-region createadmin --username=root --email=MYEMAIL@EXAMPLE.COM Substitute your own email address for MYEMAIL@EXAMPLE.COM. You may also use a different username for your administrator account, but "root" is a common convention and easy to remember. The command will prompt for a password to assign to the new user. You can run this command again for any further administrator accounts you may wish to create, but you need at least one. Log in on the server -------------------- Looking at the region controller's main web page again, you should now see a login screen. Log in using the user name and password which you have just created. .. image:: media/install-login.* Import the boot images ---------------------- Since version 1.7, MAAS stores the boot images in the region controller's database, from where the rack controllers will synchronise with the region and pull images from the region to the rack's local disk. This process is automatic and MAAS will check for and download new Ubuntu images every hour. However, on a new installation you'll need to start the import process manually once you have set up your MAAS region controller. There are two ways to start the import: through the web user interface, or through the remote API. To do it in the web user interface, go to the Images tab, check the boxes to say which images you want to import, and click the "Import images" button at the bottom of the Ubuntu section. .. image:: media/import-images.* A message will appear to let you know that the import has started, and after a while, the warnings about the lack of boot images will disappear. It may take a long time, depending on the speed of your Internet connection for import process to complete, as the images are several hundred megabytes. The import process will only download images that have changed since last import. You can check the progress of the import by hovering over the spinner next to each image. The other way to start the import is through the :ref:`region-controller API `, which you can invoke most conveniently through the :ref:`command-line interface `. To do this, connect to the MAAS API using the "maas" command-line client. See :ref:`Logging in ` for how to get set up with this tool. Then, run the command:: $ maas my-maas-session boot-resources import (Substitute a different profile name for 'my-maas-session' if you have named yours something else.) This will initiate the download, just as if you had clicked "Import images" in the web user interface. By default, the import is configured to download the most recent LTS release only for the amd64 architecture. Although this should suit most needs, you can change the selections on the Images tab, or over the API. Read :doc:`customise boot sources ` to see examples on how to do that. Speeding up repeated image imports by using a local mirror ---------------------------------------------------------- See :doc:`sstreams-mirror` for information on how to set up a mirror and configure MAAS to use it. Configure DHCP -------------- To enable MAAS to control DHCP, you can either: #. Follow the instructions at :doc:`rack-configuration` to use the web UI to set up your rack controller. #. Use the command line interface `maas` by first :ref:`logging in to the API ` and then :ref:`following this procedure ` Configure switches on the network --------------------------------- Some switches use Spanning-Tree Protocol (STP) to negotiate a loop-free path through a root bridge. While scanning, it can make each port wait up to 50 seconds before data is allowed to be sent on the port. This delay in turn can cause problems with some applications/protocols such as PXE, DHCP and DNS, of which MAAS makes extensive use. To alleviate this problem, you should enable `Portfast`_ for Cisco switches or its equivalent on other vendor equipment, which enables the ports to come up almost immediately. .. _Portfast: https://www.symantec.com/business/support/index?page=content&id=HOWTO6019 Traffic between the region contoller and rack controllers ------------------------------------------------------------ * Each rack controller must be able to: * Initiate TCP connections (for HTTP) to each region controller on port 80 or port 5240, the choice of which depends on the setting of the MAAS URL. * Initiate TCP connections (for RPC) to each region controller between port 5250 and 5259 inclusive. This permits up to 10 ``maas-regiond`` processes on each region controller host. At present this is not configurable. Once everything is set up and running, you are ready to :doc:`start enlisting nodes ` maas-2.0.0~beta3+bzr4941.orig/LICENSE0000644000000000000000000010437012705726641014773 0ustar 00000000000000MAAS is Copyright 2012-2015 Canonical Ltd. Canonical Ltd ("Canonical") distributes the MAAS source code under the GNU Affero General Public License, version 3 ("AGPLv3"). The full text of this licence is given below. Third-party copyright in this distribution is noted where applicable. All rights not expressly granted are reserved. ========================================================================= GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007 (http://www.gnu.org/licenses/agpl.html) Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community. It requires the operator of a network server to provide the source code of the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU Affero General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Remote Network Interaction; Use with the GNU General Public License. Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 . Also add information on how to contact you by electronic and paper mail. If your software can interact with users remotely through a computer network, you should also make sure that it provides a way for users to get its source. For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive of the code. There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements. You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU AGPL, see . ========================================================================= maas-2.0.0~beta3+bzr4941.orig/MANIFEST.in0000644000000000000000000000047412705726641015524 0ustar 00000000000000graft src/*/static graft src/*/templates graft src/*/fixtures graft src/*/specs graft src/provisioningserver/* graft src/metadataserver/commissioning include src/maasserver/migrations/south/django16_south_maas19.tar.gz prune src/*/testing prune src/*/tests prune src/maastesting prune src/provisioningserver/*/tests maas-2.0.0~beta3+bzr4941.orig/Makefile0000644000000000000000000004402712705726641015430 0ustar 00000000000000python := python3.5 # pkg_resources makes some incredible noise about version numbers. They # are not indications of bugs in MAAS so we silence them everywhere. export PYTHONWARNINGS = \ ignore:You have iterated over the result:RuntimeWarning:pkg_resources: # Network activity can be suppressed by setting offline=true (or any # non-empty string) at the command-line. ifeq ($(offline),) buildout := bin/buildout else buildout := bin/buildout buildout:offline=true endif # If offline has been selected, attempt to further block HTTP/HTTPS # activity by setting bogus proxies in the environment. ifneq ($(offline),) export http_proxy := broken export https_proxy := broken endif # Python enum modules. py_enums := $(wildcard src/*/enum.py) # JavaScript enum module (not modules). js_enums := src/maasserver/static/js/enums.js templates := $(shell find etc/maas/templates -type f) # MAAS SASS stylesheets. The first input file (maas-styles.css) imports # the others, so is treated specially in the target definitions. scss_inputs := \ src/maasserver/static/scss/maas-styles.scss \ $(wildcard src/maasserver/static/scss/*/*.scss) \ $(wildcard src/maasserver/static/scss/*/*/*.scss) scss_output := src/maasserver/static/css/maas-styles.css # Prefix commands with this when they need access to the database. # Remember to add a dependency on bin/database from the targets in # which those commands appear. dbrun := bin/database --preserve run -- # Disable progress when running npm and warning log levels. npm_install := NODE_ENV=production NPM_CONFIG_PROGRESS="false" npm install \ --loglevel error --cache-min 600 # For things that care, postgresfixture for example, we always want to # use the "maas" databases. export PGDATABASE := maas # For anything we start, we want to hint as to its root directory. export MAAS_ROOT := $(CURDIR)/run build: \ bin/buildout \ bin/database \ bin/maas \ bin/maas-rack \ bin/maas-region \ bin/twistd.rack \ bin/twistd.region \ bin/test.cli \ bin/test.rack \ bin/test.config \ bin/test.region \ bin/test.testing \ bin/test.js \ bin/test.e2e \ bin/py bin/ipy \ $(js_enums) all: build doc # Install all packages required for MAAS development & operation on # the system. This may prompt for a password. install-dependencies: release := $(shell lsb_release -c -s) install-dependencies: sudo DEBIAN_FRONTEND=noninteractive apt-get -y \ --no-install-recommends install $(shell sort -u \ $(addprefix required-packages/,base build dev doc $(release)) | sed '/^\#/d') sudo DEBIAN_FRONTEND=noninteractive apt-get -y \ purge $(shell sort -u required-packages/forbidden | sed '/^\#/d') .bzrignore: FORCE LC_ALL=C.UTF-8 sort -f $@ --output $@ .gitignore: .bzrignore sed 's:^[.]/:/:' $^ > $@ echo '/src/**/*.pyc' >> $@ echo '/etc/**/*.pyc' >> $@ configure-buildout: utilities/configure-buildout bin/buildout: bootstrap-buildout.py @utilities/configure-buildout --quiet $(python) bootstrap-buildout.py --allow-site-packages @touch --no-create $@ # Ensure it's newer than its dependencies. bin/database: bin/buildout buildout.cfg versions.cfg setup.py $(buildout) install database @touch --no-create $@ bin/maas-region bin/twistd.region: \ bin/buildout buildout.cfg versions.cfg setup.py $(js_enums) $(buildout) install region @touch --no-create $@ bin/test.region: \ bin/buildout buildout.cfg versions.cfg setup.py $(js_enums) $(buildout) install region-test @touch --no-create $@ bin/maas: bin/buildout buildout.cfg versions.cfg setup.py $(buildout) install cli @touch --no-create $@ bin/test.cli: bin/buildout buildout.cfg versions.cfg setup.py bin/maas $(buildout) install cli-test @touch --no-create $@ bin/test.js: bin/karma bin/buildout buildout.cfg versions.cfg setup.py $(buildout) install js-test @touch --no-create $@ bin/test.e2e: bin/protractor bin/buildout buildout.cfg versions.cfg setup.py $(buildout) install e2e-test @touch --no-create $@ # bin/maas-region is needed for South migration tests. bin/flake8 is # needed for checking lint and bin/sass is needed for checking css. bin/test.testing: \ bin/maas-region bin/flake8 bin/sass bin/buildout \ buildout.cfg versions.cfg setup.py $(buildout) install testing-test @touch --no-create $@ bin/maas-rack bin/twistd.rack: \ bin/buildout buildout.cfg versions.cfg setup.py $(buildout) install rack @touch --no-create $@ bin/test.rack: \ bin/buildout buildout.cfg versions.cfg setup.py bin/maas-rack $(buildout) install rack-test @touch --no-create $@ bin/test.config: bin/buildout buildout.cfg versions.cfg setup.py $(buildout) install config-test @touch --no-create $@ bin/flake8: bin/buildout buildout.cfg versions.cfg setup.py $(buildout) install flake8 @touch --no-create $@ bin/sphinx bin/sphinx-build: bin/buildout buildout.cfg versions.cfg setup.py $(buildout) install sphinx @touch --no-create $@ bin/py bin/ipy: bin/buildout buildout.cfg versions.cfg setup.py $(buildout) install repl @touch --no-create bin/py bin/ipy define karma-deps jasmine-core@2.4.1 karma@0.13.19 karma-chrome-launcher@0.2.2 karma-firefox-launcher@0.1.7 karma-jasmine@0.3.6 karma-opera-launcher@0.3.0 karma-phantomjs-launcher@0.2.3 karma-failed-reporter@0.0.3 phantomjs@1.9.19 endef bin/karma: deps = $(strip $(karma-deps)) bin/karma: prefix = include/nodejs bin/karma: @mkdir -p $(@D) $(prefix) $(npm_install) --prefix $(prefix) $(deps) @ln -srf $(prefix)/node_modules/karma/bin/karma $@ bin/protractor: prefix = include/nodejs bin/protractor: @mkdir -p $(@D) $(prefix) $(npm_install) --prefix $(prefix) protractor@3.0.0 @ln -srf $(prefix)/node_modules/protractor/bin/protractor $@ bin/sass: prefix = include/nodejs bin/sass: @mkdir -p $(@D) $(prefix) $(npm_install) --prefix $(prefix) node-sass@3.4.2 @ln -srf $(prefix)/node_modules/node-sass/bin/node-sass $@ define test-scripts bin/test.cli bin/test.rack bin/test.config bin/test.region bin/test.testing bin/test.js endef test: $(strip $(test-scripts)) @bin/maas-region makemigrations --dry-run --exit && exit 1 ||: @$(RM) coverage.data @echo $^ | xargs --verbose -n1 env test+coverage: export NOSE_WITH_COVERAGE = 1 test+coverage: test coverage-report: coverage/index.html sensible-browser $< > /dev/null 2>&1 & coverage.xml: coverage.data python3-coverage xml --include 'src/*' -o $@ coverage/index.html: coverage.data @$(RM) -r $(@D) python3-coverage html --include 'src/*' -d $(@D) coverage.data: @$(error Use `$(MAKE) test+coverage` to generate coverage data, or invoke a \ test script using the `--with-coverage` flag) lint: lint-py lint-py-imports lint-js lint-doc lint-rst pocketlint = $(call available,pocketlint,python-pocket-lint) # XXX jtv 2014-02-25: Clean up this lint, then make it part of "make lint". lint-css: sources = src/maasserver/static/css lint-css: @find $(sources) -type f \ -print0 | xargs -r0 $(pocketlint) --max-length=120 # Python lint checks are time-intensive, so we run them in parallel. It may # make things matters worse if the files need to be read from disk, though, so # this may need more tuning. # The -n50 -P4 setting roughly doubled speed on a high-end system with SSD and # all the files in cache. lint-py: sources = $(wildcard *.py contrib/*.py) src templates twisted utilities etc lint-py: bin/flake8 @find $(sources) -name '*.py' \ ! -path '*/migrations/*' ! -path '*/south_migrations/*' \ ! -path 'src/provisioningserver/twisted/*' ! -path 'ez_setup.py' \ ! -path 'src/maasserver/data/*' -print0 \ | xargs -r0 -n50 -P4 bin/flake8 --ignore=E123,E402,E731 \ --config=/dev/null # Statically check imports against policy. lint-py-imports: @utilities/check-imports lint-doc: @utilities/doc-lint # JavaScript lint is checked in parallel for speed. The -n20 -P4 setting # worked well on a multicore SSD machine with the files cached, roughly # doubling the speed, but it may need tuning for slower systems or cold caches. lint-js: sources = src/maasserver/static/js lint-js: @find $(sources) -type f ! -path '*/angular/3rdparty/*' \ '(' -name '*.html' -o -name '*.js' ')' -print0 \ | xargs -r0 -n20 -P4 $(pocketlint) # Apply automated formatting to all Python files. format: sources = $(wildcard *.py contrib/*.py) src templates twisted utilities etc format: @find $(sources) -name '*.py' -print0 | xargs -r0 utilities/format-imports # Update copyright dates from version history. Try to avoid updating # 3rd-party code by checking for "Canonical" or "MAAS" on the same line # as the copyright header. copyright: @bzr ls --versioned --recursive --kind=file --null | \ xargs -r0 egrep -iI 'copyright.*(canonical|maas)' -lZ | \ xargs -r0 bzr update-copyright --quiet --force-range check: clean test docs/api.rst: bin/maas-region src/maasserver/api/doc_handler.py syncdb bin/maas-region generate_api_doc > $@ sampledata: bin/maas-region bin/database syncdb $(dbrun) bin/maas-region generate_sample_data doc: bin/sphinx docs/api.rst bin/sphinx docs/_build/html/index.html: doc doc-browse: docs/_build/html/index.html sensible-browser $< > /dev/null 2>&1 & doc-with-versions: bin/sphinx docs/api.rst $(MAKE) -C docs/_build SPHINXOPTS="-A add_version_switcher=true" html man: $(patsubst docs/man/%.rst,man/%,$(wildcard docs/man/*.rst)) man/%: docs/man/%.rst | bin/sphinx-build bin/sphinx-build -b man docs man $^ enums: $(js_enums) $(js_enums): bin/py src/maasserver/utils/jsenums.py $(py_enums) bin/py -m maasserver.utils.jsenums $(py_enums) > $@ styles: bin/sass clean-styles $(scss_output) $(scss_output): $(scss_inputs) bin/sass --include-path=src/maasserver/static/scss --output-style compressed $< -o $(dir $@) clean-styles: $(RM) $(scss_output) clean: stop clean-run $(MAKE) -C acceptance $@ find . -type f -name '*.py[co]' -print0 | xargs -r0 $(RM) find . -type d -name '__pycache__' -print0 | xargs -r0 $(RM) -r find . -type f -name '*~' -print0 | xargs -r0 $(RM) find . -type f -name dropin.cache -print0 | xargs -r0 $(RM) $(RM) -r media/demo/* media/development $(RM) $(js_enums) $(js_enums).tmp $(RM) src/maasserver/data/templates.py $(RM) *.log $(RM) docs/api.rst $(RM) -r docs/_autosummary docs/_build $(RM) -r man/.doctrees $(RM) coverage.data coverage.xml $(RM) -r coverage $(RM) -r .hypothesis $(RM) -r bin include lib local $(RM) -r eggs develop-eggs $(RM) -r build dist logs/* parts $(RM) tags TAGS .installed.cfg $(RM) -r *.egg *.egg-info src/*.egg-info $(RM) -r services/*/supervise # Be selective about what to remove from run and run-e2e. define clean-run-template find $(1) -depth ! -type d \ ! -path $(1)/etc/maas/templates \ ! -path $(1)/etc/maas/drivers.yaml \ -print0 | xargs -r0 $(RM) find $(1) -depth -type d \ -print0 | xargs -r0 rmdir --ignore-fail-on-non-empty endef clean-run: $(call clean-run-template,run) $(call clean-run-template,run-e2e) clean+db: clean while fuser db --kill -TERM; do sleep 1; done $(RM) -r db $(RM) .db.lock distclean: clean $(warning 'distclean' is deprecated; use 'clean') harness: bin/maas-region bin/database $(dbrun) bin/maas-region shell --settings=maas.demo dbharness: bin/database bin/database --preserve shell syncdb: bin/maas-region bin/database $(dbrun) bin/maas-region dbupgrade define phony_targets build check clean clean+db clean-run clean-styles configure-buildout copyright coverage-report dbharness distclean doc doc-browse enums format harness install-dependencies lint lint-css lint-doc lint-js lint-py lint-py-imports lint-rst man print-% sampledata styles syncdb test test-migrations test+coverage endef # # Development services. # service_names_region := database dns regiond regiond2 reloader service_names_rack := rackd reloader service_names_all := $(service_names_region) $(service_names_rack) # The following template is intended to be used with `call`, and it # accepts a single argument: a target name. The target name must # correspond to a service action (see "Pseudo-magic targets" below). A # region- and rack-specific variant of the target will be created, in # addition to the target itself. These can be used to apply the service # action to the region services, the rack services, or all services, at # the same time. define service_template $(1)-region: $(patsubst %,services/%/@$(1),$(service_names_region)) $(1)-rack: $(patsubst %,services/%/@$(1),$(service_names_rack)) $(1): $(1)-region $(1)-rack phony_services_targets += $(1)-region $(1)-rack $(1) endef # Expand out aggregate service targets using `service_template`. $(eval $(call service_template,pause)) $(eval $(call service_template,restart)) $(eval $(call service_template,start)) $(eval $(call service_template,status)) $(eval $(call service_template,stop)) $(eval $(call service_template,supervise)) # The `run` targets do not fit into the mould of the others. run-region: @services/run $(service_names_region) run-rack: @services/run $(service_names_rack) run: @services/run $(service_names_all) phony_services_targets += run-region run-rack run # This one's for the rapper, yo. Don't run the load-balancing regiond2. run+regiond: @services/run $(filter-out regiond2,$(service_names_region)) +regiond phony_services_targets += run+regiond # Convenient variables and functions for service control. setlock = $(call available,setlock,daemontools) supervise = $(call available,supervise,daemontools) svc = $(call available,svc,daemontools) svok = $(call available,svok,daemontools) svstat = $(call available,svstat,daemontools) service_lock = $(setlock) -n /run/lock/maas.dev.$(firstword $(1)) # Pseudo-magic targets for controlling individual services. services/%/@run: services/%/@stop services/%/@deps @$(call service_lock, $*) services/$*/run services/%/@start: services/%/@supervise @$(svc) -u $(@D) services/%/@pause: services/%/@supervise @$(svc) -d $(@D) services/%/@status: @$(svstat) $(@D) services/%/@restart: services/%/@supervise @$(svc) -du $(@D) services/%/@stop: @if $(svok) $(@D); then $(svc) -dx $(@D); fi @while $(svok) $(@D); do sleep 0.1; done services/%/@supervise: services/%/@deps @mkdir -p logs/$* @touch $(@D)/down @if ! $(svok) $(@D); then \ logdir=$(CURDIR)/logs/$* \ $(call service_lock, $*) $(supervise) $(@D) & fi @while ! $(svok) $(@D); do sleep 0.1; done # Dependencies for individual services. services/dns/@deps: bin/py services/database/@deps: bin/database services/rackd/@deps: bin/twistd.rack services/reloader/@deps: services/regiond/@deps: bin/maas-region services/regiond2/@deps: bin/maas-region # # Package building # # This ought to be as simple as using bzr builddeb --export-upstream but it # has a bug and always considers apt-source tarballs before the specified # branch. Instead, export to a local tarball which is always found. Make sure # the packages listed in `required-packages/build` are installed before using # this. # Old names. PACKAGING := $(abspath ../packaging.trunk) PACKAGING_BRANCH := lp:~maas-maintainers/maas/packaging packaging-tree = $(PACKAGING) packaging-branch = $(PACKAGING_BRANCH) packaging-build-area := $(abspath ../build-area) packaging-version = $(shell \ dpkg-parsechangelog -l$(packaging-tree)/debian/changelog \ | sed -rne 's,^Version: ([^-]+).*,\1,p') $(packaging-build-area): mkdir -p $(packaging-build-area) -packaging-fetch: bzr branch $(packaging-branch) $(packaging-tree) -packaging-pull: bzr pull -d $(packaging-tree) -packaging-refresh: -packaging-$(shell \ test -d $(packaging-tree) && echo "pull" || echo "fetch") -packaging-export-orig: $(packaging-build-area) bzr export $(packaging-export-extra) --root=maas-$(packaging-version).orig \ $(packaging-build-area)/maas_$(packaging-version).orig.tar.gz # To build binary packages from uncommitted changes: # make package-export-extra=--uncommitted package package: -packaging-refresh -packaging-export-orig bzr bd --merge $(packaging-tree) --result-dir=$(packaging-build-area) -- -uc -us @echo Binary packages built, see $(packaging-build-area). # ... or use the `package-dev` target. package-dev: packaging-export-extra = --uncommitted package-dev: package # To build a source package from uncommitted changes: # make package-export-extra=--uncommitted source-package source-package: -packaging-refresh -packaging-export-orig bzr bd --merge $(packaging-tree) --result-dir=$(packaging-build-area) -- -S -uc -us @echo Source package built, see $(packaging-build-area). # ... or use the `source-package-dev` target. source-package-dev: packaging-export-extra = --uncommitted source-package-dev: source-package # To rebuild packages (i.e. from a clean slate): package-rebuild: package-clean package package-dev-rebuild: package-clean package-dev source-package-rebuild: source-package-clean source-package source-package-dev-rebuild: source-package-clean source-package-dev # To clean built packages away: package-clean: patterns := *.deb *.dsc *.build *.changes package-clean: patterns += *.debian.tar.xz *.orig.tar.gz package-clean: @$(RM) -v $(addprefix $(packaging-build-area)/,$(patterns)) source-package-clean: patterns := *.dsc *.build *.changes source-package-clean: patterns += *.debian.tar.xz *.orig.tar.gz source-package-clean: @$(RM) -v $(addprefix $(packaging-build-area)/,$(patterns)) # Debugging target. Allows printing of any variable. # As an example, try: # make print-js_enums print-%: @echo $* = $($*) define phony_package_targets -packaging-export-orig -packaging-fetch -packaging-pull -packaging-refresh package package-clean package-dev package-dev-rebuild package-rebuild source-package source-package-clean source-package-dev source-package-dev-rebuild source-package-rebuild endef # # Phony stuff. # define phony $(phony_package_targets) $(phony_services_targets) $(phony_targets) endef phony := $(sort $(strip $(phony))) .PHONY: $(phony) FORCE # # Functions. # # Check if a command is found on PATH. Raise an error if not, citing # the package to install. Return the command otherwise. # Usage: $(call available,,) define available $(if $(shell which $(1)),$(1),$(error $(1) not found; \ install it with 'sudo apt-get install $(2)')) endef maas-2.0.0~beta3+bzr4941.orig/README0000644000000000000000000000240612705726641014643 0ustar 00000000000000.. -*- mode: rst -*- ************************ MAAS: Metal as a Service ************************ Metal as a Service -- MAAS -- lets you treat physical servers like virtual machines in the cloud. Rather than having to manage each server individually, MAAS turns your bare metal into an elastic cloud-like resource. What does that mean in practice? Tell MAAS about the machines you want it to manage and it will boot them, check the hardware's okay, and have them waiting for when you need them. You can then pull nodes up, tear them down and redeploy them at will; just as you can with virtual machines in the cloud. When you're ready to deploy a service, MAAS gives Juju the nodes it needs to power that service. It's as simple as that: no need to manually provision, check and, afterwards, clean-up. As your needs change, you can easily scale services up or down. Need more power for your Hadoop cluster for a few hours? Simply tear down one of your Nova compute nodes and redeploy it to Hadoop. When you're done, it's just as easy to give the node back to Nova. MAAS is ideal where you want the flexibility of the cloud, and the hassle-free power of Juju charms, but you need to deploy to bare metal. For more information see the `MAAS guide`_. .. _MAAS guide: https://maas.io/ maas-2.0.0~beta3+bzr4941.orig/acceptance/0000755000000000000000000000000012705726641016047 5ustar 00000000000000maas-2.0.0~beta3+bzr4941.orig/bootstrap-buildout.py0000644000000000000000000001644212705726641020204 0ustar 00000000000000############################################################################## # # Copyright (c) 2006 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## """Bootstrap a buildout-based project Simply run this script in a directory containing a buildout.cfg. The script accepts buildout command-line options, so you can use the -c option to specify an alternate configuration file. """ from optparse import OptionParser import os import shutil import sys import tempfile __version__ = '2015-07-01' # See zc.buildout's changelog if this version is up to date. tmpeggs = tempfile.mkdtemp(prefix='bootstrap-') usage = '''\ [DESIRED PYTHON FOR BUILDOUT] bootstrap.py [options] Bootstraps a buildout-based project. Simply run this script in a directory containing a buildout.cfg, using the Python that you want bin/buildout to use. Note that by using --find-links to point to local resources, you can keep this script from going over the network. ''' parser = OptionParser(usage=usage) parser.add_option("--version", action="store_true", default=False, help=("Return bootstrap.py version.")) parser.add_option("-t", "--accept-buildout-test-releases", dest='accept_buildout_test_releases', action="store_true", default=False, help=("Normally, if you do not specify a --version, the " "bootstrap script and buildout gets the newest " "*final* versions of zc.buildout and its recipes and " "extensions for you. If you use this flag, " "bootstrap and buildout will get the newest releases " "even if they are alphas or betas.")) parser.add_option("-c", "--config-file", help=("Specify the path to the buildout configuration " "file to be used.")) parser.add_option("-f", "--find-links", help=("Specify a URL to search for buildout releases")) parser.add_option("--allow-site-packages", action="store_true", default=False, help=("Let bootstrap.py use existing site packages")) parser.add_option("--buildout-version", help="Use a specific zc.buildout version") parser.add_option("--setuptools-version", help="Use a specific setuptools version") parser.add_option("--setuptools-to-dir", help=("Allow for re-use of existing directory of " "setuptools versions")) options, args = parser.parse_args() if options.version: print("bootstrap.py version %s" % __version__) sys.exit(0) ###################################################################### # load/install setuptools try: from urllib.request import urlopen except ImportError: from urllib2 import urlopen ez = {} if os.path.exists('ez_setup.py'): exec(open('ez_setup.py').read(), ez) else: exec(urlopen('https://bootstrap.pypa.io/ez_setup.py').read(), ez) if not options.allow_site_packages: # ez_setup imports site, which adds site packages # this will remove them from the path to ensure that incompatible versions # of setuptools are not in the path import site # inside a virtualenv, there is no 'getsitepackages'. # We can't remove these reliably if hasattr(site, 'getsitepackages'): for sitepackage_path in site.getsitepackages(): # Strip all site-packages directories from sys.path that # are not sys.prefix; this is because on Windows # sys.prefix is a site-package directory. if sitepackage_path != sys.prefix: sys.path[:] = [x for x in sys.path if sitepackage_path not in x] setup_args = dict(to_dir=tmpeggs, download_delay=0) if options.setuptools_version is not None: setup_args['version'] = options.setuptools_version if options.setuptools_to_dir is not None: setup_args['to_dir'] = options.setuptools_to_dir ez['use_setuptools'](**setup_args) import setuptools import pkg_resources # This does not (always?) update the default working set. We will # do it. for path in sys.path: if path not in pkg_resources.working_set.entries: pkg_resources.working_set.add_entry(path) ###################################################################### # Install buildout ws = pkg_resources.working_set setuptools_path = ws.find( pkg_resources.Requirement.parse('setuptools')).location # Fix sys.path here as easy_install.pth added before PYTHONPATH cmd = [sys.executable, '-c', 'import sys; sys.path[0:0] = [%r]; ' % setuptools_path + 'from setuptools.command.easy_install import main; main()', '-mZqNxd', tmpeggs] find_links = os.environ.get( 'bootstrap-testing-find-links', options.find_links or ('http://downloads.buildout.org/' if options.accept_buildout_test_releases else None) ) if find_links: cmd.extend(['-f', find_links]) requirement = 'zc.buildout' version = options.buildout_version if version is None and not options.accept_buildout_test_releases: # Figure out the most recent final version of zc.buildout. import setuptools.package_index _final_parts = '*final-', '*final' def _final_version(parsed_version): try: return not parsed_version.is_prerelease except AttributeError: # Older setuptools for part in parsed_version: if (part[:1] == '*') and (part not in _final_parts): return False return True index = setuptools.package_index.PackageIndex( search_path=[setuptools_path]) if find_links: index.add_find_links((find_links,)) req = pkg_resources.Requirement.parse(requirement) if index.obtain(req) is not None: best = [] bestv = None for dist in index[req.project_name]: distv = dist.parsed_version if _final_version(distv): if bestv is None or distv > bestv: best = [dist] bestv = distv elif distv == bestv: best.append(dist) if best: best.sort() version = best[-1].version if version: requirement = '=='.join((requirement, version)) cmd.append(requirement) import subprocess if subprocess.call(cmd) != 0: raise Exception( "Failed to execute command:\n%s" % repr(cmd)[1:-1]) ###################################################################### # Import and run buildout ws.add_entry(tmpeggs) ws.require(requirement) import zc.buildout.buildout if not [a for a in args if '=' not in a]: args.append('bootstrap') # if -c was provided, we push it back into args for buildout' main function if options.config_file is not None: args[0:0] = ['-c', options.config_file] zc.buildout.buildout.main(args) shutil.rmtree(tmpeggs) maas-2.0.0~beta3+bzr4941.orig/buildout.cfg0000644000000000000000000001432212705726641016273 0ustar 00000000000000[buildout] parts = cli cli-test config-test flake8 rack rack-test region region-test repl sphinx testing-test versions = versions extends = versions.cfg offline = false newest = false # Uncomment the following two lines and set allow-picked-versions=true # to automatically update versions.cfg when building recipes. # extensions = buildout-versions # buildout_versions_file = versions.cfg prefer-final = true allow-picked-versions = false [common] extra-paths = ${buildout:directory}/etc ${buildout:directory}/src ${buildout:directory} test-eggs = blessings fixtures hypothesis ipdb nose nose-progressive nose-timer postgresfixture python-subunit testresources testscenarios testtools initialization = ${common:warnings} ${common:environment} environment = from os import environ environ.setdefault("MAAS_ROOT", "${buildout:directory}/run") warnings = from warnings import filterwarnings filterwarnings("ignore", category=RuntimeWarning, module="pkg_resources") inject-test-options = # When running tests from a console use the progressive output plugin. # When running headless increase the verbosity so we can see the test # being run from a log file. An `options` list must be defined ahead # of the use of this snippet. # *** NOSE PROGRESSIVE IS BROKEN IN PYTHON 3.5 *** # ["--verbosity=0", "--with-progressive"] options += ( ["--verbosity=1"] if sys.stdout.isatty() else ["--verbosity=2"] ) sys.argv[1:1] = options [database] recipe = zc.recipe.egg eggs = postgresfixture extra-paths = ${common:extra-paths} interpreter = entry-points = database=postgresfixture.main:main scripts = database [region] recipe = zc.recipe.egg test-eggs = ${common:test-eggs} selenium eggs = ${region:test-eggs} entry-points = maas-region=maasserver:execute_from_command_line twistd.region=twisted.scripts.twistd:run initialization = ${common:initialization} environ.setdefault("DJANGO_SETTINGS_MODULE", "maas.development") scripts = maas-region twistd.region extra-paths = ${common:extra-paths} [region-test] recipe = zc.recipe.egg eggs = ${region:eggs} entry-points = test.region=maasserver:execute_from_command_line initialization = ${region:initialization} environ.setdefault("MAAS_PREVENT_MIGRATIONS", "1") options = [ "test", "--noinput", "--with-crochet", "--with-select", "--select-dir=src/maas", "--select-dir=src/maasserver", "--select-dir=src/metadataserver", "--cover-package=maas,maasserver,metadataserver", # Reduce the logging level to INFO here as # DebuggingLoggerMiddleware logs the content of all the # requests at DEBUG level: we don't want this in the # tests as it's too verbose. "--logging-level=INFO", "--logging-clear-handlers", ] ${common:inject-test-options} scripts = test.region extra-paths = ${region:extra-paths} [cli] recipe = zc.recipe.egg eggs = ${region:eggs} entry-points = maas=maascli:main extra-paths = ${common:extra-paths} scripts = maas [cli-test] recipe = zc.recipe.egg eggs = ${cli:eggs} ${common:test-eggs} entry-points = test.cli=maastesting.noseplug:main initialization = ${common:warnings} options = [ "--with-select", "--select-dir=src/apiclient", "--select-dir=src/maascli", "--cover-package=apiclient,maascli", ] ${common:inject-test-options} extra-paths = ${cli:extra-paths} scripts = test.cli [js-test] recipe = zc.recipe.egg eggs = ${common:test-eggs} entry-points = test.js=maastesting.karma:run_karma extra-paths = ${common:extra-paths} scripts = test.js initialization = ${common:initialization} [testing-test] recipe = zc.recipe.egg eggs = ${common:test-eggs} entry-points = test.testing=maastesting.noseplug:main initialization = ${common:warnings} options = [ "--with-select", "--select-dir=src/maastesting", "--cover-package=maastesting", ] ${common:inject-test-options} extra-paths = ${common:extra-paths} scripts = test.testing [rack] recipe = zc.recipe.egg eggs = entry-points = maas-rack=provisioningserver.__main__:main twistd.rack=twisted.scripts.twistd:run extra-paths = ${common:extra-paths} scripts = maas-rack twistd.rack initialization = ${common:initialization} environ.setdefault("MAAS_RACK_DEVELOP", "TRUE") [rack-test] recipe = zc.recipe.egg eggs = ${rack:eggs} ${common:test-eggs} entry-points = test.rack=maastesting.noseplug:main initialization = ${common:initialization} options = [ "--with-crochet", "--crochet-no-setup", "--with-select", "--select-dir=src/provisioningserver", "--cover-package=provisioningserver", ] ${common:inject-test-options} extra-paths = ${rack:extra-paths} scripts = test.rack [config-test] recipe = zc.recipe.egg eggs = ${common:test-eggs} entry-points = test.config=maastesting.noseplug:main initialization = ${common:initialization} options = [ "--with-select", "--select-dir=etc/maas/templates/commissioning-user-data", "--cover-package=snippets", ] ${common:inject-test-options} extra-paths = ${common:extra-paths} scripts = test.config [e2e-test] recipe = zc.recipe.egg eggs = ${region:test-eggs} entry-points = test.e2e=maastesting.protractor.runner:run_protractor extra-paths = ${common:extra-paths} scripts = test.e2e initialization = from os import environ environ.setdefault("MAAS_RACK_DEVELOP", "TRUE") environ.setdefault("MAAS_ROOT", "${buildout:directory}/run-e2e") environ.setdefault("DJANGO_SETTINGS_MODULE", "maas.development") environ.setdefault("DEV_DB_NAME", "test_maas_e2e") environ.setdefault("MAAS_PREVENT_MIGRATIONS", "1") [flake8] recipe = zc.recipe.egg eggs = flake8 entry-points = flake8=flake8.run:main initialization = ${common:warnings} [sphinx] recipe = collective.recipe.sphinxbuilder source = ${buildout:directory}/docs build = ${buildout:directory}/docs/_build extra-paths = ${common:extra-paths} eggs = ${region:eggs} ${rack:eggs} # Convenient REPLs with all eggs available. [repl] recipe = zc.recipe.egg eggs = ${region:eggs} ${rack:eggs} ${common:test-eggs} extra-paths = ${common:extra-paths} interpreter = py scripts = ipy entry-points = ipy=IPython.terminal.ipapp:launch_new_instance initialization = ${common:initialization} maas-2.0.0~beta3+bzr4941.orig/contrib/0000755000000000000000000000000012705726641015421 5ustar 00000000000000maas-2.0.0~beta3+bzr4941.orig/docs/0000755000000000000000000000000012705726641014711 5ustar 00000000000000maas-2.0.0~beta3+bzr4941.orig/etc/0000755000000000000000000000000012705726641014534 5ustar 00000000000000maas-2.0.0~beta3+bzr4941.orig/ez_setup.py0000644000000000000000000002624112705726641016176 0ustar 00000000000000#!/usr/bin/env python """ Setuptools bootstrapping installer. Run this script to install or upgrade setuptools. """ import contextlib from distutils import log import optparse import os import platform import shutil import subprocess import sys import tempfile import textwrap import warnings import zipfile try: from urllib.request import urlopen except ImportError: from urllib2 import urlopen try: from site import USER_SITE except ImportError: USER_SITE = None DEFAULT_VERSION = "18.7.1" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" DEFAULT_SAVE_DIR = os.curdir def _python_cmd(*args): """ Execute a command. Return True if the command succeeded. """ args = (sys.executable,) + args return subprocess.call(args) == 0 def _install(archive_filename, install_args=()): """Install Setuptools.""" with archive_context(archive_filename): # installing log.warn('Installing Setuptools') if not _python_cmd('setup.py', 'install', *install_args): log.warn('Something went wrong during the installation.') log.warn('See the error message above.') # exitcode will be 2 return 2 def _build_egg(egg, archive_filename, to_dir): """Build Setuptools egg.""" with archive_context(archive_filename): # building an egg log.warn('Building a Setuptools egg in %s', to_dir) _python_cmd('setup.py', '-q', 'bdist_egg', '--dist-dir', to_dir) # returning the result log.warn(egg) if not os.path.exists(egg): raise IOError('Could not build the egg.') class ContextualZipFile(zipfile.ZipFile): """Supplement ZipFile class to support context manager for Python 2.6.""" def __enter__(self): return self def __exit__(self, type, value, traceback): self.close() def __new__(cls, *args, **kwargs): """Construct a ZipFile or ContextualZipFile as appropriate.""" if hasattr(zipfile.ZipFile, '__exit__'): return zipfile.ZipFile(*args, **kwargs) return super(ContextualZipFile, cls).__new__(cls) @contextlib.contextmanager def archive_context(filename): """ Unzip filename to a temporary directory, set to the cwd. The unzipped target is cleaned up after. """ tmpdir = tempfile.mkdtemp() log.warn('Extracting in %s', tmpdir) old_wd = os.getcwd() try: os.chdir(tmpdir) with ContextualZipFile(filename) as archive: archive.extractall() # going in the directory subdir = os.path.join(tmpdir, os.listdir(tmpdir)[0]) os.chdir(subdir) log.warn('Now working in %s', subdir) yield finally: os.chdir(old_wd) shutil.rmtree(tmpdir) def _do_download(version, download_base, to_dir, download_delay): """Download Setuptools.""" egg = os.path.join(to_dir, 'setuptools-%s-py%d.%d.egg' % (version, sys.version_info[0], sys.version_info[1])) if not os.path.exists(egg): archive = download_setuptools(version, download_base, to_dir, download_delay) _build_egg(egg, archive, to_dir) sys.path.insert(0, egg) # Remove previously-imported pkg_resources if present (see # https://bitbucket.org/pypa/setuptools/pull-request/7/ for details). if 'pkg_resources' in sys.modules: _unload_pkg_resources() import setuptools setuptools.bootstrap_install_from = egg def use_setuptools( version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=DEFAULT_SAVE_DIR, download_delay=15): """ Ensure that a setuptools version is installed. Return None. Raise SystemExit if the requested version or later cannot be installed. """ to_dir = os.path.abspath(to_dir) # prior to importing, capture the module state for # representative modules. rep_modules = 'pkg_resources', 'setuptools' imported = set(sys.modules).intersection(rep_modules) try: import pkg_resources pkg_resources.require("setuptools>=" + version) # a suitable version is already installed return except ImportError: # pkg_resources not available; setuptools is not installed; download pass except pkg_resources.DistributionNotFound: # no version of setuptools was found; allow download pass except pkg_resources.VersionConflict as VC_err: if imported: _conflict_bail(VC_err, version) # otherwise, unload pkg_resources to allow the downloaded version to # take precedence. del pkg_resources _unload_pkg_resources() return _do_download(version, download_base, to_dir, download_delay) def _conflict_bail(VC_err, version): """ Setuptools was imported prior to invocation, so it is unsafe to unload it. Bail out. """ conflict_tmpl = textwrap.dedent(""" The required version of setuptools (>={version}) is not available, and can't be installed while this script is running. Please install a more recent version first, using 'easy_install -U setuptools'. (Currently using {VC_err.args[0]!r}) """) msg = conflict_tmpl.format(**locals()) sys.stderr.write(msg) sys.exit(2) def _unload_pkg_resources(): del_modules = [ name for name in sys.modules if name.startswith('pkg_resources') ] for mod_name in del_modules: del sys.modules[mod_name] def _clean_check(cmd, target): """ Run the command to download target. If the command fails, clean up before re-raising the error. """ try: subprocess.check_call(cmd) except subprocess.CalledProcessError: if os.access(target, os.F_OK): os.unlink(target) raise def download_file_powershell(url, target): """ Download the file at url to target using Powershell. Powershell will validate trust. Raise an exception if the command cannot complete. """ target = os.path.abspath(target) ps_cmd = ( "[System.Net.WebRequest]::DefaultWebProxy.Credentials = " "[System.Net.CredentialCache]::DefaultCredentials; " "(new-object System.Net.WebClient).DownloadFile(%(url)r, %(target)r)" % vars() ) cmd = [ 'powershell', '-Command', ps_cmd, ] _clean_check(cmd, target) def has_powershell(): """Determine if Powershell is available.""" if platform.system() != 'Windows': return False cmd = ['powershell', '-Command', 'echo test'] with open(os.path.devnull, 'wb') as devnull: try: subprocess.check_call(cmd, stdout=devnull, stderr=devnull) except Exception: return False return True download_file_powershell.viable = has_powershell def download_file_curl(url, target): cmd = ['curl', url, '--silent', '--output', target] _clean_check(cmd, target) def has_curl(): cmd = ['curl', '--version'] with open(os.path.devnull, 'wb') as devnull: try: subprocess.check_call(cmd, stdout=devnull, stderr=devnull) except Exception: return False return True download_file_curl.viable = has_curl def download_file_wget(url, target): cmd = ['wget', url, '--quiet', '--output-document', target] _clean_check(cmd, target) def has_wget(): cmd = ['wget', '--version'] with open(os.path.devnull, 'wb') as devnull: try: subprocess.check_call(cmd, stdout=devnull, stderr=devnull) except Exception: return False return True download_file_wget.viable = has_wget def download_file_insecure(url, target): """Use Python to download the file, without connection authentication.""" src = urlopen(url) try: # Read all the data in one block. data = src.read() finally: src.close() # Write all the data in one block to avoid creating a partial file. with open(target, "wb") as dst: dst.write(data) download_file_insecure.viable = lambda: True def get_best_downloader(): downloaders = ( download_file_powershell, download_file_curl, download_file_wget, download_file_insecure, ) viable_downloaders = (dl for dl in downloaders if dl.viable()) return next(viable_downloaders, None) def download_setuptools( version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=DEFAULT_SAVE_DIR, delay=15, downloader_factory=get_best_downloader): """ Download setuptools from a specified location and return its filename. `version` should be a valid setuptools version number that is available as an sdist for download under the `download_base` URL (which should end with a '/'). `to_dir` is the directory where the egg will be downloaded. `delay` is the number of seconds to pause before an actual download attempt. ``downloader_factory`` should be a function taking no arguments and returning a function for downloading a URL to a target. """ # making sure we use the absolute path to_dir = os.path.abspath(to_dir) zip_name = "setuptools-%s.zip" % version url = download_base + zip_name saveto = os.path.join(to_dir, zip_name) if not os.path.exists(saveto): # Avoid repeated downloads log.warn("Downloading %s", url) downloader = downloader_factory() downloader(url, saveto) return os.path.realpath(saveto) def _build_install_args(options): """ Build the arguments to 'python setup.py install' on the setuptools package. Returns list of command line arguments. """ return ['--user'] if options.user_install else [] def _parse_args(): """Parse the command line for options.""" parser = optparse.OptionParser() parser.add_option( '--user', dest='user_install', action='store_true', default=False, help='install in user site package (requires Python 2.6 or later)') parser.add_option( '--download-base', dest='download_base', metavar="URL", default=DEFAULT_URL, help='alternative URL from where to download the setuptools package') parser.add_option( '--insecure', dest='downloader_factory', action='store_const', const=lambda: download_file_insecure, default=get_best_downloader, help='Use internal, non-validating downloader' ) parser.add_option( '--version', help="Specify which version to download", default=DEFAULT_VERSION, ) parser.add_option( '--to-dir', help="Directory to save (and re-use) package", default=DEFAULT_SAVE_DIR, ) options, args = parser.parse_args() # positional arguments are ignored return options def _download_args(options): """Return args for download_setuptools function from cmdline args.""" return dict( version=options.version, download_base=options.download_base, downloader_factory=options.downloader_factory, to_dir=options.to_dir, ) def main(): """Install or upgrade setuptools and EasyInstall.""" options = _parse_args() archive = download_setuptools(**_download_args(options)) return _install(archive, _build_install_args(options)) if __name__ == '__main__': sys.exit(main()) maas-2.0.0~beta3+bzr4941.orig/logs/0000755000000000000000000000000012705726641014725 5ustar 00000000000000maas-2.0.0~beta3+bzr4941.orig/man/0000755000000000000000000000000012705726641014534 5ustar 00000000000000maas-2.0.0~beta3+bzr4941.orig/media/0000755000000000000000000000000012705726641015040 5ustar 00000000000000maas-2.0.0~beta3+bzr4941.orig/python3/0000755000000000000000000000000012705726641015365 5ustar 00000000000000maas-2.0.0~beta3+bzr4941.orig/required-packages/0000755000000000000000000000000012705726641017355 5ustar 00000000000000maas-2.0.0~beta3+bzr4941.orig/run/0000755000000000000000000000000012705726641014565 5ustar 00000000000000maas-2.0.0~beta3+bzr4941.orig/run-e2e/0000755000000000000000000000000012705726641015236 5ustar 00000000000000maas-2.0.0~beta3+bzr4941.orig/scripts/0000755000000000000000000000000012705726641015450 5ustar 00000000000000maas-2.0.0~beta3+bzr4941.orig/services/0000755000000000000000000000000012705726641015604 5ustar 00000000000000maas-2.0.0~beta3+bzr4941.orig/setup.py0000644000000000000000000000567212705726641015505 0ustar 00000000000000# Copyright 2012-2016 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Setuptools installer for MAAS.""" from glob import glob from os.path import ( dirname, join, ) from setuptools import ( find_packages, setup, ) # The directory in which setup.py lives. here = dirname(__file__) def read(filename): """Return the whitespace-stripped content of `filename`.""" path = join(here, filename) with open(path, "r") as fin: return fin.read().strip() setup( name="maas", version="1.10a1", url="https://launchpad.net/maas", license="AGPLv3", description="Metal As A Service", long_description=read('README'), author="MAAS Developers", author_email="maas-devel@lists.launchpad.net", packages=find_packages( where='src', exclude=[ "*.testing", "*.tests", "maastesting", ], ), package_dir={'': 'src'}, include_package_data=True, data_files=[ ('/etc/maas', ['etc/maas/drivers.yaml']), ('/etc/maas/templates/uefi', glob('etc/maas/templates/uefi/*.template')), ('/etc/maas/templates/dns', glob('etc/maas/templates/dns/*.template')), ('/etc/maas/templates/pxe', glob('etc/maas/templates/pxe/*.template')), ('/etc/maas/templates/commissioning-user-data', glob('etc/maas/templates/commissioning-user-data/*.template')), ('/etc/maas/templates/commissioning-user-data/snippets', glob('etc/maas/templates/commissioning-user-data/snippets/*.py') + glob('etc/maas/templates/commissioning-user-data/snippets/*.sh')), ('/usr/share/maas', ['contrib/maas-rsyslog.conf', 'contrib/maas-http.conf']), ('/etc/maas/preseeds', ['contrib/preseeds_v2/commissioning', 'contrib/preseeds_v2/enlist', 'contrib/preseeds_v2/enlist_userdata', 'contrib/preseeds_v2/curtin', 'contrib/preseeds_v2/curtin_userdata', 'contrib/preseeds_v2/curtin_userdata_centos', 'contrib/preseeds_v2/curtin_userdata_custom', 'contrib/preseeds_v2/curtin_userdata_suse', 'contrib/preseeds_v2/curtin_userdata_windows']), ('/usr/bin', ['scripts/maas-generate-winrm-cert', 'scripts/uec2roottar']), ('/usr/sbin', ['scripts/maas-dhcp-helper']), ], classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Information Technology', 'Intended Audience :: System Administrators', 'License :: OSI Approved :: GNU Affero General Public License v3', 'Operating System :: POSIX :: Linux', 'Programming Language :: JavaScript', 'Programming Language :: Python', 'Topic :: System :: Systems Administration', ], ) maas-2.0.0~beta3+bzr4941.orig/src/0000755000000000000000000000000012705726641014550 5ustar 00000000000000maas-2.0.0~beta3+bzr4941.orig/templates/0000755000000000000000000000000012705726641015757 5ustar 00000000000000maas-2.0.0~beta3+bzr4941.orig/twisted/0000755000000000000000000000000012705726641015444 5ustar 00000000000000maas-2.0.0~beta3+bzr4941.orig/utilities/0000755000000000000000000000000012705726641015774 5ustar 00000000000000maas-2.0.0~beta3+bzr4941.orig/versions.cfg0000644000000000000000000000174012705726641016314 0ustar 00000000000000[versions] # Documentation. Pygments = 2.0.2 Sphinx = 1.3.5 collective.recipe.sphinxbuilder = 0.8.2 snowballstemmer = 1.2.1 # Development and testing. argparse = 1.1 blessings = 1.6 buildout-versions = 1.7 coverage = 3.5.1 django-nose = 1.4.2 extras = 0.0.3 fixtures = 0.3.14 hypothesis = 1.11.4 ipdb = 0.8.1 ipython = 1.2.1 junitxml = 0.6 linecache2 = 1.0.0 nose = 1.3.1 nose-progressive = 1.5.1 nose-timer = 0.5.0 pbr = 1.8.1 postgresfixture = 0.3.1 python-mimeparse = 0.1.4 python-subunit = 1.2.0 selenium = 2.45 setuptools = 18.7 sqlparse = 0.1.10 termcolor = 1.1.0 testresources = 0.2.7 testscenarios = 0.4 testtools = 1.8.1 traceback2 = 1.4.0 unittest2 = 1.1.0 zc.buildout = 2.5.0 zc.recipe.egg = 2.0.3 # Lint. flake8 = 2.5.4 mccabe = 0.2.1 pep8 = 1.7.0 pyflakes = 0.8.1 # Explicit versions for PACKAGED dependencies. This is where a TEST # dependency itself depends on an INSTALL/RUNTIME dependency which is, # by force, provided by a system package. psycopg2 = 2.6.1 six = 1.10.0 maas-2.0.0~beta3+bzr4941.orig/.idea/codeStyleSettings.xml0000644000000000000000000000061112705726641021135 0ustar 00000000000000 maas-2.0.0~beta3+bzr4941.orig/.idea/encodings.xml0000644000000000000000000000033412705726641017434 0ustar 00000000000000 maas-2.0.0~beta3+bzr4941.orig/.idea/inspectionProfiles/0000755000000000000000000000000012705726641020620 5ustar 00000000000000maas-2.0.0~beta3+bzr4941.orig/.idea/maas.iml0000644000000000000000000000176512705726641016376 0ustar 00000000000000 maas-2.0.0~beta3+bzr4941.orig/.idea/misc.xml0000644000000000000000000000125312705726641016417 0ustar 00000000000000 maas-2.0.0~beta3+bzr4941.orig/.idea/modules.xml0000644000000000000000000000040412705726641017131 0ustar 00000000000000 maas-2.0.0~beta3+bzr4941.orig/.idea/sqldialects.xml0000644000000000000000000000027312705726641017775 0ustar 00000000000000 maas-2.0.0~beta3+bzr4941.orig/.idea/inspectionProfiles/Project_Default.xml0000644000000000000000000000170512705726641024417 0ustar 00000000000000 maas-2.0.0~beta3+bzr4941.orig/.idea/inspectionProfiles/profiles_settings.xml0000644000000000000000000000035312705726641025106 0ustar 00000000000000 maas-2.0.0~beta3+bzr4941.orig/acceptance/Makefile0000644000000000000000000000647112705726641017517 0ustar 00000000000000# # Build and test everything in ephemeral containers: # # $ make # # Use a different packaging branch: # # $ make packaging=/path/to/branch # # Note: /path/to/branch can be anything that bzr recognises, so an lp: # link, or bzr+ssh, and so on. # # Build and test with a different Ubuntu series: # # $ make series=randy # include /etc/lsb-release # Default to the newer of Quantal or the local series. series := $(lastword $(sort quantal $(DISTRIB_CODENAME))) # Default to the main packaging branch on Launchpad, but treat Precise # specially. ifeq ($(series),precise) packaging := lp:~maas-maintainers/maas/packaging.precise else packaging := lp:~maas-maintainers/maas/packaging endif # Assume we're testing this branch. upstream := $(abspath ..) # The container on which to base ephemerals. container := maas-$(series) ## Convenience definitions. define ephexec sudo LC_ALL=C SSH_ASKPASS=$(abspath ubuntupass) setsid \ lxc-start-ephemeral -b $(upstream) -o $(container) -u ubuntu -- \ env DEBIAN_FRONTEND=noninteractive SUDO_ASKPASS=$(abspath ubuntupass) endef define ephexec-make $(ephexec) $(abspath with-make) make -C $(abspath .) endef define check-service test $(2) = $(wordlist 2,2,$(shell initctl --system status $(1))) # $(1) endef ## Top-level targets. test: build | services sudo container-updated $(ephexec-make) $@-inner # lxc-start-ephemeral does not return the exit code of any command it # runs, so we delete any existing packages before building and check # for their presence afterwards instead. build: source source/debian | services sudo container @$(RM) *.deb $(ephexec-make) $@-inner @ls -1 *.deb @touch $@ container: | services sudo test -n "$$(sudo lxc-ls -1 $(container))" || \ sudo lxc-create -n $(container) -f /etc/lxc/default.conf \ -t ubuntu -- --release $(series) container-updated: container | services sudo $(abspath update-container) $(container) services: $(call check-service,lxc,start/running) $(call check-service,lxc-net,start/running) define phony-outer-targets container container-updated services test endef ## Targets that run within an LXC container. # XXX: These packages appear to be missing from the dependencies # declared in the packaging branch. define missing-packages python-distribute python-django endef test-inner: upgrade-inner sudo -AE apt-get --assume-yes install $(strip $(missing-packages)) sudo -AE dpkg --unpack --force-depends -- *.deb sudo -AE apt-get --fix-broken --assume-yes install define build-packages debhelper devscripts dh-apport endef build-inner: | upgrade-inner sudo -AE apt-get --assume-yes install $(strip $(missing-packages)) sudo -AE apt-get --assume-yes install $(strip $(build-packages)) cd source && debuild -i -us -uc -b upgrade-inner: sudo -AE apt-get --assume-yes update sudo -AE apt-get --assume-yes upgrade define phony-inner-targets build-inner test-inner upgrade-inner endef ## Dependencies. source: bzr export --uncommitted $@ $(upstream) source/debian: | source bzr export $@ $(packaging)/debian ## Miscellaneous. sudo: @sudo -v clean: $(RM) -r source build *.build *.changes *.deb define phony-misc-targets clean sudo endef ## Phony. define phony $(phony-inner-targets) $(phony-misc-targets) $(phony-outer-targets) endef phony := $(sort $(strip $(phony))) .PHONY: $(phony) maas-2.0.0~beta3+bzr4941.orig/acceptance/README0000644000000000000000000000122012705726641016722 0ustar 00000000000000MAAS Packaging Acceptance Testing --------------------------------- The `test` make target will build binary packages for the current branch using the latest packaging branch from Launchpad, *in a clean ephemeral container*. The `build` target will install these packages in another clean ephemeral LXC container. Consider the `build-inner` and `test-inner` targets as bootstrap points for further work. It may not be suitable for full automated end-to-end testing of MAAS, so be clear about what you need to test before investing work here. OTOH, it is a good place to quickly test that the packages build, install and configure themselves as expected. maas-2.0.0~beta3+bzr4941.orig/acceptance/ubuntupass0000755000000000000000000000004012705726641020200 0ustar 00000000000000#!/usr/bin/env bash echo ubuntu maas-2.0.0~beta3+bzr4941.orig/acceptance/update-container0000755000000000000000000000137712705726641021247 0ustar 00000000000000#!/usr/bin/env bash # Copyright 2013-2015 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). # Exit immediately if a command exits with a non-zero status. set -o errexit # Treat unset variables as an error when substituting. set -o nounset container="$1" start() { echo -n Starting... sudo lxc-start -n "${container}" --daemon echo " done." } attach() { sudo LC_ALL=C lxc-attach -n "${container}" -- "$@" } stop() { echo -n Stopping... sudo lxc-stop -n "${container}" echo " done." } start && trap stop EXIT && { sleep 5 # Allow container to get going. attach sudo -AE apt-get --assume-yes update attach sudo -AE apt-get --assume-yes dist-upgrade } maas-2.0.0~beta3+bzr4941.orig/acceptance/with-make0000755000000000000000000000115412705726641017664 0ustar 00000000000000#!/usr/bin/env bash # Copyright 2012-2015 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). # Exit immediately if a command exits with a non-zero status. set -o errexit # Treat unset variables as an error when substituting. set -o nounset # Ensure that GNU make is installed. if ! sudo -AE apt-get install --assume-yes make then # The installation of `make` may have failed because the package # lists are out of date, so update them and try again. sudo -AE apt-get update sudo -AE apt-get install --assume-yes make fi exec "$@" maas-2.0.0~beta3+bzr4941.orig/contrib/maas-http.conf0000644000000000000000000000243612705726641020173 0ustar 00000000000000 SSLEngine On # Do not rely on these certificates, generate your own. SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key ExpiresActive On ExpiresByType text/javascript "access plus 1 hours" ExpiresByType application/javascript "access plus 1 hours" ExpiresByType application/x-javascript "access plus 1 hours" ExpiresByType text/css "access plus 1 hours" ExpiresByType image/gif "access plus 1 hours" ExpiresByType image/jpeg "access plus 1 hours" ExpiresByType image/png "access plus 1 hours" Alias /MAAS/static/ /usr/share/maas/web/static/ ProxyPreserveHost on ProxyPass /MAAS/ws "ws://localhost:5240/MAAS/ws" ProxyPass /MAAS/static/ ! ProxyPass /MAAS/ http://localhost:5240/MAAS/ ProxyPass /MAAS http://localhost:5240/MAAS/ RewriteEngine On # Redirect (permanently) requests for /MAAS to /MAAS/. RewriteRule ^/MAAS$ %{REQUEST_URI}/ [R=301,L] maas-2.0.0~beta3+bzr4941.orig/contrib/maas-rsyslog.conf0000644000000000000000000000013112705726641020704 0ustar 00000000000000# Log MAAS messages to their own file. :syslogtag,contains,"maas" /var/log/maas/maas.log maas-2.0.0~beta3+bzr4941.orig/contrib/preseeds_v2/0000755000000000000000000000000012705726641017642 5ustar 00000000000000maas-2.0.0~beta3+bzr4941.orig/contrib/tgt.conf0000644000000000000000000000006212705726641017064 0ustar 00000000000000include /var/lib/maas/ephemeral/tgt.conf.d/*.conf maas-2.0.0~beta3+bzr4941.orig/contrib/preseeds_v2/commissioning0000644000000000000000000000002112705726641022434 0ustar 00000000000000{{preseed_data}} maas-2.0.0~beta3+bzr4941.orig/contrib/preseeds_v2/curtin0000644000000000000000000000002112705726641021062 0ustar 00000000000000{{preseed_data}} maas-2.0.0~beta3+bzr4941.orig/contrib/preseeds_v2/curtin_userdata0000644000000000000000000000430312705726641022761 0ustar 00000000000000#cloud-config debconf_selections: maas: | {{for line in str(curtin_preseed).splitlines()}} {{line}} {{endfor}} {{if third_party_drivers and driver}} early_commands: {{py: key_string = ''.join(['\\x%x' % x for x in map(ord, driver['key_binary'])])}} driver_00_get_key: /bin/echo -en '{{key_string}}' > /tmp/maas-{{driver['package']}}.gpg driver_01_add_key: ["apt-key", "add", "/tmp/maas-{{driver['package']}}.gpg"] driver_02_add: ["add-apt-repository", "-y", "deb {{driver['repository']}} {{node.get_distro_series()}} main"] driver_03_update_install: ["sh", "-c", "apt-get update --quiet && apt-get --assume-yes install {{driver['package']}}"] driver_04_load: ["sh", "-c", "depmod && modprobe {{driver['module']}}"] {{endif}} late_commands: maas: [wget, '--no-proxy', '{{node_disable_pxe_url|escape.shell}}', '--post-data', '{{node_disable_pxe_data|escape.shell}}', '-O', '/dev/null'] {{if third_party_drivers and driver}} driver_00_key_get: curtin in-target -- sh -c "/bin/echo -en '{{key_string}}' > /tmp/maas-{{driver['package']}}.gpg" driver_02_key_add: ["curtin", "in-target", "--", "apt-key", "add", "/tmp/maas-{{driver['package']}}.gpg"] driver_03_add: ["curtin", "in-target", "--", "add-apt-repository", "-y", "deb {{driver['repository']}} {{node.get_distro_series()}} main"] driver_04_update_install: ["curtin", "in-target", "--", "apt-get", "update", "--quiet"] driver_05_install: ["curtin", "in-target", "--", "apt-get", "-y", "install", "{{driver['package']}}"] driver_06_depmod: ["curtin", "in-target", "--", "depmod"] driver_07_update_initramfs: ["curtin", "in-target", "--", "update-initramfs", "-u"] {{endif}} power_state: mode: reboot {{if node.split_arch()[0] in {'i386', 'amd64'} }} apt_mirrors: ubuntu_archive: http://{{main_archive_hostname}}/{{main_archive_directory}} ubuntu_security: http://{{main_archive_hostname}}/{{main_archive_directory}} {{else}} apt_mirrors: ubuntu_archive: http://{{ports_archive_hostname}}/{{ports_archive_directory}} ubuntu_security: http://{{ports_archive_hostname}}/{{ports_archive_directory}} {{endif}} {{if enable_http_proxy}} {{if http_proxy }} apt_proxy: {{http_proxy}} {{else}} apt_proxy: http://{{server_host}}:8000/ {{endif}} {{endif}} maas-2.0.0~beta3+bzr4941.orig/contrib/preseeds_v2/curtin_userdata_centos0000644000000000000000000000043312705726641024334 0ustar 00000000000000#cloud-config debconf_selections: maas: | {{for line in str(curtin_preseed).splitlines()}} {{line}} {{endfor}} late_commands: maas: [wget, '--no-proxy', '{{node_disable_pxe_url}}', '--post-data', '{{node_disable_pxe_data}}', '-O', '/dev/null'] power_state: mode: reboot maas-2.0.0~beta3+bzr4941.orig/contrib/preseeds_v2/curtin_userdata_custom0000644000000000000000000000043312705726641024353 0ustar 00000000000000#cloud-config debconf_selections: maas: | {{for line in str(curtin_preseed).splitlines()}} {{line}} {{endfor}} late_commands: maas: [wget, '--no-proxy', '{{node_disable_pxe_url}}', '--post-data', '{{node_disable_pxe_data}}', '-O', '/dev/null'] power_state: mode: reboot maas-2.0.0~beta3+bzr4941.orig/contrib/preseeds_v2/curtin_userdata_suse0000644000000000000000000000043312705726641024020 0ustar 00000000000000#cloud-config debconf_selections: maas: | {{for line in str(curtin_preseed).splitlines()}} {{line}} {{endfor}} late_commands: maas: [wget, '--no-proxy', '{{node_disable_pxe_url}}', '--post-data', '{{node_disable_pxe_data}}', '-O', '/dev/null'] power_state: mode: reboot maas-2.0.0~beta3+bzr4941.orig/contrib/preseeds_v2/curtin_userdata_windows0000644000000000000000000000051612705726641024535 0ustar 00000000000000#cloud-config debconf_selections: maas: | {{for line in str(curtin_preseed).splitlines()}} {{line}} {{endfor}} late_commands: maas: [wget, '--no-proxy', '{{node_disable_pxe_url}}', '--post-data', '{{node_disable_pxe_data}}', '-O', '/dev/null'] license_key: {{node.get_effective_license_key()}} power_state: mode: reboot maas-2.0.0~beta3+bzr4941.orig/contrib/preseeds_v2/enlist0000644000000000000000000000047112705726641021065 0ustar 00000000000000#cloud-config datasource: MAAS: timeout : 50 max_wait : 120 # there are no default values for metadata_url or oauth credentials # If no credentials are present, non-authed attempts will be made. metadata_url: {{metadata_enlist_url}} output: {all: '| tee -a /var/log/cloud-init-output.log'} maas-2.0.0~beta3+bzr4941.orig/contrib/preseeds_v2/enlist_userdata0000644000000000000000000001247012705726641022757 0ustar 00000000000000#cloud-config {{if enable_http_proxy}} {{if http_proxy}} apt_proxy: {{http_proxy}} {{elif server_host}} apt_proxy: http://{{server_host}}:8000/ {{endif}} {{endif}} system_info: package_mirrors: - arches: [i386, amd64] search: primary: ["http://{{main_archive_hostname}}/{{main_archive_directory}}"] security: ["http://{{main_archive_hostname}}/{{main_archive_directory}}"] failsafe: primary: "http://archive.ubuntu.com/ubuntu" security: "http://security.ubuntu.com/ubuntu" - arches: [default] search: primary: ["http://{{ports_archive_hostname}}/{{ports_archive_directory}}"] security: ["http://{{ports_archive_hostname}}/{{ports_archive_directory}}"] failsafe: primary: "http://ports.ubuntu.com/ubuntu-ports" security: "http://ports.ubuntu.com/ubuntu-ports" rsyslog: remotes: maas: "{{syslog_host_port}}" power_state: delay: now mode: poweroff timeout: 1800 condition: test ! -e /tmp/block-poweroff misc_bucket: - &maas_enlist | #### IPMI setup ###### # If IPMI network settings have been configured statically, you can # make them DHCP. If 'true', the IPMI network source will be changed # to DHCP. IPMI_CHANGE_STATIC_TO_DHCP="false" # In certain hardware, the parameters for the ipmi_si kernel module # might need to be specified. If you wish to send parameters, uncomment # the following line. #IPMI_SI_PARAMS="type=kcs ports=0xca2" TEMP_D=$(mktemp -d "${TMPDIR:-/tmp}/${0##*/}.XXXXXX") IPMI_CONFIG_D="${TEMP_D}/ipmi.d" BIN_D="${TEMP_D}/bin" OUT_D="${TEMP_D}/out" PATH="$BIN_D:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" mkdir -p "$BIN_D" "$OUT_D" "$IPMI_CONFIG_D" load_modules() { modprobe ipmi_msghandler modprobe ipmi_devintf modprobe ipmi_si ${IPMI_SI_PARAMS} udevadm settle } add_bin() { cat > "${BIN_D}/$1" chmod "${2:-755}" "${BIN_D}/$1" } add_ipmi_config() { cat > "${IPMI_CONFIG_D}/$1" chmod "${2:-644}" "${IPMI_CONFIG_D}/$1" } # Example config: enable BMC remote access (on some systems.) #add_ipmi_config "02-global-config.ipmi" <<"END_IPMI_CONFIG" #Section Lan_Channel # Volatile_Access_Mode Always_Available # Volatile_Enable_User_Level_Auth Yes # Volatile_Channel_Privilege_Limit Administrator # Non_Volatile_Access_Mode Always_Available # Non_Volatile_Enable_User_Level_Auth Yes # Non_Volatile_Channel_Privilege_Limit Administrator #EndSection #END_IPMI_CONFIG add_bin "maas-ipmi-autodetect-tool" <<"END_MAAS_IPMI_AUTODETECT_TOOL" {{for line in maas_ipmi_autodetect_tool_py.splitlines()}} {{line}} {{endfor}} END_MAAS_IPMI_AUTODETECT_TOOL add_bin "maas-ipmi-autodetect" <<"END_MAAS_IPMI_AUTODETECT" {{for line in maas_ipmi_autodetect_py.splitlines()}} {{line}} {{endfor}} END_MAAS_IPMI_AUTODETECT add_bin "maas-moonshot-autodetect" <<"END_MAAS_MOONSHOT_AUTODETECT" {{for line in maas_moonshot_autodetect_py.splitlines()}} {{line}} {{endfor}} END_MAAS_MOONSHOT_AUTODETECT add_bin "maas-enlist" <<"END_MAAS_ENLIST" {{for line in maas_enlist_sh.splitlines()}} {{line}} {{endfor}} END_MAAS_ENLIST # we could obtain the interface that booted from the kernel cmdline # thanks to 'IPAPPEND' (http://www.syslinux.org/wiki/index.php/SYSLINUX) url="{{server_url}}" # load ipmi modules load_modules pargs="" if $IPMI_CHANGE_STATIC_TO_DHCP; then pargs="--dhcp-if-static" fi power_type=$(maas-ipmi-autodetect-tool) case "$power_type" in ipmi) power_params=$(maas-ipmi-autodetect --configdir "$IPMI_CONFIG_D" ${pargs} --commission-creds) && [ -n "${power_params}" ] && power_params=${power_params%.} ;; moonshot) power_params=$(maas-moonshot-autodetect --commission-creds) && [ -n "${power_params}" ] && power_params=${power_params%.} ;; esac # Try maas-enlist without power parameters on failure for older versions of # maas-enlist without power parameter support maas-enlist --serverurl "$url" ${power_params:+--power-params "${power_params}" --power-type "${power_type}"}>/tmp/enlist.out ||\ maas-enlist --serverurl "$url" >/tmp/enlist.out if [ $? -eq 0 ]; then msg="successfully enlisted to '$url'" echo echo "=== $(date -R): $msg" cat /tmp/enlist.out echo ============================================= sleep 10 else user="ubuntu" pass="ubuntu" echo "$user:$pass" | chpasswd bfile="/tmp/block-poweroff" { echo "#!/bin/sh"; echo "touch $bfile"; } > /etc/profile.d/A01-block.sh chmod 755 /etc/profile.d/A01-block.sh echo echo ============================================= echo "failed to enlist system maas server" echo "sleeping 60 seconds then poweroff" echo echo "login with '$user:$pass' to debug and disable poweroff" echo cat /tmp/enlist.out echo ============================================= sleep 60 [ -e $bfile ] && exit 0 fi packages: [ freeipmi-tools, openipmi, ipmitool ] output: {all: '| tee -a /var/log/cloud-init-output.log'} runcmd: - [ sh, -c, *maas_enlist ] maas-2.0.0~beta3+bzr4941.orig/docs/_static/0000755000000000000000000000000012705726641016337 5ustar 00000000000000maas-2.0.0~beta3+bzr4941.orig/docs/_templates/0000755000000000000000000000000012705726641017046 5ustar 00000000000000maas-2.0.0~beta3+bzr4941.orig/docs/about.rst0000644000000000000000000000373112705726641016561 0ustar 00000000000000About this documentation ======================== This is the documentation for Canonical's MAAS software. If you aren't sure what that is, you should probably skip everything else and head straight to the :ref:`orientation` section where it is explained. Like any software though, it can be frustrating if you don't know how bits of it work, how to achieve certain goals or what to do when things go wrong. Amongst its various sections, this manual aims to answer all those questions and plenty more you haven't even thought of yet. Getting it ---------- In a cunning move, the current documentation always lives, and is built from, the main MAAS source code (in the top-level ``docs/`` directory). That means that whatever MAAS package you have installed, or even if you are really living life on the edge and have checked out a development version from Launchpad, this documentation should be the latest and most appropriate version for the software you are running. However, it is also possible that there have been additional sections, or more helpful and clearer bits added since the package you are using was made. For this reason you can always find the latest documentation online here: `http://maas.io/`_. .. _http://maas.io/: http://maas.io Contributing ------------ If you have some extra information to add, or think you have spotted an error or something out of date, we really want to hear about it. Please `File a bug report`_ or `contact us directly`_. In addition you can talk to us on the Freenode IRC channel #maas. .. _File a bug report: https://bugs.launchpad.net/maas/+filebug .. _contact us directly: https://launchpad.net/~maas-maintainers/+contactuser If you see something wrong with this documentation, you can help us fix it. Download the source to MAAS by following the instructions in :doc:`the hacking guide `, make your changes, and propose a merge against lp:maas on Launchpad. The documentation source lives in the top-level ``docs/`` directory. maas-2.0.0~beta3+bzr4941.orig/docs/api_authentication.rst0000644000000000000000000000503712705726641021320 0ustar 00000000000000.. -*- mode: rst -*- .. _api_authentication: API authentication ================== MAAS's API uses OAuth_ as its authentication mechanism. There isn't a third party involved (as in 3-legged OAuth) and so the process used is what's commonly referred to as 0-legged OAuth: the consumer accesses protected resources by submitting OAuth signed requests. .. _OAuth: http://en.wikipedia.org/wiki/OAuth Note that some API endpoints support unauthenticated requests (i.e. anonymous access). See the :doc:`API documentation ` for details. Examples ======== Here are two examples on how to perform an authenticated GET request to retrieve the list of nodes. The , , tokens are the three elements that compose the API key (API key = '::'). Python ------ .. code:: python import oauth.oauth as oauth import httplib2 import uuid def perform_API_request(site, uri, method, key, secret, consumer_key): resource_tok_string = "oauth_token_secret=%s&oauth_token=%s" % ( secret, key) resource_token = oauth.OAuthToken.from_string(resource_tok_string) consumer_token = oauth.OAuthConsumer(consumer_key, "") oauth_request = oauth.OAuthRequest.from_consumer_and_token( consumer_token, token=resource_token, http_url=site, parameters={'oauth_nonce': uuid.uuid4().hex}) oauth_request.sign_request( oauth.OAuthSignatureMethod_PLAINTEXT(), consumer_token, resource_token) headers = oauth_request.to_header() url = "%s%s" % (site, uri) http = httplib2.Http() return http.request(url, method, body=None, headers=headers) # API key = '::' response = perform_API_request( 'http://server/MAAS/api/2.0', '/nodes/?op=list', 'GET', '', '', '') Ruby ---- .. code:: ruby require 'oauth' require 'oauth/signature/plaintext' def perform_API_request(site, uri, key, secret, consumer_key) consumer = OAuth::Consumer.new( consumer_key, "", { :site => "http://localhost/MAAS/api/2.0", :scheme => :header, :signature_method => "PLAINTEXT"}) access_token = OAuth::AccessToken.new(consumer, key, secret) return access_token.request(:get, "/nodes/?op=list") end # API key = "::" response = perform_API_request( "http://server/MAAS/api/2.0", "/nodes/?op=list", "", "", "consumer_key>") maas-2.0.0~beta3+bzr4941.orig/docs/bootsources.rst0000644000000000000000000000673212705726641020022 0ustar 00000000000000.. -*- mode: rst -*- .. _bootsources: Boot images import configuration ================================ The configuration for where a region downloads its images is defined by a set of "sources". Each "source" defines a Simplestreams repository location (``url``) from which images can be downloaded and a ``keyring_filename`` (or ``keyring_data``) for validating index and image signatures from that location. For each source, you can define a series of filters (``selections``) specifying which images should be downloaded from that source. The following example use the MAAS CLI to list the boot sources and the boot source selections. Assuming the CLI ``PROFILE`` is the name of the profile under which you're logged in to the server:: $ maas $PROFILE boot-sources read [ { "url": "https://images.maas.io/ephemeral-v2/releases/", "keyring_data": "", "resource_uri": "", "keyring_filename": "/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg", "id": 1 } ] $ maas $PROFILE boot-source-selections read 1 [ { "labels": [ "release" ], "arches": [ "amd64" ], "subarches": [ "*" ], "release": "trusty", "id": 1, "resource_uri": "" } ] Restricting the images being downloaded --------------------------------------- Let's say you want to add a previous LTS release to images being downloaded. Starting from the configuration described above, you would need to: - Add the "Precise" selection (the selection '1' of the source '1'):: $ maas $PROFILE boot-source-selections create 1 os="ubuntu" release="precise" arches="amd64" subarches="*" labels="*" After you've selected the additional boot sources you need to tell MAAS to start the import process by running the command:: $ maas $PROFILE boot-resources import Downloading the images from a different source ---------------------------------------------- Let's say you want to import the images from a different location. You would need to to change the source's url and keyring:: $ maas $PROFILE boot-source update 1 url="http://custom.url" keyring_filename="" keyring_data@=./custom_keyring_file { "url": "http://custom.url/", "keyring_data": "", "resource_uri": "", "keyring_filename": "", "id": 1 } Adding a source --------------- You can also add a new source:: $ maas $PROFILE boot-sources create url=http://my.url keyring_filename="" keyring_data@=./ custom_keyring_file { "url": "http://my.url/", "keyring_data": "ZW1wdHkK", "keyring_filename": "", "id": 2, "resource_uri": "" } Inside that newly created source ('2') you can add selections:: $ maas $PROFILE boot-source-selections create 2 os="ubuntu" release="trusty" arches="amd64" subarches="*" labels='*' { "labels": ["*"], "arches": ["amd64"], "subarches": ["*"], "release": "trusty", "id": 3, "resource_uri": "" } Deleting a source ----------------- Let's say you need to delete the newly added source. To delete the source:: $ maas $PROFILE boot-source delete 2 maas-2.0.0~beta3+bzr4941.orig/docs/changelog.rst0000644000000000000000000036511012705726641017400 0ustar 00000000000000========= Changelog ========= 2.0.0 (beta3) ============= Issues fixed in this release ---------------------------- LP: #1553665 Unconfigured interfaces shouldn't add DNS records LP: #1571563 Can't override built in partitioning LP: #1566109 adding a device with no mac address gives an internal server error LP: #1564927 [2.0] Can't start OMAPI protocol: address not available LP: #1570606 [2.0] subnet.list: list index out of range error when using a /31 subnet LP: #1570600 [2.0b2] Trying to enabled dhcp on fabric-1 with IPv4 networks, results in maas-dhcpd6 attempted to be enabled LP: #1570609 [2.0b2] builtins.TypeError: cannot use a bytes pattern on a string-like object LP: #1571851 [2.0b2] interface_set returns an interface without 'links' even if empty LP: #1570626 [2.0b2] NameError: name 'LargeFile' is not defined LP: #1572070 [2.0b2] Cannot link physical device interfaces to tagged vlans, breaking juju 2.0 multi-NIC containers LP: #1569483 [2.0b2] Can't deploy CentOS LP: #1571622 [2.0b2] Bad VLAN Validation on UI Node Details page LP: #1555715 [UI 2.0a1] changing a subnet's space does not cause a refresh in networks/spaces tab in the UI LP: #1570152 [UI 2.0b1] Can't delete subnet in the UI, no action for it. LP: #1571002 [UI 2.0b2] When reconfiguring DHCP, I can't unselect Secondary Rack Controller 2.0.0 (beta2) ============= Issues fixed in this release ---------------------------- LP: #1563409 [2.0a4] 2.0 api is confused about its hash LP: #1555251 [2.0] Missing region-controller API LP: #1569102 API 2.0 deploy makes machine lose power information LP: #1564657 [2.0a4] Bridges no longer discovered by the rack controller LP: #1557144 [2.0a1] When Xenial is the only one image imported, nodes fail to boot after saving the commissioning image LP: #1556185 TypeError: 'Machine' object is not iterable LP: #1562198 [2.0a4] When providng DHCP a smarter default dynamic range is needed LP: #1568051 ThreadPool context entry failure causes thread pool to break LP: #1567178 [2.0 beta 1] After CD install, maas-region RPC endpoints is not available LP: #1566419 Rack controllers should output whether boot resources are synced LP: #1566920 Cannot change power settings for machine LP: #1568041 "[2.0beta1] macaddress_set should be removed from the machines and devices API" LP: #1568045 [2.0beta1] constraint_map should be removed from the machines acquire output LP: #1567213 Devices results missing interface_set LP: #1568847 "[2.0 beta1 ] Service 'maas-proxy' failed to start LP: #1543195 Unable to set mtu on default VLAN LP: #1566336 MAAS keeps IPs assigned to eth0, even after eth0 is enslaved into a bond LP: #1546274 Importing custom boot images is broken in MAAS 1.10. LP: #1566503 "Failed talking to node's BMC: cannot use a string pattern on a bytes-like object" LP: #1543968 MAAS 1.9+ allows non-unique space names and shows no space id in a subnet LP: #1543707 MAAS 1.9+ should not allow whitespace characters in space names LP: #1560495 [UI 2.0a3] Bad table spacing between columns LP: #1561733 [2.0a3] MAAS no longer detects external DHCP servers LP: #1566848 [2.0 beta1] Xenial is not the default image LP: #1563701 [2.0] VLAN interfaces of secondary rack-controller are not reported LP: #1561991 [2.0a4] Doesn't use modify over the OMAPI LP: #1566829 DoesNotExist: RegionControllerProcess matching query does not exist. LP: #1561954 Ubuntu Server install menu needs a 16.04 refresh LP: #1564971 [2.0a4] duplicate ipranges cuase dhcpd Configuration file errors LP: #1568207 Remove deprecated node-interface 2.0.0 (beta1) ============= Major new features ------------------ **Region Controller Redundancy** Starting from MAAS 2.0 beta 1, MAAS now provides the ability to scale out or provide redundancy for the MAAS Region Controller API server and DNS. This will allow administrators to set up multiple MAAS Region Controllers (maas-region-api) against a common database, providing redundancy of services. With further manual configuration, users will be able to setup MAAS Region Controller in High Availability. Minor new features ------------------ **MAAS Proxy is now managed** Starting from MAAS 2.0 beta 1, MAAS now manages the configuration for maas-proxy. This allows MAAS to lock down maas-proxy, and only allow traffic from networks MAAS know about. For more information see :ref:`MAAS Proxy ` **DHCP Snippets WebUI** MAAS 2.0 beta 1 introduces the ability to add and remove DHCP snippets via the Web UI. This can be found under the ‘Settings’ page. This feature is available for administrative only. Issues fixed in this release ---------------------------- LP: #1557451 [2.0] MAAS api 1.0 version returns null LP: #1563094 builtins.FileNotFoundError: [Errno 2] No such file or directory: 'bzr' LP: #1557526 [2.0a2] Link "go to rack controllers page" does not link to controllers page. LP: #1562106 [2.0a4] Can't assign a 'Static IP' Address LP: #1562888 [2.0] DHCP Snippets are not validated before committed LP: #1553841 [2.0a1] MAAS should ensure that BMC password is correct before saving LP: #1379567 maas-proxy is an open proxy with no ACLs. it should add networks automatically LP: #1562214 [2.0a4] If external proxy is being used, status from maas-proxy shouldn't be surfaced LP: #1555392 [2.0a1] python3-maas-client needs to send data as bytes() LP: #1563807 Systemd units need to reflect updated MAAS names LP: #1563799 [2.0a4] Permission error for boot-resources/cache LP: #1563779 [2.0a4] maas-rackd missing presumed lost 2.0.0 (alpha4) ============== Important annoucements ---------------------- **maas-region-controller-min has been renamed to maas-region-api** The `maas-region-controller-min` package has now been renamed to `maas-region-api`. This package provides the API services for MAAS (maas-regiond) and can be used to scale out the API front-end of your MAAS region controller. Major new features ------------------ **DHCP Snippets Backend & API** MAAS 2.0 alpha 4 introduces the ability to define DHCP snippets. This feature allows administrators to manage DHCP directly from MAAS’, removing the need to manually modify template files. Snippets can be defined as: * `Host snippets`, allowing to define configuration for a particular node in MAAS. * `Subnet snippets`, allowing to define configuration for a specific subnet in MAAS. * `Global snippets`, allowing to define configuration that will affect DHCP (isc-dhcp) as a whole. For more information, see :ref:`DHCP Snippets `. Minor new features ------------------ **Rack Controller Web UI Improvements** MAAS 2.0 alpha 4 adds the UI for Served VLANs and Service Tracking, allowing users to see what VLANs are being currently served by a rack controller, and the status of the services in those Rack Controllers. **Rsyslog during enlistment and commissioning** MAAS 2.0 alpha 4 now enables rsyslog for the enlistment and commissioning environment when using Xenial as the Commissioning image. This allows users to see all cloud-init’s syslog information in /var/log/maas/rsyslog/. Known issues and work arounds ----------------------------- **DHCP snippets are not validated before committed** When DHCP snippets are created, MAAS is not validating the DHCP snippet against isc-dhcp config. This means that if users input invalid isc-dhcp configuration, this will cause the DHCP config to be generated anyway, yielding maas-dhcp to not be working properly or started at all. See bug `1562888`_ for more information. .. _1562888: http://launchpad.net/bugs/1562888 Issues fixed in this release ---------------------------- LP: #1561816 Rack controller 'None' disconnected. LP: #1557616 [2.0a2] UI provides no way to disable DHCP LP: #1559332 [2.0a3] Server VLAN's UI is showing too many vlans LP: #1555679 [2.0a1] bridges with same mac as physical interfaces prevent rack interface discovery LP: #1560233 [2.0a3] maas-regiond not available right after install. LP: #1559330 [2.0a3] maas-rackd attemps to connect to regiond, constantely, without stop LP: #1559361 [2.0a3] maas-dhcpd is being restarted constantly while enlisting/commissioning multiple machines LP: #1559327 [2.0a3] dhcpd is configured incorrectly when two subnets are incorrectly placed in the same VLAN LP: #1549843 [2.0a1] Failed to update this region's process and endpoints; unleashed:pid=28940 record's may be out of date LP: #1559398 [2.0a3] Can't commission too many machines at a time LP: #1556366 [2.0a1] PXE interface incorrectly displayed on the UI 2.0.0 (alpha3) ============== Important Announcements ----------------------- **Debian Installer Files are no longer installed** Following the full drop of support for the Debian Installer (DI) in 1.9, MAAS no longer downloads the DI related files from simplestreams and on upgrade all DI related files will be removed both from the region and all rack controllers. Major new features ------------------ **Networks WebUI** MAAS 2.0.0 alpha 3 is introducing a few new Web UI features that were not available in MAAS 1.9 or MAAS 1.10. * Add Fabric and Space details pages MAAS 2.0.0 now displays more detailed information of the Fabric and Space, by introducing the details page for each. * Add ability to add/remove (create/delete) new Fabrics, Spaces, Subnets and VLANs MAAS 2.0.0 now provides the ability to add new Fabrics, Spaces, Subnets and VLANs. This can be done as actions under the Networks listing page. The ability to delete such Fabrics, Spaces, Subnets and VLANs is also available, however, this is only possible for the non-default components and from the component’s details page. **WebUI for new storage features** MAAS 2.0.0 alpha 3 provides the ability to add mount options via the WebUI. MAAS 2.0.0 alpha 3 also provides the ability to create new swap partitions via the WebUI. As a reminder, previous MAAS releases would automatically create a swap file, but starting from MAAS 2.0, users will have the ability to create a swap partition instead, if so desired. Minor new features ------------------ **Ability to change a machine’s domain name from the UI** MAAS 2.0.0 alpha 3 introduces the ability to change a machine’s DNS domain via the WebUI. It was previously supported on the API only. **Rack Controller details page now shows served VLANs** The Rack Controller details page now shows what VLANs are being served on this Rack Controller, and whether it is the primary or secondary Rack providing services for such VLAN. **Added `maas-rack support-dump` command** For increased support observability, users can now dump the contents of several commonly-needed data structures by executing `sudo maas-rack support-dump`. This command will dump networking diagnostics, rack configuration, and image information. Information can be restricted to a particular category by using the `--networking`, `--config`, or `--images` options. Known issues and work arounds ----------------------------- **Rack Controller tries to constantly reconnect** In some situations, the MAAS Rack Controller will try to constantly re-connect to the region controller after a restart, causing the Rack Controller to be unavailable for a period of time. At the moment, there's no work around other than to wait for a few minutes until the Rack Controller has been fully connected. See bug `1559330`_ for more information. .. _1559330: http://launchpad.net/bugs/1559330 Major bugs fixed in this release -------------------------------- LP: #1555393 python3-maas-client API 2.0 seems to no longer use op but MAASClient.post requires it and incorectly passes it along LP: #1554566 Fail to commission when Fabric on Machine Interface and Rack Interface dont match LP: #1553848 TFTP back-end crashes LP: #1554999 Can't deploy a node (no interfaces on rack controller) 2.0.0 (alpha2) ============== Important Announcements ----------------------- **maas-region-admin command has been replaced** The MAAS Region command, `maas-region-admin` has now been replaced by the `maas-region` command. **maas-provision command has been replaced** The MAAS Rack Controller command, `maas-provision`, has now been replaced by the `maas-rack` command. Major new features ------------------ **Networks listing page** A new Networks listing page has been introduced, that allows users users to have a better view of MAAS networking concepts under the 'Networks' tab. It allows users to filter by `Fabric` and `Space`. **Service Tracking** MAAS is now fully tracking the status of the services for the different services that MAAS uses, as defined by systemd. These services are: * maas-proxy * bind * maas-dhcpd and maas-dhcpd6 * tgt Known issues & work arounds --------------------------- **Failure to commission when Machine interfaces are not in the same fabric as DHCP** Machines fail to commission when its interfaces are in a different fabric from the one DHCP is running on. For example, if DHCP is enabled on `fabric-2`, and the machine's PXE interface is on `fabric-0`, the machine will fail to commission. To work around this, you can update the Rack Controller interface connected to `fabric-2`, to be under `fabric-0`, and enabling DHCP on the `untagged` VLAN under `fabric-0`. See bug `1553617`_ for more information. .. _1554566: https://launchpad.net/bugs/1554566 2.0.0 (alpha1) ============== Important Announcements ----------------------- **MAAS 2.0 supported on Ubuntu 16.04 LTS (Xenial)** MAAS version 2.0 will be supported on Ubuntu 16.04 LTS. MAAS 2.0 (and the transitional 1.10 release) will NOT be supported on Ubuntu 14.04 LTS. MAAS versions 1.9 and earlier will continue to be supported on Ubuntu 14.04 LTS (Trusty) until they reach end-of-life. Upgrades are supported for users running Ubuntu 14.04 systems running MAAS 1.9 or earlier. Upon upgrading to Ubuntu 16.04, the MAAS database and configuration will be seamlessly migrated to the supported MAAS version. Please see the “Other Notable Changes†section below for more details regarding the reasons for this change. **API 1.0 has been deprecated, introducing API 2.0** Starting from MAAS 2.0, the API 1.0 has now been deprecated and a new MAAS 2.0 API is being introduced. With the introduction of the new API version, various different endpoints have now been deprecated and new end-points have been introduced. API users will need to update their client tools to reflect the changes of the new API 2.0. For more information on API 2.0, refer to :ref:`API documentation `. **Cluster Controllers have now been deprecated. Introducing Rack Controllers** Starting from MAAS 2.0, MAAS Cluster Controllers have been deprecated alongside with the NodeGroups API. The Cluster Controllers have been replaced with Rack Controllers, and the RackController API have now been introduced. Thehe new Rack Controllers currently provides feature parity with earlier versions of MAAS. For more information on Rack Controllers, refer to the `Major new Features` section bellow or refer to :ref:`rack-configuration`. **MAAS Static Range has been deprecated** Starting from MAAS 2.0, the MAAS Static Range has now been deprecated, and MAAS assumes total control of a subnet. MAAS will auto-assign IP addresses to deployed machines that are not within a dynamic or a reserved range. Users are now only required to (continue to) specify the dynamic range, which continues to be used for auto-enlistment, commissioning, and any other systems configured for DHCP. Major new features ------------------- **MAAS Rack Controllers** Starting for MAAS 2.0, MAAS has introduced Rack Controllers that completely replace Cluster Controllers. * NodeGroups and NodeGroupInterfaces API endpoints are now deprecated. RackControllers API endpoint has been introduced. * Clusters tab is no longer available in the WebUI. Controllers can now be found under the Nodes tab, where each cluster interface can be found. Other cluster interface properties have been moved to the Subnet and VLAN details page under the “Networks†tab. * Machines no longer belong to Rack Controllers. In earlier versions of MAAS, Machines would directly belong to a Cluster Controller in order for them to be managed. The Cluster Controller that the machine belonged to would not only perform DHCP for that machine, but also all the PXE/TFTP booting, and power management. As of MAAS 2.0, Machines no longer belong to a Rack Controller. Multiple Rack Controllers could potentially manage the machine. This is now automatically determined. * DHCP now configured per VLAN In earlier versions of MAAS, DHCP was directly linked and configured per Cluster Controller Interface. As of MAAS 2.0, DHCP is now configured and managed per VLAN, allowing the ability for any Rack Controller in a VLAN to manage DHCP. * Rack Controllers now provide High Availability Provided that machines no longer belong to a Rack Controller, and that DHCP is managed on the VLAN bases, multiple Rack Controllers can manage the same set of machines. Starting from MAAS 2.0, Rack Controllers in the same VLAN become candidates to manage DHCP, PXE/TFTP, and power for the machines connected to the VLAN. As such, Rack Controllers now support high availability. MAAS supports the concept of Primary and Secondary Rack Controller. In the event that the Primary Rack Controller is unavailable, the Secondary Rack Controller can take over the services provided providing High Availability. **DNS Management** MAAS 2.0 extends DNS management and provides the ability to: * Ability to create multiple DNS domains. * Ability to add multiple records (CNAME, TXT, MX, SRV ) per domain. (API only) * Ability to select Domain for Machines and Devices. (API only, WebUI in progress) * Ability to assign (additional) names to IP addresses (API only) * For deployed machines, A records continue to be create specifying the IP of the PXE interface. * Additional PTR records and now created for all the other interfaces in the form of: . * Reverse DNS is now generated for only the subnet specified, rather than the parent /24 or /16. By default, RFC2137 glue is provided for networks smaller than /24. This can be disabled or changed on a per-subnet basis via the API. **IP Ranges** Previous versions of MAAS used the concepts of a “dynamic range†and “static rangeâ€, which were properties of each cluster interface. This has been redesigned for MAAS 2.0 as follows: * Dynamic ranges have been migrated from MAAS 1.10 and earlier as-is. * Because static ranges have been removed from MAAS, each static range has been migrated to one or more reserved ranges, which represent the opposite of the previous static range. (MAAS now assumes it has full control of each managed subnet, and is free to assign IP addresses as it sees fit, unless told otherwise.) For example, if in MAAS 1.10 or earlier you configured a cluster interface on 192.168.0.1/24, with a dynamic range of 192.168.0.2 through 192.168.0.99, and a static range of 192.168.0.100 through 192.168.0.199, this will be migrated to: IP range #1 (dynamic): 192.168.0.2 - 192.168.0.99 IP range #2 (reserved): 192.168.0.200 - 192.168.0.254 Since 192.168.0.100 - 192.168.0.199 (the previous static range) is not accounted for, MAAS assumes it is free to allocate static IP addresses from that range. * Scalability is now possible by means of adding a second dynamic IP range to a VLAN. (To deal with IP address exhaustion, MAAS supports multiple dynamic ranges on one or more subnets within a DHCP-enabled VLAN.) * Reserved ranges can now be allocated to a particular MAAS user. * A comment field has been added, so that users can indicate why a particular range of IP addresses is reserved. **API 2.0 and MAAS CLI Updates** MAAS 2.0 introduces a new API version, fully deprecating the MAAS 1.0 API. As such, new endpoints and commands have been introduced: * RackControllers - This endpoint/command has the following operations in addition to the base operations provided by nodes: * import-boot-images - Import the boot images on all rack controllers * describe-power-types - Query all of the rack controllers for power information * RackController - This endpoint/command has the following operations in addition to the base operations provided by nodes * import-boot-images - Import boot images on the given rack controller * refresh - refresh the hardware information for the given rack controller * Machines - This endpoint/command replaces many of the operations previously found in the nodes endpoint/command. The machines endpoint/command has the following operations in addition to the base operations provided by nodes. * power-parameters - Retrieve power parameters for multiple machines * list-allocated - Fetch machines that were allocated to the user/oauth token. * allocate - Allocate an available machine for deployment. * accept - Accept declared machine into MAAS. * accept-all - Accept all declared machines into MAAS. * create - Create a new machine. * add-chassis - Add special hardware types. * release - Release multiple machines. * Machine - This endpoint/command replaces many of the operations previously found in the node endpoint/command. The machine endpoint/command has the following operations in addition to the base operations provided by node. * power-parameters - Obtain power parameters for the given machine. * deploy - Deploy an operating system to a given machine. * abort - Abort the machines current operation. * get-curtin-config - Return the rendered curtin configuration for the machine. * power-off - Power off the given machine. * set-storage-layout - Change the storage layout of the given machine. * power-on -Turn on the given machine. * release - Release a given machine. * clear-default-gateways - Clear any set default gateways on the machine. * update - Change machine configuration. * query-power-state - Query the power state of a machine. * commission - Begin commissioning process for a machine Other endpoints/commands have changed: * All list commands/operations have been converted to read * All new and add commands/operations have been converted to create * Nodes - The nodes endpoint/command is now a base endpoint/command for all other node types(devices, machines, and rack-controllers). As such most operations have been moved to the machines endpoint/command.The following operations remain as they can be used on all node types. * is-registered - Returns whether or not the given MAC address is registered with this MAAS. * set-zone - Assign multiple nodes to a physical zone at once. * read - List nodes visible to the user, optionally filtered by criteria. * Node - The node endpoint/command is now a base endpoint/command for all other node types(devices, machines, and rack-controllers). As such most operations have been moved to the machine endpoint/command. The following operations remain as they can be used on all node types. * read - Read information about a specific node * details - Obtain various system details. * delete - Delete a specific node. * With the migration of nodes to machines the following items previously outputted with the list command have been changed or removed from the machines read command: * status - Will now show all status types * substatus, substatus_action, substatus_message, substatus_name - Replaced by status, status_action, status_message, status_name. * boot_type - Removed, MAAS 2.0 only supports fastpath. * pxe_mac - Replaced by boot_interface. * hostname - Now only displays the hostname, without the domain, of the machine. To get the fully qualified domain name the fqdn and domain are now also outputted. * And other endpoints/commands have been deprecated: * NodeGroups - Replacement operations are found in the RackControllers, Machines, and BootResources endpoints/commands. * NodeGroupInterfaces - replacement operations are found in the RackController, IPRanges, Subnets, and VLANS endpoints/commands. **Extended Storage Support** MAAS 2.0 Storage Model has been extended to support: * XFS as a filesystem. * Mount Options. * Swap partitions. MAAS 1.9 only supported the creation of a swap file in the filesystem. * tmps/ramfs Support. All of these options are currently available over the CLI. Other notable changes --------------------- **MAAS 2.0 Requires Python 3.5** Starting from MAAS 1.10 transitional release, MAAS has now been ported to Python 3. The Python 3 version ported against is 3.5, which is default in Ubuntu Xenial. **MAAS 2.0 now fully supports native Django 1.8 migration system** Starting from the MAAS 1.10 transitional release, MAAS has added support for Django 1.8. Django 1.8 has dropped support for the south migration system in favor of the native Django migration system, breaking backwards compatibility. As such, MAAS 2.0 has inherited such support and moving forward migrations will be run with the native migration system. Provided that Django 1.8 breaks backwards compatibility with the south migration system, the MAAS team has put significant effort in ensuring MAAS continues to support an upgrade path, and as such, users from 1.5, 1.7, 1.8, 1.9 and 1.10 will be able to upgrade seamlessly to MAAS 2.0. **Instant DHCP Lease Notifications** We no longer scan the leases file every 5 minutes. ISC-DHCP now directly notifies MAAS if a lease is committed, released, or expires. **Host entries in DHCP** Host entries are now rendered in the DHCP configuration instead of placed in the leases file. This removes any state that used to previously exist in the leases file on the cluster controller. Now deleting the dhcpd.leases file will not cause an issue with MAAS static mappings. **Modeling BMCs** We select one of the available rack controllers to power control or query a BMC. The same rack controller that powers the BMC does not need to be the rack controller that the machine PXE boots from. Known Problems & Workarounds ---------------------------- **Rack Controllers will fail to register when bond interfaces are present** Registering Rack Controller that have bond interfaces will fail. See bug `1553617`_ for more information. .. _1553617: https://launchpad.net/bugs/1553617 1.9.1 ===== See https://launchpad.net/maas/+milestone/1.9.1 for full details. Bug Fix Update -------------- #1523779 Fix grub-install error on deploying power8 machines. #1526542 Skip block devices with duplicate serial numbers to fix multipath issue. #1536754 Upgrade from 1.8 to 1.9 lost connected macs in all but one network. #1532262 Fix failure to power query requests for SM15K servers. #1484696 Fix bug in apache2 maas config where it will reuse websocket connections to work around a bug in apache2 itself. 1.9.0 ===== Important announcements ----------------------- **New Networking Concepts and API's: Fabrics, Spaces and Subnets** With the introduction of new MAAS networking concepts, new API's are also been introduced. These are: * fabrics * spaces * subnets * vlans * fan-networks MAAS 1.9.0 will continue to provide backwards compatibility with the old network API for reading purposes, but moving forward, users are required to use the new API to manipulate fabrics, spaces and subnets. **Advanced Network and Storage Configuration only available for Ubuntu deployments** Users can now perform advanced network and storage configurations for nodes before deployment. The advanced configuration is only available for Ubuntu deployments. All other deployments using third party OS', including CentOS, RHEL, Windows and Custom Images, won't result in such configuration. **Re-commissioning required for upgraded MAAS** Now that storage partitioning and advanced configuration is supported natively, VM nodes in MAAS need to be re-commissioned. * If upgrading from MAAS 1.8, only VM nodes with VirtIO storage devices need to be re-commissioned. * If upgrading from MAAS 1.7, all nodes will need to be re-commissioned in order for MAAS to correctly capture the storage and networking devices. This does not affect nodes that are currently deployed. **Default Storage Partitioning Layout - Flat** With the introduction of custom storage, MAAS has also introduced the concept of partitioning layouts. Partitioning layouts allow the user to quickly auto-configure the disk partitioning scheme after first commissioning or re-commissioning (if selected to do so). The partitioning layouts are set globally on the `Settings` page. The current default Partitioning layout is 'Flat', maintaining backwards compatibility with previous MAAS releases. This means MAAS will take the first disk it finds in the system and use it as the root and boot disk. **Deployment with configured /etc/network/interfaces** Starting with MAAS 1.9, all node deployments will result in writing `/etc/network/interfaces` statically, by default. This increases MAAS' robustness and reliability as users no longer have to depend on DHCP for IP address allocation solely. MAAS will continue to provide IP addresses via DHCP, even though interfaces in `/etc/network/interfaces` may have been configured statically. Major new features ------------------ **Storage Partitioning and Advanced Configuration** MAAS now supports Storage Partitioning and Advanced Configuration natively. This allows MAAS to deploy machines with different Storage Layouts, as well as different complex partitioning configurations. Storage support includes: * LVM * Bcache * Software RAID levels 0, 1, 5, 6, 10. * Advanced partitioning Storace configuration is available both via the WebUI and API. For more information refer to :ref:`storage`. **Advanced Networking (Fabrics, Spaces, Subnetworks) and Node Network Configuration** MAAS now supports Advanced Network configuration, allowing users to not only perform advanced node network configuration, but also allowing users to declare and map their infrastructure in the form of Fabrics, VLANs, Spaces and Subnets. **Fabrics, Spaces, Subnets and Fan networks** MAAS now supports the concept of Fabrics, Spaces, Subnets and FANS, which introduce a whole new way of declaring and mapping your network and infrastructure in MAAS. The MAAS WebUI allows users to view all the declared Fabrics, Spaces, VLANs inside fabrics and Subnets inside Spaces. The WebUI does not yet support the ability to create new of these, but the API does. These new concepts replace the old `Network` concepts from MAAS' earlier versions. For more information, see :ref:`networking`. For more information about the API, see :ref:`region-controller-api`. **Advanced Node Networking Configuration** MAAS can now perform the Node's networking configuration. Doing so, results in `/etc/network/interfaces` being written. Advanced configuration includes: * Assign subnets, fabrics, and IP to interfaces. * Create VLAN interfaces. * Create bond interfaces. * Change interface names. MAAS also allows configuration of node interfaces in different modes: * Auto Assign - Node interface will be configured statically and MAAS will auto assign an IP address. * DHCP - The node interface will be configured to DHCP. * Static - The user will be able to specify what IP address the interface will obtain, while MAAS will configure it statically. * Unconfigured - MAAS will leave the interface with LINK UP. **Curtin & cloud-init status updates** Starting from MAAS 1.9.0, curtin and cloud-init will now send messages to MAAS providing information regarding various of the actions being taken. This information will be displayed in MAAS in the `Node Event Log`. Note that this information is only available when using MAAS 1.9.0 and the latest version fo curtin. For cloud-init messages this information is only available when deploying Wily+. **Fabric and subnet creation** MAAS now auto-creates multiple fabrics per physical interface connected to the Cluster Controller, and will correctly create subnetworks under each fabric, as well as VLAN's, if any of the Cluster Controller interface is a VLAN interface. **HWE Kernels** MAAS now has a different approach to deploying Hardware Enablement Kernels. Start from MAAS 1.9, the HWE kernels are no longer coupled to subarchitectures of a machine. For each Ubuntu release, users will be able to select any of the available HWE kernels for such release, as well as set the minimum kernel the machine will be deployed with by default. For more information, see :ref:`hardware-enablement-kernels`. **CentOS images can be imported automatically** CentOS Image (CentOS 6 and 7) can now be imported automatically from the MAAS Images page. These images are currently part of the daily streams. In order to test this images, you need to use the daily image stream. This can be changed in the `Settings` page under `Boot Images` to `http://maas.ubuntu.com/images/ephemeral-v2/daily/`. Once changed, images can be imported from the MAAS Images page. The CentOS image will be published in the Releases stream shortly. Minor notable changes --------------------- **Minimal Config Files for Daemons** Starting from MAAS 1.9, minimal configuration files have been introduced for both, the MAAS Region Controller and the MAAS Cluster Controller daemons. * The Region Controller (`maas-regiond`) has now dropped the usage of `/etc/maas/maas_local_settings.py` in favor of `/etc/maas/regiond.conf`. Available configuration options are now `database_host`, `database_name`, `database_user`, `database_pass`, `maas_url`. MAAS will attempt to migrate any configuration on upgrade, otherwise it will use sane defaults. * The Cluster Controller (`maas-clusterd`) has now dropped the usage of `/etc/maas/pserv.yaml` and `/etc/maas/maas_cluster.conf` in favor of `/etc/maas/clusterd.conf`. Available configuration options are now `maas_url` and `cluster_uuid` only. MAAS will attempt to migrate any configuration on upgrade, otherwise it will use sane defaults. **Commissioning Actions** MAAS now supports commissioning actions. These allow the user to specify how commissioning should behave in certain escenarios. The commissioning actions available are: * Enable SSH during commissioning & Keep machine ON after commissioning * Keep network configuration after commissioning * Keep storage configuration after commissioning **Warn users about missing power control tools** MAAS now warns users about the missing power control tools. Each MAAS power driver use a set of power tools that may or may not be installed by default. If these power tools are missing from the system, MAAS will warn users. **Python Power Drivers** Starting from MAAS 1.9, MAAS is moving away from using shell scripts templates for Power Drivers. These are being migrated to MAAS' internal control as power drivers. Currently supported are APC, MSCM, MSFT OCS, SM15k, UCSM, Virsh, VMWare and IPMI. Remaining Power Drivers include AMT, Fence CDU's, Moonshot. Major bugs fixed in this release -------------------------------- See https://launchpad.net/maas/+milestone/1.9.0 for details. 1.9.0 (RC4) ============ Major bugs fixed in this release -------------------------------- LP: #1523674 Virsh is reporting ppc64le, not ppc64el. LP: #1524091 Don't require DHCP to be on if it should be off. LP: #1523988 No required packages for HMC as it uses pure python paramiko ssh client. LP: #1524007 Don't hold the cluster configuration lock while reloading boot images. LP: #1524924 Fix commissioning to correctly identify secondary subnets, VLAN's and fabrics. 1.9.0 (RC3) ============= Major bugs fixed in this release -------------------------------- LP: #1522898 "node-interface" API should just be "interface" - to allow devices to use it LP: #1519527 Juju 1.25.1 proposed: lxc units all have the same IP address after upgrade from 1.7/1.8. LP: #1522294 MAAS fails to parse some DHCP leases. LP: #1519090 DHCP interface automatically obtains an IP even when the subnet is unmanaged. LP: #1519077 MAAS assigns IP addresses on unmanaged subnets without consideration for some addresses known to be in use. LP: #1519396 MTU field is not exposed over the API for VLAN. LP: #1521833 Updating subnet name removes dns_server. LP: #1519919 CC looks for NICs with kernel module loaded and fall back doesn't check persistent device names. LP: #1522225 Migration 0181 can fail on upgrade if disks across nodes have duplicate serial numbers. LP: #1519247 Migration 0146 can fail on upgrade when migrating unmanaged subnets. LP: #1519397 [UI] Once a cache_set is created the UI fails with ERROR. LP: #1519918 [UI] "failed to detect a valid IP address" when trying to view node details. 1.9.0 (RC2) ============= Major bugs fixed in this release -------------------------------- LP: #1513085 Partitioning should align for performance. LP: #1516815 MAAS creates DNS record against Alias (eth0:1) if alias belongs to the PXE Interface. LP: #1515769 Failed to power on SM15k. LP: #1516722 Fix migration that might affect upgrade from 1.7. LP: #1516065 Failed to power control IPMI BMC that does not support setting the boot order. LP: #1517097 Constraints for acquiring interfaces argument should 'AND' key-value pairs for the same label. LP: #1517687 [UI] Cannot create a partition using the whole disk. LP: #1513258 [UI] CSS Broken for Bond Network Device. LP: #1516173 [UI] Prevent being able to unmount/remove filesystems while node is on. LP: #1510457 [UI] No error message if there is no boot and/or root disk configured for a node. 1.9.0 (RC1) ============= Major bugs fixed in this release -------------------------------- LP: #1515498 MAAS uses wrong IP for DNS record (creates against the bond). LP: #1515671 Local archive ignored for deployment. Works for commissioning and enlistment. LP: #1513485 Fix handling of multiple StaticIPAddress rows with empty IP addresses. LP: #1513485 Lease parser failure - doesn't update IP on the PXE NIC. LP: #1514486 Cannot claim sticky IP address for device with parent. LP: #1514883 Cluster downloads boot-images from managed network (pxe) instead of network used to connect to Region. LP: #1510917 Updating/modifying/assigning vlans, spaces, fabrics, subnets doesn't allow specifying names and lock to ID's. LP: #1513095 MAAS should prevent deploying nodes with PXE interface 'unconfigured'. LP: #1508056 MTU should be a set on the VLAN, and able to override on the interface. LP: #1439476 Internal Server Error when creating/editing cluster interface. LP: #1510224 Non-interactive way to change password. LP: #1513111 When a bond is created all IP address associated with the bond members should be removed. LP: #1487135 MAAS does not provide a dump of the config it passes to curtin for networking and storage. LP: #1512959 MAAS should not offer EXT3, rather VFAT, EXT2, EXT4. LP: #1505031 Network constraints for juju. LP: #1509535 Creating a partition or a Volume Group on the whole disk leaves free space. LP: #1511493 Should not allow partitions to be created on bcache device. LP: #1503475 Storage section should only be editable when Ready or Allocated. LP: #1512832 maasserver.api.tests.test_fannetworks.TestFanNetworksAPI.test_read fails randomly. LP: #1508754 Creating a logical volume on a partition that is too small almost works, resulting in strange error messages. LP: #1503925 [UI] Keep selected nodes selected after action. LP: #1515380 [UI] Refresh UI cache after an upgrade to avoid seeing garbage. LP: #1510106 [UI] Boot disk is not lighted nor can be changed. LP: #1510118 [UI] Can't remove / delete a partition with a filesystem under 'Available disks and partitions'. LP: #1510153 [UI] Creating a partition should allow to select filesystem and mountpoint. LP: #1510468 [UI] When selecting a device, ensure padding between buttons is 20px. LP: #1510455 [UI] Misaligned mount point column on used disks table. LP: #1510469 [UI] Align the individual storage actions with the name field, rather than the tickbox. LP: #1503479 [UI] can't add physical interface. LP: #1503474 [UI] Containers (lxc, kvm) data missing on node details. LP: #1513271 [UI] Unable to unmount a filesystem in the UI. LP: #1503536 [UI] Animation missing on show members and select node. LP: #1510482 [UI] Add tooltips to icons. LP: #1510486 [UI] Add tooltips to inactive buttons. 1.9.0 (beta2) ============= Major bugs fixed in this release -------------------------------- LP: #1511257 New capabilities for subnets, vlan, spaces and fabrics. LP: #1509077 Upgrade left a PXE NIC"s on nodes without a subnet associated causing deploy issues. LP: #1512109 DNS record doesn't get created against the PXE interface LP: #1510334 bcache cache_mode setting not configured on servers LP: #1510210 Administrators unable to delete users using the API LP: #1509536 Can create a VolumeGroup (vg0) without having created a partition on the boot disk LP: #1501400 set-boot-disk yields in a machine not being able to deploy LP: #1504956 Deploying Other OS' (CentOS, Windows) should not configure custom storage LP: #1509164 Add RAID 10 support LP: #1511437 MAAS should download grub from grub-efi-amd64-signed package instead of the archive path LP: #1510120 Fails to deploy with UEFI LP: #1507586 previous owner of node can use oauth creds to retrieve current owner's user-data LP: #1507630 IP range validation for too small ranges LP: #1511610 TestReleaseAutoIPs.test__calls_update_host_maps_for_next_ip_managed_subnet can fail randomly LP: #1511071 No way to disable maas-proxy LP: #1505034 [UI] HWE naming needs to be clearer LP: #1509476 [UI] Angular $digest loop issue on node details page LP: #1509473 [UI] New nodes interfaces doesn't show which interface is the PXE interface LP: #1510471 [UI] When partitioning, there should be 20px padding between the sizing fields LP: #1510467 [UI] On the available table, add model and serial to the name column LP: #1510466 [UI] On the available table, change “available space†to “size†for consistency LP: #1510472 [UI] when formatting/mounting, the button says “Format & Mount†this should just be “Mount†LP: #1503533 [UI] Tickbox on create bond networking LP: #1510447 [UI] On the file system table, change name to “File system†(lower case S) LP: #1510474 [UI] When creating bcache and raid, remove the empty column between the config fields and LP: #1510488 [UI] On the available table, make sure all buttons are lowercase LP: #1511174 [UI] Subnets filter doesn't show network, it shows name instead LP: #1509417 [UI] can't edit / add storage tags LP: #1510891 [UI] Hover state for networking doesn't work LP: #1510458 [UI] change "edit tag" link to icon storage LP: #1510629 [UI] Can no longer see the IP address PXE interface gets on commissioning 1.9.0 (beta1) ============= Major New Features ------------------ **Storage Configuration: LVM and RAID UI** Starting from MAAS 1.9.0 (beta1), MAAS now exposes custom storage configuration in the WebUI for the following: * LVM: Ability to easily create LVM. * RAID: Ability to create RAID 0, 1, 5, 6. Minor notable changes --------------------- **Fabric and subnet creation** Starting from MAAS 1.9.0 (beta1), MAAS now auto-creates multiple fabrics per physical interface connected to the Cluster Controller, and will correctly create subnetworks under each fabric, as well as VLAN's if any VLAN interface on the Cluster Controller is preset. Known Problems & Workarounds ---------------------------- **CentOS fails to deploy with LVM Storage layout** CentOS fails to deploy when deploying with an LVM storage layout. Provided that LVM is the default storage layout, every CentOS deployment will fail, unless this layout is changed to 'Flat' storage. To work around the problem, the default storage layout can be changed from `LVM` to `Flat` in MAAS' Networks page, under `Storage Layout` section. See bug `1499558`_ for more information. .. _1499558: https://launchpad.net/bugs/1499558 **Fail to deploy (boot) with UEFI** MAAS will successfully instal in a UEFI system, however, after deployment it won't boot onto the local disk. See bug `1510120`_ for more information. .. _1510120: https://launchpad.net/bugs/1510120 1.9.0 (alpha5) ============== Major New Features ------------------ **Storage Configuration: Partitioning and Bcache UI** Starting from MAAS 1.9.0 (alpha5), MAAS now exposes storage custom storage configuration in the WebUI for the following: * Partitioning: Ability to create and delete partitions. * Bcache: Ability to create cache sets and bcache devices, allowing multiple bcache devices to use the same cache set. Minor notable changes --------------------- **Warn users about missing power control tools** MAAS now warns users about the missing power control tools. Each MAAS power driver use a set of power tools that may or may not be installed by default. If these power tools are missing from the system, MAAS will warn users. Known Problems & Workarounds ---------------------------- **CentOS fails to deploy with LVM Storage layout** CentOS fails to deploy when deploying with an LVM storage layout. Provided that LVM is the default storage layout, every CentOS deployment will fail, unless this layout is changed to 'Flat' storage. To work around the problem, the default storage layout can be changed from `LVM` to `Flat` in MAAS' Networks page, under `Storage Layout` section. See bug `1499558`_ for more information. .. _1499558: https://launchpad.net/bugs/1499558 **Juju 1.24.6 bootstrap failure - Changing MAAS configured /etc/network/interfaces** Juju 1.24.6 (or less), assumes that it can manage the MAAS deployed node's network configuration. Juju changes /etc/network/interfaces and disables bringing up eth0 on boot, to create a bridge to support LXC. However, provided that MAAS / curtin now writes the node's network configuration, Juju is unable to successfully finish the creation of the bridge, but in the process, it disables auto bring up of eth0. Starting from Juju 1.24.7+, Juju has grown support to correctly manage a /etc/network/interfaces that has been created after deployment with MAAS 1.9.0. See bug `1494476`_ for more information. .. _1494476: https://launchpad.net/bugs/1494476 1.9.0 (alpha4) ============== Minor notable changes --------------------- * Various UI cosmetic fixes and improvements. * Do not create MBR larger than 2TiB for LVM. * Various concurrency fixes and improvements to robustness. Known Problems & Workarounds ---------------------------- **CentOS fails to deploy with LVM Storage layout** CentOS fails to deploy when deploying with an LVM storage layout. Provided that LVM is the default storage layout, every CentOS deployment will fail, unless this layout is changed to 'Flat' storage. To work around the problem, the default storage layout can be changed from `LVM` to `Flat` in MAAS' Networks page, under `Storage Layout` section. See bug `1499558`_ for more information. .. _1499558: https://launchpad.net/bugs/1499558 **Juju 1.24+ bootstrap failure - Changing MAAS configured /etc/network/interfaces** Juju 1.24+, by default, assumes that it can manage the MAAS deployed node's network configuration. Juju changes /etc/network/interfaces and disables bringing up eth0 on boot, to create a bridge to support LXC. However, provided that MAAS / curtin now write the node's network configuration, Juju is unable to successfully finish the creation of the bridge, but in the process, it disables auto bring up of eth0. The machine will deploy successfully, however, after a reboot eth0 will never be brought back up due to the changes made by Juju. This will prevent Juju from SSH'ing into the machine and finishing the boostrap. To prevent this from happening, `disable-network-management: true` needs to be used. Note that this will prevent the deployment of LXC containers as they have to DHCP. See bug `1494476`_ for more information. .. _1494476: https://launchpad.net/bugs/1494476 1.9.0 (alpha3) ============== Major New Features ------------------ **Advanced Node Network Configuration UI** Starting from MAAS 1.9.0 (alpha3), MAAS can now do the Node's Network configuration. Doing such configuration will result in having `/etc/network/interfaces` writen. Advanced configuration UI includes: * Create VLAN interfaces. * Create bond interfaces. * Create Alias interfaces. * Change interface names. **Subnetworks page UI** Starting from MAAS 1.9.0 (alpha3), MAAS can now show the new Subnets tab in the UI. This allow users to view: * Fabrics * Spaces * VLANs in fabrics. * Subnets in Spaces. Known Problems & Workarounds ---------------------------- **CentOS fails to deploy with LVM Storage layout** CentOS fails to deploy when deploying with an LVM storage layout. Provided that LVM is the default storage layout, every CentOS deployment will fail, unless this layout is changed to 'Flat' storage. To work around the problem, the default storage layout can be changed from `LVM` to `Flat` in MAAS' Networks page, under `Storage Layout` section. See bug `1499558`_ for more information. .. _1499558: https://launchpad.net/bugs/1499558 **Juju 1.24+ bootstrap failure - Changing MAAS configured /etc/network/interfaces** Juju 1.24+, by default, assumes that it can manage the MAAS deployed node's network configuration. Juju changes /etc/network/interfaces and disables bringing up eth0 on boot, to create a bridge to support LXC. However, provided that MAAS / curtin now write the node's network configuration, Juju is unable to successfully finish the creation of the bridge, but in the process, it disables auto bring up of eth0. The machine will deploy successfully, however, after a reboot eth0 will never be brought back up due to the changes made by Juju. This will prevent Juju from SSH'ing into the machine and finishing the boostrap. To prevent this from happening, `disable-network-management: true` needs to be used. Note that this will prevent the deployment of LXC containers as they have to DHCP. See bug `1494476`_ for more information. .. _1494476: https://launchpad.net/bugs/1494476 1.9.0 (alpha2) ============== Important announcements ----------------------- **Installation by default configures /etc/network/interfaces** Starting from MAAS 1.9.0 (alpha2), all Ubuntu deployments will result with static network configurations. Users will be able to interact with the API to further configure interfaces. **Introduction to Fabrics, Spaces and Subnets introduces new Network API** With the introduction of the concepts of Fabrics, Spaces and Subnets starting from MAAS 1.9.0 (alpha2), MAAS also introduces new API's for: * fabrics * spaces * subnets * vlans * fan-networks MAAS 1.9.0 will continue to provide backwards compatibility with the old network API for reading purposes, but moving forward, users are required to use the new API to manipulate fabrics, spaces and subnets. Major New Features ------------------ **Advanced Node Network Configuration** Starting from MAAS 1.9.0 (alpha2), MAAS can now do the Node's Network configuration. Doing such configuration will result in having `/etc/network/interfaces` writen. Advanced configuration includes: * Assign subnets, fabrics, and IP to interfaces. * Create VLAN interfaces. * Create bond interfaces. * Change interface names. **Fabrics, Spaces, Subnets and Fan networks** Starting from MAAS 1.9.0 (alpha2), MAAS now supports the concept of Fabrics, Spaces, Subnets and FANS. These new concepts replaces the old `Network` concepts from MAAS' earlier versions. For more information, see :ref:`networking`. For more information about the API, see :ref:`region-controller-api`. **Curtin & cloud-init status updates** Starting from MAAS 1.9.0 (alpha2), curtin and cloud-init will now send messages to MAAS providing information regarding various of the actions taken. This information will be displayed in MAAS in the `Node Event Log`. Note that this information is only available when using MAAS 1.9.0 and the latest version fo curtin. For cloud-init messages this information is only available when deploying Wily. Minor notable changes --------------------- **Commissioning Actions** MAAS now supports commissioning actions. These allow the user to specify how commissioning should behave in certain escenarios. The commissioning actions available are: * Enable SSH during commissioning * Keep machine ON after commissioning * Keep network configuration after commissioning * Keep storage configuration after commissioning **CentOS images can be imported automatically** CentOS Image (CentOS 6 and 7) can now be imported automatically from the MAAS Images page. These images are currently part of the daily streams. In order to test this images, you need to use the daily image stream. This can be changed in the `Settings` page under `Boot Images` to `http://maas.ubuntu.com/images/ephemeral-v2/daily/`. Once changed, images can be imported from the MAAS Images page. Known Problems & Workarounds ---------------------------- **CentOS fails to deploy with LVM Storage layout** CentOS fails to deploy when deploying with an LVM storage layout. Provided that LVM is the default storage layout, every CentOS deployment will fail, unless this layout is changed to 'Flat' storage. To work around the problem, the default storage layout can be changed from `LVM` to `Flat` in MAAS' Networks page, under `Storage Layout` section. See bug `1499558`_ for more information. .. _1499558: https://launchpad.net/bugs/1499558 **Juju 1.24+ bootstrap failure - Changing MAAS configured /etc/network/interfaces** Juju 1.24+, by default, assumes that it can manage the MAAS deployed node's network configuration. Juju changes /etc/network/interfaces and disables bringing up eth0 on boot, to create a bridge to support LXC. However, provided that MAAS / curtin now write the node's network configuration, Juju is unable to successfully finish the creation of the bridge, but in the process, it disables auto bring up of eth0. The machine will deploy successfully, however, after a reboot eth0 will never be brought back up due to the changes made by Juju. This will prevent Juju from SSH'ing into the machine and finishing the boostrap. To prevent this from happening, `disable-network-management: true` needs to be used. Note that this will prevent the deployment of LXC containers as they have to DHCP. See bug `1494476`_ for more information. .. _1494476: https://launchpad.net/bugs/1494476 1.9.0 (alpha1) ============== Important announcements ----------------------- **LVM is now the default partitioning layout** Starting from MAAS 1.9, all of the deployments will result on having LVM configure for each of the machines. A Flat partitioning layout is not longer used by default. (This, however, can be changed in the MAAS Settings Page). **Re-commissioning required from VM's with VirtIO devices** Starting from MAAS 1.9, storage partitioning and advance configuration is supported natively (see below). In order for MAAS to correctly map VirtIO devices in VM's, these VM nodes need to be re-commissioned. If not re-comissioned, MAAS will prevent the deployment until done so. Previously deployed nodes won't be affected, but will also have to be re-commissioned if released. Major new features ------------------ **Storage Partitioning and Advanced Configuration** MAAS now natively supports Storage Partitioning and Advanced Configuration. This allows MAAS to deploy machines with different Storage Layouts, as well as different complext partitioning configurations. Storage support includes: * LVM * Bcache * Software Raid * Advanced partitioning For more information refer to :ref:`storage`. Minor notable changes --------------------- **Minimal Config Files for Daemons** Starting from MAAS 1.9, minimal configuration files have been introduced for both, the MAAS Region Controller and the MAAS Cluster Controller daemons. * The Region Controller (`maas-regiond`) has now dropped the usage of `/etc/maas/maas_local_settings.py` in favor of `/etc/maas/regiond.conf`. Available configuration options are now `database_host`, `database_name`, `database_user`, `database_pass`, `maas_url`. MAAS will attempt to migrate any configuration on upgrade, otherwise it will use sane defaults. * The Cluster Controller (`maas-clusterd`) has now dropped the usage of `/etc/maas/pserv.yaml` and `/etc/maas/maas_cluster.conf` in favor of `/etc/maas/clusterd.conf`. Available configuration options are now `maas_url` and `cluster_uuid` only. MAAS will attempt to migrate any configuration on upgrade, otherwise it will use sane defaults. **HWE Kernels** MAAS now has a different approach to deploying Hardware Enablement Kernels. Start from MAAS 1.9, the HWE kernels are no longer coupled to subarchitectures of a machine. For each Ubuntu release, users will be able to select any of the available HWE kernels for such release, as well as set the minimum kernel the machine will be deployed with by default. For more information, see :ref:`hardware-enablement-kernels`. **Python Power Drivers** Starting from MAAS 1.9, MAAS is moving away from using shell scripts templates for Power Drivers. These are being migrated to MAAS' internal control as power drivers. Currently supported are APC, MSCM, MSFT OCS, SM15k, UCSM, Virsh, VMWare and IPMI. Remaining Power Drivers include AMT, Fence CDU's, Moonshot. Known Problems & Workarounds ---------------------------- **Fail to deploy Trusty due to missing bcache-tools** In order to correctly perform storage partitioning in Trusty+, the new version of curtin used by MAAS requires bcache-tools to be installed. However, these tools are not available in Trusty, hence causing MAAS/curtin deployment failures when installing Trusty. An SRU in Ubuntu Trusty for these tools is already in progress. To work around the problem, a curtin custom configuration to install bcache-tools can be used in `/etc/maas/preseeds/curtin_userdata`:: {{if node.get_distro_series() in ['trusty']}} early_commands: add_repo: ["add-apt-repository", "-y", "ppa:maas-maintainers/experimental"] {{endif}} See bug `1449099`_ for more information. .. _1449099: https://bugs.launchpad.net/bugs/1449099 **Fail to deploy LVM in Trusty** MAAS fail to deploy Ubuntu Trusty with a LVM Storage layout, as curtin will fail to perform the partitioning. See bug `1488632`_ for more information. .. _1488632: https://bugs.launchpad.net/bugs/1488632 1.8.2 ===== See https://launchpad.net/maas/+milestone/1.8.2 for full details. Bug Fix Update -------------- #1484696 Regenerate the connection URL on websocket client reconnect, to fix CSRF after upgrade to 1.8.1. #1445942 Validate the osystem and distro_series when using the deploy action, which fixes win2012r2 deployment issues. #1481940 Fix failure in MAAS startup messages by not generating dhcpd config files when they are not in use. #1459865 Fix enlistment to always use the correct kernel parameters. 1.8.1 ===== See https://launchpad.net/maas/+milestone/1.8.1 for full details. Bug Fix Update -------------- #1481118 Add --username to maas-region-admin apikey command docs. #1472707 Add ListBootImagesV2 RPC command. Fallback to using ListBootImages RPC when the ListBootImagesV2 is not handled on the cluster. #1470591 Fix setting the default_distro_series over the API. #1413388 Fix upgrade issue where it would remove custom DNS config, potentially breaking DNS #1317705 Commissioning x86_64 node never completes, sitting at grub prompt, pserv py tbs #1389007 Power monitor service hits amp.TooLong errors with > ~600 nodes to a cluster #1436279 Websocket server accessed over port 5240 #1469305 If hostname not set, sudo warning make maas throw 500 #1470585 Can't set a list of forwarders (BIND config) #1469846 UCS chassis enlist Failed to probe and enlist UCS nodes: list index out of range #1470276 Add cisco snic to 3rd party driver #1402042 console= parameters need to be added before -- on kernel cmdline #1465722 [UI] Machine details styling #1465737 [UI] Actions design styles #1465740 [UI] Replace close "X" with correct versions #1465742 [UI] Table design styles #1470389 [UI] Make table heading hover consistant with nodes/devices tabs #1470395 [UI] adding between node name and save button inconsistent #1459710 [UI] "Set zone" label oddly placed on node listing page 1.8.0 ===== Important announcements ----------------------- **Region Controller now running on twisted.** The MAAS Region Controller is now running as a twisted daemon. It is no longer dependent on Apache in order to run. The MAAS Region controller is now controlled by ``maas-regiond`` upstart job or systemd unit. The ``maas-regiond`` daemon is available in port ``5240``. **Firewall ports for Region and Cluster controller communication** The communication between Region and Cluster controller is now limited to use the ports between ``5250`` and ``5259``. For all of those users who are using a remote cluster (not running on the same machine as the MAAS Region Controller), need to ensure that these ports are open in the firewall. Major new features ------------------ **Web UI Re-design** MAAS now includes a newly re-designed Web UI. The new Web UI features a new design and a lot of usability improvements. Some of the UI new features include: * Live Updating The new UI now allows users to view the current status of the various nodes of MAAS in real-time and without having to manually refresh the browser. * Bulk Actions Quickly select multiple nodes or devices and perform actions. If nodes or devices are not in a state where that action can be performed MAAS will alert you to the machines allowing you to modify your selection before performing the action. * Live Searching View the matching nodes or devices as you search. Just type and the nodes will start to filter, no reloading or waiting for the page to load. * Better Filtering Easily filter through the list of nodes and devices in MAAS to find the specific nodes that match your search. Examples: * All nodes that are Ready and have at least 2 disks:: status:Ready disks:2 * All nodes that are not Ready:: status:!Ready * All nodes that have Failed to complete an action:: status:Failed * All nodes that are deployed but their power is off:: status:Deployed power:off * Node & Storage Tag Management Administrators can now add and remove tags for both Machine and Storage. This is now possible via the Web UI from the `Node Details` page. * Add Chassis A new `Add Chassis` feature has been added to the UI. This is an option of `Add Hardware`. This not only allows administrators to add machines that belong to a single chassis, but also allows administrators to add Virtual Machines for both KVM and VMWare based products. **Support for Devices** MAAS adds a new concept for a different type of machines, called `Devices`. `Devices` are machines that MAAS does not fully manage; this means that MAAS can not power manage nor properly control. `Devices` are machines in the Network that MAAS can provide network services for (DHCP/DNS), or can track for inventory. Administrators can assign three different types of IP Address to a device: * `External`, which can be any IP address on the network. * `Static`, which can be selected manually or automatically, and belongs to Subnetwork that MAAS can control. * `Dynamic`, any IP address that is automatically assigned by MAAS via DHCP. MAAS will automatically create a DNS mapping for any of the IP addresses belonging to a Device. **Storage Discovery** Storage that is attached to a node in MAAS is now a first class citizen. Easily view and filter nodes based on the number of disks and the size of each disk attached to a node. Information retrieved from a storage device includes its name, model, serial, size, block size, and extra information that is applied to a storage device as a tag. MAAS will auto tag devices including tags for solid state device (ssd), rotary, rpm speed, and connected bus. **Twisted Daemons** The MAAS Region Controller no longer requires an Apache frontend. It is still used by default to be backward compatible, but the MAAS Region Controller is now a standalone Twisted process (the twisted daemon for the Cluster Controller, ``maas-clusterd``, was introduced in MAAS 1.7). The MAAS Region Controller is now ``maas-regiond``. Starting from MAAS 1.8 the Region Controller and Cluster Controller are noq controlled only by two daemons. (``maas-regiond`` and ``maas-clusterd`` respectively) **DB Isolation** Previously PostgreSQL was used in the default READ COMMITTED transaction isolation mode. It has now been increased to REPEATABLE READ. PostgreSQL thus provides extra support to ensure that changes in MAAS are logically consistent, a valuable aid in a busy distributed system. **VMware support** VMware products are now supported in MAAS. This allows MAAS to register all the Virtual Machines that the VMWare product is running (or a subset whose name matches a specified prefix), set them up to PXE boot, and configure them for power management. This feature requires the ``python3-pyvmomi`` package to be installed. (This is a suggested package, so be sure to use ``--install-suggests`` on your ``apt-get`` command line when installing the MAAS cluster, or install it manually.) The following VMware products have been tested: vSphere Hypervisor 5.5, ESXi 5.5, and Workstation 11. This feature supports both i386 and amd64 virtual machines. Minor notable changes --------------------- **RPC Communication & Ports** RPC communication between the Region Controller and the Cluster Controller has now been limited to use the ports between 5250 and 5259, inclusive. **Discovered virtual machine names are imported into MAAS** When using the new `Add Chassis` functionality (or the ``probe_and_enlist`` API), virtual machines (VMs) imported into MAAS will now use the names defined within the Hypervisor as hostnames in MAAS. This feature works with KVM (virsh or PowerKVM) and VMWare VMs. The names of the virtual machines will be converted into valid hostnames, if possible. For example, if a VM called `Ubuntu 64-bit` is imported, it will become `ubuntu-64-bit`. Note that only the hostname portion of the name is used. For example, if a VM is called `maas1.example.com`, only the “mass1†portion of the name will be used as the node name. (The cluster configuration determines the remainder of the DNS name.) **Virtual machine boot order is now set automatically** When using the new `Add Chassis` functionality (or the `probe_and_enlist` API) to add KVM or VMware virtual machines, MAAS will automatically attempt to set each virtual machine’s boot order so that the network cards (PXE) are attempted first. (This increases the repeatability of VM deployments, because a VM whose boot order is incorrectly set may work *once*, but subsequently fail to deploy.) **Systemd Support** MAAS now supports systemd, allowing all of the MAAS daemons to run with Systemd, if the Ubuntu system is running systemd by default instead Upstart. These daemons include ``maas-regiond``, ``maas-clusterd``, ``maas-dhcpd``, ``maas-dhcpd6``, ``maas-proxy``. **Upstart & Systemd improvements** Both Upstart Jobs and Systemd Units now run and supervise various instances of the ``maas-regiond`` in order to be able to effectively handle all requests. Known Problems & Workarounds ---------------------------- **Disk space is not reclaimed when MAAS boot images are superseded** Whenever new boot images are synced to ``maas-regiond``, new large objects in the database are created for them, which may replace older versions of the same image (for the specified version/architecture combination). Unfortunately, the standard postgresql `autovacuum` does not remove large objects that are no longer used; a “full vacuum†is required for this. Therefore, a new command has been introduced which will run the appropriate postgresql vacuum command (See bug `1459876`_):: maas-region-admin db_vacuum_lobjects This command should be run with care (ideally, during a scheduled maintenance period), since it could take a long time (on the order of minutes) if there are a large number of superseded images. .. _1459876: https://launchpad.net/bugs/1459876 **MAAS logs to maas.log.1 instead of maas.log** The `/var/log/maas/maas.log` is a rsyslog based log file, that gets rotated in the form of `maas.log.1`, `maas.log.2.gz`, etc. In one situation it has been seen that `maas.log` is empty, and rsyslog was sending logs to `maas.log.1` instead. This has been identified as an issue in rsyslog rather than maas. See bug `1460678`_. .. _1460678: https://launchpad.net/bugs/1460678 Major bugs fixed in this release -------------------------------- See https://launchpad.net/maas/+milestone/1.8.0 for full details. #1185455 Not obvious how to search nodes along a specific axis, or multiple axes #1277545 Node list sort order not maintained #1300122 No way to get the version of the MAAS server through the API #1315072 Finding BMC IP address requires clicking "Edit node" in Web UI #1329267 CLI does not tell users to issue a "refresh" when the API gets out of date #1337874 Re-commissioning doesn't detect NIC changes #1352923 MAAS 1.8 requires arbitrary high-numbered port connections between cluster and region controllers #1384334 Dnssec failures cause nodes to be unable to resolve external addresses #1402100 Nodes can be in Ready state without commissioning data, if you mark a node in 'failed commisioning', broken and then fixed. #1412342 Maas.log only contains cluster logs #1424080 Deployment Failed -- Failed to get installation results #1432828 MAAS needs to write power off jobs to to systemd units instead of upstart #1433622 Maas cluster name should not / can not have trailing '.' #1433625 'APIErrorsMiddleware' object has no attribute 'RETRY_AFTER_SERVICE_UNAVAILABLE' #1435767 Retry mechanism fails with oauth-authenticated requests #1436027 Interfaces does not have entry for eth0 #1437388 exceptions.AttributeError: 'NoneType' object has no attribute 'is_superuser' #1437426 No view for loading page or notification for connection error #1438218 django.db.transaction.TransactionManagementError: raised when deploying multiple nodes in the UI #1438606 Releasing node not transitioned to "Failed releasing" #1438808 Network and storage tables on node details page mis-aligned in Firefox #1438842 Cannot add an extra NIC #1439064 Title of individual commissioning result page is permanently "Loading..." #1439159 maas packaging in vivid needs to prevent isc-dhcpd and squid3 from running #1439239 MAAS API node details failures #1439322 Simultaneous IP address requests with only one succeeding #1439339 "Choose power type" dropdown broken in FF #1439359 When upgrading to MAAS 1.7 from MAAS 1.5, MAAS should trigger the image import automatically. #1439366 MAAS 1.7 should be backwards compatible with 1.5 the preseed naming convention #1440090 NIC information (networks / PXE interface) get's lost due to re-discovering NIC's during commissioning #1440763 Rregiond.log Tracebacks when trying to deploy 42 nodes at a time #1440765 oauth.oauth.OAuthError: Parameter not found: %s' % parameter #1441002 Maas api "device claim-sticky-ip-address" fails with "500: 'bool' object has not attribute 'uuid'". #1441021 No IP validation #1441399 Socket.error: [Errno 92] Protocol not available #1441610 Machines get stuck in releasing for a long time #1441652 502 Proxy Error when trying to access MAAS in browser #1441756 Manager service is not sending limit to region #1441841 Can't add a device that has IP address that it is within the wider range MAAS manages, but not within Dynamic/Static range MAAS manages #1441933 Internal Server Error when saving a cluster without Router IP #1442059 Failed deployment/release timeout #1442162 Spurious test failure: maasserver.api.tests.test_nodes.TestFilteredNodesListFromRequest.test_node_list_with_ids_orders_by_id #1443344 MAAS node details page shows BMC password in cleartext #1443346 utils.fs.atomic_write does not preserve file ownership #1443709 Error on request (58) node.check_power #1443917 IntegrityError: duplicate key value violates unique constraint "maasserver_componenterror_component_key", (component)=(clusters) already exists #1445950 Proxy error when trying to delete a windows image #1445959 Deploying a different OS from node details page yields in always deploying ubuntu #1445994 Add Devices button has disappeared #1445997 Clicking on a device takes be back to node details page #1446000 MAC is not shown in device list #1446810 Too Many Open Files in maas.log #1446840 Internal server error saving the clusters interfaces #1447009 Combo loader crash when requesting JS assets #1447208 deferToThread cannot wait for a thread in the same threadpool #1447736 Node isn't removed from the node listing when it becomes non-visible #1447739 Node isn't added to the node listing when it becomes visible #1449011 maas root node start distro_series=precise on a non-allocated node returns wrong error message #1449729 Nodes fail to commission #1450091 tgt does not auto-start on Vivid #1450115 django.db.utils.OperationalError raised when instantiating MAASAndNetworkForm #1450488 MAAS does not list all the tags #1451852 Legacy VMware "add chassis" option should be removed #1451857 Probe-and-enlist for VMware needs to update VM config to use PXE boot #1453730 Commissioning script contents is shown under other settings #1453954 500 error reported to juju when starting node - "another action is already in progress for that node" #1455151 Adding one device on fresh install shows as two devices until page refresh #1455643 Regression: Node listing extends past the edge of the screen #1456188 Auto image import stacktraces #1456538 Package install fails with "invoke-rc.d: unknown initscript, /etc/init.d/maas-regiond-worker not found." #1456698 Unable to deploy a node that is marked fixed when it is on #1456892 500 error: UnboundLocalError: local variable 'key_required' referenced before assignment #1456969 MAAS cli/API: missing option set use-fast-installer / use-debian-installer #1457203 Usability - Enter key in search field should not reset view and filter #1457708 Cluster gets disconnected after error: provisioningserver.service_monitor.UnknownServiceError: 'maas-dhcpd' is unknown to upstart. #1457786 Test suite runs sudo commands #1458894 Cluster image download gives up and logs an IOError too soon #1459380 MAAS logs 503 spurious errors when the region service isn't yet online #1459607 Spurious test: maasserver.api.tests.test_node.TestNodeAPI.test_POST_commission_commissions_node #1459876 When MAAS Boot Images are Superseded, Disk Space is not Reclaimed #1460485 MAAS doesn't transparently remove multiple slashes in URLs #1461181 Too many open files, after upgrade to rc1 #1461256 Filter by node broken in Chromium - angular errors in java script console #1461977 Unused "Check component compatibility and certification" field should be removed #1462079 Devices can't add a device with a Static IP address outside of dyanmic/static range #1462320 eventloop table is out of date #1462507 BlockDevice API is not under the nodes endpoint 1.7.6 ===== Bug Fix Update -------------- #1470585 Accept list of forwarders for upstream_dns rather than just one. #1413388 Fix upgrade issue where it would remove custom DNS config, potentially breaking DNS 1.7.5 ===== Bug Fix Update -------------- #1456969 MAAS cli/API: missing option set use-fast-installer / use-debian-installer 1.7.4 ===== Bug Fix Update -------------- #1456892 500 error: UnboundLocalError: local variable 'key_required' referenced before assignment #1387859 When MAAS has too many leases, and lease parsing fails, MAAS fails to auto-map NIC with network #1329267 Alert a command-line user of `maas` when their local API description is out-of-date. 1.7.3 ===== Bug Fix Update -------------- #1441933 Internal Server Error when saving a cluster without Router IP #1441133 MAAS version not exposed over the API #1437094 Sorting by mac address on webui causes internal server error #1439359 Automatically set correct boot resources selection and start import after upgrade from MAAS 1.5; Ensures MAAS is usable after upgrade. #1439366 Backwards compatibility with MAAS 1.5 preseeds and custom preseeds. Ensures that users dont have to manually change preseeds names. 1.7.2 ===== Bug Fix Update -------------- For full details see https://launchpad.net/maas/+milestone/1.7.2 #1331214 Support AMT Version > 8 #1397567 Fix call to amttool when restarting a node to not fail disk erasing. #1415538 Do not generate the 'option routers' stanza if router IP is None. #1403909 Do not deallocate StaticIPAddress before node has powered off. #1405998 Remove all OOPS reporting. #1423931 Update the nodes host maps when a sticky ip address is claimed over the API. #1433697 Look for bootloaders in /usr/lib/EXTLINUX 1.7.1 ===== Minor feature improvements -------------------------- New CentOS Release support. Further to the work done in the 1.7.0 MAAS Release, MAAS now supports uploading various versions of CentOS. Previously MAAS would only officially support 6.5. Power Monitoring for Seamicro 15000, Cisco UCS and HP Moonshot Chassis Further the work done in the 1.7.0 MAAS release, it now supports power query and monitoring for the Seamicro 15000 Chassis, the Cisco UCS Chassis Manager and the HP Moonshot Chassis Manager. Node Listing Page and Node Event Log live refresh The Node Listing page and the Node Event Log now have live refresh every 10 seconds. This allows MAAS to display the latest node status and events without forcing a browser refresh. IP Address Reservation The static IP address reservation API now has an optional "mac" parameter. Specifying a MAC address here will link the new static IP to that MAC address. A DHCP host map will be created for the MAC address. No other IPs may be reserved for that MAC address until the current one is released. Bug fix update -------------- For full details see https://launchpad.net/maas/+milestone/1.7.1 #1330765 If start_nodes() fails, it doesn't clean up after itself. #1373261 pserv.yaml rewrite breaks when previous generator URL uses IPv6 address #1386432 After update to the latest curtin that changes the log to install.log MAAS show's two installation logs #1386488 If rndc fails, you get an Internal Server Error page #1386502 No "failed" transition from "new" #1386914 twisted Unhandled Error when region can't reach upstream boot resource #1391139 Tagged VLAN on aliased NIC breaks migration 0099 #1391161 Failure: twisted.internet.error.ConnectionDone: Connection was closed cleanly. #1391411 metadata API signal() is releasing host maps at the end of installation #1391897 Network names with dots cause internal server error when on node pages #1394382 maas does not know about VM "paused" state #1396308 Removing managed interface causes maas to delete nodes #1397356 Disk Wiping fails if installation is not Ubuntu #1398405 MAAS UI reports storage size in Gibibytes (base 2) but is labeled GB - Gigabytes (base 10). #1399331 MAAS leaking sensitive information in ps ax output #1400849 Check Power State disappears after upgrade to 1.7 bzr 3312 #1401241 custom dd-tgz format images looked for in wrong path, so they don't work #1401983 Exception: deadlock detected #1403609 can not enlist chassis with maas admin node-group probe-and-enlist-mscm #1283106 MAAS allows the same subnet to be defined on two managed interfaces of the same cluster #1303925 commissioning fails silently if a node can't reach the region controller #1357073 power state changes are not reflected quickly enough in the UI #1360280 boot-source-selections api allows adding bogus and duplicated values #1368400 Can't power off nodes that are in Ready state but on #1370897 The node power monitoring service does not check nodes in parallel #1376024 gpg --batch [...]` error caused by race in BootSourceCacheService #1376716 AMT NUC stuck at boot prompt instead of powering down (no ACPI support in syslinux poweroff) #1378835 Config does not have a unique index on name #1379370 Consider removing transaction in claim_static_ip_addresses(). #1379556 Panicky log warning that is irrelevant #1381444 Misleading error message in log "Unknown power_type 'sm15k'" #1382166 Message disclosing image import necessary visible while not logged in #1382237 UnicodeEncodeError when unable to create host maps #1383231 Error message when trying to reserve the same static IP twice is unhelpful #1383237 Error message trying to reserve an IP address when no static range is defined is misleading #1384424 Seamicro Machines do not have Power Status Tracking #1384428 HP Moonshot Chassis Manager lacks power status monitoring #1384924 need to provide a better upgrade message for images on the cluster but not on the region #1386517 DHCP leases are not released at the end of commissioning and possibly enlistment #1387239 MAAS does not provide an API for reserving a static IP for a given MAC address #1387414 Race when registering new event type #1388033 Trying to reserve a static IP when no more IPs are available results in 503 Service Unavailable with no error text #1389602 Inconsistent behavior in the checks to delete a node #1389733 node listing does not update the status and power of nodes #1390144 Node 'releasing' should have a timeout #1391193 API error documentation #1391421 Names of custom boot-resources not visible in the web UI #1391891 Spurious test failure: TestDNSForwardZoneConfig_GetGenerateDirectives.test_returns_single_entry_for_tiny_network #1393423 PowerKVM / VIrsh import should allow you to specify a prefix to filter VM's to import #1393953 dd-format images fail to deploy #1400909 Networks are being autocreated like eth0-eth0 instead of maas-eth0 #1401349 Memory size changes to incorrect size when page is refreshed #1402237 Node event log queries are slow (over 1 second) #1402243 Nodes in 'Broken' state are being power queried constantly #1402736 clicking on zone link from node page - requested URL was not found on this server #1403043 Wrong top-level tab is selected when viewing a node #1381609 Misleading log message when a node has a MAC address not attached to a cluster interface #1386909 Misleading Error: Unable to identify boot image for (ubuntu/amd64/generic/trusty/local): cluster 'maas' does not have matching boot image. #1388373 Fresh image import of 3 archs displaying multiple rows for armhf and amd64 #1398159 TFTP into MAAS server to get pxelinux.0 causes unhandled error #1383651 Node.start() and Node.stop() raise MulltipleFailures unnecessarily #1383668 null" when releasing an IP address is confusing #1389416 Power querying for UCSM not working #1399676 UX bug: mac address on the nodes page should be the MAC address it pxe booted from #1399736 MAAS should display memory sizes in properly labeld base 2 units - MiB, GiB, etc. #1401643 Documentation has wrong pattern for user provided preseeds #1401707 Slow web performance (5+ minute response time) on MAAS with many nodes #1403609 Fix MSCM chassis enlistment. #1409952 Correctly parse MAC Address for Power8 VM enlistment. #1409852 Do not fail when trying to perform an IP Address Reservation. #1413030 OS and Release no longer populate on Add Node page #1414036 Trying to add an empty network crashes (AddrFormatError) 1.7.0 ===== Important announcements ----------------------- **Re-import your boot images** You must re-import your boot images, see below for details. **Update Curtin preseed files** Two changes were made to Curtin preseed files that need your attention if you made any customisations: * The OS name must now appear in the filename. The new schema is shown here, each file pattern is tried in turn until a match is found:: {prefix}_{osystem}_{node_arch}_{node_subarch}_{release}_{node_name} {prefix}_{osystem}_{node_arch}_{node_subarch}_{release} {prefix}_{osystem}_{node_arch}_{node_subarch} {prefix}_{osystem}_{node_arch} {prefix}_{osystem} {prefix} * If you are modifying ``/etc/network/interfaces`` in the preseed, it must be moved so it is processed last in ``late_commands`` since MAAS now writes to this file itself as part of IPv6 setup. For example:: late_commands: bonding_02: ["curtin", "in-target", "--", "wget", "-O", "/etc/network/interfaces", "http://[...snip...]"] must now look like this:: late_commands: zz_write_ifaces: ["curtin", "in-target", "--", "wget", "-O", "/etc/network/interfaces", "http://[...snip...]"] The leading ``zz`` ensures the command sorts to the end of the ``late_commands`` list. Major new features ------------------ **Improved image downloading and reporting.** MAAS boot images are now downloaded centrally by the region controller and disseminated to all registered cluster controllers. This change includes a new web UI under the `Images` tab that allows the admin to select which images to import and shows the progress of the ongoing download. This completely replaces any file-based configuration that used to take place on cluster controllers. The cluster page now shows whether it has synchronised all the images from the region controller. This process is also completely controllable using the API. .. Note:: Unfortunately due to a format change in the way images are stored, it was not possible to migrate previously downloaded images to the new region storage. The cluster(s) will still be able to use the existing images, however the region controller will be unaware of them until an import is initiated. When the import is finished, the cluster(s) will remove older image resources. This means that the first thing to do after upgrading to 1.7 is go to the `Images` tab and re-import the images. **Increased robustness.** A large amount of effort has been given to ensuring that MAAS remains robust in the face of adversity. An updated node state model has been implemented that takes into account more of the situations in which a node can be found including any failures at each stage. When a node is getting deployed, it is now monitored to check that each stage is reached in a timely fashion; if it does not then it is marked as failed. The core power driver was updated to check the state of the power on each node and is reported in the web UI and API. The core driver now also handles retries when changing the power state of hardware, removing the requirement that each power template handle it individually. **RPC security.** As a step towards mutually verified TLS connections between MAAS's components, 1.7 introduces a simple shared-secret mechanism to authenticate the region with the clusters and vice-versa. For those clusters that run on the same machine as the region controller (which will account for most people), everything will continue to work without intervention. However, if you're running a cluster on a separate machine, you must install the secret: 1. After upgrading the region controller, view /var/lib/maas/secret (it's text) and copy it. 2. On each cluster, run: sudo -u maas maas-provision install-shared-secret You'll be prompted for the secret; paste it in and press enter. It is a password prompt, so the secret will not be echoed back to you. That's it; the upgraded cluster controller will find the secret without needing to be told. **RPC connections.** Each cluster maintains a persistent connection to each region controller process that's running. The ports on which the region is listening are all high-numbered, and they are allocated randomly by the OS. In a future release of MAAS we will narrow this down. For now, each cluster controller needs unfiltered access to each machine in the region on all high-numbered TCP ports. **Node event log.** For every major event on nodes, it is now logged in a node-specific log. This includes events such as power changes, deployments and any failures. **IPv6.** It is now possible to deploy Ubuntu nodes that have IPv6 enabled. See :doc:`ipv6` for more details. **Removal of Celery and RabbitMQ.** While Celery was found to be very reliable it ultimately did not suit the project's requirements as it is a largely fire-and-forget mechanism. Additionally it was another moving part that caused some headaches for users and admins alike, so the decision was taken to remove it and implement a custom communications mechanism between the region controller and cluster controllers. The new mechanism is bidirectional and allowed the complex interactions to take place that are required as part of the robustness improvements. Since a constant connection is maintained, as a side effect the web UI now shows whether each cluster is connected or not. **Support for other OSes.** Non-Ubuntu OSes are fully supported now. This includes: - Windows - Centos - SuSE **Custom Images.** MAAS now supports the deployment of Custom Images. Custom images can be uploaded via the API. The usage of custom images allows the deployment of other Ubuntu Flavors, such as Ubuntu Desktop. **maas-proxy.** MAAS now uses maas-proxy as the default proxy solution instead of squid-deb-proxy. On a fresh install, MAAS will use maas-proxy by default. On upgrades from previous releases, MAAS will install maas-proxy instead of squid-deb-proxy. Minor notable changes --------------------- **Better handling of networks.** All networks referred to by cluster interfaces are now automatically registered on the Network page. Any node network interfaces are automatically linked to the relevant Network. .. Note:: Commissioning currently requires an IP address to be available for each network interface on a network that MAAS manages; this allows MAAS to auto-populate its networks database. In general you should use a well-sized network (/16 recommended if you will be using containers and VMs) and dynamic pool. If this feature risks causing IP exhaustion for your deployment and you do not need the auto-populate functionality, you can disable it by running the following command on your region controller:: sudo maas maas set-config name=enable_dhcp_discovery_on_unconfigured_interfaces value=False **Improved logging.** A total overhaul of where logging is produced was undertaken, and now all the main events in MAAS are selectively reported to syslog with the "maas" prefix from both the region and cluster controllers alike. If MAAS is installed using the standard Ubuntu packaging, its syslog entries are redirected to /var/log/maas/maas.log. On the clusters, pserv.log is now less chatty and contains only errors. On the region controller appservers, maas-django.log contains only appserver errors. **Static IP selection.** The API was extended so that specific IPs can be pre-allocated for network interfaces on nodes and for user-allocated IPs. **Pronounceable random hostnames.** The old auto-generated 5-letter names were replaced with a pseudo-random name that is produced from a dictionary giving names of the form 'adjective-noun'. Known Problems & Workarounds ---------------------------- **Upgrade issues** There may be upgrade issues for users currently on MAAS 1.5 and 1.6; while we have attempted to reproduce and address all the issues reported, some bugs remain inconclusive. We recommend a full, tested backup of the MAAS servers before attempting the upgrade to 1.7. If you do encounter issues, please file these and flag them to the attention of the MAAS team and we will address them in point-releases. See bugs `1381058`_, `1382266`_, `1379890`_, `1379532`_, and `1379144`_. .. _1381058: https://launchpad.net/bugs/1381058 .. _1382266: https://launchpad.net/bugs/1382266 .. _1379890: https://launchpad.net/bugs/1379890 .. _1379532: https://launchpad.net/bugs/1379532 .. _1379144: https://launchpad.net/bugs/1379144 **Split Region/Cluster set-ups** If you site your cluster on a separate host to the region, it needs a security key to be manually installed by running ``maas-provision install-shared-secret`` on the cluster host. **Private boot streams** If you had private boot image stream information configured in MAAS 1.5 or 1.6, upgrading to 1.7 will not take that into account and it will need to be manually entered on the settings page in the MAAS UI (bug `1379890`_) .. _1379890: https://launchpad.net/bugs/1379890 **Concurrency issues** Concurrency issues expose us to races when simultaneous operations are triggered. This is the source of many hard to reproduce issues which will require us to change the default database isolation level. We intend to address this in the first point release of 1.7. **Destroying a Juju environment** When attempting to "juju destroy" an environment, nodes must be in the DEPLOYED state; otherwise, the destroy will fail. You should wait for all in-progress actions on the MAAS cluster to conclude before issuing the command. (bug `1381619`_) .. _1381619: https://launchpad.net/bugs/1381619 **AMT power control** A few AMT-related issues remain, with workarounds: * Commissioning NUC reboots instead of shutting down (bug `1368685`_). There is `a workaround in the power template`_ * MAAS (amttool) cannot control AMT version > 8. See `workaround described in bug 1331214`_ * AMT NUC stuck at boot prompt instead of powering down (no ACPI support in syslinux poweroff) (bug `1376716`_). See the `ACPI-only workaround`_ .. _1368685: https://bugs.launchpad.net/maas/+bug/1368685 .. _a workaround in the power template: https://bugs.launchpad.net/maas/+bug/1368685/comments/8 .. _workaround described in bug 1331214: https://bugs.launchpad.net/maas/+bug/1331214/comments/18 .. _1376716: https://bugs.launchpad.net/maas/+bug/1376716 .. _ACPI-only workaround: https://bugs.launchpad.net/maas/+bug/1376716/comments/12 **Disk wiping** If you enable disk wiping, juju destroy-environment may fail for you. The current workaround is to wait and re-issue the command. This will be fixed in future versions of MAAS & Juju. (bug `1386327`_) .. _1386327: https://bugs.launchpad.net/maas/+bug/1386327 **BIND with DNSSEC** If you are using BIND with a forwarder that uses DNSSEC and have not configured certificates, you will need to explicitly disable that feature in your BIND configuration (1384334) .. _1384334: https://bugs.launchpad.net/maas/+bug/1384334 **Boot source selections on the API** Use of API to change image selections can leave DB in a bad state (bug `1376812`_). It can be fixed by issuing direct database updates. .. _1376812: https://bugs.launchpad.net/maas/+bug/1376812 **Disabling DNS** Disabling DNS may not work (bug `1383768`_) .. _1383768: https://bugs.launchpad.net/maas/+bug/1383768 **Stale DNS zone files** Stale DNS zone files may be left behind if the MAAS domainname is changed (bug `1383329`_) .. _1383329: https://bugs.launchpad.net/maas/+bug/1383329 Major bugs fixed in this release -------------------------------- See https://launchpad.net/maas/+milestone/1.7.0 for full details. #1081660 If maas-enlist fails to reach a DNS server, the node will be named ";; connection timed out; no servers could be reached" #1087183 MaaS cloud-init configuration specifies 'manage_etc_hosts: localhost' #1328351 ConstipationError: When the cluster runs the "import boot images" task it blocks other tasks #1342117 CLI command to set up node-group-interface fails with /usr/lib/python2.7/dist-packages/maascli/__main__.py: error: u'name' #1349254 Duplicate FQDN can be configured on MAAS via CLI or API #1352575 BMC password showing in the apache2 logs #1355534 UnknownPowerType traceback in appserver log #1363850 Auto-enlistment not reporting power parameters #1363900 Dev server errors while trying to write to '/var/lib/maas' #1363999 Not assigning static IP addresses #1364481 http 500 error doesn't contain a stack trace #1364993 500 error when trying to acquire a commissioned node (AddrFormatError: failed to detect a valid IP address from None) #1365130 django-admin prints spurious messages to stdout, breaking scripts #1365850 DHCP scan using cluster interface name as network interface? #1366172 NUC does not boot after power off/power on #1366212 Large dhcp leases file leads to tftp timeouts #1366652 Leaking temporary directories #1368269 internal server error when deleting a node #1368590 Power actions are not serialized. #1370534 Recurrent update of the power state of nodes crashes if the connection to the BMC fails. #1370958 excessive pserv logging #1372767 Twisted web client does not support IPv6 address #1372944 Twisted web client fails looking up IPv6 address hostname #1373031 Cannot register cluster #1373103 compose_curtin_network_preseed breaks installation of all other operating systems #1373368 Conflicting power actions being dropped on the floor can result in leaving a node in an inconsistent state #1373699 Cluster Listing Page lacks feedback about the images each cluster has #1374102 No retries for AMT power? #1375980 Nodes failed to transition out of "New" state on bulk commission #1376023 After performing bulk action on maas nodes, Internal Server Error #1376888 Nodes can't be deleted if DHCP management is off. #1377099 Bulk operation leaves nodes in inconsistent state #1379209 When a node has multiple interfaces on a network MAAS manages, MAAS assigns static IP addresses to all of them #1379744 Cluster registration is fragile and insecure #1380932 MAAS does not cope with changes of the dhcp daemons #1381605 Not all the DNS records are being added when deploying multiple nodes #1012954 If a power script fails, there is no UI feedback #1186196 "Starting a node" has different meanings in the UI and in the API. #1237215 maas and curtin do not indicate failure reasonably #1273222 MAAS doesn't check return values of power actions #1288502 archive and proxy settings not honoured for commissioning #1316919 Checks don't exist to confirm a node will actually boot #1321885 IPMI detection and automatic setting fail in ubuntu 14.04 maas #1325610 node marked "Ready" before poweroff complete #1325638 Add hardware enablement for Universal Management Gateway #1340188 unallocated node started manually, causes AssertionError for purpose poweroff #1341118 No feedback when IPMI credentials fail #1341121 No feedback to user when cluster is not running #1341581 power state is not represented in api and ui #1341800 MAAS doesn't support soft power off through the API #1344177 hostnames can't be changed while a node is acquired #1347518 Confusing error message when API key is wrong #1349496 Unable to request a specific static IP on the API #1349736 MAAS logging is too verbose and not very useful #1349917 guess_server_address() can return IPAddress or hostname #1350103 No support for armhf/keystone architecture #1350856 Can't constrain acquisition of nodes by not having a tag #1356880 MAAS shouldn't allow changing the hostname of a deployed node #1357714 Virsh power driver does not seem to work at all #1358859 Commissioning output xml is hard to understand, would be nice to have yaml as an output option. #1359169 MAAS should handle invalid consumers gracefully #1359822 Gateway is missing in network definition #1363913 Impossible to remove last MAC from network in UI #1364228 Help text for node hostname is wrong #1364591 MAAS Archive Mirror does not respect non-default port #1365616 Non-admin access to cluster controller config #1365619 DNS should be an optional field in the network definition #1365776 commissioning results view for a node also shows installation results #1366812 Old boot resources are not being removed on clusters #1367455 MAC address for node's IPMI is reversed looked up to yield IP address using case sensitive comparison #1373580 [SRU] Glen m700 cartridge list as ARM64/generic after enlist #1373723 Releasing a node without power parameters ends up in not being able to release a node #1233158 no way to get power parameters in api #1319854 `maas login` tells you you're logged in successfully when you're not #1368480 Need API to gather image metadata across all of MAAS #1281406 Disk/memory space on Node edit page have no units #1299231 MAAS DHCP/DNS can't manage more than a /16 network #1357381 maas-region-admin createadmin shows error if not params given #1376393 powerkvm boot loader installs even when not needed #1287224 MAAS random generated hostnames are not pronounceable #1348364 non-maas managed subnets cannot query maas DNS 1.6.1 ===== Bug fix update -------------- - Auto-link node MACs to Networks (LP: #1341619) MAAS will now auto-create a Network from a cluster interface, and if an active lease exists for a node's MAC then it will be linked to that Network. 1.6.0 ===== Special notice: Cluster interfaces now have static IP ranges in order to give nodes stable IP addresses. You need to set the range in each interface to turn on this feature. See below for details. Major new features ------------------ IP addresses overhaul. This release contains a total reworking of IP address allocation. You can now define a separate "static" range in each cluster interface configuration that is separate from the DHCP server's dynamic range. Any node in use by a user will receive an IP address from the static range that is guaranteed not to change during its allocated lifetime. Previously, this was at the whim of the DHCP server despite MAAS placing host maps in its configuration. Currently, dynamic IP addresses will continue to receive DNS entries so as to maintain backward compatibility with installations being upgraded from 1.5. However, this will be changed in a future release to only give DNS entries to static IPs. You can also use the API to `reserve IP addresses`_ on a per-user basis. .. _reserve IP addresses: http://maas.ubuntu.com/docs1.6/api.html#ip-addresses Support for additional OSes. MAAS can now install operating systems other than Ubuntu on nodes. Preliminary beta support exists for CentOS and SuSE via the `Curtin`_ "fast" installer. This has not been thoroughly tested yet and has been provided in case anyone finds this useful and is willing to help find and report bugs. Minor notable changes --------------------- DNS entries In 1.5 DNS entries for nodes were a CNAME record. As of 1.6, they are now all "A" records, which allows for reliable reverse look-ups. Only nodes that are allocated to a user and started will receive "A" record entries. Unallocated nodes no longer have DNS entries. Removal of bootresources.yaml The bootresources.yaml file, which had to be configured separately on each cluster controller, is no longer in use. Instead, the configuration for which images to download is now held by the region controller, and defaults to downloading all images for LTS releases. A `rudimentary API`_ is available to manipulate this configuration. .. _rudimentary API: http://maas.ubuntu.com/docs1.6/api.html#boot-source Fast installer is now the default Prevously, the slower Debian installer was used by default. Any newly- enlisted nodes will now use the newer `fast installer`_. Existing nodes will keep the installer setting that they already have. .. _fast installer: https://launchpad.net/curtin Bugs fixed in this release -------------------------- #1307779 fallback from specific to generic subarch broken #1310082 d-i with precise+hwe-s stops at "Architecture not supported" #1314174 Autodetection of the IPMI IP address fails when the 'power_address' of the power parameters is empty. #1314267 MAAS dhcpd will re-issue leases for nodes #1317675 Exception powering down a virsh machine #1322256 Import boot resources failing to verify keyring #1322336 import_boot_images crashes with KeyError on 'keyring' #1322606 maas-import-pxe-files fails when run from the command line #1324237 call_and_check does not report error output #1328659 import_boot_images task fails on utopic #1332596 AddrFormatError: failed to detect a valid IP address from None executing upload_dhcp_leases task #1250370 "sudo maas-import-ephemerals" steps on ~/.gnupg/pubring.gpg #1250435 CNAME record leaks into juju's private-address, breaks host based access control #1305758 Import fails while writing maas.meta: No such file or directory #1308292 Unhelpful error when re-enlisting a previously enlisted node #1309601 maas-enlist prints "successfully enlisted" even when enlistment fails. #1309729 Fast path installer is not the default #1310844 find_ip_via_arp() results in unpredictable, and in some cases, incorrect IP addresses #1310846 amt template gives up way too easily #1312863 MAAS fails to detect SuperMicro-based server's power type #1314536 Copyright date in web UI is 2012 #1315160 no support for different operating systems #1316627 API needed to allocate and return an extra IP for a container #1323291 Can't re-commission a commissioning node #1324268 maas-cli 'nodes list' or 'node read ' doesn't display the osystem or distro_series node fields #1325093 install centos using curtin #1325927 YUI.Array.each not working as expected #1328656 MAAS sends multiple stop_dhcp_server tasks even though there's no dhcp server running. #1331139 IP is inconsistently capitalized on the 'edit a cluster interface' page #1331148 When editing a cluster interface, last 3 fields are unintuitive #1331165 Please do not hardcode the IP address of Canonical services into MAAS managed DHCP configs #1338851 Add MAAS arm64/xgene support #1307693 Enlisting a SeaMicro or Virsh chassis twice will not replace the missing entries #1311726 No documentation about the supported power types and the related power parameters #1331982 API documentation for nodegroup op=details missing parameter #1274085 error when maas can't meet juju constraints is confusing and not helpful #1330778 MAAS needs support for managing nodes via the Moonshot HP iLO Chassis Manager CLI #1337683 The API client MAASClient doesn't encode list parameters when doing a GET #1190986 ERROR Nonce already used #1342135 Allow domains to be used for NTP server configuration, not just IPs #1337437 Allow 14.10 Utopic Unicorn as a deployable series #1350235 Package fails to install when the default route is through an aliased/tagged interface #1353597 PowerNV: format_bootif should make sure mac address is all lowercase 1.5.3 ===== Bug fix update -------------- - Reduce number of celery tasks emitted when updating a cluster controller (LP: #1324944) - Fix VirshSSH template which was referencing invalid attributes (LP: #1324966) - Fix a start up problem where a database lock was being taken outside of a transaction (LP: #1325759) - Reformat badly formatted Architecture error message (LP: #1301465) - Final changes to support ppc64el (now known as PowerNV) (LP: #1315154) 1.5.2 ===== Minor feature changes --------------------- Boot resource download changes. Further to the work done in the 1.5 (Ubuntu 14.04) release, MAAS no longer stores the configuration for downloading boot resources in ``/etc/maas/bootresources.yaml``; this file is now obsolete. The sources list is now stored on the region controller and passed to the cluster controller when the job to download boot resources is started. It is still possible to pass a list of sources to ``maas-import-pxe-files`` when running the script manually. 1.5.1 ===== Bug fix update -------------- For full details see https://launchpad.net/maas/+milestone/1.5.1 #1303915 Powering SM15k RESTAPI v2.0 doesn't force PXE boot #1307780 no armhf commissioning template #1310076 lost connectivity to a node when using fastpath-installer with precise+hwe-s #1310082 d-i with precise+hwe-s stops at "Architecture not supported" #1311151 MAAS imports Trusty's 'rc' images by default. #1311433 REGRESSION: AttributeError: 'functools.partial' object has no attribute '__module__' #1313556 API client blocks when deleting a resource #1314409 parallel juju deployments race on the same maas #1316396 When stopping a node from the web UI that was started from the API, distro_series is not cleared #1298784 Vulnerable to user-interface redressing (e.g. clickjacking) #1308772 maas has no way to specify alternate IP addresses for AMT template #1300476 Unable to setup BMC/UCS user on Cisco B200 M3 1.5 === (released in Ubuntu 14.04) Major new features ------------------ Advanced Networking. MAAS will now support multiple managed network interfaces on a single cluster. It will track networks (including tagged VLANs) to which each node is able to connect and provides this information in the API. API clients may also use networking information in acquisition constraints when asking for a new node allocation. See :ref:`The full Networking documentation `. Zones. A Zone is an arbitrary grouping of nodes. MAAS now allows admins to define Zones, and place in them any of the region's nodes. Once defined, API clients can use the zone name as acquisition constraints for new node allocations. See :doc:`physical-zones` for more detail. Hardware Enablement Kernels. MAAS is now able to fetch and use hardware enablement kernels which allow kernels for newer Ubuntu releases to be used on older releases. See :doc:`hardware-enablement-kernels` Minor feature changes --------------------- Maas-Test. A new project `maas-test`_ was created to put a piece of hardware through MAAS's test suite to see if it's suitable for use in MAAS, and optionally report the results to a bug in Launchpad's maas-test project. .. _maas-test: https://launchpad.net/maas-test/ IPMI improvements. Many improvements were made to IPMI handling, including better detection during enlistment. Many IPMI-based systems that previously failed to work with MAAS will now work correctly. Completion of image downloading changes. Further to the work done in the 1.4 (Ubuntu 13.10) release, MAAS now uses indexed "simplestreams" data published by Canonical to fetch not only the ephemeral images, but now also the kernels and ramdisks. The resource download configuration is now in a new file ``/etc/maas/bootresources.yaml`` on each cluster controller. All previous configuration files for image downloads are now obsolete. The new file will be pre-configured based on images that are already present on the cluster. This change also enables end-users to provide their own simplestreams data and thusly their own custom images. Cluster-driven hardware availability. When adding or editing node hardware in the region controller, MAAS will contact the relevant cluster controller to validate the node's settings. As of release, the only validation made is the architecture and the power settings. Available architectures are based on which images have been imported on the cluster. In the future, this will enable new cluster controllers to be added that contain drivers for new hardware without restarting the region controller. Seamicro hardware. MAAS now supports the Seamicro 15000 hardware for power control and API-based enlistment. AMT. MAAS now supports power control using `Intel AMT`_. .. _Intel AMT: http://www.intel.com/content/www/us/en/architecture-and-technology/intel-active-management-technology.html DNS forwarders. In MAAS's settings it's now possible to configure an upstream DNS, which will be set in the bind daemon's 'forwarders' option. Foreign DHCP servers. MAAS detects and shows you if any other DHCP servers are active on the networks that are on the cluster controller. Commissioning Results. A node's commissioning results are now shown in the UI. Renamed commands. ``maas`` is renamed to ``maas-region-admin``. ``maas-cli`` is now just ``maas``. Bugs fixed in this release -------------------------- For full details see https://launchpad.net/maas/+milestone/14.04 #1227035 If a template substitution fails, the appserver crashes #1255479 MaaS Internal Server Error 500 while parsing tags with namespaces in definition upon commissioning #1269648 OAuth unauthorised errors mask the actual error text #1270052 Adding an SSH key fails due to a UnicodeDecodeError #1274024 kernel parameters are not set up in the installed OS's grub cfg #1274190 periodic_probe_dhcp task raises IOError('No such device') #1274912 Internal server error when trying to stop a node with no power type #1274926 A node's nodegroup is autodetected using the request's IP even when the request is a manual #1278895 When any of the commissioning scripts fails, the error reported contains the list of the scripts that *didn't* fail #1279107 maas_ipmi_autodetect.py ignores command failures #1282828 Almost impossible to provide a valid nodegroup ID when enlisting new node on API #1283114 MAAS' DHCP server is not stopped when the number of managed interfaces is zero #1285244 Deleting a node sometimes fails with omshell error #1285607 maas_ipmi_autodetect mistakes empty slot for taken slot #1287274 On OCPv3 Roadrunner, maas_ipmi_autodetect fails because LAN Channel settings can't be changed #1287512 OCPv3 roadrunner detects IPMI as 1.5 #1289456 maas IPMI user creation fails on some DRAC systems #1290622 report_boot_images does not remove images that were deleted from the cluster #1293676 internal server error when marking nodes as using fast-path installer #1300587 Cloud-archive selection widget is obsolete #1301809 Report boot images no directory traceback #1052339 MAAS only supports one "managed" (DNS/DHCP) interface per cluster controller. #1058126 maas dbshell stacktraces in package #1064212 If a machine is booted manually when in status "Declared" or "Ready", TFTP server tracebacks #1073460 Node-specific kernel and ramdisk is not possible #1177932 Unable to select which pxe files to download by both series and architecture. #1181334 i386 required to install amd64 #1184589 When external commands, issued by MAAS, fail, the log output does not give any information about the failure. #1187851 Newline added to end of files obtained with maas-cli #1190986 ERROR Nonce already used #1191735 TFTP server not listening on all interfaces #1210393 MAAS ipmi fails on OCPv3 Roadrunner #1228205 piston hijacks any TypeError raised by MAAS #1234880 HP ilo4 consoles default to autodetect protocol, which doesn't work #1237197 No scheduled job for images download #1238284 multiple ip address displayed for a node #1243917 'maas createsuperuser' errors out if no email address is entered. #1246531 dhcpd.conf not updated when user hits "Save cluster controller" #1246625 The power parameters used by the virsh power template are inconsistent. #1247708 Cluster interface shows up with no interface name #1248893 maas-cli listing nodes filtered by hostname doesn't work #1249435 kernel options not showing up in WebUI and not being passed at install time to one node #1250410 Search box renders incorrectly in Firefox #1268795 unable to automatically commission Cisco UCS server due to BMC user permissions #1270131 1 CPU when there are multiple cores on Intel NUC #1271056 API call for listing nodes filtered by zone #1273650 Fastpath installer does not pick up package mirror settings from MAAS #1274017 MAAS new user creation requires E-Mail address, throws wrong error when not provided #1274465 Network identity shows broadcast address instead of the network's address #1274499 dhcp lease rollover causes loss of access to management IP #1275643 When both IPMI 1.5 and 2.0 are available, MAAS should use 2.0 #1279304 Node commissioning results are not displayed in the UI #1279728 Storage capacity isn't always detected #1287964 MAAS incorrectly detects / sets-up BMC information on Dell PowerEdge servers #1292491 pserv traceback when region controller not yet ready #1293661 cannot use fast path installer to deploy other than trusty #1294302 fast installer fails to PXE boot on armhf/highbank #1295035 The UI doesn't display the list of available boot images #1297814 MAAS does not advertise its capabilities #1298790 Logout page vulnerable to CSRF #1271189 support switching image streams in import ephemerals #1287310 hard to determine valid values for power parameters #1272014 MAAS prompts user to run `maas createadmin`; instead of `maas createsuperuser` #1108319 maascli could have a way to tell which cluster controllers don't have the pxe files 1.4 === (released in Ubuntu 13.10) Major new features ------------------ LLDP collection. MAAS now collects LLDP data on each node during its commissioning cycle. The router to which the node is connected will have its MAC address parsed out of the data and made available for using as a placement constraint (passing connected_to or not_connected_to to the acquire() API call), or you can define tags using expressions such as ``//lldp:chassis/lldp:id[@type="mac"]/text() = "20:4e:7f:94:2e:10"`` which would tag nodes with a router using that MAC address. New faster installer for nodes. MAAS will now make use of the new Curtin_ installer which is much quicker than the old Debian Installer process. Typically an installation now takes a couple of minutes instead of upwards of 10 minutes. To have a node use the faster installer, add the ``use-fastpath-installer`` tag to it, or click the "Use the fast installer" button on the node page. .. _Curtin: https://launchpad.net/curtin More extensible templates for DHCP, power control, PXE and DNS. Templates supplied for these activities are now all in their own template file that is customisable by the user. The files now generally live under /etc/maas/ rather than embedded in the code tree itself. Minor feature changes --------------------- Reworked ephemeral downloading While there is no end-user visible change, the ephemeral image download process is now driven by a data stream published by Canonical at http://maas.ubuntu.com/images/streams. In the future this will allow end users to use their own customised images by creating their own stream. The configuration for this is now also part of ``pserv.yaml``, obsoleting the maas_import_ephemerals configuration file. The config will be auto- migrated on the first run of the ``maas-import-ephemerals`` script. Improved maas-cli support Users can now manage their SSH keys and API credentials via the maas-cli tool. Django 1.5 MAAS is updated to work with Django 1.5 HP Moonshot Systems support. MAAS can now manage HP Moonshot Systems as any other hardware. However, in order for MAAS to power manage these systems, it requires the user to manually specify the iLO credentials before the enlistment process begins. This can be done in the ``maas_moonshot_autodetect.py`` template under ``/etc/maas/templates/commissioning-user-data/snippets/``. Bugs fixed in this release -------------------------- #1039513 maas-import-pxe-files doesn't cryptographically verify what it downloads #1158425 maas-import-pxe-files sources path-relative config #1204507 MAAS rejects empty files #1208497 netboot flag defaults to 'true' on upgrade, even for allocated nodes #1227644 Releasing a node using the API errors with "TypeError: 00:e0:81:dd:d1:0b is not JSON serializable" #1234853 MAAS returns HTTP/500 when adding a second managed interface to cluster controller #971349 With 100% of nodes in 'declared' state, pie chart is white on white #974035 Node listing does not support bulk operations #1045725 SAY clauses in PXE configs are being evaluated as they're encountered, not when the label is branched to #1054518 distro_series can be None or "" #1064777 If a node's IP address is known, it's not shown anywhere #1084807 Users are editing the machine-generated dhcpd.conf #1155607 Conflict between "DNS zone name" in Cluster controller and "Default domain for new nodes" in settings #1172336 MAAS server reference to AvahiBoot wiki page that does not exist #1185160 no way to see what user has a node allocated #1202314 Discrepancy between docs and behavior #1206222 Documentation Feedback and Site suggestions #1209039 Document that MAAS requires 'portfast' on switch ports connected to nodes #1215750 No way of tracing/debugging http traffic content in the appserver. #1223157 start_commissioning needlessly sets owner on commissioning nodes #1227081 Error in apache's log "No handlers could be found for logger "maasserver"" #1233069 maas-import-pxe-files fails when md5 checksums can't be downloaded #1117415 maas dhcp responses do not have domain-name or domain-search #1136449 maas-cli get-config and set-config documentation #1175405 Pie chart says "deployed" which is inconsistent with the node list's "allocated" #1233833 Usability: deleting nodes is too easy #1185897 expose ability to re-commission node in api and cli #997092 Can't delete allocated node even if owned by self maas-2.0.0~beta3+bzr4941.orig/docs/conf.py0000644000000000000000000002462312705726641016217 0ustar 00000000000000# -*- coding: utf-8 -*- # # MAAS documentation build configuration file, created by # sphinx-quickstart on Thu Jan 19 14:48:25 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. from collections import OrderedDict from datetime import datetime import os from os import environ from subprocess import ( CalledProcessError, check_output, ) import sys from pytz import UTC # Configure MAAS's settings. environ.setdefault("DJANGO_SETTINGS_MODULE", "maas.settings") # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # Include '.' in the path so that our custom extension, 'versions', can # be found. sys.path.insert(0, os.path.abspath('.')) # -- Multiple documentation options. # Add a widget to switch between different versions of the documentation to # each generated page. add_version_switcher = False # In order for the version widget to be able to redirect correctly to the # other versions of the documentation, each version of the documentation # has to be accessible at the following addresses: # // -> documentation for trunk. # /1.4/ -> documentation for 1.4. # etc. doc_prefix = 'docs' # Path of the JSON document, relative to homepage of the documentation for trunk # (i.e. '//'), with the list of the versions to include in the # version switcher widget. versions_path = '_static/versions.js' # Versions to include in the version switcher. # Note that the version switcher fetches the list of the documentation versions # from the list published by the trunk documentation (i.e. in '//'). # This means the following list is meaningful only for trunk. # The first item should be the development version. doc_versions = OrderedDict([ ('dev', 'Development trunk'), ('2.0', 'MAAS 2.0'), ('1.9', 'MAAS 1.9'), ('1.8', 'MAAS 1.8'), ('1.7', 'MAAS 1.7'), ('1.5', 'MAAS 1.5'), ('1.4', 'MAAS 1.4'), ]) # -- General configuration ----------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. #needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.autosummary', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.pngmath', 'sphinx.ext.viewcode', 'versions', ] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # The suffix of source filenames. source_suffix = '.rst' # The encoding of source files. #source_encoding = 'utf-8-sig' # The master toctree document. master_doc = 'index' # General information about the project. project = u'MAAS' copyright = u'2012-2015, MAAS Developers' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. (version, _), *_ = doc_versions.items() # The full version, including alpha/beta/rc tags. release = version # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. #language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: #today = '' # Else, today_fmt is used as the format for a strftime call. #today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = ['_build', '_templates'] # The reST default role (used for this markup: `text`) to use for all documents. #default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. #add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). #add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. #show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # A list of ignored prefixes for module index sorting. #modindex_common_prefix = [] # AutoDoc autodoc_default_flags = ['members', 'show-inheritance'] autodoc_member_order = 'bysource' autodoc_docstring_signature = True # AutoSummary autosummary_generate = True # -- Options for HTML output --------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. html_theme = 'maas' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. #html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. #html_theme_path = [] html_theme_path = ['_templates'] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". #html_title = None # A shorter title for the navigation bar. Default is the same as html_title. #html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. html_logo = 'media/maas-logo-200.png' # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. html_favicon = 'media/maas.ico' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. #html_use_smartypants = True # Custom sidebar templates, maps document names to template names. #html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. #html_additional_pages = {} # If false, no module index is generated. #html_domain_indices = True # If false, no index is generated. #html_use_index = True # If true, the index is split into individual pages for each letter. #html_split_index = False # If true, links to the reST sources are added to the pages. #html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. #html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). #html_file_suffix = None # Output file base name for HTML help builder. htmlhelp_basename = 'MAASdoc' # -- Options for LaTeX output -------------------------------------------------- # The paper size ('letter' or 'a4'). latex_paper_size = 'a4' # The font size ('10pt', '11pt' or '12pt'). #latex_font_size = '10pt' # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ ('index', 'MAAS.tex', u'MAAS Documentation', u'MAAS Developers', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of # the title page. #latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. #latex_use_parts = False # If true, show page references after internal links. #latex_show_pagerefs = False # If true, show URL addresses after external links. #latex_show_urls = False # Additional stuff for the LaTeX preamble. #latex_preamble = '' # Documents to append as an appendix to all manuals. #latex_appendices = [] # If false, no module index is generated. #latex_domain_indices = True # -- Options for manual page output -------------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ ('man/maas.8', 'maas', u'MAAS API commandline utility', [u'Canonical 2013-2014'], 8), ('man/maas-region.8', 'maas-region', u'MAAS administration tool', [u'Canonical 2013-2014'], 8) ] # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = {'http://docs.python.org/': None} # Gather information about the branch and the build date. try: bzr_last_revision_number = check_output(['bzr', 'revno']) bzr_last_revision_date = check_output(['bzr', 'version-info', '--template={date}', '--custom']) bzr_build_date = check_output(['bzr', 'version-info', '--template={build_date}', '--custom']) except CalledProcessError: # This is not a Bazaar branch. bzr_last_revision_number = 'unknown' bzr_last_revision_date = ( datetime.utcnow().replace(tzinfo=UTC) .strftime('+%Y-%m-%d %H:%M:%S %z')) bzr_build_date = bzr_last_revision_date else: # Output from check_output() is bytes; decode to str. bzr_last_revision_number = bzr_last_revision_number.decode("ascii") bzr_last_revision_date = bzr_last_revision_date.decode("ascii") bzr_build_date = bzr_build_date.decode("ascii") # Populate html_context with the variables used in the templates. html_context = { 'add_version_switcher': 'true' if add_version_switcher else 'false', 'versions_json_path': '/'.join(['', doc_prefix, versions_path]), 'doc_prefix': doc_prefix, 'bzr_last_revision_date': bzr_last_revision_date, 'bzr_last_revision_number': bzr_last_revision_number, 'bzr_build_date': bzr_build_date, } maas-2.0.0~beta3+bzr4941.orig/docs/configure.rst0000644000000000000000000001076412705726641017434 0ustar 00000000000000Additional Configuration ======================== Choosing a series to install ---------------------------- You may have some specific reason to choose a particular version of Ubuntu to install on your nodes, perhaps based around package availability, hardware support or some other reason. It is possible to choose a specific series from those available in a number of ways. From the user interface ^^^^^^^^^^^^^^^^^^^^^^^ The web-based user interface makes it easy to select which Ubuntu series you wish to install on an individual node. When either adding a node manually, or on the node page when the node has been automatically discovered but before it is accepted, there is a drop down menu to select the version of Ubuntu you wish to install. .. image:: media/series.* The menu will always list all the currently available series according to which boot images are available. Using the maas command ^^^^^^^^^^^^^^^^^^^^^^ It is also possible to select a series using the maas command. This can be done on a per node basis with:: $ maas machine update distro_series="" Where the string contains one of the valid, available distro series (e.g. "trusty") or is empty for the default value. .. _preseed: Altering the Preseed file ------------------------- .. warning:: Do not try to alter the preseed files if you don't have a good understanding of what you are doing. Altering the installed version of Ubuntu can prevent MAAS from working as intended, and may have security and stability consequences. When MAAS commissions a node it installs a version of Ubuntu. The installation is performed using a 'preseed' file, which is effectively a list of answers to the questions you would get were you to run the installer manually. The preseed file used by MAAS is carefully made so that the target node can be brought up and do all the jobs expected of it. However, in exceptional circumstances, you may wish to alter the pressed file to work around some issue. There are actually two preseed files, stored here:: /etc/maas/preseeds/curtin_userdata The preseed file is used to customize the installation of a machine based on different options. Users can set early_commands or late_commands according to what they need, or customize it based on nodes, architecture and other variables. The preseeds offers a concept that will allow users to configure it as required. This is based on a node's :: node.system_id node.hostname node.domain node.owner node.bios_boot_method node.osystem node.distro_series node.architecture node.min_hwe_kernel node.hwe_kernel node.zone node.cpu_count node.memory You can configure the preseed to add late_commands. For example, you can configure the preseed to install a package based on the hostname, and after the installation has been completed:: late_commands: {{if node.hostname == 'node01'}} package_install: ["curtin", "in-target", "--", "apt-get", "-y", "install", "mysql"] {{endif}} Installing Additional Rack Controllers -------------------------------------- In an environment comprising large numbers of nodes, it is likely that you will want to organise the nodes on a more distributed basis. The standard install of the MAAS region controller includes a rack controller, but it is possible to add additional rack controllers to the configuration, as shown in the diagram below: .. image:: media/orientation_architecture-diagram.* Each rack controller will need to run on a separate Ubuntu server. Installing and configuring the software is straightforward though:: $ sudo apt-get install maas-rack-controller This meta-package will install all the basic requirements of the system. Configuring the Rack Controller ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Follow the instructions at :doc:`rack-configuration` to configure additional Rack Controllers. Client-side DNS configuration ----------------------------- When using a third party tool such as ``juju`` it will need to be able to resolve the hostnames that the MAAS API returns to it. In order for this to happen, *client-side DNS* must be configured to point to MAAS's DNS server. Generally speaking, this is a simple case of adding the following line to the ``/etc/resolv.conf`` file on your client host:: nameserver replacing the with the actual IP address of the host running the MAAS DNS server. However, for hosts using the ``resolvconf`` package, please read its documentation for more information. maas-2.0.0~beta3+bzr4941.orig/docs/development/0000755000000000000000000000000012705726641017233 5ustar 00000000000000maas-2.0.0~beta3+bzr4941.orig/docs/devices.rst0000644000000000000000000000214212705726641017064 0ustar 00000000000000.. -*- mode: rst -*- .. _devices: Devices ======== .. note:: This feature is available in MAAS versions 1.8 and above. If you're writing a client application, you can check if MAAS supports this feature via the web API; see the documentation for the ``devices-management`` capability :ref:`here`. In addition to nodes, a MAAS cluster controller can manage *devices*. Devices represent non-installable machines. This feature can be used to track routers, virtual machines, etc. within MAAS. Same as nodes, devices can be assigned IP addresses and DNS names. IP addresses can be fixed, in which case the device should be configured to use the defined IP address, or dynamic, in which case the device can obtain an IP address from the MAAS DHCP server and will receive the configured IP address. Devices can also be assigned a parent node and will be automatically deleted (along with all the IP address reservations associated with it) when the parent node is deleted or released. This is designed to model and manage the virtual machines or containers running on a MAAS-deployed node.maas-2.0.0~beta3+bzr4941.orig/docs/dhcpsnippets.rst0000644000000000000000000000741512705726641020156 0ustar 00000000000000.. -*- mode: rst -*- .. _dhcpsnippets: ========================= DHCP Snippets ========================= .. note:: This feature is available in MAAS versions 2.0 and above. Modifications made directly to dhcpd.conf.template or dhcpd6.conf.template are no longer supported. MAAS allows customizing dhcpd.conf and dhcpd6.conf through the use of DHCP snippets. DHCP snippets are user defined dhcpd.conf configuration options which are inserted into /var/lib/maas/dhcpd.conf and /var/lib/maas/dhcpd6.conf by MAAS. Custom dhcpd.conf configuration options can be inserted either globally, on a subnet, or on a node. For information about dhcpd.conf options refer to the dhcpd.conf man or info page. Creating a DHCP Snippet ----------------------- Administrators can create DHCP Snippets over the API using the following command::: $ maas dhcpsnippets create name= value= The name of the DHCP snippet will be added to /var/lib/maas/dhcpd.conf and /var/lib/maas/dhcpd6.conf as a comment above the value. Optionally a description can also be specified as such:: $ maas dhcpsnippets create name= value= description= Global DHCP Snippets ^^^^^^^^^^^^^^^^^^^^ If no subnet or node is specified, the DHCP Snippet will be considered global. A global DHCP Snippet is a configuration option which is applied to all VLANS, subnets, and nodes. The global_snippet flag can also be used to force a DHCP Snippet to be global:: $ maas dhcpsnippets create name= value= global_snippet=true Subnet DHCP Snippets ^^^^^^^^^^^^^^^^^^^^ DHCP Snippets can be applied only to a specific subnet as follows:: $ maas dhcpsnippets create name= value= subnet= Node DHCP Snippets ^^^^^^^^^^^^^^^^^^ DHCP Snippets can be applied only to a specific node. When a node is specified, each snippet will be added to the host entry for each interface. A node can be specified as follows:: $ maas dhcpsnippets create name= value= node= DHCP Snippet Enablement ^^^^^^^^^^^^^^^^^^^^^^^ DHCP Snippets can be turned off by using the enabled flag option as follows:: $ maas dhcpsnippets create name= value= enabled=false Listing DHCP Snippets --------------------- To list all DHCP Snippets use the following command:: $ maas dhcpsnippets read To list a particular DHCP Snippet use the following command.:: $ maas dhcpsnippet read Updating a DHCP Snippet ----------------------- Administrators can update the DHCP Snippet attributes using the following command:: $ maas dhcpsnippet update DHCP Snippet Value History -------------------------- MAAS stores the complete history of changes made to the DHCP Snippet's value. MAAS only uses the latest revision of the value when writing dhcpd.conf. Reverting a Value ^^^^^^^^^^^^^^^^^ .. warning:: Reverting a value will result in all later versions being deleted! The revert operation allows the user to revert to a previous value. When specifying what to revert to the user can either provide the value id or a negative number representing how many revivisions to go back:: $ maas dhcpsnippet revert to= Deleting a DHCP Snippet ----------------------- Administrators can delete a DHCP Snippet using the following command:: $ maas dhcpsnippet delete maas-2.0.0~beta3+bzr4941.orig/docs/enum.rst0000644000000000000000000000034012705726641016404 0ustar 00000000000000========== MAAS Enums ========== .. This only lists the enums that are relevant to outside users, e.g. people writing client applications using MAAS's web API. .. autoclass:: maasserver.enum.NODE_STATUS :members: maas-2.0.0~beta3+bzr4941.orig/docs/getting-help.rst0000644000000000000000000000366212705726641020041 0ustar 00000000000000************ Getting help ************ Where to get help ----------------- The two channels you can use to get help debugging a MAAS issue are: - The `Ask Ubuntu`_ website. - The `Freenode #maas`_ IRC channel. .. _Ask Ubuntu: http://askubuntu.com/questions/ask?tags=maas .. _Freenode #maas: http://webchat.freenode.net/?channels=maas Gathering debugging information ------------------------------- If your question is related to a problem related to a specific MAAS installation, we encourage you to gather debugging information and make it available before you head over to Ask Ubuntu or the IRC channel. This way, you'll have all the required information handy for people who can help you. Gathering debugging information is a fully automated process that is performed with the help of `sosreport`_. If your MAAS server is running Ubuntu version 14.04 (Trusty Tahr) or later, you can get sosreport from the official archives:: # Install sosreport. sudo apt-get install -y sosreport # Create the report. sudo sosreport -o maas Alternatively, if your MAAS server is running a previous Ubuntu release, you'll need to install sosreport manually:: # Install git. sudo apt-get install -y git # Get the latest version of sosreport. git clone https://github.com/sosreport/sosreport.git /tmp/sosreport # Create the report. sudo /tmp/sosreport/sosreport -o maas .. _sosreport: https://github.com/sosreport/sosreport This will create a tarball containing MAAS' log files, MAAS' configuration files and a dump of MAAS' database. By default, the tarball will end up in /tmp but you can change the location, see sosreport's manpage for details. If there are things you do not wish to share publicly, feel free to edit the tarball. Now, the last step is to make this file available by any means at your disposal (openly accessible FTP server, Dropbox, etc.) in order for the people who will help you to be able to get their hands on it. maas-2.0.0~beta3+bzr4941.orig/docs/hacking.rst0000755000000000000000000000000012705726641021060 2../HACKING.txtustar 00000000000000maas-2.0.0~beta3+bzr4941.orig/docs/hardware-enablement-kernels.rst0000644000000000000000000000600612705726641023013 0ustar 00000000000000.. -*- mode: rst -*- .. _hardware-enablement-kernels: ================================= Using hardware-enablement kernels ================================= .. note:: As of MAAS 1.9 this feature is configured by setting the hwe_kernel variable instead of the architecture variable. MAAS allows you to use hardware enablement kernels when booting nodes with Ubuntu that require them. What are hardware-enablement kernels? ------------------------------------- Brand new hardware gets released all the time. We want that hardware to work well with Ubuntu and MAAS, even if it was released after the latest release of MAAS or Ubuntu. Hardware Enablement (HWE) is all about keeping pace with the new hardware. Ubuntu's solution to this is to offer newer kernels for older releases. There are at least two kernels on offer for Ubuntu releases: the "generic" kernel -- i.e. the kernel released with the current series -- and the Hardware Enablement kernel, which is the most recent kernel release. There are separate HWE kernels for each release of Ubuntu, referred to as ``hwe-``. So, the 14.04 / Trusty Tahr HWE kernel is called ``hwe-t``, the 12.10 / Quantal Quetzal HWE kernel is called ``hwe-q`` and so on. This allows you to use newer kernels with older releases, for example running Precise with a Saucy (hwe-s) kernel. For more information see the `LTS Enablement Stack`_ page on the Ubuntu wiki. .. _LTS Enablement Stack: https://wiki.ubuntu.com/Kernel/LTSEnablementStack Booting hardware-enablement kernels ----------------------------------- MAAS imports hardware-enablement kernels along with its generic boot images. These hardware-enablement kernels are specified by using min_hwe_kernel or hwe_kernel variables. The min_hwe_kernel variable is used to instruct MAAS to ensure the release to be deployed uses a kernel version at or above the value of min_hwe_kernel. For example if min_hwe_kernel is set to hwe-t when deploying any release before Trusty the hwe-t kernel will be used. For any release after Trusty the default kernel for that release will be used. If hwe-t or newer is not availible for the specified release MAAS will not allow that release to be deployed and throw an error. min_hwe_kernel can be set by running the command:: $ maas node update min_hwe_kernel=hwe- It's also possible to set the min_hwe_kernel from the MAAS web UI, by visiting the Node's page and clicking ``Edit node``. Under the Minimum Kernel field, you will be able to select any HWE kernels that have been imported onto that node's cluster controller. .. image:: media/min_hwe_kernel.png You can also set the hwe_kernel during deployment. MAAS checks that the specified kernel is avalible for the release specified before deploying the node. You can set the hwe_kernel when deploying by using the command:: $ maas node start distro_series= hwe_kernel=hwe- Or through the web interface as seen below. .. image:: media/hwe_kernel.png maas-2.0.0~beta3+bzr4941.orig/docs/index.rst0000644000000000000000000000562112705726641016556 0ustar 00000000000000.. MAAS documentation master file ######################## MAAS: Metal As A Service ######################## This is the documentation for the `MAAS project`_. Metal as a Service -- MAAS -- lets you treat physical servers like virtual machines in the cloud. Rather than having to manage each server individually, MAAS turns your bare metal into an elastic cloud-like resource. What does that mean in practice? Tell MAAS about the machines you want it to manage and it will boot them, check the hardware's okay, and have them waiting for when you need them. You can then pull nodes up, tear them down and redeploy them at will; just as you can with virtual machines in the cloud. When you're ready to deploy a service, MAAS gives `Juju`_ the nodes it needs to power that service. It's as simple as that: no need to manually provision, check and, afterwards, clean-up. As your needs change, you can easily scale services up or down. Need more power for your Hadoop cluster for a few hours? Simply tear down one of your Nova compute nodes and redeploy it to Hadoop. When you're done, it's just as easy to give the node back to Nova. .. _MAAS project: http://maas.io/ .. _Juju: https://juju.ubuntu.com/ MAAS is ideal where you want the flexibility of the cloud, and the hassle-free power of Juju charms, but you need to deploy to bare metal. ************ Introduction ************ .. toctree:: :maxdepth: 2 about orientation releases changelog ************************ Setting up a MAAS server ************************ .. toctree:: :maxdepth: 2 install configure rack-configuration static-ips ipv6 bootsources nodes hardware-enablement-kernels sstreams-mirror networks kernel-options installing-ubuntu os-support storage networking proxy devices dhcpsnippets ****************** Deploying services ****************** .. toctree:: :maxdepth: 2 juju-quick-start tags physical-zones *********************** API / CLI Documentation *********************** .. toctree:: :maxdepth: 2 api api_authentication maascli version *************** Troubleshooting *************** .. toctree:: :maxdepth: 2 getting-help troubleshooting ****************** Command-line Tools ****************** .. toctree:: :maxdepth: 1 man/maas-region.8 man/maas.8 *************** Developing MAAS *************** .. toctree:: :maxdepth: 2 development/philosophy hacking models enum development/security development/building-packages development/cluster-registration development/cluster-bootstrap development/tagging development/lease-scanning-and-dns development/preseeds development/metadata development/rpc development/transactions development/notes/index ****************** Indices and tables ****************** .. toctree:: :maxdepth: 2 * :ref:`genindex` * :ref:`modindex` * :ref:`search` maas-2.0.0~beta3+bzr4941.orig/docs/install.rst0000755000000000000000000000000012705726641021164 2../INSTALL.txtustar 00000000000000maas-2.0.0~beta3+bzr4941.orig/docs/installing-ubuntu.rst0000644000000000000000000000333212705726641021130 0ustar 00000000000000===================================== Installing Ubuntu and deploying nodes ===================================== Once a node has been accepted into MAAS and is ready for use, users can deploy services to that node. Prior to deployment, MAAS is responsible for: 1. Powering up the node. 2. Installing Ubuntu on the node. 3. Installing the user's SSH keys on the node. Once these steps have been completed, the node is ready to have services deployed to it, either manually or by using a tool like Juju_. There are two ways to install Ubuntu on a node: 1. :ref:`The Curtin installer `. 2. :ref:`The Debian installer (Deprecated) `. .. _Juju: http://juju.ubuntu.com .. _curtin-installer: The Curtin Installer -------------------- The Curtin Installer is, as the name suggests, installs Ubuntu on a node more quickly than would be possible using the :ref:`Debian installer `. The Curtin installer is enabled by default and is the only one supported. The Curtin installer copies a pre-built Ubuntu image to the node, with all the packages installed that would be normally found in an Ubuntu installation. The Curtin installer is the fastest OS installer yet. For more information about the Curtin installer, see the `curtin project`_ on Launchpad. .. _curtin project: https://launchpad.net/curtin .. _debian-installer: The Debian Installer (Deprecated) --------------------------------- The Debian Installer installs Ubuntu on a node in exactly the same way as you would install it manually. .. note:: Starting from MAAS 1.8, the Debian Installer has been deprecated and it is no longer supported. While it is still available in MAAS, it is not recommended and is not supported. maas-2.0.0~beta3+bzr4941.orig/docs/ipv6.rst0000644000000000000000000001471612705726641016340 0ustar 00000000000000.. -*- mode: rst -*- .. _ipv6: Managing IPv6 Networks ====================== .. note:: This feature is available in MAAS versions 1.7 and above, starting with lp:maas revision 2992. If you're writing a client application that makes use of this feature, you can query the region-server API for the ``ipv6-deployment-ubuntu`` :ref:`capability`. MAAS has limited IPv6 support for networking nodes. It works much like IPv4 support, but with a number of limitations: * Nodes still boot, register, and install using the IPv4 network. * IPv6 addresses are only configured when using the default Ubuntu installer. * Most BMCs can only be controlled (e.g. to power nodes on/off) using IPv4. * MAAS still uses IPv4 for its internal operation, installing nodes, etc. * For now, MAAS only supports IPv6 on networks where it also manages IPv4 DHCP. * A network interface on a node can only be on one IPv6 subnet. * A network interface on a cluster controller can manage only one IPv6 subnet. The web user interface and REST API can be accessed in the same way on both IPv4 and IPv6. To use an IPv6 address as the hostname in a URL, in your browser or elsewhere, surround it with square brackets. For example, on the local machine (``::1``, the IPv6 equivalent of ``localhost``) you might request:: http://[::1]/MAAS/ If your MAAS server has a DNS hostname that resolves to both IPv4 and IPv6 addresses, your browser may already be accessing the UI through IPv6 without you noticing. Enabling IPv6 ------------- You enable IPv6 networking in the same way that you enable IPv4 networking: configure a separate cluster interface for your IPv6 subnet, in addition to the one you need for your IPv4 subnet. The IPv6 cluster interface must define a static address range. Provided that you already have a functioning IPv6 network, that's all there is to it. The following sections will go into more detail about what is supported, what is needed, and what to do if you don't yet have a functioning IPv6 network. An IPv6 cluster interface can use the same network interface on the cluster controller as an existing IPv4 network interface. It just defines a different subnet, with IPv6 addressing. A node that's connected to the IPv4 subnet will also be connected to the IPv6 subnet on the same network segment. Configuring your IPv6 subnet ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ When you configure your IPv6 cluster interface, be sure to define a static IP address range. Deployed nodes on the subnet will get static addresses in this range. IPv6 networks are normally 64 bits wide, so you can be generous with the ranges' sizes. It also means that you can leave the netmask field blank. (There are no broadcast addresses in IPv6, so leave the broadcast address field blank as well.) You may want MAAS to manage DHCP and DNS, but it's not required. In fact nodes do not need a DHCP server at all for IPv6; MAAS configures static IPv6 addresses on the node's network interfaces while deploying it. A DHCPv6 server can provide addresses for containers or virtual machines running on the nodes, as well as devices on the network that are not managed by MAAS, but it is not needed for the nodes themselves. MAAS will not be aware of any addresses issued by DHCP, and does not guarantee that they will stay unchanged. .. _ipv6-routing: Routing ^^^^^^^ In IPv6, clients do not discover routes through DHCP. Routers make themselves known on their networks by sending out *route advertisements*. These *RAs* contain other configuration as well: whether clients should statelessly configure their own unique IP addresses based on their MAC addresses; whether they should request stateless configuration from a DHCP server; and finally, whether they should request a stateful IP address from a DHCP server. Since a network interface can have any number of IPv6 addresses even on a single subnet, several of these address assignment mechanisms can be combined. However, when MAAS configures IPv6 networking on a node, it does not rely on RAs. it statically configures your nodes' default IPv6 route to use the router that is configured on the cluster interface, so that the nodes will know their default gateway. They do not need DHCP and will not autoconfigure global addresses. However, if you are planning to operate DHCPv6 clients as well, e.g. on machines not managed by MAAS or on virtual machines hosted by MAAS nodes, you may still want to have RAs configured to make those clients obtain configuration over DHCP. If you need RAs but your gateway does not send them, install and configure ``radvd`` somewhere on the network to advertise its route. Other installers and operating systems ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Static IPv6 addresses are currently only configured on Ubuntu, when installed using the "fast" installer. Other operating systems, or Ubuntu with the classic Debian installer, will not have their IPv6 addresses configured. The same applies when a user manually installs an operating system on a node, or overwrites its networking configuration: the node will no longer have its static IPv6 address configured, even if MAAS has allocated it to the node. However, as long as the address remains allocated to the node, you may still configure its operating system to use that address. The node can then use that address as if it had been configured by MAAS. Disabling IPv4 -------------- For advanced users, there is an experimental capability to deploy nodes with pure IPv6, with IPv4 networking disabled. To enable this on a node, check the "Disable IPv4 when deployed" box on the node's Edit page. The process of managing and deploying the node will still largely work through IPv4, but once deployed, the node will have IPv6 networking only. In practice nodes may not be functional without IPv4 networking. A few things are known to be needed in any case: Configuring the MAAS URL ^^^^^^^^^^^^^^^^^^^^^^^^ The *maas-cluster-controller* package has a configuration item for the URL where nodes and cluster controllers can reach the MAAS region API. By default, this URL is set based on the region controller's IPv4 address. To make it work for nodes that won't have IP4, you must set the MAAS URL to use a hostname instead of an IP address. The hostname must resolve to both IPv4 and IPv6 addresses, and both on the cluster controller and on the nodes. To change this setting, run:: dpkg-reconfigure maas-cluster-controller It will prompt you for the URL, with its current setting as the initial value. maas-2.0.0~beta3+bzr4941.orig/docs/juju-quick-start.rst0000644000000000000000000001031312705726641020663 0ustar 00000000000000Juju Quick Start ================ These instructions will help you deploy your first charm with Juju to a MAAS cluster. In the following, we assume that you have a MAAS cluster set-up with at least 2 nodes enlisted with it. Your API key, SSH key, and environments.yaml -------------------------------------------- You'll need an API key from MAAS so that the Juju client can access it. Each user account in MAAS can have as many API keys as desired. One hard and fast rule is that you'll need to use a different API key for each Juju *environment* you set up within a single MAAS cluster. There is no need to explicitly add an SSH key to MAAS when using Juju; it will automatically put your public key on any hosts that it starts up. **Note**: You do not need to use the MAAS web UI or API to allocate a node to yourself, Juju will do this for you. Getting a key ^^^^^^^^^^^^^ To get the API key: #. Go to your MAAS preferences page (go to your MAAS home page ``http://${my-maas-server}:80/MAAS/`` and choose *Preferences* from the drop-down menu that appears when clicking your username at the top-right of the page). #. Optionally add a new MAAS key. Do this if you're setting up another environment within the same MAAS cluster. The ``${my-maas-server}`` slot should be replaced with the hostname of your MAAS server. Adding an SSH key ^^^^^^^^^^^^^^^^^ While you're still on the MAAS preferences page, add your SSH key by clicking *Add SSH key*. Use the public half of your SSH key, the content of ``~/.ssh/id_rsa.pub`` for example; don't paste the private half. Creating environments.yaml ^^^^^^^^^^^^^^^^^^^^^^^^^^ Create or modify ``~/.juju/environments.yaml`` with the following content:: environments: maas: type: maas maas-server: 'http://${my-maas-server}:80/MAAS' maas-oauth: '${maas-api-key}' admin-secret: ${your-admin-secret} default-series: precise Substitute the API key from earlier into the ``${maas-api-key}`` slot, and the hostname of your MAAS server into the ``${my-maas-server}`` slot. The ``${your-admin-secret}`` slot should be replaced with a random pass-phrase, there is no default. Now Juju -------- If juju-core is not yet installed on the client machine, run:: $ sudo apt-get install juju-core Now, use juju to display the status of the default environment:: $ juju status As you've not bootstrapped you ought to see:: error: Unable to connect to environment "". Please check your credentials or use 'juju bootstrap' to create a new environment. **Note**: if Juju complains that there are multiple environments and no explicit default, add ``-e ${environment-name}`` after each command, e.g.:: $ juju status -e maas Bootstrap:: $ juju sync-tools $ juju bootstrap If bootstrapping on a version of juju older than 1.14.0 then use:: $ juju bootstrap --upload-tools This will return quickly, but the master node may take a *long* time to come up. It has to completely install Ubuntu and Juju on it and reboot before it'll be available for use. It's probably worth either trying a ``juju status`` once in a while to check on progress, or following the install on the node directly. **Beware** of `bug 413415`_ - *console-setup hangs under chroot debootstrap with a console login on ttyX* - when monitoring an installation on the node. .. _bug 413415: https://bugs.launchpad.net/ubuntu/+source/console-setup/+bug/413415 Once the boostrap node has been installed a status command should come up with something a bit more interesting:: environment: maas machines: "0": agent-state: started agent-version: 1.13.3.1 dns-name: kmhwd.master instance-id: /MAAS/api/2.0/nodes/node-5c5b713a-1afc-11e3-9904-525400123456/ series: precise services: {} Now it's possible to deploy a charm:: $ juju deploy mysql $ juju status If you have another node free you can finish off the canonical and by now familiar example:: $ juju deploy wordpress $ juju add-relation wordpress mysql $ juju expose wordpress $ juju status Note that each charm runs on its own host, so each deployment will actually take as long as it took to bootstrap. Have a beer, drown your sorrows in liquor, or, my preference, have another cup of tea. maas-2.0.0~beta3+bzr4941.orig/docs/kernel-options.rst0000644000000000000000000000230412705726641020413 0ustar 00000000000000=========================== Setting kernel boot options =========================== MAAS is able to send specific kernel options to booting nodes on both a global basis and a per-node basis. Global kernel options --------------------- As an admin, click on the gear icon at the top right and scroll down to the Global Kernel Parameters section, as shown here: .. image:: media/global_kernel_opts.png Whatever you set here is sent as-is to all booting nodes. Per-node kernel options ----------------------- Per-node kernel options are set using tags. The easiest way of doing this is to use the ``maas`` command. You will need to :ref:`be logged in to the API first ` and then you can add a tag which has its ``kernel_opts`` value set, like this:: $ maas maas tags new name='nomodeset' \ comment='nomodeset kernel option' kernel_opts='nomodeset vga' Once the tag is defined, you can add it to a node or nodes:: $ maas maas tag update-nodes nomodeset add= \ add= .. note:: Any per-node kernel options set will completely override the global options. If multiple tags attached to a node have the kernel_opts defined, the first one ordered by name is used. maas-2.0.0~beta3+bzr4941.orig/docs/maascli.rst0000644000000000000000000004154312705726641017063 0ustar 00000000000000.. _cli: ---------------------- Command Line Interface ---------------------- As well as the web interface, many tasks can be performed by accessing the MAAS API directly through the `maas` command. This section details how to log in with this tool and perform some common operations. .. _api-key: Logging in ---------- Before the API will accept any commands from maas, you must first log in. To do this, you need an API key for your MAAS account. A key was generated for you as soon as your account was created, although you can still generate additional keys if you prefer. The key can be found in the web user interface, or if you have root privileges on the region controller, retrieved from the command line. To obtain the key from the web user interface, log in and click on your user name in the top right corner of the page, and select 'Preferences' from the menu which appears. .. image:: media/maascli-prefs.* A new page will load... .. image:: media/maascli-key.* Your MAAS API keys appear at the top of the preferences form. It's easiest to just select and copy the key (it's quite long!) and then paste it into the command line. To obtain the key through the command line, run this command on the region controller (it requires root access):: $ sudo maas-region apikey --username=my-username (Substitute your MAAS user name for my-username). Once you have your API key, log in with:: $ maas login This command logs you in, and creates a "profile" with the profile name you have selected. The profile is an easy way of storing the server URL and your login credentials, and re-using them across command-line invocations. Think of the profile as a persistent session. You can have multiple profiles open at the same time, and so as part of the login command, you assign a unique name to the new profile. Later invocations of the maas command line will refer to the profile by this name. For example, you might log in with a command line like:: $ maas login my-maas http://10.98.0.13/MAAS/api/2.0 AWSCRMzqMNy:jjk...5e1FenoP82Qm5te2 This creates the profile 'my-maas' and registers it with the given key at the specified API endpoint URL. If you omit the API key, the command will prompt you for it in the console. It is also possible to use a hyphen, '-' in place of the API key. In this case the command will read the API key from standard input, as a single line, ignoring whitespace. This mode of input can be useful if you want to read the API key from a file, or if you wish to avoid including the API key in a command line where it may be observed by other users on the system. Specifying an empty string instead of an API key will make the profile act as an anonymous user. Some calls in the API are accessible without logging in, but most of them are not. maas commands ------------- The ``maas`` command exposes the whole API, so you can do anything you actually *can* do with MAAS using this command. Unsurprisingly, this leaves us with a vast number of options, but before we delve into detail on the specifics, here is a sort of 'cheat-sheet' for common tasks you might want to do using ``maas``. * :ref:`Configure DHCP and DNS services ` * :ref:`Commission all enlisted nodes ` * :ref:`Setting IPMI power parameters for a node ` The main maas commands are: .. program:: maas :samp:`list` lists the details [name url auth-key] of all the currently logged-in profiles. :samp:`login ` Logs in to the MAAS controller API at the given URL, using the key provided and associates this connection with the given profile name. :samp:`logout ` Logs out from the given profile, flushing the stored credentials. :samp:`refresh` Refreshes the API descriptions of all the current logged in profiles. This may become necessary for example when upgrading the maas packages to ensure the command-line options match with the API. :samp:` [command] [options] ...` Using the given profile name instructs ``maas`` to direct the subsequent commands and options to the relevant MAAS, which for the current API are detailed below... account ^^^^^^^ This command is used for creating and destroying the MAAS authorisation tokens associated with a profile. Usage: maas ** account [-d --debug] [-h --help] create-authorisation-token | delete-authorisation-token [token_key=\ **] .. program:: maas account :samp:`-d, --debug` Displays debug information listing the API responses. :samp:`-h, --help` Display usage information. :samp:`-k, --insecure` Disables the SSL certificate check. :samp:`create-authorisation-token` Creates a new MAAS authorisation token for the current profile which can be used to authenticate connections to the API. :samp:`delete-authorisation-token token_key=` Removes the given key from the list of authorisation tokens. .. boot-images - not useful in user context .. ^^^^^^^^^^^ .. files - not useful in user context .. ^^^^^ node ^^^^ API calls which operate on individual nodes. With these commands, the node is always identified by its "system_id" property - a unique tag allocated at the time of enlistment. To discover the value of the system_id, you can use the ``maas nodes list`` command. USAGE: maas node [-h] release | start | stop | delete | read | update .. program:: maas node :samp:`-h, --help` Display usage information. :samp:`release ` Releases the node given by ** :samp:`start ` Powers up the node identified by ** (where MAAS has information for power management for this node). :samp:`stop ` Powers off the node identified by ** (where MAAS has information for power management for this node). :samp:`delete ` Removes the given node from the MAAS database. :samp:`read ` Returns all the current known information about the node specified by ** :samp:`update [parameters...]` Used to change or set specific values for the node. The valid parameters are listed below:: hostname= The new hostname for this node. architecture= Sets the architecture type, where is a string containing a valid architecture type, e.g. "i386/generic" distro_series= Sets the distro series of Ubuntu to use (e.g. "precise"). power_type= Set the given power type on the node. (e.g. "ipmi") power_parameters_{param1}... = Set the given power parameters. Note that the valid options for these depend on the power type chosen. power_parameters_skip_check 'true' | 'false' Whether to sanity check the supplied parameters against this node's declared power type. The default is 'false'. .. _cli-power: Example: Setting the power parameters for an ipmi enabled node:: maas maas node update \ power_type="ipmi" \ power_parameters_power_address=192.168.22.33 \ power_parameters_power_user=root \ power_parameters_power_pass=ubuntu; nodes ^^^^^ Usage: maas nodes [-h] is-registered | list-allocated | acquire | list | accept | accept-all | new .. program:: maas nodes :samp:`-h, --help` Display usage information. :samp:`accept ` Accepts the node referenced by . :samp:`accept-all` Accepts all currently discovered but not previously accepted nodes. :samp:`acquire` Allocates a node to the profile used to issue the command. Any ready node may be allocated. :samp:`is-registered mac_address=
` Checks to see whether the specified MAC address is registered to a node. :samp:`list` Returns a JSON formatted object listing all the currently known nodes, their system_id, status and other details. :samp:`list-allocated` Returns a JSON formatted object listing all the currently allocated nodes, their system_id, status and other details. :samp:`new architecture= mac_addresses= [parameters]` Creates a new node entry given the provided key=value information for the node. A minimum of the MAC address and architecture must be provided. Other parameters may also be supplied:: architecture="" - The architecture of the node, must be one of the recognised architecture strings (e.g. "i386/generic") hostname="" - a name for this node. If not supplied a name will be generated. mac_addresses="" - The mac address(es) allocated to this node. power_type="" - the power type of the node (e.g. virsh, ipmi) .. _cli-commission: Examples: Accept and commission all discovered nodes:: $ maas maas nodes accept-all List all known nodes:: $ maas maas nodes list Filter the list using specific key/value pairs:: $ maas maas nodes list architecture="i386/generic" node-groups ^^^^^^^^^^^ Usage: maas node-groups [-d --debug] [-h --help] [-k --insecure] register | list | accept | reject .. program:: maas node-groups :samp:`-d, --debug` Displays debug information listing the API responses. :samp:`-h, --help` Display usage information. :samp:`-k, --insecure` Disables the SSL certificate check. :samp:`register uuid= name= interfaces=` Registers a new node group with the given name and uuid. The interfaces parameter must be supplied in the form of a JSON string comprising the key/value data for the interface to be used, for example: interface='["ip":"192.168.21.5","interface":"eth1", \ "subnet_mask":"255.255.255.0","broadcast_ip":"192.168.21.255", \ "router_ip":"192.168.21.1", "ip_range_low":"192.168.21.10", \ "ip_range_high":"192.168.21.50"}]' :samp:`list` Returns a JSON list of all currently defined node groups. :samp:`accept ` Accepts a node-group or number of nodegroups indicated by the supplied UUID :samp:`reject ` Rejects a node-group or number of nodegroups indicated by the supplied UUID node-group-interface ^^^^^^^^^^^^^^^^^^^^ For managing the interfaces. See also :ref:`node-group-interfaces` Usage: maas ** node-group-interfaces [-d --debug] [-h --help] [-k --insecure] read | update | delete [parameters...] ..program:: maas node-group-interface :samp:`read ` Returns the current settings for the given UUID and interface :samp:`update [parameters]` Changes the settings for the interface according to the given parameters:: management= 0 | 1 | 2 The service to be managed on the interface ( 0= none, 1=DHCP, 2=DHCP and DNS). subnet_mask= Apply the given dotted decimal value as the subnet mask. broadcast_ip= Apply the given dotted decimal value as the broadcast IP address for this subnet. router_ip= Apply the given dotted decimal value as the default router address for this subnet. ip_range_low= The lowest value of IP address to allocate via DHCP ip_range_high= The highest value of IP address to allocate via DHCP :samp:`delete ` Removes the entry for the given UUID and interface. .. _cli-dhcp: Example: Configuring DHCP and DNS. To enable MAAS to manage DHCP and DNS, it needs to be supplied with the relevant interface information. To do this we need to first determine the UUID of the node group affected:: $ uuid=$(maas node-groups list | grep uuid | cut -d\" -f4) Once we have the UUID we can use this to update the node-group-interface for that nodegroup, and pass it the relevant interface details:: $ maas node-group-interface update $uuid eth0 \ ip_range_high=192.168.123.200 \ ip_range_low=192.168.123.100 \ management=2 \ broadcast_ip=192.168.123.255 \ router_ip=192.168.123.1 \ Replacing the example values with those required for this network. The only non-obvious parameter is 'management' which takes the values 0 (no management), 1 (manage DHCP) and 2 (manage DHCP and DNS). .. _node-group-interfaces: node-group-interfaces ^^^^^^^^^^^^^^^^^^^^^ The node-group-interfaces commands are used for configuring the management of DHCP and DNS services where these are managed by MAAS. Usage: maas ** node-group-interfaces [-d --debug] [-h --help] [-k --insecure] list | new [parameters...] .. program:: maas node-group-interfaces :samp:`-d, --debug` Displays debug information listing the API responses. :samp:`-h, --help` Display usage information. :samp:`-k, --insecure` Disables the SSL certificate check. :samp:`list