Release Notes for LDS 12.06b3

Highlights:

  • MAAS
  • precise and lucid supported
  • postgresql 9.1 support, also still support postgresql 8.4
  • several api changes
  • auto-upgrade profiles
  • preliminary RBAC support
  • dynamically updated list of LDS releases in the account page
  • packages can now be removed from a "pull" or "upload" pocket
  • packages can be held and unheld via the UI (click on the package icon in the detail row)
  • package profiles can be created based on an existing computer

Read on for details.

Upgrading

Upgrade from the previous Beta (beta2) is supported.

Quickstart upgrade

For the quickstart upgrade, please use apt-get dist-upgrade instead of apt-get install landscape-server-quickstart. Also, when prompted about configuration file changes, answer so that the file is NOT replaced. Quickstart scripts will kick in later during the installation and upgrade these config files automatically if needed.

Non-quickstart upgrade

The non-quickstart upgrade has some manual steps that need to be performed. Please chose a section below depending on which version of LDS you are upgrading from.

Non-quickstart upgrade from previous stable (11.07.20120130)

  • stop all landscape services on all machines
  • add the following line to the [maintenance] section of /etc/landscape/service.conf:

diskstore = /var/lib/landscape/landscape-disk-store
  • add this new section to /etc/landscape/service.conf:

[package-upload]
stores = main account-1
threads = 10
port = 9100
root-url = http://localhost:9100
mailer = queue
mailer-path = /var/lib/landscape/landscape-mail-queue-1
  • add a new [load-shaper] section to /etc/landscape/service.conf:

[load-shaper]
critical-load = 10.0
good-load = 3.0
good-duration = 60
  • remove the existing [statsd] section and its contents entirely from /etc/landscape/service.conf

  • add these lines to the existing [landscape] section of /etc/landscape/service.conf:

reprepro-binary = /opt/canonical/landscape/scripts/reprepro-wrapper.sh
repository-path = /var/lib/landscape/landscape-repository
  • In the apache config file for LDS, in the https (port 443) vhost section, remove the final /message-system part from the existing rewrite rule. This:

    RewriteRule ^/message-system http://localhost:8090/++vh++https:${hostname}:443/++/message-system [P,L]

Should become this:

    RewriteRule ^/message-system http://localhost:8090/++vh++https:${hostname}:443/++/ [P,L]
  • Also in the https (port 443) vhost section, add a new rewrite rule for script attachments and package upload, just below the existing /api rule, so that it looks like this:

(...)
    RewriteRule ^/api http://localhost:9080/ [P,L]
    RewriteRule ^/attachment/(.*) http://localhost:8090/attachment/$1 [P,L]
    RewriteRule ^/upload/(.*) http://localhost:9100/$1 [P,L]
(...)
  • update the sources.list line to point to the new beta

  • upgrade using apt-get dist-upgrade. As usual, reply with "N" when asked about overwriting any Landscape configuration file.

  • restart apache so it gets the new landscape group membership:

sudo /etc/init.d/apache2 restart
  • manually upgrade the clouddeck schema:

sudo /etc/init.d/clouddeck stop
sudo clouddeck-schema /etc/clouddeck/stores.cfg
sudo /etc/init.d/clouddeck start
  • if automatic schema upgrades are disabled (see /etc/default/landscape-server), then you will also need to manually upgrade the Landscape schema:

sudo setup-landscape-server

Non-quickstart upgrade from previous beta (12.04~b2-0ubuntu1)

  • stop all landscape services on all machines
  • add the following line to the [maintenance] section of /etc/landscape/service.conf:

diskstore = /var/lib/landscape/landscape-disk-store
  • update the sources.list line to point to the new beta

  • upgrade using apt-get dist-upgrade. As usual, reply with "N" when asked about overwriting any Landscape configuration file.

  • restart apache so it gets the new landscape group membership:

sudo /etc/init.d/apache2 restart
  • manually upgrade the clouddeck schema:

sudo /etc/init.d/clouddeck stop
sudo clouddeck-schema /etc/clouddeck/stores.cfg
sudo /etc/init.d/clouddeck start
  • if automatic schema upgrades are disabled (see /etc/default/landscape-server), then you will also need to manually upgrade the Landscape schema:

