Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(RHIDP-4259): NAS 1.4 #133

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion ci-scripts/rhdh-setup/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export RBAC_POLICY="${RBAC_POLICY:-all_groups_admin}"

export PSQL_LOG="${PSQL_LOG:-true}"
export RHDH_METRIC="${RHDH_METRIC:-true}"
export PSQL_EXPORT="${PSQL_EXPORT:-false}"
export PSQL_EXPORT="${PSQL_EXPORT:-true}"
export LOG_MIN_DURATION_STATEMENT="${LOG_MIN_DURATION_STATEMENT:-65}"
export LOG_MIN_DURATION_SAMPLE="${LOG_MIN_DURATION_SAMPLE:-50}"
export LOG_STATEMENT_SAMPLE_RATE="${LOG_STATEMENT_SAMPLE_RATE:-0.7}"
Expand Down Expand Up @@ -441,6 +441,17 @@ psql_debug() {
$clin exec "${psql_db}" -- sh -c 'sed -i "s/^\s*#track_wal_io_timing.*/track_wal_io_timing = on/" /var/lib/pgsql/data/userdata/postgresql.conf'
$clin exec "${psql_db}" -- sh -c 'sed -i "s/^\s*#track_functions.*/track_functions = all/" /var/lib/pgsql/data/userdata/postgresql.conf'
$clin exec "${psql_db}" -- sh -c 'sed -i "s/^\s*#stats_fetch_consistency.*/stats_fetch_consistency = cache/" /var/lib/pgsql/data/userdata/postgresql.conf'
$clin exec "${psql_db}" -- sh -c 'sed -i "s/^\s*shared_buffers.*/shared_buffers = 512MB/" /var/lib/pgsql/data/userdata/postgresql.conf'
$clin exec "${psql_db}" -- sh -c 'sed -i "s/^\s*min_wal_size.*/min_wal_size = 1GB/" /var/lib/pgsql/data/userdata/postgresql.conf'
$clin exec "${psql_db}" -- sh -c 'sed -i "s/^\s*max_wal_size.*/max_wal_size = 4GB/" /var/lib/pgsql/data/userdata/postgresql.conf'
$clin exec "${psql_db}" -- sh -c 'sed -i "s/^\s*#effective_cache_size.*/effective_cache_size = 1536MB/" /var/lib/pgsql/data/userdata/postgresql.conf'
$clin exec "${psql_db}" -- sh -c 'sed -i "s/^\s*#maintenance_work_mem.*/maintenance_work_mem = 128MB/" /var/lib/pgsql/data/userdata/postgresql.conf'
$clin exec "${psql_db}" -- sh -c 'sed -i "s/^\s*#checkpoint_completion_target.*/checkpoint_completion_target = 0.9/" /var/lib/pgsql/data/userdata/postgresql.conf'
$clin exec "${psql_db}" -- sh -c 'sed -i "s/^\s*#wal_buffers.*/wal_buffers = 16MB/" /var/lib/pgsql/data/userdata/postgresql.conf'
$clin exec "${psql_db}" -- sh -c 'sed -i "s/^\s*#default_statistics_target.*/default_statistics_target = 100/" /var/lib/pgsql/data/userdata/postgresql.conf'
$clin exec "${psql_db}" -- sh -c 'sed -i "s/^\s*#random_page_cost.*/random_page_cost = 1.1/" /var/lib/pgsql/data/userdata/postgresql.conf'
$clin exec "${psql_db}" -- sh -c 'sed -i "s/^\s*#effective_io_concurrency.*/effective_io_concurrency = 300/" /var/lib/pgsql/data/userdata/postgresql.conf'
$clin exec "${psql_db}" -- sh -c 'sed -i "s/^\s*#work_mem.*/work_mem = 2621kB/" /var/lib/pgsql/data/userdata/postgresql.conf'
$clin exec "${psql_db}" -- sh -c "echo shared_preload_libraries = \'pgaudit,auto_explain,pg_stat_statements\' >> /var/lib/pgsql/data/userdata/postgresql.conf"
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,15 @@ upstream:
primary:
containerSecurityContext:
enabled: false
resources:
requests:
cpu: 250m
memory: 1Gi
ephemeral-storage: 1Gi
limits:
cpu: 2000m
memory: 5Gi
ephemeral-storage: 5Gi
extraEnvVars:
- name: POSTGRESQL_ADMIN_PASSWORD
valueFrom:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,15 @@ upstream:
primary:
containerSecurityContext:
enabled: false
resources:
requests:
cpu: 250m
memory: 1Gi
ephemeral-storage: 1Gi
limits:
cpu: 2000m
memory: 5Gi
ephemeral-storage: 5Gi
extraEnvVars:
- name: POSTGRESQL_ADMIN_PASSWORD
valueFrom:
Expand Down
17 changes: 17 additions & 0 deletions test.env
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,20 @@
# export SCALE_DB_STORAGES="1Gi 2Gi"
# export SCALE_CPU_REQUESTS_LIMITS=": 1:1"
# export SCALE_MEMORY_REQUESTS_LIMITS=": 1Gi:1Gi"
export DURATION=5m
export PRE_LOAD_DB="true"
export SCALE_ACTIVE_USERS_SPAWN_RATES='100:20 200:40 100:20 200:40 100:20 200:40'
export SCALE_BS_USERS_GROUPS='10000:2000'
export SCALE_CATALOG_SIZES='2500:2500'
export SCALE_CPU_REQUESTS_LIMITS=:
export SCALE_DB_STORAGES=2Gi
export SCALE_MEMORY_REQUESTS_LIMITS=:
export SCALE_REPLICAS=1
export SCALE_WORKERS=40
export SCENARIO=mvp
export USE_PR_BRANCH=true
export WAIT_FOR_SEARCH_INDEX=false
export RHDH_HELM_CHART=redhat-developer-hub
export AUTH_PROVIDER=keycloak
export RHDH_HELM_REPO='https://raw.githubusercontent.com/rhdh-bot/openshift-helm-charts/refs/heads/redhat-developer-hub-1.4-69-CI/installation'
export RHDH_METRIC=true