Unsupported
This commit is contained in:
parent
3d73741342
commit
e6ef8d0913
10 changed files with 1 additions and 280 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -1,3 +0,0 @@
|
||||||
*.py[ocd]
|
|
||||||
|
|
||||||
.idea/
|
|
||||||
19
Dockerfile
19
Dockerfile
|
|
@ -1,19 +0,0 @@
|
||||||
FROM fedora:25
|
|
||||||
|
|
||||||
MAINTAINER "Petr Hracek" <phracek@redhat.com>
|
|
||||||
|
|
||||||
LABEL summary="Provides a minimal set of packages used for debugging."
|
|
||||||
LABEL description="The Fedora Debugging Tools Container is a docker-formatted image that includes a minimal set of tools for troubleshooting and investigating a Fedora Host. Designed to run as a privileged container."
|
|
||||||
LABEL io.k8s.display-name="Fedora Debugging Tools Base"
|
|
||||||
|
|
||||||
RUN dnf install -y --setopt=tsflags=nodocs \
|
|
||||||
iputils \
|
|
||||||
iproute \
|
|
||||||
lsof \
|
|
||||||
net-tools \
|
|
||||||
passwd \
|
|
||||||
strace \
|
|
||||||
valgrind && \
|
|
||||||
dnf -y clean all
|
|
||||||
|
|
||||||
CMD ["/usr/bin/bash"]
|
|
||||||
17
Makefile
17
Makefile
|
|
@ -1,17 +0,0 @@
|
||||||
.PHONY: build run default
|
|
||||||
|
|
||||||
IMAGE_NAME = debugging-tools
|
|
||||||
MODULEMDURL=file://debugging-tools.yaml
|
|
||||||
|
|
||||||
all: run
|
|
||||||
default: run
|
|
||||||
|
|
||||||
build:
|
|
||||||
docker build --tag=$(IMAGE_NAME) .
|
|
||||||
|
|
||||||
run: build
|
|
||||||
docker run -it --name $(IMAGE_NAME) --privileged --ipc=host --net=host --pid=host -e HOST=/host -e NAME=$(IMAGE_NAME) -e IMAGE=$(IMAGE_NAME) -v /run:/run -v /var/log:/var/log -v /etc/machine-id:/etc/machine-id -v /etc/localtime:/etc/localtime -v /:/host $(IMAGE_NAME)
|
|
||||||
|
|
||||||
test: build
|
|
||||||
cd tests; MODULE=docker MODULEMD=$(MODULEMDURL) URL="docker=$(IMAGE_NAME)" make all
|
|
||||||
cd tests; MODULE=rpm MODULEMD=$(MODULEMDURL) URL="docker=$(IMAGE_NAME)" make all
|
|
||||||
44
README.md
44
README.md
|
|
@ -1,44 +0,0 @@
|
||||||
# debugging-tools-base
|
|
||||||
A minimal set of debugging tools so I can troubleshoot my running server.
|
|
||||||
|
|
||||||
The list of packages available in container is:
|
|
||||||
|
|
||||||
* iproute - Advanced IP routing and network device configuration tools
|
|
||||||
* iputils - Network monitoring tools including ping
|
|
||||||
* lsof - A utility which lists open files on a Linux/UNIX system
|
|
||||||
* net-tools - Basic networking tools
|
|
||||||
* passwd - An utility for setting or changing passwords using PAM - YES (no if we're not making container)
|
|
||||||
* strace - Tracks and displays system calls associated with a running process
|
|
||||||
* valgrind - Tool for finding memory management bugs in programs
|
|
||||||
|
|
||||||
|
|
||||||
## How to run the container for debugging
|
|
||||||
|
|
||||||
Pull container from DockerHub:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker pull modularitycontainers/debugging-tools-base
|
|
||||||
```
|
|
||||||
|
|
||||||
For running the container, use command:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker run -it --name NAME --privileged --ipc=host --net=host --pid=host -e HOST=/host -e NAME=NAME -e IMAGE=IMAGE -v /run:/run -v /var/log:/var/log -v /etc/machine-id:/etc/machine-id -v /etc/localtime:/etc/localtime -v /:/host debugging-tools-base
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
## How to extent the container with you set of tools for debugging
|
|
||||||
|
|
||||||
Write a Dockerfile:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
FROM modularitycontainers/debugging-tool-base:latest
|
|
||||||
|
|
||||||
MAINTAINTER YOUR_NAME <email@adress.com>
|
|
||||||
|
|
||||||
RUN INSTALL_PKSG="<list of your tools for debugging> " && \
|
|
||||||
dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
|
|
||||||
dnf -y clean all
|
|
||||||
CMD ["/usr/bin/bash"]
|
|
||||||
|
|
||||||
```
|
|
||||||
1
dead.package
Normal file
1
dead.package
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Unsupported
|
||||||
|
|
@ -1,103 +0,0 @@
|
||||||
document: modulemd
|
|
||||||
version: 1
|
|
||||||
data:
|
|
||||||
summary: Set of debugging tools so I can troubleshoot my running server
|
|
||||||
description: The list of minimal set of debugging tools except base-runtime.
|
|
||||||
license:
|
|
||||||
module: [ MIT ]
|
|
||||||
dependencies:
|
|
||||||
buildrequires:
|
|
||||||
base-runtime: master
|
|
||||||
# add common-build-dependencies
|
|
||||||
common-build-dependencies-bootstrap: f26
|
|
||||||
common-build-dependencies: f26
|
|
||||||
shared-userspace: f26
|
|
||||||
requires:
|
|
||||||
base-runtime: master
|
|
||||||
shared-userspace: f26
|
|
||||||
references:
|
|
||||||
community: https://fedoraproject.org/wiki/Modularity
|
|
||||||
documentation: https://fedoraproject.org/wiki/Fedora_Packaging_Guidelines_for_Modules
|
|
||||||
profiles:
|
|
||||||
default:
|
|
||||||
rpms:
|
|
||||||
- iproute
|
|
||||||
- iputils
|
|
||||||
# No dependencies
|
|
||||||
- lsof
|
|
||||||
- net-tools
|
|
||||||
- passwd
|
|
||||||
- strace
|
|
||||||
- valgrind
|
|
||||||
api:
|
|
||||||
rpms:
|
|
||||||
- iproute
|
|
||||||
- iputils
|
|
||||||
- lsof
|
|
||||||
- net-tools
|
|
||||||
- passwd
|
|
||||||
- strace
|
|
||||||
- valgrind
|
|
||||||
components:
|
|
||||||
rpms:
|
|
||||||
iproute:
|
|
||||||
rationale: A dependency of tangerine.
|
|
||||||
ref: master
|
|
||||||
buildorder: 10
|
|
||||||
iputils:
|
|
||||||
rationale: A dependency of tangerine.
|
|
||||||
ref: master
|
|
||||||
buildorder: 10
|
|
||||||
lsof:
|
|
||||||
rationale: A dependency of tangerine.
|
|
||||||
ref: master
|
|
||||||
buildorder: 10
|
|
||||||
net-tools:
|
|
||||||
rationale: A dependency of tangerine.
|
|
||||||
ref: master
|
|
||||||
buildorder: 10
|
|
||||||
passwd:
|
|
||||||
rationale: A dependency of tangerine.
|
|
||||||
ref: master
|
|
||||||
buildorder: 10
|
|
||||||
strace:
|
|
||||||
rationale: A dependency of tangerine.
|
|
||||||
ref: master
|
|
||||||
buildorder: 10
|
|
||||||
valgrind:
|
|
||||||
rationale: A dependency of tangerine.
|
|
||||||
ref: master
|
|
||||||
buildorder: 10
|
|
||||||
libmnl:
|
|
||||||
rationale: A dependency of iproute.
|
|
||||||
ref: master
|
|
||||||
linux-atm:
|
|
||||||
rationale: A dependency of iproute.
|
|
||||||
ref: master
|
|
||||||
linuxdoc-tools:
|
|
||||||
rationale: A dependency of iproute.
|
|
||||||
ref: master
|
|
||||||
psutils:
|
|
||||||
rationale: A dependency of iproute.
|
|
||||||
ref: master
|
|
||||||
texlive:
|
|
||||||
rationale: A dependency of iproute.
|
|
||||||
ref: master
|
|
||||||
docbook-utils:
|
|
||||||
rationale: A dependency of iputils.
|
|
||||||
ref: master
|
|
||||||
perl-SGMLSpm:
|
|
||||||
rationale: A dependency of iputils.
|
|
||||||
ref: master
|
|
||||||
bluez:
|
|
||||||
rationale: A dependency of net-tools.
|
|
||||||
ref: master
|
|
||||||
libuser:
|
|
||||||
rationale: A dependency of passwd.
|
|
||||||
ref: master
|
|
||||||
libunwind:
|
|
||||||
rationale: A dependency of strace.
|
|
||||||
ref: master
|
|
||||||
openmpi:
|
|
||||||
rationale: A dependency of valgrind.
|
|
||||||
ref: master
|
|
||||||
0
sources
0
sources
|
|
@ -1,6 +0,0 @@
|
||||||
MODULE_LINT=/usr/share/moduleframework/tools/modulelint.py
|
|
||||||
CMD=python -m avocado run --filter-by-tags=-WIP $(MODULE_LINT) *.py
|
|
||||||
|
|
||||||
#
|
|
||||||
all:
|
|
||||||
$(CMD)
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
document: modularity-testing
|
|
||||||
version: 1
|
|
||||||
name: debugging-tools
|
|
||||||
modulemd-url: http://raw.githubusercontent.com/container-images/debugging-tools-base/master/debugging-tools-base.yaml
|
|
||||||
source: https://github.com/container-images/debugging-tools-base
|
|
||||||
packages:
|
|
||||||
rpms:
|
|
||||||
- iproute
|
|
||||||
- iputils
|
|
||||||
- lsof
|
|
||||||
- net-tools
|
|
||||||
- passwd
|
|
||||||
- strace
|
|
||||||
- valgrind
|
|
||||||
module:
|
|
||||||
docker:
|
|
||||||
source: https://github.com/container-images/debugging-tools-base.git
|
|
||||||
container: docker.io/modularitycontainers/debugging-tools-base
|
|
||||||
rpm:
|
|
||||||
|
|
@ -1,69 +0,0 @@
|
||||||
#!/usr/bin/python
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
#
|
|
||||||
# This Modularity Testing Framework helps you to write tests for modules
|
|
||||||
# Copyright (C) 2017 Red Hat, Inc.
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# he Free Software Foundation; either version 2 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License along
|
|
||||||
# with this program; if not, write to the Free Software Foundation, Inc.,
|
|
||||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
#
|
|
||||||
# Authors: Petr Sklenar <psklenar@redhat.com>
|
|
||||||
#
|
|
||||||
|
|
||||||
from moduleframework import module_framework
|
|
||||||
import os
|
|
||||||
import time
|
|
||||||
|
|
||||||
|
|
||||||
class simpleTests(module_framework.AvocadoTest):
|
|
||||||
"""
|
|
||||||
:avocado: enable
|
|
||||||
"""
|
|
||||||
|
|
||||||
def test_iputils(self):
|
|
||||||
self.start()
|
|
||||||
self.run('ls -al /usr/bin/ping')
|
|
||||||
self.run('ls -al /usr/bin/tracepath')
|
|
||||||
self.run('lsof /')
|
|
||||||
|
|
||||||
def test_iproute(self):
|
|
||||||
self.start()
|
|
||||||
self.run('ls -al /usr/sbin/ip')
|
|
||||||
self.run('ls -al /usr/sbin/ifcfg')
|
|
||||||
x = self.run('/usr/sbin/ifcfg', ignore_status=True)
|
|
||||||
self.assertEqual(1, x.exit_status)
|
|
||||||
self.run('ls -al /usr/sbin/ifstat')
|
|
||||||
self.run('/usr/sbin/ifstat')
|
|
||||||
|
|
||||||
def test_lsof(self):
|
|
||||||
self.run('lsof /')
|
|
||||||
|
|
||||||
def test_net_tools(self):
|
|
||||||
self.run('ls -al /usr/sbin/route')
|
|
||||||
self.run('route')
|
|
||||||
self.run('ls -al /usr/bin/netstat')
|
|
||||||
self.run('netstat')
|
|
||||||
|
|
||||||
def test_passwd(self):
|
|
||||||
self.run('ls -al /usr/bin/passwd')
|
|
||||||
self.run('passwd --help')
|
|
||||||
|
|
||||||
def test_strace(self):
|
|
||||||
self.run('ls -al /usr/bin/strace')
|
|
||||||
self.run('strace -h')
|
|
||||||
|
|
||||||
def test_valgrind(self):
|
|
||||||
self.run('ls -al /usr/bin/valgrind')
|
|
||||||
self.run('valgrind -h')
|
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue