Manage Debian, Ubuntu, and derivative Linux distributions with Landscape Scripts
Tags: Debian , desktop , homelab , Landscape , Management , Public cloud , Raspberry Pi , Server
What are you tinkering with over your vacation? Perhaps you have ambitions to have a beautiful homelab, launch pet projects on a public cloud, or build do it yourself home automation. Ubuntu has broad community and commercial support, making it the logical choice when you need to provision machines and containers with a mix of proprietary and open source software. Once your homelab, home automation, or public cloud projects are running, you can deploy Landscape beta. Landscape beta is a Linux dashboard which can be deployed anywhere, and manage machines anywhere. This self-hosted Linux systems management software can administer a variety of Linux distributions. Canonical maintains a Landscape Scripts Github repository where we aggregate community scripts for common tasks in any language. If you write shell scripts that make managing your Raspberry Pis or virtual machines easier, consider forking the Landscape Scripts repository and contributing to open-source software by submitting a Pull Request with your own scripts or script ideas.
The scripts may be in any language, Landscape can remotely run any script as long as an interpreter for that language is present on the machine. You can use Bash, Zsh, Python, Powershell, and more. These scripts can be run as any user, and be deployed with up to 5 attachments. The fastest path towards Linux server management at scale is to leverage technology system administrators know. Beyond automation and configuration capabilities, Landscape can run scripts on any selection of machines it manages, making it one of the easiest to use systems management tools on the market.
Windows administrators rejoice, Powershell can be used on Linux
Presented by Canonical’s Product Managers of Desktop, Landscape, and IAM: Oliver Smith, Rajan Patel, and Massimiliano Gori present what comparable and overlapping tools manage Linux and Windows.
The Landscape Scripts repository is a common location where others can peer review your solutions and community members can determine the shape of unofficial Landscape scripts and code. This collection of well-maintained tools are known to work with the currently supported version of Landscape, and strongly influence the evolution of features that are native to Landscape.
If you see a Landscape Script authored as a bash script and see opportunities for a cleaner implementation in Python, Powershell, or anything else, feel free to open an Issue with your thoughts, or submit a Pull Request with a contribution of your own.
If you have leveraged Landscape’s remote script execution capabilities, feel free to share your solutions on the Landscape Scripts repository. A community of helpful developers will collaborate with you and propose improvements to your contributions. Landscape Engineers at Canonical will review all Pull Requests and provide feedback. This invitation is open to employees of organisations, and hobbyist users alike. New software engineers that want to dip their toes into an open-source project and sharpen their coding chops are also welcome.
Using Landscape Scripts has the obvious prerequisite of having Landscape installed somewhere. Several weeks ago I put out a YouTube video which explained how to deploy Landscape for free on the Always Free tier of Oracle’s public cloud:
This video follows the steps laid out for a Juju based Landscape installation on a single machine, as described in a post on Landscape’s Forums. The video walks you through some of the nuances you would encounter on Oracle Public Cloud. Alas, spending 30 minutes to install software is not a great experience. What if we could accomplish that installation in 5 minutes?
The scripts within the Landscape Scripts repository are not limited to monitoring and maintenance. There is a section for cloud-init, featuring a cloud-init.yaml file that can provision Landscape on a single machine, leveraging LXD containers. Using the cloud-init YAML configuration file, which defines what software needs to be installed and how it should be configured, brings the installation time down to 5 minutes.
When deploying an always-free ARM virtual machine on Oracle Public Cloud, you can paste the cloud-init.yaml file into the cloud-init text area in Oracle Cloud’s web based interface, as shown in the screenshot below:
Once your virtual machine is running you can follow the steps in the Youtube video after the 14:00 minute marker, to install a valid SSL certificate on your machine.
Managing Debian and its derivatives with Landscape beta
Once you install Landscape beta, if you are running Debian Bullseye or one of its derivatives, you are in for a treat. Thanks in part to a motivated user who submitted a Pull Request to the open source Landscape Client project, and some collaboration with Landscape engineers Mitch Burton and Kevin Nasto, it is now possible to manage your Debian Bullseye machines with Landscape.
To install and configure Landscape Client on Debian Bullseye or a Debian based non-Ubuntu derivative, run the following commands:
sudo apt update && sudo apt install gpg ca-certificates gpg --keyserver keyserver.ubuntu.com --recv-keys 6e85a86e4652b4e6 gpg --export 6e85a86e4652b4e6 | sudo tee -a /usr/share/keyrings/landscape-client-keyring.gpg > /dev/null echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/landscape-client-keyring.gpg] https://ppa.launchpadcontent.net/landscape/self-hosted-beta/ubuntu focal main" | sudo tee -a /etc/apt/sources.list.d/landscape-client.list sudo apt update && sudo apt install landscape-client sudo landscape-config
Ubuntu Pro includes access to Landscape
If you feel inspired to try something new, it makes sense to choose Ubuntu as your base. Ubuntu Pro (currently in public beta) expands our famous ten-year security coverage to an additional 23,000 packages beyond the main operating system. Anyone can use Ubuntu Pro for free on up to 5 machines, or 50 if you are an official Ubuntu Community member. Enabling Ubuntu Pro on your Ubuntu LTS instances is explained in a straightforward how-to guide.
Landscape is available with an Ubuntu Pro subscription. Up until now, a separate license.txt file had to be added to your Landscape server to define how many machines Landscape can manage. This has been simplified in Landscape beta. Your self-hosted Landscape beta comes with a preinstalled license.txt file which allows you to manage up to 10 machines, in addition to that, an unlimited number of machines which have an Ubuntu Pro subscription can be managed by Landscape beta. This Ubuntu Pro subscription awareness will be coming to Landscape’s SaaS and stable offering in Q1 2023.
Share your stories and questions
You have many different trajectories in which you could take your vacation tinkering, as you enjoy your downtime. The Landscape Forums are an excellent place to share your journey with the Ubuntu community. Tell us what worked well, what could use improvement, and what you would like to see or build next. Most importantly, do not hesitate to ask questions if you get stuck along the way. The following links will help you get started:
- Landscape beta Forums on Discourse
- Landscape Scripts Github repository
- Landscape Forums on Discourse
- Landscape homepage
Ubuntu on public clouds
There is no one size fits all cloud architecture.
Developing the optimum cloud strategy requires evaluating your business needs and aligning them with the different solutions available.