Skip to content

Commit

Permalink
cleanup apt-news-tutorial more
Browse files Browse the repository at this point in the history
  • Loading branch information
orndorffgrant committed Aug 8, 2024
1 parent 00044e0 commit 16d1969
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 6 deletions.
4 changes: 4 additions & 0 deletions docs/_static/css/highlight.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.ignore-err .highlight .err {
color: inherit;
border: inherit;
}
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
28 changes: 22 additions & 6 deletions docs/tutorials/host_apt_news.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
=====================

Expand Down Expand Up @@ -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.
Expand All @@ -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": [
{
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 16d1969

Please sign in to comment.