Skip to content

Commit 87b3c10

Browse files
sharder996geoffreynyaga
authored andcommitted
[docs] Fix cross-references in how-to guides (#4399)
The current implementation of internal linking to other pages/content across the documentation set has been largely relative links. Whilst this works and the link check CI passes, it does not scale well over time. Usong the recommend Myst referencing standard is positive because of the following reasons: 1. The links will still work even in situations where the linked markdown page/file gets renamed or moved to a new folder 2. The user gets redirected to the exact heading in the destination page 3. Standardized naming of heading references. MULTI-2157
1 parent f3b2cc5 commit 87b3c10

15 files changed

Lines changed: 97 additions & 62 deletions

docs/how-to-guides/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Multipass allows you to create Ubuntu instances with a single command. As your n
2323
- [Add a network to an existing instance](manage-instances/add-a-network-to-an-existing-instance)
2424
- [Configure static IPs](manage-instances/configure-static-ips)
2525
- [Use a blueprint](manage-instances/use-a-blueprint)
26-
- [Use the Docker blueprint](manage-instances/use-the-docker-blueprint)
26+
- {ref}`how-to-guides-manage-instances-use-the-docker-blueprint`
2727
- [Run a Docker container in Multipass](manage-instances/run-a-docker-container-in-multipass)
2828

2929
## Customise Multipass

docs/how-to-guides/manage-instances/add-a-network-to-an-existing-instance.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
# Add a network to an existing instance
33

44
```{seealso}
5-
[`networks`](/reference/command-line-interface/networks), [`get`](/reference/command-line-interface/get), [`set`](/reference/command-line-interface/set), [`local.<instance-name>.bridged`](/reference/settings/local-instance-name-bridged)
6-
```
5+
[`networks`](reference-command-line-interface-networks), [`get`](reference-command-line-interface-get), [`set`](reference-command-line-interface-set), [`local.<instance-name>.bridged`](reference-settings-local-instance-name-bridged)
6+
````
77
88
This guide explains how to bridge an existing Multipass instance with the available networks.
99
1010
```{caution}
1111
This feature is available starting from Multipass version 1.14.
1212
```
1313

14-
First, you need to select a Multipass-wide preferred network to bridge with (you can always change it later). To do so, list all available networks using the [`multipass networks`](/reference/command-line-interface/networks) command. The output will be similar to the following:
14+
First, you need to select a Multipass-wide preferred network to bridge with (you can always change it later). To do so, list all available networks using the [`multipass networks`](reference-command-line-interface-networks) command. The output will be similar to the following:
1515

1616
```{code-block} text
1717
Name Type Description
@@ -24,19 +24,19 @@ mpbr0 bridge Network bridge for Multipass
2424
virbr0 bridge Network bridge
2525
```
2626

27-
Set the preferred network (for example, `eth0`) using the [`set`](/reference/command-line-interface/set) command:
27+
Set the preferred network (for example, `eth0`) using the [`set`](reference-command-line-interface-set) command:
2828

2929
```{code-block} text
3030
multipass set local.bridged-network=eth0
3131
```
3232

33-
Before bridging the network, you need to stop the instance (called `ultimate-grosbeak` in our example) using the [`stop`](/reference/command-line-interface/stop) command:
33+
Before bridging the network, you need to stop the instance (called `ultimate-grosbeak` in our example) using the [`stop`](reference-command-line-interface-stop) command:
3434

3535
```{code-block} text
3636
multipass stop ultimate-grosbeak
3737
```
3838

39-
You can now ask Multipass to bridge your preferred network using the [`local.<instance-name>.bridged`](/reference/settings/local-instance-name-bridged) setting:
39+
You can now ask Multipass to bridge your preferred network using the [`local.<instance-name>.bridged`](reference-settings-local-instance-name-bridged) setting:
4040

4141
```{code-block} text
4242
multipass set local.ultimate-grosbeak.bridged=true
@@ -49,15 +49,15 @@ multipass set local.bridged-network=eth1
4949
multipass set local.ultimate-grosbeak.bridged=true
5050
```
5151

52-
Use the [`get`](/reference/command-line-interface/get) command to check whether an instance is bridged with the currently configured preferred network:
52+
Use the [`get`](reference-command-line-interface-get) command to check whether an instance is bridged with the currently configured preferred network:
5353

5454
```{code-block} text
5555
multipass get local.ultimate-grosbeak.bridged
5656
```
5757

5858
After following the recipe above, the result should be `true`.
5959

60-
Now, [`start`](/reference/command-line-interface/start) the instance.
60+
Now, [`start`](reference-command-line-interface-start) the instance.
6161

6262
```{code-block} text
6363
multipass start ultimate-grosbeak

docs/how-to-guides/manage-instances/configure-static-ips.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(how-to-guides-manage-instances-configure-static-ips)=
22
# Configure static IPs
33

4-
> See also: [Instance](/explanation/instance)
4+
> See also: [Instance](explanation-instance)
55
66
This guide explains how to create instances with static IPs in a new network, internal to the host. With this approach, instances get an extra IP that does not change with restarts. By using a separate, local network we avoid any IP conflicts. Instances retain the usual default interface with a DHCP-allocated IP, which gives them connectivity to the outside.
77

docs/how-to-guides/manage-instances/create-an-instance.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
(how-to-guides-manage-instances-create-an-instance)=
22
# Create an instance
33

4-
> See also: [`launch`](/reference/command-line-interface/launch), [Instance](/explanation/instance)
4+
> See also: [`launch`](reference-command-line-interface-launch), [Instance](explanation-instance)
55
66
This document demonstrates various ways to create an instance with Multipass. While every method is a one-liner involving the command `multipass launch`, each showcases a different option that you can use to get exactly the instance that you want.
77

88
## Create an instance
99

10-
> See also: [`launch`](/reference/command-line-interface/launch), [`info`](/reference/command-line-interface/info)
10+
> See also: [`launch`](reference-command-line-interface-launch), [`info`](reference-command-line-interface-info)
1111
1212
To create an instance with Multipass, run the command `multipass launch`. This launches a new instance, which is randomly named; for example:
1313

@@ -32,7 +32,7 @@ Memory usage: 71.6M out of 985.4M
3232

3333
## Create an instance with a specific image
3434

35-
> See also: [`find`](/reference/command-line-interface/find), [`launch <image>`](/reference/command-line-interface/launch), [`info`](/reference/command-line-interface/info)
35+
> See also: [`find`](reference-command-line-interface-find), [`launch <image>`](reference-command-line-interface-launch), [`info`](reference-command-line-interface-info)
3636
3737
To find out which images are available, run `multipass find`. Here's a sample output:
3838

@@ -77,7 +77,7 @@ Mounts: --
7777

7878
## Create an instance with a custom name
7979

80-
> See also: [`launch --name`](/reference/command-line-interface/launch)
80+
> See also: [`launch --name`](reference-command-line-interface-launch)
8181
8282
To launch an instance with a specific name, add the `--name` option to the command line; for example `multipass launch kinetic --name helpful-duck`:
8383

@@ -88,7 +88,7 @@ Launched: helpful-duck
8888

8989
## Create an instance with custom CPU number, disk and RAM
9090

91-
> See also: [`launch --cpus --disk --memory`](/reference/command-line-interface/launch)
91+
> See also: [`launch --cpus --disk --memory`](reference-command-line-interface-launch)
9292
9393
You can specify a custom number of CPUs, disk and RAM size using the `--cpus`, `--disk` and `--memory` arguments, respectively. For example:
9494

@@ -98,22 +98,22 @@ multipass launch --cpus 4 --disk 20G --memory 8G
9898

9999
## Create an instance with primary status
100100

101-
> See also: [`launch --name primary`](/reference/command-line-interface/launch)
101+
> See also: [`launch --name primary`](reference-command-line-interface-launch)
102102
103103
An instance can obtain the primary status at creation time if its name is `primary`:
104104

105105
```{code-block} text
106106
multipass launch kinetic --name primary
107107
```
108108

109-
For more information, see [How to use the primary instance](/how-to-guides/manage-instances/use-the-primary-instance).
109+
For more information, see [How to use the primary instance](how-to-guides-manage-instances-use-the-primary-instance).
110110

111111
(create-an-instance-with-multiple-network-interfaces)=
112112
## Create an instance with multiple network interfaces
113113

114-
> See also: [`launch --network`](/reference/command-line-interface/launch)
114+
> See also: [`launch --network`](reference-command-line-interface-launch)
115115
116-
Multipass can create instances with additional network interfaces using the `multipass launch` command with the `--network` option. This is complemented by the [`networks`](/reference/command-line-interface/networks) command, that you can use to find available host networks to bridge with.
116+
Multipass can create instances with additional network interfaces using the `multipass launch` command with the `--network` option. This is complemented by the [`networks`](reference-command-line-interface-networks) command, that you can use to find available host networks to bridge with.
117117

118118
This feature is only supported for images with [`cloud-init` support for v2 network config](https://cloudinit.readthedocs.io/en/latest/topics/network-config-format-v2.html), which in turn requires [netplan](https://netplan.io/) to be installed, meaning that you'll require Ubuntu 17.10 and Ubuntu Core 16 (except `snapcraft:core16`) or later. More specifically, this feature is only supported in the following scenarios:
119119

@@ -123,7 +123,7 @@ This feature is only supported for images with [`cloud-init` support for v2 netw
123123

124124
The `--network` option can be given multiple times to request multiple network interfaces beyond the default one, which is always present. Each time you add the `--network` option you also need to provide an argument specifying the properties of the desired interface:
125125

126-
- `name` - This is the only required value, used to identify the host network to connect the instance's device to (see [`networks`](/reference/command-line-interface/networks) for possible values).
126+
- `name` - This is the only required value, used to identify the host network to connect the instance's device to (see [`networks`](reference-command-line-interface-networks) for possible values).
127127
- `mode` - Either `auto` (default) or `manual`; with `auto`, the instance will attempt to configure the network automatically.
128128
- `mac` - Custom MAC address to use for the device.
129129

@@ -231,11 +231,11 @@ Another option is to install `NetworkManager`, but other network handlers need t
231231

232232
## Create an instance with a custom DNS
233233

234-
In some scenarios the default of using the system-provided DNS will not be sufficient. When that's the case, you can use the `--cloud-init` option to the [`launch`](/reference/command-line-interface/launch) command, or modify the networking configuration after the instance started.
234+
In some scenarios the default of using the system-provided DNS will not be sufficient. When that's the case, you can use the `--cloud-init` option to the [`launch`](reference-command-line-interface-launch) command, or modify the networking configuration after the instance started.
235235

236236
### The `--cloud-init` approach
237237

238-
> See also: [`launch --cloud-init`](/reference/command-line-interface/launch)
238+
> See also: [`launch --cloud-init`](reference-command-line-interface-launch)
239239
240240
To use a custom DNS in your instances, you can use this `cloud-init` snippet:
241241

docs/how-to-guides/manage-instances/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ Multipass allows you to create Ubuntu instances with a single command. As your n
1515
- [Remove an instance](how-to-guides-manage-instances-remove-an-instance)
1616
- [Add a network to an existing instance](how-to-guides-manage-instances-add-a-network-to-an-existing-instance)
1717
- [Configure static IPs](how-to-guides-manage-instances-configure-static-ips)
18-
- [Use a blueprint](how-to-guides-manage-instances-use-a-blueprint)
19-
- [Use the Docker blueprint](how-to-guides-manage-instances-use-the-docker-blueprint)
18+
- {ref}`how-to-guides-manage-instances-use-a-blueprint`
19+
- {ref}`how-to-guides-manage-instances-use-the-docker-blueprint`
2020
- [Run a Docker container in Multipass](how-to-guides-manage-instances-run-a-docker-container-in-multipass)
2121

2222
```{toctree}

docs/how-to-guides/manage-instances/launch-customized-instances-with-multipass-and-cloud-init.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ You can set up instances with a customized environment or configuration using th
66
Below are some common examples of using `cloud-init` with Multipass to create customized instances. The `cloud-init` file is provided by the Multipass team, but users are free to create and use their own personal `cloud-init` configurations.
77

88
## 📦 anbox-cloud-appliance
9+
910
Launch with:
1011
```{code-block} text
1112
multipass launch \
@@ -16,8 +17,11 @@ multipass launch \
1617
--timeout 900 \
1718
--cloud-init https://raw.githubusercontent.com/canonical/multipass/refs/heads/main/data/cloud-init-yaml/cloud-init-anbox.yaml
1819
```
20+
1921
## ⚙️ charm-dev
22+
2023
Launch with:
24+
2125
```{code-block} text
2226
multipass launch 24.04 \
2327
--name charm-dev \
@@ -27,7 +31,9 @@ multipass launch 24.04 \
2731
--timeout 1800 \
2832
--cloud-init https://raw.githubusercontent.com/canonical/multipass/refs/heads/main/data/cloud-init-yaml/cloud-init-charm-dev.yaml
2933
```
34+
3035
Health check:
36+
3137
```{code-block} text
3238
multipass exec charm-dev -- bash -c "
3339
set -e
@@ -38,8 +44,11 @@ multipass exec charm-dev -- bash -c "
3844
charmcraft pack
3945
"
4046
```
47+
4148
## 🐳 docker
49+
4250
Launch with:
51+
4352
```{code-block} text
4453
multipass launch 24.04 \
4554
--name docker \
@@ -48,10 +57,13 @@ multipass launch 24.04 \
4857
--disk 40G \
4958
--cloud-init https://raw.githubusercontent.com/canonical/multipass/refs/heads/main/data/cloud-init-yaml/cloud-init-docker.yaml
5059
```
60+
5161
Health check:
62+
5263
```{code-block} text
5364
multipass exec docker -- bash -c "docker run hello-world"
5465
```
66+
5567
You can also optionally add aliases:
5668

5769
```{code-block} text
@@ -61,10 +73,13 @@ multipass alias docker:docker-compose docker-compose
6173
multipass prefer default
6274
multipass aliases
6375
```
64-
> See also: [`How to use command aliases`](/how-to-guides/manage-instances/use-instance-command-aliases)
76+
77+
> See also: [`How to use command aliases`](how-to-guides-manage-instances-use-instance-command-aliases)
6578
6679
## 🎞️ jellyfin
80+
6781
Launch with:
82+
6883
```{code-block} text
6984
multipass launch 22.04 \
7085
--name jellyfin \
@@ -75,7 +90,9 @@ multipass launch 22.04 \
7590
```
7691

7792
## ☸️ minikube
93+
7894
Launch with:
95+
7996
```{code-block} text
8097
multipass launch \
8198
--name minikube \
@@ -85,15 +102,19 @@ multipass launch \
85102
--timeout 1800 \
86103
--cloud-init https://raw.githubusercontent.com/canonical/multipass/refs/heads/main/data/cloud-init-yaml/cloud-init-minikube.yaml
87104
```
105+
88106
Health check:
107+
89108
```{code-block} text
90109
multipass exec minikube -- bash -c "set -e
91110
minikube status
92111
kubectl cluster-info"
93112
```
94113

95114
## 🤖 ros2-humble
115+
96116
Launch with:
117+
97118
```{code-block} text
98119
multipass launch 22.04 \
99120
--name ros2-humble \
@@ -103,7 +124,9 @@ multipass launch 22.04 \
103124
--timeout 1800 \
104125
--cloud-init https://raw.githubusercontent.com/canonical/multipass/refs/heads/main/data/cloud-init-yaml/cloud-init-ros2-humble.yaml
105126
```
127+
106128
Heath check:
129+
107130
```{code-block} text
108131
multipass exec ros2-humble -- bash -c "
109132
set -e
@@ -116,8 +139,11 @@ multipass exec ros2-humble -- bash -c "
116139
ls /opt/ros/humble
117140
"
118141
```
142+
119143
## 🤖 ros2-jazzy
144+
120145
Launch with:
146+
121147
```{code-block} text
122148
multipass launch 24.04 \
123149
--name ros2-jazzy \
@@ -127,7 +153,9 @@ multipass launch 24.04 \
127153
--timeout 1800 \
128154
--cloud-init https://raw.githubusercontent.com/canonical/multipass/refs/heads/main/data/cloud-init-yaml/cloud-init-ros2-jazzy.yaml
129155
```
156+
130157
Health check:
158+
131159
```{code-block} text
132160
multipass exec ros2-jazzy -- bash -c "
133161
set -e

docs/how-to-guides/manage-instances/modify-an-instance.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
(how-to-guides-manage-instances-modify-an-instance)=
22
# Modify an instance
33

4-
> See also: [Instance](/explanation/instance), [`launch`](/reference/command-line-interface/launch), [`set`](/reference/command-line-interface/set), [Settings](/reference/settings/index)
4+
> See also: [Instance](explanation-instance), [`launch`](reference-command-line-interface-launch), [`set`](reference-command-line-interface-set), [Settings](reference-settings-index)
55
6-
This document shows further ways to customise an instance outside of the [`launch`](/reference/command-line-interface/launch) command using the Multipass [settings](/reference/settings/index).
6+
This document shows further ways to customise an instance outside of the [`launch`](reference-command-line-interface-launch) command using the Multipass [settings](reference-settings-index).
77

88
(set-the-cpu-ram-or-disk-of-an-instance)=
99
## Set the CPUs , RAM or disk space of an instance
1010

11-
> See also: [`local.<instance-name>.cpus`](/reference/settings/local-instance-name-cpus), [`local.<instance-name>.disk)`](/reference/settings/local-instance-name-disk), [`local.<instance-name>.memory`](/reference/settings/local-instance-name-memory)
11+
> See also: [`local.<instance-name>.cpus`](reference-settings-local-instance-name-cpus), [`local.<instance-name>.disk)`](reference-settings-local-instance-name-disk), [`local.<instance-name>.memory`](reference-settings-local-instance-name-memory)
1212
1313
You can set instance properties at `launch` time, but you can also update some of them after the instance has been created. Specifically, an instance’s memory, disk space, and the number of its CPUs are exposed via daemon settings: `local.<instance-name>.(cpus|disk|memory)`.
1414

15-
To modify one of this properties, first stop the instance and then issue the [`set`](/reference/command-line-interface/set) command. For example:
15+
To modify one of this properties, first stop the instance and then issue the [`set`](reference-command-line-interface-set) command. For example:
1616

1717
```{code-block} text
1818
multipass stop handsome-ling
@@ -63,7 +63,7 @@ Modifying instance settings is not supported when using the Hyperkit driver, whi
6363

