porthole/mysqlclient-utility
Trung Thai 606ccfeb63 WIP: doc and continuation of Gates integration testing and
validation experimental.

- Revise README.md document
- Update values to reflect the corresponding repo
- Continue to perform integration testing and validation as needed

Change-Id: I809efd13c06197f4a81ac5fad3961ae3e43fd0a3
2019-10-01 09:32:41 -04: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.

Prerequisites

  1. Internet access
  2. Successfully deploy Openstack Helm Chart sandbox
  3. Have access to Jump Host where the user k8s profile has already been setup

Installation

  1. Clone the OpenStack-Helm and Porthole repos

    $git clone https://git.openstack.org/openstack/openstack-helm-infra.git
    $git clone https://git.openstack.org/openstack/openstack-helm.git
    $git clone https://review.opendev.org/airship/porthole
    
  2. Pull PatchSet (optional)

    $cd porthole
    $git pull https://review.opendev.org/airship/porthole refs/changes/[patchset number]/[latest change set]
    

Validation

Execute into the pod by using kubectl command line:

Case 1 - Execute into the pod

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

It's expected to provide a shell prompt

Case 2 - Test connectiviy to Mariadb (optional)

Find mariadb pod and its corresponding IP

kubectl get pods --all-namespaces -o wide |grep -i mariadb-server|awk '{print $1,$2,$7}'

An Output should look similar to below

openstack mariadb-server-0 192.168.207.19

Now connect to the pod as illustrated in Case 1 by providing CLI arguements accordingly

CLI Syntax

$kubectl exec <POD_NAME> -it -n utility -- mysql -h <IP> -u root -p<PASSWORD> -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 |
+--------------------+