Switch integration test deployment to httpd mode#74
Conversation
The pipeline failure revealed the root cause: the container image's default CMD is Fixed by replacing the container's |
The pipeline failure was caused by |
|
You should use |
Switched to The
The container command creates those |
The crash was caused by |
|
This is the production config for inspiration: |
The crash was caused by httpd being unable to open its error log: |
Replace CTS_DEVELOPER_ENV=1 (Flask dev server on port 5005) with a production-like httpd setup on port 8080. A cts-config ConfigMap is created with two files: - /etc/cts/config.py: ProdConfiguration (AUTH_BACKEND=noauth, PostgreSQL URI), loaded by init_config when CTS_DEVELOPER_ENV is absent. - /etc/cts/httpd.conf: Apache httpd + mod_wsgi config matching the production template (ServerRoot /etc/httpd, Include conf.modules.d/*, WSGIDaemonProcess, WSGIScriptAlias). PidFile and DefaultRuntimeDir point to /tmp so httpd can write them as a non-root user under OpenShift's restricted-v2 SCC. Logs go to /dev/stderr and /dev/stdout. The main container command is overridden to run httpd -DFOREGROUND directly, bypassing start_cts_from_here which unconditionally sets CTS_DEVELOPER_ENV=1. Port references updated from 5005 to 8080 throughout (Service, containerPort, readiness/liveness probes, CTS_URL). Fixes #73 Generated-By: OpenCode (google-vertex-anthropic/claude-sonnet-4-6@default)
The pipeline failure was Switched to the production httpd.conf template you shared: |
Code Review: Switch integration test deployment to httpd modeScope: SHOULD FIX —
|
Switch the EaaS integration test from Flask dev server to httpd mode, matching the production runtime.
Changes
.tekton/integration-test-eaas.yamlkubectl applystep that creates acts-configConfigMap containing:/etc/cts/config.py—ProdConfigurationclass (AUTH_BACKEND = "noauth", PostgreSQL URI), loaded byinit_configvia the file-based path (noCTS_DEVELOPER_ENV)./etc/cts/httpd.conf— minimal Apache httpd + mod_wsgi config listening on port 8080.ServerRootis/etc/httpdso that relativeLoadModulepaths resolve to/etc/httpd/modules/(where Fedora's httpd RPM installs them). Writable locations are redirected:PidFile/Mutexto/tmp/httpd/runandErrorLogto/var/log/httpd(alreadychmod 755in the Dockerfile).CTS_DEVELOPER_ENV=1andSQLALCHEMY_DATABASE_URIenv vars from both therun-migrationsinit container and the mainctscontainer.cts-configConfigMap at/etc/cts(read-only) in both containers.mkdir -p /tmp/httpd/run && exec httpd -DFOREGROUND -f /etc/cts/httpd.conf. The default./start_cts_from_herescript hardcodesexport CTS_DEVELOPER_ENV=1, which unconditionally forces Flask's dev server on port 5005 regardless of the config file.5005to8080: Serviceport/targetPort,containerPort,readinessProbe,livenessProbe, andCTS_URLin the test runner step.No application code was changed. All existing integration tests pass unchanged.
Fixes #73