6464
## Set the status of an instance to primary
6565

66-
> See also: [client.primary-name](/reference/settings/client-primary-name)
66+
> See also: [client.primary-name](reference-settings-client-primary-name)
6767
6868
This section demonstrates how to set the status of an instance to primary. This is convenient because it makes this instance the default argument for several commands, such as `shell` , `start` , `stop` , `restart` and `suspend`, and also automatically mounts your $HOME directory into the instance.
6969

docs/how-to-guides/manage-instances/remove-an-instance.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
(how-to-guides-manage-instances-remove-an-instance)=
22
# Remove an instance
33

4-
> See also: [Instance](/explanation/instance)
4+
> See also: [Instance](explanation-instance)
55
66
This guide demonstrates how to remove an instance, either temporarily or permanently.
77

88
## Move an instance to the recycle bin
99

10-
> See also: [`delete`](/reference/command-line-interface/launch), [`recover`](/reference/command-line-interface/recover)
10+
> See also: [`delete`](reference-command-line-interface-delete), [`recover`](reference-command-line-interface-recover)
1111
1212
To mark an instance as deleted, run:
1313

@@ -43,7 +43,7 @@ keen-yak STOPPED -- Ubuntu 18.04 LTS
4343

4444
## Remove an instance permanently
4545

46-
> See also: [`delete`](/reference/command-line-interface/launch), [`purge`](/reference/command-line-interface/purge)
46+
> See also: [`delete`](reference-command-line-interface-delete), [`purge`](reference-command-line-interface-purge)
4747
4848
If you want to get rid of all instances in `Deleted` status for good, you can purge them:
4949

