porthole/images/mysqlclient-utility
astebenkova f543332804 [images] Upgrade distro version to Ubuntu Jammy
+ add python3-netifaces for successful pip packages compilation and
  orphan-sysvinit-scripts to install /etc/init.d/rsyslog script in Jammy
+ build specific image instead of all in airship-porthole-images-* jobs

Change-Id: I5c9b3bf81db95a03bd623d3c46f37f37bd595504
2024-05-20 18:18:59 +03:00
..
2023-06-23 18:48:26 +00:00
2024-04-09 11:02:09 -05:00

Mysqlclient-utility Container

This utility container allows Operations personnel to access MariaDB pods remotely to perform database functions. Authorized users in UCP Keystone RBAC will able to run queries through the utilscli helper.

Usage

Get into the utility pod using kubectl exec.

        kubectl exec -it <POD_NAME> -n utility /bin/bash

Testing Connectivity to Mariadb (Optional)

  1. Find the mariadb pod and its corresponding IP.
       kubectl get pods --all-namespaces | grep -i mariadb-server | awk '{print $1,$2}' \
       | while read a b ; do kubectl get pod $b -n $a -o wide
       done
  1. Connect to the indicated pod by providing the arguments specified for the CLI as shown below.
       kubectl exec <POD_NAME> -it -n utility -- mysql -h <IP> -u root -p<PASSWORD> \
              -e 'show databases;'

The output should resemble the following.

        >--------------------+\
        | Database           |\
        |--------------------|\
        | cinder             |\
        | glance             |\
        | heat               |\
        | horizon            |\
        | information_schema |\
        | keystone           |\
        | mysql              |\
        | neutron            |\
        | nova               |\
        | nova_api           |\
        | nova_cell0         |\
        | performance_schema |\
        +--------------------+\