From 2df85dec75ca49a523bf3c3ad44cc9f77c0efd7d Mon Sep 17 00:00:00 2001 From: Ryan Emerson Date: Wed, 11 Dec 2019 16:45:59 +0000 Subject: [PATCH] #18 Provide tooling for debugging images --- README.md | 16 ++++++++++++++++ modules/dependencies/module.yaml | 5 +++++ 2 files changed, 21 insertions(+) diff --git a/README.md b/README.md index a5fd4bd..e585fed 100644 --- a/README.md +++ b/README.md @@ -327,6 +327,22 @@ The entrypoint for the image is `modules/runtimes/added/bin/launch.sh`, which is [ConfigGenerator](https://github.com/infinispan/infinispan-image-artifacts/tree/master) program to generate the server configuration based upon the user supplied yaml files, before then launching the server. +### Provided Tools +In order to keep the image's size as small as possible, we utilise the [ubi-minimal](https://developers.redhat.com/products/rhel/ubi/) image. Consequently, the image does not provide all of the tools that are commonly available in linux distributions. +Below is a list of common tools/recipes that are useful for debugging. + +| Task | Command | +| ---- | ------- | +| Text editor | vi | +| Get the PID of the java process | ps -fC java | +| Get socket/file information | lsof | +| List all open files excluding network sockets | lsof |grep -v "IPv[46]" | +| List all TCP sockets | ss -t -a | +| List all UDP sockets | ss -u -a | +| Network configuration | ip | +| Show unicast routes | ip route | +| Show multicast routes | ip maddress | + ## Kubernetes ### Liveness and Readiness Probes diff --git a/modules/dependencies/module.yaml b/modules/dependencies/module.yaml index 3c2af44..1b14c9b 100644 --- a/modules/dependencies/module.yaml +++ b/modules/dependencies/module.yaml @@ -8,8 +8,13 @@ version: 1.0 packages: install: - bsdtar + - findutils + - iproute - java-11-openjdk-headless + - lsof - openssl + - procps-ng + - vim-minimal execute: - script: install.sh \ No newline at end of file