|
4 | 4 |
|
5 | 5 | A collection of tools for interacting with IBM® MQ queue managers running in containers. |
6 | 6 |
|
7 | | -This repository currently includes the MQ MustGather tool, which simplifies the collection of diagnostic information from a running queue manager. Tools are provided as CLI commands, built from a Go binary, and are designed to be lightweight, container-friendly, and easy to integrate into automated environments. |
| 7 | +The following tools are currently available: |
8 | 8 |
|
9 | | -Additional tools may be added over time to support broader inspection and interaction use cases. |
| 9 | + - [MustGather](#mustgather-usage) - Collect diagnostic information required when opening a support case with IBM® MQ containers Support. |
| 10 | + - [PVCTool](#pvctool-usage) - Provides access to the files on a queue manager PVC where a remote shell cannot be established to the queue manager pod. This might be because the pod is in an Error or CrashLoopBackOff state. |
10 | 11 |
|
11 | | -The full source code is available at https://github.com/ibm-messaging/mq-container-inspector |
| 12 | +## Install Instructions |
12 | 13 |
|
13 | | -## Build |
| 14 | +To use MQ container inspector, you must install it via one of the following options: |
14 | 15 |
|
15 | | -To build the MQ container inspector tools, simply run: |
| 16 | +- [Build Binary](#build-binary): Build the MQ container inspector binary from the source code |
| 17 | +- [Download Binary](#download-binary): Download the prebuilt MQ container inspector Binary |
| 18 | +- [Prebuilt MQ container inspector image](#prebuilt-mq-container-inspector-image): Use MQ container inspector via the CPFS MustGather Image |
16 | 19 |
|
17 | | -`go build` |
| 20 | +### Build Binary |
18 | 21 |
|
19 | | -This will produce a single binary containing all available CLI tools. No additional dependencies or setup steps are required. |
| 22 | +To build and install the MQ container inspector` tool, follow these steps: |
| 23 | + |
| 24 | +1. Clone MQ container inspector GitHub repository, for example: |
| 25 | + |
| 26 | +```bash |
| 27 | +git clone https://github.com/ibm-messaging/mq-container-inspector.git |
| 28 | +cd mq-container-inspector |
| 29 | +``` |
| 30 | + |
| 31 | +2. Build MQ container inspector: |
| 32 | + |
| 33 | +```bash |
| 34 | +go build |
| 35 | +``` |
| 36 | + |
| 37 | +3. Add mq-container-inspector to your path, for example: |
| 38 | + |
| 39 | +``` |
| 40 | +sudo mv mq-container-inspector /usr/local/bin |
| 41 | +``` |
| 42 | + |
| 43 | +4. Verify the build was successful: |
| 44 | + |
| 45 | +`mq-container-inspector version` |
| 46 | + |
| 47 | +### Download Binary |
| 48 | + |
| 49 | +#### Linux |
| 50 | + |
| 51 | +1. Download the latest MQ container inspector tarball and signature for your architecture from the [releases page](https://github.com/ibm-messaging/mq-container-inspector/releases) |
| 52 | +2. Verify the tarball signature by following the instructions in [VerifyBinary.md](https://github.com/ibm-messaging/mq-container-inspector/tree/main/docs/VerifyBinary.md) |
| 53 | +3. Extract the tarball (e.g. for 1.0.0_mq-container-inspector_linux-amd64.tar.gz): |
| 54 | +`tar -xvzf ~/Downloads/1.0.0_mq-container-inspector_linux-amd64.tar.gz` |
| 55 | +4. Add mq-container-inspector to your path, for example: |
| 56 | + |
| 57 | +``` |
| 58 | +sudo mv 1.0.0_mq-container-inspector_linux-amd64 /usr/local/bin/mq-container-inspector |
| 59 | +``` |
| 60 | +5. Verify the Installation: |
| 61 | +`mq-container-inspector version` |
| 62 | + |
| 63 | +#### MacOS |
| 64 | +- Requires [Homebrew](https://brew.sh/) |
| 65 | +- Requires [Go](https://go.dev/) |
| 66 | + |
| 67 | +An MQ container inspector tarball is not available for MacOS, however the binary is available for install via brew. |
| 68 | + |
| 69 | +1. Add the MQ homebrew tap: |
| 70 | +`brew tap ibm-messaging/ibmmq` |
| 71 | + |
| 72 | +2. Install MQ container inspector: |
| 73 | +`brew install ibm-messaging/ibmmq/mqcontainerinspector` |
| 74 | + |
| 75 | +3. Verify the Installation: |
| 76 | +`mq-container-inspector version` |
| 77 | + |
| 78 | +#### Windows |
| 79 | + |
| 80 | +1. Download the latest MQ container inspector zip file and signature from the [releases page](https://github.com/ibm-messaging/mq-container-inspector/releases) |
| 81 | +2. Verify the zip file signature by following the instructions in [VerifyBinary.md](https://github.com/ibm-messaging/mq-container-inspector/tree/main/docs/VerifyBinary.md) |
| 82 | +3. Unzip the Tool, for example: |
| 83 | +- Locate the downloaded .zip file (e.g. 1.0.0_mq-container-inspector_windows-amd64.zip) |
| 84 | +- Right-click the file and choose Extract All... |
| 85 | +- Choose a destination folder and click Extract |
| 86 | +4. Add the executable to your system path: |
| 87 | +`setx PATH "%PATH%;C:\<Path-to-executable>\mq-container-inspector" /M` |
| 88 | +5. Verify the Installation: |
| 89 | +`mq-container-inspector version` |
| 90 | + |
| 91 | +### Pre-built MQ container inspector image |
| 92 | + |
| 93 | +The MQ container inspector binary is included in the IBM Cloud Pak foundational services MustGather image (icr.io/cpopen/cpfs/must-gather:latest). For usage instructions, see the [MQ Container troubleshooting docs](https://www.ibm.com/docs/en/ibm-mq/9.4.x?topic=troubleshooting-problems-mq-operator) |
20 | 94 |
|
21 | 95 | ## Mustgather Usage |
22 | 96 |
|
23 | | -After building the binary, you can run the MustGather tool with the following command: |
| 97 | +After the binary has been built or installed, you can run the MustGather tool with the following command: |
24 | 98 |
|
25 | | -`./mq-container-inspector mustgather --qm-name <queue-manager-name> --qm-namespace <queue-manager-namespace>` |
| 99 | +`mq-container-inspector mustgather --qm-name <queue-manager-name> --qm-namespace <queue-manager-namespace>` |
26 | 100 |
|
27 | 101 | This command collects diagnostic data from the specified queue manager running in a Kubernetes or OpenShift environment. |
28 | 102 |
|
29 | 103 | By default, the output is saved inside a `Must_Gather_<timestamp>` folder in the current working directory. |
30 | 104 |
|
| 105 | +For full usage and output, see the [Mustgather Usage Guide](https://github.com/ibm-messaging/mq-container-inspector/tree/main/docs/MustGatherUsage.md) |
| 106 | + |
31 | 107 | ## PVCtool Usage |
32 | 108 |
|
33 | | -After building the binary, you can run the PVC tool with the following command: |
| 109 | +After the binary has been built or installed, you can use the PVC tool to perform a [runmqras](https://www.ibm.com/docs/en/ibm-mq/9.4.x?topic=reference-runmqras-collect-mq-troubleshooting-information) must gather against a failing queue manager, with the following command: |
34 | 110 |
|
35 | | -`./mq-container-inspector pvctool --qm-name <queue-manager-name> --qm-namespace <queue-manager-namespace>` |
| 111 | +`mq-container-inspector pvctool --qm-name <queue-manager-name> --qm-namespace <queue-manager-namespace> --runmqras --cleanup` |
36 | 112 |
|
37 | | -This command creates pods attached to the queue manager PVCs for inspecting the PVCs in a Kubernetes or OpenShift environment. |
| 113 | +This command creates kubernetes pods attached to the queue manager PVCs. It then execs into the pvctool pod, runs runmqras and deletes the pods. |
38 | 114 |
|
39 | | -To delete the pvctool pods, run the same command with the --cleanup flag: |
| 115 | +By default, the output is saved inside a `PVC_Inspector_<timestamp>` folder in the current working directory. |
40 | 116 |
|
41 | | -`./mq-container-inspector pvctool --qm-name <queue-manager-name> --qm-namespace <namespace> --cleanup` |
| 117 | +For full usage and output, see the [PVCTool Usage Guide](https://github.com/ibm-messaging/mq-container-inspector/tree/main/docs/PVCToolUsage.md) |
42 | 118 |
|
43 | 119 | ## Issues and contributions |
44 | 120 |
|
|
0 commit comments