
Following Airship Code and Project conventions [0], adding standard Makefile targets and moving charts and Dockerfiles into correct directories. [0] https://airship-docs.readthedocs.io/en/latest/code-conventions.html#code-and-project-conventions Change-Id: Ia38fd662be663b83a1b8adef1eca1492ed1fde34
2.0 KiB
2.0 KiB
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
- Internet access
- Successfully deploy Openstack Helm Chart sandbox
- Have access to Jump Host where the user k8s profile has already been setup
Installation
-
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
-
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 |
+--------------------+