kolla-ansible/tools/diag
Martin Hiner 53e8b80ed3 Add container engine option to scripts
This patch add a way to choose container engine inside tool and test
scripts. This is in preparation for Podman introduction but still
leaves Docker as default container engine.

Signed-off-by: Martin Hiner <m.hiner@partner.samsung.com>
Change-Id: I395d2bdb0dfb4b325b6ad197c8893c8a0f768324
2023-04-28 16:16:55 +02:00

32 lines
896 B
Bash
Executable File

#!/usr/bin/env bash
container_engine="${1:-docker}"
echo "##### System Identification #####"
egrep -w 'PRETTY_NAME|VERSION_ID' /etc/os-release
echo "##### ${container_engine^} Version #####"
$container_engine --version
echo "##### ${container_engine^} Info #####"
$container_engine info
echo "##### Ansible Version #####"
ansible --version
echo "##### List installed packages, including editables #####"
pip list
echo "##### Globals.yml file #####"
egrep -w 'kolla_base_distro|openstack_release' /etc/kolla/globals.yml
cat /etc/kolla/globals.yml | grep ^enable_
echo "##### ${container_engine^} Images #####"
$container_engine images -a --filter "label=kolla_version" --filter "dangling=false" --format "{{.ID}} - {{.Repository}}:{{.Tag}} - {{.CreatedSince}}"
echo "##### All ${container_engine^} Containers #####"
$container_engine ps -a
echo "##### Ip Link Show #####"
ip link show