From 16d1969ec02f2f80b04fcad2c4b89d7ecb5b8272 Mon Sep 17 00:00:00 2001 From: Grant Orndorff Date: Thu, 8 Aug 2024 09:27:58 -0400 Subject: [PATCH] cleanup apt-news-tutorial more --- docs/_static/css/highlight.css | 4 ++++ docs/conf.py | 1 + docs/tutorials/host_apt_news.rst | 28 ++++++++++++++++++++++------ 3 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 docs/_static/css/highlight.css diff --git a/docs/_static/css/highlight.css b/docs/_static/css/highlight.css new file mode 100644 index 0000000000..5a84e89f8d --- /dev/null +++ b/docs/_static/css/highlight.css @@ -0,0 +1,4 @@ +.ignore-err .highlight .err { + color: inherit; + border: inherit; +} diff --git a/docs/conf.py b/docs/conf.py index 145cc95d1e..38f240eca8 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -122,6 +122,7 @@ "css/mermaid.css", "css/header.css", "css/furo_colors.css", + "css/highlight.css", ] html_js_files = [ "js/github_issue_links.js", diff --git a/docs/tutorials/host_apt_news.rst b/docs/tutorials/host_apt_news.rst index 046411f97f..e34c94bff4 100644 --- a/docs/tutorials/host_apt_news.rst +++ b/docs/tutorials/host_apt_news.rst @@ -9,6 +9,9 @@ configure your Ubuntu machines to use it. .. Why we use Multipass + command to install it .. include:: ./common/install-multipass.txt +.. note:: + You will need at least 10 Gb of free space on your machine to launch the Multipass VM used in this tutorial. + Tutorial overview ===================== @@ -131,7 +134,7 @@ and add the following content: ] } -In ``nano``, use :kbd:`CTRL`+:kbd:`S` and :kbd:`CTRL`+:kbd:`X` to save and exit, respectively. +In ``nano``, use :kbd:`CTRL` + :kbd:`S` and :kbd:`CTRL` + :kbd:`X` to save and exit, respectively. That apt news configuration will show one message to systems running Ubuntu 22.04 (codename "jammy") and will show a different message to all other systems. @@ -146,12 +149,19 @@ following command. root@apt-news-server:~# sed -i "s/TODAY/$(date --iso-8601=seconds)/" /var/www/html/aptnews.json -You can double check that the command worked by verifying the ``begin`` field has an appropriate value. +You can double check that the command worked by looking at the new contents of the file. .. code-block:: console - :emphasize-lines: 5 root@apt-news-server:~# cat /var/www/html/aptnews.json + +You should see that the ``begin`` field now has an appropriate value. + +.. code-block:: json + :force: + :class: ignore-err + :emphasize-lines: 4 + { "messages": [ { @@ -203,7 +213,7 @@ Then we can run these commands to see the custom APT news message: The output of ``apt upgrade`` should look like this. -.. code-block:: console +.. code-block:: text Reading package lists... Done Building dependency tree... Done @@ -238,7 +248,7 @@ Then run these commands again to see the APT news message: The output of ``apt upgrade`` should look like this. -.. code-block:: console +.. code-block:: text Reading package lists... Done Building dependency tree... Done @@ -262,11 +272,17 @@ Clean up Congratulations! This tutorial demonstrated the basics of how an APT news server can be set up and used by other Ubuntu machines. -Now that the tutorial is over, you can exit out of the Multipass VM and delete it. +Now that the tutorial is over, you can exit out of the Multipass VM: .. code-block:: console ubuntu@tutorial:~$ exit + you@yourcomputer:~$ + +and delete it: + +.. code-block:: console + you@yourcomputer:~$ multipass delete --purge tutorial .. LINKS