porthole/images/mysqlclient-utility
Rahul Khiyani 55703d7563 Adjust code to project conventions
1. Cleaning up old Makefiles and scripts which are not used anymore

2. Renaming files to contain .md extension so that they render correctly

3. Moving README* files so that they are stored in same location

4. Adding installation scripts for all the utilities

Change-Id: Id8475cc7323f6905a0ea6df330197c61688a2a90
2019-11-19 14:56:22 +00:00
..
Dockerfile.ubuntu_xenial Adjust repository for code and project conventions 2019-10-04 15:27:44 +02:00
README.md Adjust code to project conventions 2019-11-19 14:56:22 +00:00

Mysqlclient-utility Container

This container allows users access to MariaDB pods remotely to perform db functions. Authorized users in UCP keystone RBAC will able to run queries through 'utilscli' helper.

Usage & Test

Get in to the utility pod using kubectl exec. Then perform the followings:

Case 1 - Execute into the pod

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

Case 2 - Test connectivity to Mariadb (optional)

  1. Find 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. Now connect to the pod as described in Case 1 by providing the arguments as indicated for the CLI, as shown below

    • $kubectl exec <POD_NAME> -it -n utility -- mysql -h -u root -p
      -e 'show databases;'

It's expected to see an output looks similar to below.

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