### Install and Initialize MicroCloud Source: https://github.com/canonical/canonical.com/blob/main/templates/microcloud/index.html Commands to install the necessary snap packages and initialize or join a MicroCloud cluster. ```bash snap install microcloud lxd microceph microovn microcloud init microcloud join ``` -------------------------------- ### Install MicroK8s on macOS Source: https://github.com/canonical/canonical.com/blob/main/templates/microk8s/partials/_get-started-mac.html Use Homebrew to install the MicroK8s package and initialize the installation. ```bash brew install ubuntu/microk8s/microk8s ``` ```bash microk8s install ``` -------------------------------- ### Install LXD via snap Source: https://github.com/canonical/canonical.com/blob/main/templates/lxd/install.html Use the snap package manager to install the LXD daemon. ```bash snap install lxd ``` -------------------------------- ### Install MicroK8s on Linux Source: https://github.com/canonical/canonical.com/blob/main/templates/microk8s/partials/_get-started-linux.html Use this command to install MicroK8s via snap. Ensure you have snapd installed. ```bash sudo snap install microk8s --classic ``` -------------------------------- ### Install and configure Charmed Spark on Kubernetes Source: https://github.com/canonical/canonical.com/blob/main/templates/data/spark-on-kubernetes.html Commands to install the necessary snap packages, enable Kubernetes features, and initialize the Spark environment. ```bash snap install spark-client snap install microk8s microk8s enable dns rbac microk8s.kubectl create namespace spark spark-client.service-account-registry create --username spark --namespace spark --conf spark.executor.instances=3 spark-client.spark-shell ``` -------------------------------- ### Launch LXD instances Source: https://github.com/canonical/canonical.com/blob/main/templates/lxd/install.html Create and start new instances using container or virtual machine images. ```bash lxc launch ubuntu:24.04 ubuntu-container ``` ```bash lxc launch ubuntu:24.04 ubuntu-container --vm ``` -------------------------------- ### Run the website locally Source: https://github.com/canonical/canonical.com/blob/main/README.md Use the dotrun snap to start the local development server. ```bash dotrun ``` -------------------------------- ### Install Multipass on Linux Source: https://github.com/canonical/canonical.com/blob/main/templates/multipass/install.html Use the snap package manager to install Multipass on supported Linux distributions. ```bash sudo snap install multipass ``` -------------------------------- ### Initialize LXD Source: https://github.com/canonical/canonical.com/blob/main/templates/lxd/install.html Configure the LXD environment by running the initialization tool. ```bash lxd init ``` -------------------------------- ### Initialize Flask Application and Routes Source: https://context7.com/canonical/canonical.com/llms.txt Sets up the FlaskBase application and defines the homepage and sitemap XML routes. ```python from flask import Flask, render_template, make_response from canonicalwebteam.flask_base.app import FlaskBase # Initialize the Flask application with base configuration app = FlaskBase( __name__, "canonical.com", template_folder="../templates", static_folder="../static", template_404="404.html", template_500="500.html", ) # Homepage route @app.route("/") def index(): return render_template("index.html") # Sitemap index for SEO @app.route("/sitemap.xml") def index_sitemap(): xml_sitemap = render_template("sitemap-index.xml") response = make_response(xml_sitemap) response.headers["Content-Type"] = "application/xml" response.headers["Cache-Control"] = "public, max-age=43200" return response ``` -------------------------------- ### Example motd-news Message Source: https://github.com/canonical/canonical.com/blob/main/templates/legal/motd.md An example of a motd-news message, typically used for brief announcements or updates. It includes a title and a URL. ```text * MicroK8s gets a native Windows installer and command-line integration. https://ubuntu.com/blog/microk8s-installers-windows-and-macos ```