sudo setup-landscape-server

Fresh deployment

MAAS

This release of LDS supports Canonical's MAAS (Machine as a Service), see https://wiki.ubuntu.com/ServerTeam/MAAS/ for details.

To configure a new Provisioning Server in Landscape, you will need:

  • MAAS api credentials. Get them by going to your user preferences in the MAAS web interface
  • API URL: it will be of the form https://<server>/MAAS/

Once that is done and you have a working MAAS installation, Landscape can be used to provision new machines that will become automatically registered in Landscape.

Auto upgrade profiles

You can create auto upgrade profiles which, when applied to computers via tags, can keep them up-to-date with all upgrades or just security upgrades. You can also select when you want to apply updates: if hourly or at specific times and days of the week.

Python API client

Several API changes.

from landscape_api.base.errors import UnknownDistributionError
  • import_gpg_key now takes key material as the second argument instead of a filename. To use a filename, use the new method import_gpg_key_from_file

  • some methods which take lists as arguments used to accept strings instead. That's no longer the case: if an argument is supposed to be a list, it has to be a list.

API and Repository Profiles tutorials

Please see the Beta 1 Release Notes for how to get started with the API. The Python API example has been changed a bit to cope with changes since that release and a new version is below:

   1 #!/usr/bin/python
   2 import os, json, sys
   3 from landscape_api.base import API
   4 from landscape_api.base.errors import InvalidQueryError
   5 
   6 uri = os.getenv("LANDSCAPE_API_URI")
   7 key = os.getenv("LANDSCAPE_API_KEY")
   8 secret = os.getenv("LANDSCAPE_API_SECRET")
   9 ca = os.getenv("LANDSCAPE_API_SSL_CA_FILE", None)
  10 
  11 if not uri or not key or not secret:
  12     print "Please set all of LANDSCAPE_API_URI, LANDSCAPE_API_KEY and LANDSCAPE_API_SECRET"
  13     sys.exit(1)
  14 
  15 api = API(uri, key, secret, ca)
  16 tag = "maas-server"
  17 try:
  18     # it will throw an exception if the tag doesn't exist
  19     computers = api.get_computers(query="tag:%s" % tag)
  20 except InvalidQueryError as e:
  21     print "Tag %s doesn't exist" % tag
  22     sys.exit(1)
  23 
  24 for computer in computers:
  25     print "Id:", computer["id"]
  26     print "Title:", computer["title"]
  27     print "Hostname:", computer["hostname"]
  28     print "Last ping:", computer["last_ping_time"]
  29     print "Memory:", computer["total_memory"]
  30     if computer["reboot_required_flag"]:
  31         print "Needs to reboot!"
  32     print

API documentation

Please see the documentation link at the bottom of the LDS pages in your installation.

Known issues

Here are some of the known issues and shortcomings of this release.

No Ubuntu releases

Two cron jobs need to run in order for Landscape to know the available Ubuntu releases. This affects the release upgrade code, and the start new cloud instance code.

If your deployment isn't listing the Ubuntu releases, then you can either wait for the cron jobs to kick in, or run them manually as follows:

sudo -u landscape dash /opt/canonical/landscape/scripts/maintenance.sh
sudo -u landscape dash /opt/canonical/landscape/scripts/meta_releases.sh
  • /!\ If you have several thousand computers registered with Landscape, the maintenance job can take a long time to complete.

Provisioning activities with confusing summary

The provisioning activities will still say "Waiting" even after they are finished. You have to view the details to check the correct status, not the title.

Upgrade with dist-upgrade

When upgrading from beta2, please use apt-get dist-upgrade instead of just apt-get install landscape-server or apt-get install landscape-server-quickstart as some dependencies still need to be adjusted in the packages.

No verification for provisioning server credentials or URI

When adding a new provisioning server, there is no verification of the data that is entered in the form. If the wrong credentials are used, or if the wrong URL was entered, this will only be discovered when actually provisioning a new machine later on.

LDS/BetaReleaseNotes12.06b3 (last edited 2012-07-13 19:34:15 by ahasenack)