Michael Beaver a8ac95ca66 Replace OSH-AIO instructions and add links
Currently the docs here have the instructions from the Openstack-Helm
All-in-One environment docs instead of just linking to the docs
themselves. This change removes the redundant instructions and replaces
them with a link to the source of the instructions. This also adds a
link to the Airship in a Bottle instructions to the postgresql-utility
docs.

This is beneficial both to reduce the documentation here, as well as
avoiding changes to the original documents not making their way here.

Change-Id: I54af601112f93d9b50653afb56b93d0cd253658e
2020-03-05 19:17:07 +00:00

1.7 KiB

PostgreSQL Utility Container

Prerequisites: Deploy Airship in a Bottle (AIAB)

Deploy the Airship in a Bottle environment

Installation

  1. Add the below to /etc/sudoers.
root    ALL=(ALL) NOPASSWD: ALL
ubuntu  ALL=(ALL) NOPASSWD: ALL
  1. Install the latest versions of Git, CA Certs, and Make if necessary.
set -xe

sudo apt-get update
sudo apt-get install --no-install-recommends -y \
ca-certificates \
git \
make \
jq \
nmap \
curl \
uuid-runtime
  1. Deploy Porthole.
git clone https://opendev.org/airship/porthole
  1. Modify the test case test-postgresqlutility-running.yaml.

Testing

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-655989696f-79246:/$ utilscli psql -h <hostaddress> -U postgresadmin -p <portnumber> --password <password>
Password for user postgresadmin:
WARNING: psql major version 9.5, server major version 10.
        Some psql features might not work.
Type "help" for help.

postgresdb=# \d
                 List of relations
Schema |       Name       |   Type   |     Owner
-------+------------------+----------+---------------
public | company          | table    | postgresadmin
public | role             | table    | postgresadmin
public | role_role_id_seq | sequence | postgresadmin
public | test             | table    | postgresadmin
(4 rows)

postgresdb=#