Skip to content

Commit e7e591d

Browse files
authored
Merge pull request #28425 from mikemckiernan/toolbox
feat: doc enhancements for toolbox (OSDOCS-1508)
2 parents c7a68f3 + a2e3495 commit e7e591d

File tree

4 files changed

+106
-0
lines changed

4 files changed

+106
-0
lines changed

modules/about-toolbox.adoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * support/gathering-cluster-data.adoc
4+
5+
[id="about-toolbox_{context}"]
6+
= About `toolbox`
7+
8+
`toolbox` is a tool that starts a container on a {op-system-first} system. The tool is primarily used to start a container that includes the required binaries and plug-ins that are needed to run commands such as `sosreport` and `redhat-support-tool`.
9+
10+
The primary purpose for a `toolbox` container is to gather diagnostic information and to provide it to Red Hat Support. However, if additional diagnostic tools are required, you can add RPM packages or run an image that is an alternative to the standard support tools image.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * support/gathering-cluster-data.adoc
4+
5+
[id="installing-packages-to-a-toolbox-container_{context}"]
6+
= Installing packages to a `toolbox` container
7+
8+
By default, running the `toolbox` command starts a container with the `registry.redhat.io/rhel8/support-tools:latest` image. This image contains the most frequently used support tools. If you need to collect node-specific data that requires a support tool that is not part of the image, you can install additional packages.
9+
10+
.Prerequisites
11+
12+
* You have accessed a node with the `oc debug node/<node_name>` command.
13+
14+
.Procedure
15+
16+
. Set `/host` as the root directory within the debug shell. The debug pod mounts the host's root file system in `/host` within the pod. By changing the root directory to `/host`, you can run binaries contained in the host's executable paths:
17+
+
18+
[source,terminal]
19+
----
20+
# chroot /host
21+
----
22+
23+
. Start the toolbox container:
24+
+
25+
[source,terminal]
26+
----
27+
# toolbox
28+
----
29+
30+
. Install the additional package, such as `wget`:
31+
+
32+
[source,terminal]
33+
----
34+
# dnf install -y <package_name>
35+
----
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * support/gathering-cluster-data.adoc
4+
5+
[id="starting-an-alternative-image-with-toolbox_{context}"]
6+
= Starting an alternative image with `toolbox`
7+
8+
By default, running the `toolbox` command starts a container with the `registry.redhat.io/rhel8/support-tools:latest` image. You can start an alternative image by creating a `.toolboxrc` file and specifying the image to run.
9+
10+
.Prerequisites
11+
12+
* You have accessed a node with the `oc debug node/<node_name>` command.
13+
14+
.Procedure
15+
16+
. Set `/host` as the root directory within the debug shell. The debug pod mounts the host's root file system in `/host` within the pod. By changing the root directory to `/host`, you can run binaries contained in the host's executable paths:
17+
+
18+
[source,terminal]
19+
----
20+
# chroot /host
21+
----
22+
23+
. Create a `.toolboxrc` file in the home directory for the root user ID:
24+
+
25+
[source,terminal]
26+
----
27+
# vi ~/.toolboxrc
28+
----
29+
+
30+
[source,text]
31+
----
32+
REGISTRY=quay.io <.>
33+
IMAGE=fedora/fedora:33-x86_64 <.>
34+
TOOLBOX_NAME=toolbox-fedora-33 <.>
35+
----
36+
<.> Optional: Specify an alternative container registry.
37+
<.> Specify an alternative image to start.
38+
<.> Optional: Specify an alternative name for the toolbox container.
39+
40+
. Start a toolbox container with the alternative image:
41+
+
42+
[source,terminal]
43+
----
44+
# toolbox
45+
----
46+
+
47+
[NOTE]
48+
====
49+
If an existing `toolbox` pod is already running, the `toolbox` command outputs `'toolbox-' already exists. Trying to start...`. Remove the running toolbox container with `podman rm toolbox-` and spawn a new toolbox container, to avoid issues with `sosreport` plug-ins.
50+
====

support/gathering-cluster-data.adoc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,14 @@ include::modules/support-collecting-network-trace.adoc[leveloffset=+1]
4343

4444
// Providing diagnostic data to Red Hat Support
4545
include::modules/support-providing-diagnostic-data-to-red-hat.adoc[leveloffset=+1]
46+
47+
// About `toolbox`
48+
include::modules/about-toolbox.adoc[leveloffset=+1]
49+
50+
// Installing packages to a toolbox container
51+
[discrete]
52+
include::modules/support-installing-packages-to-a-toolbox-container.adoc[leveloffset=+2]
53+
54+
// Starting an alternative image with toolbox
55+
[discrete]
56+
include::modules/support-starting-an-alternative-image-with-toolbox.adoc[leveloffset=+2]

0 commit comments

Comments
 (0)