Terriermon - Digimon

19. Administering an AlloyDB Database

2024. 11. 27. 08:51클라우드/GCP

Task 1. Examine a Database Flag

  • 데이터베이스 플래그 검사

클릭

 

1.To add a database flag to your instance, expand Advanced Configuration Options and click on Add a Database Flag.

 

2.Browse the list of avaiable flags (inside Choose a flag) to get a sense of the supported options. You will not add an additional flag as part of this lab.
3.Click Cancel twice to exit the Edit Primary instance screen.
 

Task 2. Setup a Database Extension

  • 데이터베이스 확장 설정

export ALLOYDB=ALLOYDB_ADDRESS
echo $ALLOYDB  > alloydbip.txt
psql -h $ALLOYDB -U postgres
\c postgres
CREATE EXTENSION IF NOT EXISTS PGAUDIT;
select extname, extversion from pg_extension where extname = 'pgaudit';

 

Task 3. Create a Read Pool Instance for an Existing Cluster

  • 기존 클러스터에 대한 읽기 풀 인스턴스 생성

 

 

 

Task 4. Setup Backups

  • 백업 설정

 

 

Task 5. Examine Monitoring in the AlloyDB Console

 

 

export ALLOYDB=$(cat alloydbip.txt)
pgbench -h $ALLOYDB -U postgres -i -s 50 -F 90 -n postgres

 

 

 

psql -h $ALLOYDB -U postgres
select count (*) from pgbench_accounts;

 

 

Run the following pgbench operation to simulate a workload against lab-instance. The operation corresponds to a load of fifty (50) clients, across two (2) threads, polling every thirty (30) seconds, over the course of three (3) minutes. You will be prompted for the postgres user's password which is Change3Me.

 

pgbench -h $ALLOYDB -U postgres -c 50 -j 2 -P 30 -T 180 postgres

 

 

  • AlloyDB 콘솔에서 모니터링 검토

 

 

참고: https://www.cloudskillsboost.google/focuses/100851?parent=catalog

 

Administering an AlloyDB Database | Google Cloud Skills Boost

In this lab, you perform administrative tasks that are essential to the optimal use of an AlloyDB for PostgreSQL database.

www.cloudskillsboost.google

 

반응형