porthole/images/postgresql-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
..
Dockerfile.ubuntu_bionic Porthole upgrades 2023-06-23 18:48:26 +00:00
Dockerfile.ubuntu_focal K8S upgrade v1.29.3 2024-04-09 11:02:09 -05:00
Dockerfile.ubuntu_jammy [images] Upgrade distro version to Ubuntu Jammy 2024-05-20 18:18:59 +03:00
README.md Replace Postgresql UC deployment Process 2020-04-08 01:00:25 +00:00

PostgreSQL Utility Container

Since this needs postgresql Pods, Deploy postgres pods with Ceph (For Secrets) in osh-infra namespace

Installation

Install Postgresql Pods in OSH with below steps:

Run this below command from porthole

set -xe
: "${OSH_INFRA_PATH:="../openstack-helm-infra"}"

cd "${OSH_INFRA_PATH}"
bash -c "./tools/deployment/osh-infra-logging/020-ceph.sh"
bash -c "./tools/deployment/osh-infra-logging/025-ceph-ns-activate.sh"
bash -c "./tools/deployment/osh-infra-monitoring/130-postgresql.sh"

Testing

Get Hostname/Service for postgresql pods

kubectl get services -n osh-infra | grep postgresql

Get in to the utility pod using kubectl exec. To perform any operation on the ucp PostgreSQL cluster, use the below example.

Example:

utilscli psql -h hostname -U username -d database
psql -h hostaddress -U username -p port --password password

root@ubuntu:~# kubectl exec -it postgresql-655989696f-79246 -n utility /bin/bash
nobody@postgresql-utility-7bc947c85d-gvwpz:/$ utilscli psql -h 10.106.253.127 -p 5432 -U postgres
Password for user postgres:
psql (10.12 (Ubuntu 10.12-0ubuntu0.18.04.1), server 9.5.19)
SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off)
Type "help" for help.


postgres=# \l
 maasdb    | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =Tc/postgres         +
           |          |          |             |             | postgres=CTc/postgres+
           |          |          |             |             | maas=CTc/postgres
 postgres  | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 |
 template0 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
           |          |          |             |             | postgres=CTc/postgres
 template1 | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres          +
           |          |          |             |             | postgres=CTc/postgres


postgresdb=#