Lead Image © Kitsadakron Pongha, 123RF.com

Lead Image © Kitsadakron Pongha, 123RF.com

Landscape

Canonical's Landscape tool maintains Ubuntu environments

Article from ADMIN 20/2014
By
Manually maintaining large IT infrastructures almost inevitably leads to errors. Enter Canonical's Landscape, a commercial tool that uses a web interface and an API to gather information, render it graphically, and complete maintenance work.

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.

Figure 1: Landscape manages Ubuntu machines via a web interface.

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.

Figure 2: Landscape reports provide an overview of the states of the monitored computers.

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.

Figure 3: Landscape installs and updates packages individually or in groups.

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.

Figure 4: The monitoring function displays the computer and network workload.

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

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy ADMIN Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus