Skip to content

Commit

Permalink
docs: Add WSL tutorial (#5206)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRealFalcon authored Apr 25, 2024
1 parent 8854179 commit 90c15a6
Show file tree
Hide file tree
Showing 6 changed files with 356 additions and 4 deletions.
3 changes: 2 additions & 1 deletion doc/rtd/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@
# Sphinx-copybutton config options: 1) prompt to be stripped from copied code.
# 2) Set to copy all lines (not just prompt lines) to ensure multiline snippets
# can be copied even if they don't contain an EOF line.
copybutton_prompt_text = "$ "
copybutton_prompt_text = r"\$ |PS> "
copybutton_prompt_is_regexp = True
copybutton_only_copy_prompt_lines = False

# -- Options for HTML output --------------------------------------------------
Expand Down
3 changes: 2 additions & 1 deletion doc/rtd/reference/datasources/wsl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ the datasource from working.
For more information about how to configure WSL,
`check the official documentation <https://learn.microsoft.com/windows/wsl/wsl-config#configuration-settings-for-wslconf>`_.

.. _wsl_user_data_configuration:

User data configuration
========================

Expand Down Expand Up @@ -205,4 +207,3 @@ include file.
WSL automatically generates those files by default, unless configured to
behave otherwise in ``/etc/wsl.conf``. Overwriting may work, but only
until the next reboot.

3 changes: 3 additions & 0 deletions doc/rtd/reference/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ date. A 5 year timeline may also be expected for changed keys.

.. automodule:: cloudinit.config.cc_users_groups
.. automodule:: cloudinit.config.cc_wireguard

.. _mod-write_files:

.. automodule:: cloudinit.config.cc_write_files
.. automodule:: cloudinit.config.cc_yum_add_repo
.. automodule:: cloudinit.config.cc_zypper_add_repo
14 changes: 13 additions & 1 deletion doc/rtd/tutorial/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ capable of.
Core tutorial
=============

This tutorial, which we recommend if you are completely new to ``cloudinit``,
This tutorial, which we recommend if you are completely new to ``cloud-init``,
uses the QEMU emulator to introduce you to all of the key concepts, tools,
processes and operations that you will need to get started.

Expand All @@ -35,3 +35,15 @@ user data script.
:maxdepth: 1

lxd.rst

WSL tutorial
============

This tutorial is for learning to use ``cloud-init`` within a ``WSL``
environment. You will use a ``cloud-init`` user data script to customize a
``WSL`` instance.

.. toctree::
:maxdepth: 1

wsl.rst
2 changes: 1 addition & 1 deletion doc/rtd/tutorial/lxd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ Which should print the following:

.. code-block::
Valid cloud-config: system userdata
Valid schema user-data
Finally, let us verify that our user data was applied successfully:

Expand Down
Loading

0 comments on commit 90c15a6

Please sign in to comment.