Your submission was sent successfully! Close

Thank you for signing up for our newsletter!
In these regular emails you will find the latest updates from Canonical and upcoming events where you can meet our team.Close

Thank you for contacting our team. We will be in touch shortly.Close

  1. Blog
  2. Article

lizzieepton
on 13 February 2024

Simplify IoT device management: How to add Ubuntu Core devices to Landscape


Landscape has been a member of the Canonical product list for almost as long as Canonical has existed. Landscape allows administrators to manage their desktop and server instances from a single centralised portal. With the latest release of Landscape Server (23.10), we’ve introduced the ability to manage snap packages from Landscape – and with a beta release of the Landscape Client snap package now available from our Snap Store, you can also add Ubuntu Core-based devices to your Landscape estate.

Landscape provides remote fleet management services across your entire Ubuntu estate. It allows you to manage software versions and configurations, control security patching, monitor your devices performance and compliance, access management and auditing.  

This blog will help you get started using Landscape to manage Ubuntu for IoT devices. We will show you how to install the Landscape Client snap on an Ubuntu Core device, how to configure it and then see the device in your Landscape web portal. Further blogs in this series will address Landscape’s snap management features, larger scale deployments and how to include the snap with your base Ubuntu Core device image.

Why manage your IoT devices with Landscape?

Before we explore configuring your device for management with Landscape, we should address the question of why you should manage your IoT device with Landscape. What benefits do you get and how will it make your life easier?

With a lot of IoT Devices being physically inaccessible, remote device management allows you to interact with your device from anywhere in the world. You can monitor its health, check it is running the latest versions of snaps, reconfigure its settings or just give it a good old reboot – all without leaving your desk. In addition, by grouping multiple devices together, you can perform these operations on numerous devices simultaneously, saving you both time and effort.

Requirements

To follow along with this blog, you will need a suitable account on a Landscape server instance. In order to manage the installed snaps on the device, you will need a self-hosted Landscape server running either the beta or 23.10 version. The functionality to manage snaps will be added to our Landscape SaaS versions shortly although you can still already register and monitor these devices.

Install the Landscape Client snap

First, your need to connect to your Ubuntu Core device using SSH and your Ubuntu One account credentials. You will be required to generate an SSH key pair and upload the public SSH key to your account.  During the configuration of Core, you were asked to provide your SSO login credentials to download this public key to your device and allow you to connect. For more information, see how to connect to Ubuntu Core with SSH.

Once you’ve connected to the device, we can install the Landscape Client snap from the snap store. As the snap is currently in beta, we will need to specify that we want the beta channel. 

> snap install landscape-client –channel=beta

The installation of the snap will also connect all the necessary interfaces for the client to the device, granting it permission to manage your configuration and installed snaps. 

Configure the client

Once you’ve installed the client, we need to configure it to talk to your Landscape Server instance. For this exercise, we will use the Landscape Configuration Wizard. As we will see at the end of this section, you can specify all the necessary settings directly from the command line, but by walking through the wizard, we can see the process more clearly.

Before we start this process, we need to ensure we have some information available. 

Computer Title

This is the name that will appear in Landscape when you have completed enrollment. It does not need to be unique but it should help you identify your device when working in the Landscape web portal.

Account Name

As the Landscape server is multi-tenanted, you will need the account to which you would like to enrol your device. For self-hosted Landscape accounts, the account name defaults to “standalone”. 

Landscape Domain 

The Fully Qualified Domain Name (FQDN) of your Landscape Server. This must be accessible from your device. 

Registration Key

The registration key configured for your Landscape account. This is optional but without it you will need to manually confirm all new device additions to your account. If you specify a registration key, you have the option to automatically accept the device provided the keys match. For more information on registration keys and enabling auto-registration, see how to auto-register new computers.

HTTP/HTTPS Proxy URL

These are only required if your network needs a proxy to connect to the Landscape server. 

Once this information is collated, run the configuration wizard using the following command:

