Landscape
Canonical's Landscape tool maintains Ubuntu environments
Monitoring and maintenance are important topics for anyone who needs to manage multiple machines. For Ubuntu environments, Canonical offers Landscape (Figure 1) as a useful service.
Landscape [1] manages any number of clients – provided that you have enough licenses. The client always makes the first move: It logs in to the server and proactively supplies information. The server processes whatever it gets and queues the administrator's commands for the clients to pick up.
Joining In
To add an Ubuntu machine to your own Landscape account, you first need to install the landscape-client
package. Among other things, it contains the landscape-config
command-line program, which is used to set up Landscape. Simply input the computer name and your Landscape account information.
The landscape configuration tool also asks whether you want to let Landscape run arbitrary shell scripts (Enable script execution? ). This is optionally followed by the details of the user account whose permissions the programs can use when they run; by default, these are nobody and landscape . Administrators can use scripts to perform remote queries via Landscape.
To complete the configuration, the client sends a registration request to the specified Landscape account. In the web interface, you just click to approve. Following this, the new client locally collects all the relevant system information, such as the hardware configuration and the installed packages and sends it to Landscape. A little patience is required here, however, because it can take up to an hour and a half for all the information to upload.
Core Functions
From now on, the Landscape clients regularly tell the server about their health state. The web interface provides the admin – or, optionally, several admins in various roles with different permissions – this information in different forms.
The reports summarize the states of the monitored computers (Figure 2). They visualize the overall condition of all or individual monitored computers; the underlying data is also available for download. If so desired, computers can be organized into groups using tags so that all monitoring functions can be applied to arbitrary subsets. In the same way, the admin can create group-specific profiles so that the servers receive, or do not receive, different packages and updates.
Package management is one of the main benefits of the Landscape service. New installs and uninstalls are done for whole groups at the push of a button, as are updates. Updates, in turn, can be selected individually; Landscape displays and installs security updates separately. If so desired, the selection can also be made at the individual package level (Figure 3). Landscape also supports upgrades to new versions of Ubuntu. However, it does not have an option for manually configuring the package sources.
The monitoring function provides an overview of the workload on the Landscape clients; again, they can be grouped if necessary. By default, Landscape plots graphs for the average RAM usage, disk space usage, and network load (Figure 4). You can create your own shell scripts to add arbitrary evaluations to this directory, provided you have allowed script execution in the client configuration.
The main requirement for your own script is that it outputs a number when run; Landscape then collects and visualizes the number. Negative and decimal numbers are allowed, but the number must be written to standard output. Landscape notices the script's exit code: If it is not zero, it returns an error. The same goes for short programs with an excessively long running time: After 10 seconds, Landscape suspends execution, again outputting an error message. Furthermore, Landscape outputs information about the processes running on the clients and existing user accounts and keeps track of completed activities.
With all of these basic functions, Canonical's Landscape lets admins perform most of their everyday maintenance regardless of location. All you need is Internet access. Admins who hoped for – or feared – the option of completing their first tasks on their way to work are in for a disappointment, however; the Landscape web interface does not offer a smartphone-optimized screen layout.
Connections
To prevent Landscape from tearing holes in your infrastructure's safety measures, only clients can initiate communication with the Landscape server. They use the typical HTTP or HTTPS ports 80 and 443, which are open for outbound connections anyway on most networks and firewalls.
Every 30 seconds, the Landscape client sends an unencrypted HTTP request to the server. On one hand, it thus signals that the computer is still running; on the other, it gives the server the opportunity to trigger an event. Any messages from the server are retrieved via the encrypted HTTPS port.
Apart from these communications with the Landscape server, Landscape clients only send queries to package repositories. This behavior helps them keep their sources up to date and provides the server with information about updatable packages. Landscape loads and installs these packages on request; it does not interfere with other tools or accounts that call the apt-get
package management tool directly.
Buy this article as PDF
(incl. VAT)
Buy ADMIN Magazine
Subscribe to our ADMIN Newsletters
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Most Popular
Support Our Work
ADMIN content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.