docs/how-to-guides/manage-instances/run-a-docker-container-in-multipass.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
(how-to-guides-manage-instances-run-a-docker-container-in-multipass)=
22
# Run a Docker container in Multipass
3+
34
```{Warning}
4-
Blueprints are deprecated and will be removed in a future release. You can achieve similar effects with cloud-init and other launch options. Find out more at: [Launch customized instances with Multipass and cloud-init](/how-to-guides/manage-instances/launch-customized-instances-with-multipass-and-cloud-init)
5+
Blueprints are deprecated and will be removed in a future release. You can achieve similar effects with cloud-init and other launch options. Find out more at: [Launch customized instances with Multipass and cloud-init](how-to-guides-manage-instances-launch-customized-instances-with-multipass-and-cloud-init)
56
```
67
<!-- This is published as an Ubuntu Tutorial at this link: https://ubuntu.com/tutorials/running-a-container-with-the-docker-workflow-in-multipass -->
78

@@ -36,7 +37,7 @@ In this tutorial, you will see how to get started with the Docker blueprint by c
3637

3738
*Duration: 3 minutes*
3839

39-
Let's start by installing Multipass on your machine, following the steps in [How to install Multipass](/how-to-guides/install-multipass).
40+
Let's start by installing Multipass on your machine, following the steps in [How to install Multipass](how-to-guides-install-multipass).
4041

4142
<!-- Out of date and unnecessary
4243
![|720x643](https://assets.ubuntu.com/v1/25ca03d0-mp-docker.png)

0 commit comments

Comments
 (0)