How to Access VMs and Databases related to PKS

Following instructions are about how to access the VMs and Databases for PKS.

1. SSH into Ops Manager & access tempest_production database

- SSH into your Ops Manager VM # Use the password you gave when you logged in the Operations Manager UI for the first time.

$ ssh ubuntu@opsman.mycompany.local 
ubuntu@opsman.mycompany.local's password:
ubuntu@opsman:~$ sudo -i
[sudo] password for ubuntu: 

- Access then tempest_production databases on PostgreSQL

root@opsman:~# su - postgres
postgres@opsman:~$ psql tempest_production
tempest_production=# \d
 
                             List of relations
Schema |                  Name                   |   Type   |    Owner
--------+-----------------------------------------+----------+-------------
public | application_unlock_infos                | table    | tempest-web
public | application_unlock_infos_id_seq         | sequence | tempest-web
public | ar_internal_metadata                    | table    | tempest-web
public | certificates                            | table    | tempest-web
public | certificates_id_seq                     | sequence | tempest-web
public | delayed_jobs                            | table    | tempest-web
public | delayed_jobs_id_seq                     | sequence | tempest-web
public | disk_types                              | table    | tempest-web
public | disk_types_id_seq                       | sequence | tempest-web
public | encryption_keys                         | table    | tempest-web
public | encryption_keys_id_seq                  | sequence | tempest-web
public | installation_changes                    | table    | tempest-web
public | installation_changes_id_seq             | sequence | tempest-web
public | installation_logs                       | table    | tempest-web
:
:

2. SSH into PKS UAA/API Server and Access MySQL DB

- Login to the PKS VM using the 'bosh ssh' command

- Access MySQL DB Get the MySQL root password from PKS tile -> Credentials -> Mysql Admin password

3. SSH into Kubernetes Master and Access etcd database - SSH into a Kubernetes master

- Access etcd key-value datastore # # etcd has two API versions of v2 & v3 and their command usages are different. # - Access Flannel Configuration using API v2 ** etcdctl/API v2 command usage - https://github.com/coreos/etcd/blob/master/etcdctl/READMEv2.md

- Access Cluster Objects using API v3 ** etcdctl/API v3 command usage - https://coreos.com/etcd/docs/latest/dev-guide/interacting_v3.html

4. SSH into Harbor VM, containers and Access various Databases - SSH into Harbor VM

- Access Notary DB in MySQL

- Access Clair DB in PostgreSQL

- Access Harbor DB in MySQL

references: https://community.pivotal.io/s/article/How-to-Access-VMs--Databases-related-to-PKS

Last updated

Was this helpful?