> sudo landscape-client.config –computer-title “<computer title>” –account-name <account name>

This command will launch the configuration wizard as shown below with the user input between these two symbols <>.

Manage this machine with Landscape (https://ubuntu.com/landscape):

Will you be using your own Self-Hosted Landscape installation? [y/N]: y

Provide the fully qualified domain name of your Landscape Server e.g. landscape.yourdomain.com

Landscape Domain: <Landscape server FQDN>

A Registration Key prevents unauthorized registration attempts.

Provide the Registration Key found at:

https://<Landscape server FQDN>/account/<Account Name>

(Optional) Registration Key: _  <Registration Key>

If your network requires you to use a proxy, provide the address of

these proxies now.

HTTP proxy URL:  _  <Proxy URL or leave blank>

HTTPS proxy URL:  _  <Proxy URL or leave blank>

A summary of the provided information:

Computer’s Title: <Computer Title>

Account Name: <Account Name>

Landscape FQDN: <Landscape server FQDN>

Registration Key: Hidden

The landscape-config parameters to repeat this registration on another machine are:

sudo landscape-config –account-name snap-management-demo –url https://staging.landscape.canonical.com/message-system –ping-url http://staging.landscape.canonical.com/ping

Request a new registration for this computer now? [y/N]: y

This completes the registration and enrols your device with the Landscape server.

Accept the registration

If you didn’t specify a registration key and enable auto-registration in the previous steps, you’ll need to accept the registration in your Landscape account.

To accept the registration(s), log in to your Landscape account. You should see a notification telling you a computer needs authorising.

Click on this message, check that the device attempting to enrol is your device and then click accept. If this device has previously existed in Landscape (i.e. if you are reinstalling a device) you can select it during this stage of the registration if you want to reuse the instance. 

Your device will then appear in the Computers list and after a few minutes will start populating. 

Manage your device

That’s it – with your device enrolled, you can start managing it from the Landscape Server. Start by trying to install a new snap or fixing its version to prevent update? Maybe setup some graphs to monitor how your devices are performing or perhaps set up an automatic alert to email you if one of your devices stops responding? All from the comfort of your own desktop.

Learn more

For more information on the power and capabilities of Ubuntu Core check out: Ubuntu Core.

For more information on the features and functionality of Landscape check out: Landscape | Ubuntu.

Are you interested in running Ubuntu Core with Landscape management on your devices and are working on a commercial project? Get in touch with our team today.

Further reading

Ubuntu Core as an immutable Linux Desktop base

Managing software in complex network environments: the Snap Store Proxy

Manage FIPS-enabled Linux machines at scale with Landscape 23.03

Related posts


Canonical
6 July 2023

불변의 리눅스 데스크톱 기반으로서의 우분투 코어(Ubuntu Core)

Desktop Article

캐노니컬(Canonical)은 IoT를 위한 완전한 컨테이너 플랫폼을 만들기 위해 2014년에 우분투 코어 개발을 시작했습니다. 우분투 코어에서는 도커(Docker) 및 LXC가 구축된 것과 동일한 커널 컨테이너 기술을 사용하여 잘 정의된 업그레이드 및 롤백을 통해 시스템의 모든 구성 요소를 안전한 샌드박스에 넣습니다. 저희는 자율적으로 연결된 사물 인터넷 장치가 사람의 개입 없이 적용할 수 있는 업데이트를 수신하여 에지에서 보안 및 ...


Oliver Smith
31 May 2023

Ubuntu Core as an immutable Linux Desktop base

Desktop Article

Join us as we discuss the architecture of immutable operating systems and the role of Ubuntu Core in the future of the immutable Linux desktop. ...


Nathan Hart
5 January 2023

Security in the smart home: considerations for device makers

IoT Article

When people think of home security they usually think of an alarm system with a keypad next to the door. These days, however, home security should have two meanings. I’m here to talk about the second: cybersecurity. In other words, security in the smart home. A recent investigation found that a shocking number of leading ...