Use Landscape to Manage Ubuntu VMs

If you’re like me you spin up a vm when ever you want to test some thing or when you hear about about a new software that seems interesting. Lately, I’ve been spinning up a lot of Ubuntu virtual machines for single purposes and now that there are a few I started looking into how to centrally manage them. That is when I found Canonical Landscape!

From the web page the main goal of Landscape is for companies to sign up for the cloud management and support contracts which has a $2500 minimal purchase however you slice it up. The one detail that isn’t advertised as much is that you can set it up internally for up to 10 machines/vms for free. Granted you don’t get any support from Canonical, but my main goal was to centralize patch management for 3 Ubuntu virtual machines which  this product fit the goal perfectly.

Configuration:

I configured a new Ubuntu virtual machine with the follow specifications

  • Name: Landscape.tdsheridanlab.com
  • CPU: 2 cores
  • Memory: 4GB
  • HD: 400 GB (Thin Provisioned)
  • OS: Ubuntu Server 16.04 LTS

During the installation of Ubuntu the only thing I added was SSH so I wouldn’t have to do it manually later. No this site is not externally available so don’t try to connect to it.

As you can see from the screenshot it’s not really doing much CPU wise. When I originally deployed it i had it set to 1 core and 3 GBs of Memory and it ran painfully slow. Increasing it to 2 cores and 4 GB made a huge difference.

Installation:

After I applied all the available updates to the virtual machine (sudo apt-get update and sudo apt-get upgrade) I follow Canonical’s 3 step to install the server.

1. Add Landscape Repository:

sudo add-apt-repository ppa:landscape/17.03

2. Update Package List:

sudo apt update

3. Install Landscape:

sudo apt install landscape-server-quickstart

Source: https://landscape.canonical.com/set-up-on-prem

I opened a web browser and went to https://landscape.tdsheridanlab.com and created my account. This account is a local administrator account to use the software and is made up of an email address and a password.

Now that Landscape is running we have to add some clients to manage it.

Client Computers:

Adding clients is super easy, but there is one step that they leave out. I do not have an internal certificate authority, I didn’t want to buy a certificate, and i didn’t want to set up an automated process at the time for LetsEncrypt certificates. We have to add the self sign certificate to the client Ubuntu virtual machine before we register it with Landscape.

Get the Landscape Server Certificate

The certificate is located at /etc/ssl/certs/landscape_server.pem. I used filezilla to connect to the server over port 22 and downloaded it to my local computer and uploaded it to each client computer. You could easily SSH in to the Landscape server and copy it to a file share as well.

Instructions:

On the Left hand see you’ll see a link that says “Following These Instructions”

When you click on that link it gives you the exact steps except the self signed certificate step.

To add a client using the self signed certificate follow these amended steps.

      1. On the Client computer update the repositories:
        sudo apt-get update
      2. Install the client:
        sudo apt-get install landscape-client
      3.  Copy the self signed certificate to
        /etc/landscape/

        on the client computer(s)

      4. Use nano to modify the client.conf file
        1. sudo nano /etc/landscape/client.conf
        2. Add
          ssl_public_key = /etc/landscape/landscape_server.pem

          to the bottom of the configuration and save the file

      5. register the computer using the code from the Landscape page.
        1. Under computer title change to something more descriptive
          --computer-title "My Web Server" 
      6. Go through the wizard on the client computer and allow or deny the functionality that you want Landscape to be able to do.
      7. Accept the computer in the Landscape portal.

After the Landscape Server has inventoried the client computer it will show up on in the list.

If you click on any of the computers you’ll get information about that computer.

Info:

Activities:

Monitoring:

 

There is more screens full of information. The only down side of this platform is that in only works with Ubuntu.

Hopefully you guys find this post useful.

-T

 

Sources:

AskUbuntu: https://askubuntu.com/questions/549809/how-do-i-install-landscape-for-personal-use

Landscape Product Page: https://landscape.canonical.com/