Replace Postgresql UC deployment Process
Enhanced Postgresql UC to deploy in OSH instead of relaying for AIAB for testing.Added Calico UC to Readme File,and fixed Deployment Scripts. Change-Id: I726e2dc975a82f773c0a7d69c4e60511fa0da05d
This commit is contained in:
parent
a8ac95ca66
commit
1a913172e8
20
README.md
20
README.md
@ -36,29 +36,33 @@ The recommended minimum system requirements for a full deployment are:
|
||||
1. To Deploy Utility containers, Please run required scripts
|
||||
|
||||
cd porthole
|
||||
2. Deploy `Calico-utility`.
|
||||
./tools/deployment/utilities/005-calicoctl-utility.sh
|
||||
|
||||
2. Deploy `Ceph-utility`.
|
||||
3. Deploy `Ceph-utility`.
|
||||
|
||||
./tools/deployment/utilities/010-ceph-utility.sh
|
||||
|
||||
3. Deploy `Compute-utility`.
|
||||
4. Deploy `Compute-utility`.
|
||||
|
||||
./tools/deployment/utilities/020-compute-utility.sh
|
||||
|
||||
4. Deploy `Etcdctl-utility`.
|
||||
5. Deploy `Etcdctl-utility`.
|
||||
|
||||
./tools/deployment/utilities/030-etcdctl-utility.sh
|
||||
|
||||
5. Deploy `Mysqlclient-utility`.
|
||||
6. Deploy `Mysqlclient-utility`.
|
||||
|
||||
./tools/deployment/utilities/040-Mysqlclient-utility.sh
|
||||
|
||||
6. Deploy `Openstack-utility`.
|
||||
7. Deploy `Openstack-utility`.
|
||||
|
||||
./tools/deployment/utilities/050-openstack-utility.sh
|
||||
|
||||
8. Deploy `Postgresql-utility'.
|
||||
./tools/deployment/utilities/060-postgresql-utility.sh
|
||||
|
||||
## NOTE
|
||||
|
||||
The PostgreSQL utility container is deployed as a part of Airship-in-a-Bottle (AIAB).
|
||||
To deploy and test `postgresql-utility`, see the
|
||||
[PostgreSQL README](https://opendev.org/airship/porthole/src/branch/master/images/postgresql-utility/README.md).
|
||||
The PostgreSQL utility container needed Postgresql DB Pods for Testing. Please follow below Link.
|
||||
`[PostgreSQL README](https://opendev.org/airship/porthole/src/branch/master/images/postgresql-utility/README.md).`
|
||||
|
@ -1,45 +1,33 @@
|
||||
# PostgreSQL Utility Container
|
||||
|
||||
## Prerequisites: Deploy Airship in a Bottle (AIAB)
|
||||
|
||||
Deploy the [Airship in a Bottle environment](https://opendev.org/airship/treasuremap/src/branch/master/tools/deployment/aiab)
|
||||
|
||||
Since this needs postgresql Pods, Deploy postgres pods with Ceph (For Secrets) in osh-infra namespace
|
||||
|
||||
## Installation
|
||||
|
||||
1. Add the below to `/etc/sudoers`.
|
||||
Install Postgresql Pods in OSH with below steps:
|
||||
|
||||
```
|
||||
root ALL=(ALL) NOPASSWD: ALL
|
||||
ubuntu ALL=(ALL) NOPASSWD: ALL
|
||||
```
|
||||
|
||||
2. Install the latest versions of Git, CA Certs, and Make if necessary.
|
||||
Run this below command from porthole
|
||||
|
||||
```
|
||||
set -xe
|
||||
: "${OSH_INFRA_PATH:="../openstack-helm-infra"}"
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install --no-install-recommends -y \
|
||||
ca-certificates \
|
||||
git \
|
||||
make \
|
||||
jq \
|
||||
nmap \
|
||||
curl \
|
||||
uuid-runtime
|
||||
```
|
||||
|
||||
3. Deploy Porthole.
|
||||
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"
|
||||
|
||||
```
|
||||
git clone https://opendev.org/airship/porthole
|
||||
```
|
||||
|
||||
4. Modify the test case `test-postgresqlutility-running.yaml`.
|
||||
|
||||
## 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.
|
||||
|
||||
@ -50,21 +38,23 @@ 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.
|
||||
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.
|
||||
|
||||
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)
|
||||
|
||||
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=#
|
||||
```
|
||||
|
@ -9,4 +9,4 @@ helm upgrade --install calicoctl-utility ./calicoctl-utility --namespace=utilit
|
||||
#NOTE: Validate Deployment info
|
||||
kubectl get -n utility secrets
|
||||
kubectl get -n utility configmaps
|
||||
kubectl get pods -n utility
|
||||
kubectl get pods -n utility | grep calicoctl-utility
|
||||
|
@ -2,7 +2,7 @@
|
||||
set -xe
|
||||
|
||||
#NOTE: Lint and package chart
|
||||
: ${OSH_INFRA_PATH:="../../openstack-helm-infra"}
|
||||
: ${OSH_INFRA_PATH:="../openstack-helm-infra"}
|
||||
make -C ${OSH_INFRA_PATH} ceph-provisioners
|
||||
|
||||
#NOTE: Deploy command
|
||||
@ -48,3 +48,4 @@ helm upgrade --install ceph-utility ./ceph-utility \
|
||||
kubectl get -n utility jobs
|
||||
kubectl get -n utility secrets
|
||||
kubectl get -n utility configmaps
|
||||
kubectl get -n utility pods | grep ceph-utility
|
||||
|
@ -10,6 +10,5 @@ helm upgrade --install compute-utility ./compute-utility --namespace=utility
|
||||
|
||||
#NOTE: Validate Deployment info
|
||||
kubectl get -n utility jobs
|
||||
kubectl get -n utility secrets
|
||||
kubectl get -n utility configmaps
|
||||
kubectl get -n utility pods
|
||||
kubectl get -n utility pods | grep compute-utility
|
||||
|
@ -2,11 +2,11 @@
|
||||
set -xe
|
||||
kubectl label nodes --all openstack-helm-node-class=primary --overwrite
|
||||
|
||||
helm dependency update charts/calicoctl-utility
|
||||
helm dependency update charts/etcdctl-utility
|
||||
cd charts
|
||||
helm upgrade --install etcdctl-utility ./etcdctl-utility --namespace=utility
|
||||
|
||||
#NOTE: Validate Deployment info
|
||||
kubectl get -n utility secrets
|
||||
kubectl get -n utility configmaps
|
||||
kubectl get pods -n utility
|
||||
kubectl get pods -n utility | grep etcdctl-utility
|
||||
|
@ -2,12 +2,12 @@
|
||||
set -xe
|
||||
|
||||
kubectl label nodes --all openstack-helm-node-class=primary --overwrite
|
||||
helm dependency update charts/calicoctl-utility
|
||||
helm dependency update charts/openstack-utility
|
||||
cd charts
|
||||
helm upgrade --install openstack-utility ./openstack-utility --namespace=utility
|
||||
|
||||
#NOTE: Validate Deployment info
|
||||
kubectl get pods --all-namespaces | grep openstack-utility
|
||||
kubectl get pods -n utility | grep openstack-utility
|
||||
helm status openstack-utility
|
||||
export OS_CLOUD=openstack_helm
|
||||
sleep 30 #NOTE(portdirect): Wait for ingress controller to update rules and restart Nginx
|
||||
|
@ -8,4 +8,4 @@ helm upgrade --install postgresql-utility ./postgresql-utility --namespace=utili
|
||||
sleep 60
|
||||
|
||||
#NOTE: Validate Deployment info
|
||||
kubectl get pods --all-namespaces | grep postgresql-utility
|
||||
kubectl get pods -n utility | grep postgresql-utility
|
||||
|
Loading…
Reference in New Issue
Block a user