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
|
1. To Deploy Utility containers, Please run required scripts
|
||||||
|
|
||||||
cd porthole
|
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
|
./tools/deployment/utilities/010-ceph-utility.sh
|
||||||
|
|
||||||
3. Deploy `Compute-utility`.
|
4. Deploy `Compute-utility`.
|
||||||
|
|
||||||
./tools/deployment/utilities/020-compute-utility.sh
|
./tools/deployment/utilities/020-compute-utility.sh
|
||||||
|
|
||||||
4. Deploy `Etcdctl-utility`.
|
5. Deploy `Etcdctl-utility`.
|
||||||
|
|
||||||
./tools/deployment/utilities/030-etcdctl-utility.sh
|
./tools/deployment/utilities/030-etcdctl-utility.sh
|
||||||
|
|
||||||
5. Deploy `Mysqlclient-utility`.
|
6. Deploy `Mysqlclient-utility`.
|
||||||
|
|
||||||
./tools/deployment/utilities/040-Mysqlclient-utility.sh
|
./tools/deployment/utilities/040-Mysqlclient-utility.sh
|
||||||
|
|
||||||
6. Deploy `Openstack-utility`.
|
7. Deploy `Openstack-utility`.
|
||||||
|
|
||||||
./tools/deployment/utilities/050-openstack-utility.sh
|
./tools/deployment/utilities/050-openstack-utility.sh
|
||||||
|
|
||||||
|
8. Deploy `Postgresql-utility'.
|
||||||
|
./tools/deployment/utilities/060-postgresql-utility.sh
|
||||||
|
|
||||||
## NOTE
|
## NOTE
|
||||||
|
|
||||||
The PostgreSQL utility container is deployed as a part of Airship-in-a-Bottle (AIAB).
|
The PostgreSQL utility container needed Postgresql DB Pods for Testing. Please follow below Link.
|
||||||
To deploy and test `postgresql-utility`, see the
|
`[PostgreSQL README](https://opendev.org/airship/porthole/src/branch/master/images/postgresql-utility/README.md).`
|
||||||
[PostgreSQL README](https://opendev.org/airship/porthole/src/branch/master/images/postgresql-utility/README.md).
|
|
||||||
|
@ -1,45 +1,33 @@
|
|||||||
# PostgreSQL Utility Container
|
# PostgreSQL Utility Container
|
||||||
|
|
||||||
## Prerequisites: Deploy Airship in a Bottle (AIAB)
|
Since this needs postgresql Pods, Deploy postgres pods with Ceph (For Secrets) in osh-infra namespace
|
||||||
|
|
||||||
Deploy the [Airship in a Bottle environment](https://opendev.org/airship/treasuremap/src/branch/master/tools/deployment/aiab)
|
|
||||||
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
1. Add the below to `/etc/sudoers`.
|
Install Postgresql Pods in OSH with below steps:
|
||||||
|
|
||||||
```
|
Run this below command from porthole
|
||||||
root ALL=(ALL) NOPASSWD: ALL
|
|
||||||
ubuntu ALL=(ALL) NOPASSWD: ALL
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Install the latest versions of Git, CA Certs, and Make if necessary.
|
|
||||||
|
|
||||||
```
|
```
|
||||||
set -xe
|
set -xe
|
||||||
|
: "${OSH_INFRA_PATH:="../openstack-helm-infra"}"
|
||||||
|
|
||||||
sudo apt-get update
|
cd "${OSH_INFRA_PATH}"
|
||||||
sudo apt-get install --no-install-recommends -y \
|
bash -c "./tools/deployment/osh-infra-logging/020-ceph.sh"
|
||||||
ca-certificates \
|
bash -c "./tools/deployment/osh-infra-logging/025-ceph-ns-activate.sh"
|
||||||
git \
|
bash -c "./tools/deployment/osh-infra-monitoring/130-postgresql.sh"
|
||||||
make \
|
|
||||||
jq \
|
|
||||||
nmap \
|
|
||||||
curl \
|
|
||||||
uuid-runtime
|
|
||||||
```
|
|
||||||
|
|
||||||
3. Deploy Porthole.
|
|
||||||
|
|
||||||
```
|
```
|
||||||
git clone https://opendev.org/airship/porthole
|
|
||||||
```
|
|
||||||
|
|
||||||
4. Modify the test case `test-postgresqlutility-running.yaml`.
|
|
||||||
|
|
||||||
## Testing
|
## Testing
|
||||||
|
|
||||||
|
Get Hostname/Service for postgresql pods
|
||||||
|
|
||||||
|
```
|
||||||
|
kubectl get services -n osh-infra | grep postgresql
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
Get in to the utility pod using `kubectl exec`.
|
Get in to the utility pod using `kubectl exec`.
|
||||||
To perform any operation on the ucp PostgreSQL cluster, use the below example.
|
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
|
psql -h hostaddress -U username -p port --password password
|
||||||
|
|
||||||
root@ubuntu:~# kubectl exec -it postgresql-655989696f-79246 -n utility /bin/bash
|
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>
|
nobody@postgresql-utility-7bc947c85d-gvwpz:/$ utilscli psql -h 10.106.253.127 -p 5432 -U postgres
|
||||||
Password for user postgresadmin:
|
Password for user postgres:
|
||||||
WARNING: psql major version 9.5, server major version 10.
|
psql (10.12 (Ubuntu 10.12-0ubuntu0.18.04.1), server 9.5.19)
|
||||||
Some psql features might not work.
|
SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off)
|
||||||
Type "help" for help.
|
Type "help" for help.
|
||||||
|
|
||||||
postgresdb=# \d
|
|
||||||
List of relations
|
postgres=# \l
|
||||||
Schema | Name | Type | Owner
|
maasdb | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =Tc/postgres +
|
||||||
-------+------------------+----------+---------------
|
| | | | | postgres=CTc/postgres+
|
||||||
public | company | table | postgresadmin
|
| | | | | maas=CTc/postgres
|
||||||
public | role | table | postgresadmin
|
postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
|
||||||
public | role_role_id_seq | sequence | postgresadmin
|
template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
|
||||||
public | test | table | postgresadmin
|
| | | | | postgres=CTc/postgres
|
||||||
(4 rows)
|
template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
|
||||||
|
| | | | | postgres=CTc/postgres
|
||||||
|
|
||||||
|
|
||||||
postgresdb=#
|
postgresdb=#
|
||||||
```
|
```
|
||||||
|
@ -9,4 +9,4 @@ helm upgrade --install calicoctl-utility ./calicoctl-utility --namespace=utilit
|
|||||||
#NOTE: Validate Deployment info
|
#NOTE: Validate Deployment info
|
||||||
kubectl get -n utility secrets
|
kubectl get -n utility secrets
|
||||||
kubectl get -n utility configmaps
|
kubectl get -n utility configmaps
|
||||||
kubectl get pods -n utility
|
kubectl get pods -n utility | grep calicoctl-utility
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
set -xe
|
set -xe
|
||||||
|
|
||||||
#NOTE: Lint and package chart
|
#NOTE: Lint and package chart
|
||||||
: ${OSH_INFRA_PATH:="../../openstack-helm-infra"}
|
: ${OSH_INFRA_PATH:="../openstack-helm-infra"}
|
||||||
make -C ${OSH_INFRA_PATH} ceph-provisioners
|
make -C ${OSH_INFRA_PATH} ceph-provisioners
|
||||||
|
|
||||||
#NOTE: Deploy command
|
#NOTE: Deploy command
|
||||||
@ -48,3 +48,4 @@ helm upgrade --install ceph-utility ./ceph-utility \
|
|||||||
kubectl get -n utility jobs
|
kubectl get -n utility jobs
|
||||||
kubectl get -n utility secrets
|
kubectl get -n utility secrets
|
||||||
kubectl get -n utility configmaps
|
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
|
#NOTE: Validate Deployment info
|
||||||
kubectl get -n utility jobs
|
kubectl get -n utility jobs
|
||||||
kubectl get -n utility secrets
|
|
||||||
kubectl get -n utility configmaps
|
kubectl get -n utility configmaps
|
||||||
kubectl get -n utility pods
|
kubectl get -n utility pods | grep compute-utility
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
set -xe
|
set -xe
|
||||||
kubectl label nodes --all openstack-helm-node-class=primary --overwrite
|
kubectl label nodes --all openstack-helm-node-class=primary --overwrite
|
||||||
|
|
||||||
helm dependency update charts/calicoctl-utility
|
helm dependency update charts/etcdctl-utility
|
||||||
cd charts
|
cd charts
|
||||||
helm upgrade --install etcdctl-utility ./etcdctl-utility --namespace=utility
|
helm upgrade --install etcdctl-utility ./etcdctl-utility --namespace=utility
|
||||||
|
|
||||||
#NOTE: Validate Deployment info
|
#NOTE: Validate Deployment info
|
||||||
kubectl get -n utility secrets
|
kubectl get -n utility secrets
|
||||||
kubectl get -n utility configmaps
|
kubectl get -n utility configmaps
|
||||||
kubectl get pods -n utility
|
kubectl get pods -n utility | grep etcdctl-utility
|
||||||
|
@ -2,12 +2,12 @@
|
|||||||
set -xe
|
set -xe
|
||||||
|
|
||||||
kubectl label nodes --all openstack-helm-node-class=primary --overwrite
|
kubectl label nodes --all openstack-helm-node-class=primary --overwrite
|
||||||
helm dependency update charts/calicoctl-utility
|
helm dependency update charts/openstack-utility
|
||||||
cd charts
|
cd charts
|
||||||
helm upgrade --install openstack-utility ./openstack-utility --namespace=utility
|
helm upgrade --install openstack-utility ./openstack-utility --namespace=utility
|
||||||
|
|
||||||
#NOTE: Validate Deployment info
|
#NOTE: Validate Deployment info
|
||||||
kubectl get pods --all-namespaces | grep openstack-utility
|
kubectl get pods -n utility | grep openstack-utility
|
||||||
helm status openstack-utility
|
helm status openstack-utility
|
||||||
export OS_CLOUD=openstack_helm
|
export OS_CLOUD=openstack_helm
|
||||||
sleep 30 #NOTE(portdirect): Wait for ingress controller to update rules and restart Nginx
|
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
|
sleep 60
|
||||||
|
|
||||||
#NOTE: Validate Deployment info
|
#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