Running the MariaDB Client on OpenShift

I set up a MariaDB server and wanted to test it out. There are many docs out there about how to set up the client. This is what worked for me.

First, find out the internal IP address of the Database server pod:

oc get pod -l name=mariadb -o json | jq  -r  '. | .items[0] | .status |  .podIP '

In my case, that returned 10.131.0.81. Which lead to this command:

kubectl run -it --rm --image=mariadb:latest --restart=Never mariadb-client -- mysql  keystone -h 10.131.0.81 --user keystone -pkeystone

Package Management Domain Model

Many years ago, when I first started working at Red Hat, I worked up a package management domain model diagram. I’ve referred to it many times over the years, but have never posted or explained it in detail. Recently, discussions over image building software caused me to refer to it a few times. Here it is, with annotations below.

Continue reading

Convert Docker Image Output to an HTML Table

#!/bin/sh
 
docker images | awk '
BEGIN {print ("<table>")};
/REPOSITORY/{
print("<tr><th>" $1,"</th><th>" $2,"</th><th>" $3,$4,"</th><th>" $5"</th><th>" $6"</th></tr>")}
/MB/{
print ("<tr><td>" $1,"</td><td>" $2,"</td><td>" $3,"</td><td>" $4,$5,$6 "</td><td> " $7,$8 "</td></tr>")}
END {print ("</table>")}'