diff --git a/ci-scripts/rhdh-setup/deploy.sh b/ci-scripts/rhdh-setup/deploy.sh index 2dabd77..ad3928e 100755 --- a/ci-scripts/rhdh-setup/deploy.sh +++ b/ci-scripts/rhdh-setup/deploy.sh @@ -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}" @@ -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 = 2GB/" /var/lib/pgsql/data/userdata/postgresql.conf' + $clin exec "${psql_db}" -- sh -c 'sed -i "s/^\s*max_wal_size.*/max_wal_size = 8GB/" /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 = 4/" /var/lib/pgsql/data/userdata/postgresql.conf' + $clin exec "${psql_db}" -- sh -c 'sed -i "s/^\s*#effective_io_concurrency.*/effective_io_concurrency = 2/" /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 diff --git a/ci-scripts/rhdh-setup/template/backstage/helm/chart-values.image-override.yaml b/ci-scripts/rhdh-setup/template/backstage/helm/chart-values.image-override.yaml index 4dcb875..5e70a44 100644 --- a/ci-scripts/rhdh-setup/template/backstage/helm/chart-values.image-override.yaml +++ b/ci-scripts/rhdh-setup/template/backstage/helm/chart-values.image-override.yaml @@ -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: diff --git a/ci-scripts/rhdh-setup/template/backstage/helm/chart-values.yaml b/ci-scripts/rhdh-setup/template/backstage/helm/chart-values.yaml index 3ae4330..b012c0f 100644 --- a/ci-scripts/rhdh-setup/template/backstage/helm/chart-values.yaml +++ b/ci-scripts/rhdh-setup/template/backstage/helm/chart-values.yaml @@ -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: diff --git a/test.env b/test.env index fc58e74..b6c9303 100644 --- a/test.env +++ b/test.env @@ -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