Landscape Client

Channel Revision Published Runs on
latest/stable 69 11 Dec 2023
Ubuntu 23.10 Ubuntu 23.04 Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04 Ubuntu 14.04 Ubuntu 12.04
latest/stable 49 07 Sep 2022
Ubuntu 23.10 Ubuntu 23.04 Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04 Ubuntu 14.04 Ubuntu 12.04
latest/stable 44 22 Mar 2021
Ubuntu 23.10 Ubuntu 23.04 Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04 Ubuntu 14.04 Ubuntu 12.04
latest/stable 36 11 Nov 2020
Ubuntu 23.10 Ubuntu 23.04 Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04 Ubuntu 14.04 Ubuntu 12.04
latest/beta 69 11 Dec 2023
Ubuntu 23.10 Ubuntu 23.04 Ubuntu 22.10 Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04 Ubuntu 14.04
latest/beta 62 10 Oct 2023
Ubuntu 23.10 Ubuntu 23.04 Ubuntu 22.10 Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04 Ubuntu 14.04
latest/beta 59 13 Jun 2023
Ubuntu 23.10 Ubuntu 23.04 Ubuntu 22.10 Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04 Ubuntu 14.04
latest/beta 49 07 Sep 2022
Ubuntu 23.10 Ubuntu 23.04 Ubuntu 22.10 Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04 Ubuntu 14.04
latest/beta 48 07 Sep 2022
Ubuntu 23.10 Ubuntu 23.04 Ubuntu 22.10 Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04 Ubuntu 14.04
latest/edge 70 30 Oct 2024
Ubuntu 24.04 Ubuntu 23.10 Ubuntu 23.04 Ubuntu 22.10 Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04 Ubuntu 14.04 Ubuntu 12.04
latest/edge 62 10 Oct 2023
Ubuntu 24.04 Ubuntu 23.10 Ubuntu 23.04 Ubuntu 22.10 Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04 Ubuntu 14.04 Ubuntu 12.04
latest/edge 59 13 Jun 2023
Ubuntu 24.04 Ubuntu 23.10 Ubuntu 23.04 Ubuntu 22.10 Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04 Ubuntu 14.04 Ubuntu 12.04
latest/edge 56 26 Jan 2023
Ubuntu 24.04 Ubuntu 23.10 Ubuntu 23.04 Ubuntu 22.10 Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04 Ubuntu 14.04 Ubuntu 12.04
latest/edge 40 11 Nov 2020
Ubuntu 24.04 Ubuntu 23.10 Ubuntu 23.04 Ubuntu 22.10 Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04 Ubuntu 14.04 Ubuntu 12.04
latest/edge 36 11 Nov 2020
Ubuntu 24.04 Ubuntu 23.10 Ubuntu 23.04 Ubuntu 22.10 Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04 Ubuntu 16.04 Ubuntu 14.04 Ubuntu 12.04
legacy/stable 49 21 Nov 2023
Ubuntu 22.04 Ubuntu 20.04 Ubuntu 18.04
juju deploy landscape-client
Show information

Platform:

Ubuntu
24.04 23.10 23.04 22.10 22.04 20.04 18.04 16.04 14.04 +1

landscape-client

Description

Landscape client is the daemon for Landscape server. This subordinate charm is intended to be used to register a machine against a running Landscape server. This charm uses the Ops framework

Links

Usage

The minimal example to get started with Landscape SaaS

juju deploy landscape-client --config account-name=foo-bar
juju deploy ubuntu --series jammy
juju relate landscape-client ubuntu

To install using a PPA

--config ppa=ppa:landscape/self-hosted-beta

To connect to a Landscape Self-Hosted instance

juju deploy landscape-client \
    --config computer-title=helloworld \
    --config account-name=standalone \
    --config url=https://mydomain.com/message-system \
    --config ping-url=http://mydomain.com/ping \

However, when registering the client against a server with a custom or not well known CA, we need to use the ssl-public-key option. To insert the certificate contents into the charm config directly, encode it in base64 using the following syntax:

--config ssl-public-key=base64:<base64_encoded_certificate>

For example:

--config ssl-public-key=base64:LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS4HY5RHZ6VWxUcDYwcjFNRmw1bG16M2I5a2dJeTVJeUYyUURCNnhXeEFMYXoKUGJwVCtnZ2NvYTN5Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0=

If the certificate is already present in the client machine, then use the filepath:

--config ssl-public-key=/path/to/ca.cert

Upgrading

It is recommended to use the PPA.

juju config landscape-client ppa=ppa:landscape/self-hosted-beta

The charm upgrade action can be run as shown where landscape-client/0 is the desired unit.

For juju 3.0 and above, run:

juju run landscape-client/0 upgrade

For versions before juju 3.0, use run-action instead of run:

juju run-action landscape-client/0 upgrade

Re-registering

The charm will register the client once. Subsequent config-changed events will restart the service. If you want to register again, run:

juju run landscape-client/0 register

If you’re using a version before juju 3.0, use run-action instead of run.

Relations

Since this is a subordinate charm, a relation is required. (Breaking the relation via remove-relation will disable the client.)

In the following example the Ubuntu Charm is used.

juju deploy landscape-client --config account-name=foo-bar
juju deploy ubuntu --series jammy
juju relate landscape-client ubuntu

This is accomplished using the juju-info interface. For more information, see Juju’s reference material on implicit integrations.

Source Code

The code for this updated version of the charm is in https://github.com/canonical/landscape-client-charm

Development

Make your code modifications and ensure that the options bundle.yaml are correct. Then

make build

To run linting and tests, cd into the top level directory and

sudo apt install tox
tox

To run an individual test:

tox tests/unit/test_charm.py::TestCharm::test_ssl_cert

The following commands may also be helpful:

juju status --watch 1s
juju debug-log --include landscape-client


Help improve this document in the forum (guidelines). Last updated 4 months ago.