56

I'd like to manage my home machines and laptops with Landscape, how can I do this?

Jorge Castro
  • 71,754

4 Answers4

61

For Ubuntu 16.04 or 14.04 LTS

You can install Landscape directly on a machine running Ubuntu 14.04 LTS, this is called "Landscape On Premises." It is free for up to 10 physical (or virtual) machines and 50 containers:

Deploying a single server

WARNING: landscape-quickstart modifies apache configuration files, DO NOT DO THIS ON AN EXISTING SERVER INSTALLATION without understanding what you are getting into.

Just install the Landscape Quickstart package: Check here for changes to the below instructions:

sudo add-apt-repository ppa:landscape/17.03
sudo apt-get update
sudo apt-get install landscape-server-quickstart

After it finishes, access it with a browser like https://hostname.example.com/

Where hostname.example.com is the output of hostname -f on that machine, or just hostname if that fails to resolve.

Using Landscape

You should then see the web UI after filling in your name and contact details:

Account dashboard with 20 remaining registrations

Click on the link highlighted to add client machines:

Registration instructions

Follow those instructions on the client you want to join to Landscape. Note the following line:

sudo landscape-config --computer-title "My Web Server" --account-name standalone  --url https://<servername>/message-system --ping-url http://<servername>/ping

You can customize the title and so forth for each machine. See the landscape-config man page for more information.

After you type in the landscape-config command the client will ask you some questions, those are optional, you can just hit Enter until the client restarts, then you can accept the client in the web UI.

Registering clients with a self signed certificate:

The quickstart package installs a self-signed certificate that is generated on-the-fly.

  • Grab this file from the server: /etc/ssl/certs/landscape_server_ca.crt
  • Copy it somewhere on the client, for example, /etc/landscape/landscape_server_ca.crt
  • Change /etc/landscape/client.conf to include this line, pointing at the file you just copied: ssl_public_key = /etc/landscape/landscape_server_ca.crt

Then try to register again. (Thanks to panlinux for figuring this out)

Further Reading:

dpb
  • 7,069
Andreas Hasenack
  • 3,065
  • 1
  • 17
  • 17
  • I get an error on command sudo apt-get install landscape-server-quickstart E: Unable to locate package landscape-server-quickstart – prodigerati Apr 03 '16 at 23:03
  • @prodigerati ...because you either didn't do the add-apt-repository or the apt-get update – Auspex May 10 '16 at 12:46
  • deploying Landscape Server works well, but Landscape Client someone has ever tried to deploy that on a node? Because after I made that I can't register the node on my Landscape server. I've open also a post here: https://askubuntu.com/questions/918493/deploy-of-landscape-client-on-a-node – Riccardo Magrini May 26 '17 at 12:14
  • For the love of god, can we add a huge warning label at the start of this post "DO NOT DO THIS ON AN EXISTING APACHE INSTALLATION BEFORE YOU READ FURTHER"? – pkExec Mar 23 '18 at 13:09
  • 1
    @pkExec, I added something. – dpb Apr 06 '18 at 02:17
  • Does Landscape work with Debian, or only Ubuntu? – raphael75 May 17 '19 at 19:39
16

For Ubuntu 16.04 LTS

On one machine install Ubuntu Server 16.04.01 LTS -> Download Ubuntu Server 16.04.01 LTS.
It is recommended to install openssh-server as well, this can be chosen during the process.
Once installed the Ubuntu Server operating system, install landscape-server-quickstart.
You also have to adjust the firewall to make everything working flawlessly without any issue.

Open a terminal - execute the following commands to accomplish these tasks :

sudo ufw enable
sudo ufw allow ssh
sudo ufw allow http
sudo ufw allow https

sudo add-apt-repository ppa:landscape/16.06
sudo apt update
sudo apt install landscape-server-quickstart  

After the installation is complete, you have to register the landscape account.
Because the Server has no GUI, you need to install a text based web browser :

sudo apt install links  
links https://<server-hostname>  

Now register the Ubuntu Server - to do this you need the landscape-client.

sudo apt install landscape-client  
sudo landscape-config --account-name standalone --url https://<server-hostname>/message-system --ping-url http://<server-hostname>/ping  

Backup the Landscape certificate, because it has to exist on every machine you want to register :

sudo cp /etc/ssl/certs/landscape_server.pem /<external-media>/landscape_server.pem  

To register additional Ubuntu systems, install the landscape-client package on each machine :

sudo apt install landscape-client  

Copy over the Landscape certificate (which you saved before) and edit the client.config file :

sudo cp /<external-media>/landscape_server.pem /etc/landscape/landscape_server.pem  
sudo nano /etc/landscape/client.conf  

Add this line : ssl_public_key = /etc/landscape/landscape_server.pem and save the change.

Now register the Ubuntu system the same way you did, when you registered the Ubuntu Server :

sudo landscape-config --account-name standalone --url https://<server-hostname>/message-system --ping-url http://<server-hostname>/ping  

Open https://<server-hostname> in your web browser and accept all the pending computers.

Additional information : The free license covers 10 bare metal machines and 50 LXC containers !

References

cl-netbox
  • 31,163
  • 7
  • 94
  • 131
  • IMO we should recommend using another browser/PC to hit the landscape URL instead of installing links on the server. – Jorge Castro Aug 12 '16 at 14:34
  • @JorgeCastro : When you install LOP on a machine which runs the desktop edition of Ubuntu, of course any other browser can be used ... when you install LOP on a server without a GUI, you need a text based web browser, such as links, that is mainly the reason why I suggested to use links in the instructions and once the account is registered, one can access landscape from any attached computer with any browser though ... links is only needed for the registration process of the standalone account from the server. :) – cl-netbox Aug 12 '16 at 16:27
  • Note that you may need to install python-software-properties or software-properties-common to get the add-apt-repository command. – Fake Name Dec 31 '16 at 05:14
  • Already read that, but use quickstart and not juju deploy – Riccardo Magrini Feb 01 '17 at 19:09
  • @cl-netbox the result is that: http://paste.ubuntu.com/23910833/ – Riccardo Magrini Feb 02 '17 at 13:31
  • @cl-netbox all software have been upgraded using their ppa stable – Riccardo Magrini Feb 02 '17 at 14:16
  • @RiccardoMagrini Well, then you should contact the juju -> https://launchpad.net/~juju/+archive/ubuntu/stable and the landscape -> https://launchpad.net/~landscape/+archive/ubuntu/16.06 teams and report the bug/error. – cl-netbox Feb 02 '17 at 14:19
3

Along with the other answers, https://landscape.canonical.com is always available. This is a hosted service that you can sign up for a 30 day demo to see if it meets your needs, and does not require you to go through the steps needed to set up your own server.

dpb
  • 7,069
3

For those on ARM processor installations of Ubuntu 14.04, it seems that while the 15.11 PPA has an ARMHF package, using landscape-server-quickstart is not available (ie an apt-get update doesn't find that command). Thus, using @andreas Deploying for Scale Out method is the only one which works (per landscape docs):

sudo add-apt-repository ppa:juju/stable
sudo apt-get update
sudo apt-get install juju-core juju-deployer juju-quickstart

juju-quickstart u/landscape/landscape-dense-maas

Using landscape-dense-mass avoids setting up MAAS or planning for autoscaling. This was a good fit approach where I wanted to simply use Landscape to monitor an existing fixed number of Ubuntu 14.04 servers.

hamx0r
  • 1,096
  • 7
  • 4