
NOTE: This has become a monolithic commit to get gate settings/scripts in place for CI - Add Makefile with UCP standard entrypoints - Move Dockerfile into images/drydock per UCP standards - Add values.yaml entries for uWSGI threads and workers - Add environment variables to chart Deployment manifest for uWSGI thread and workers - Add threads and workers specification to uWSGI commandline in entrypoint - Test that the Drydock API is responding - Test that the Drydock API rejects noauth requests - Fix Makefile utility script to work behind a proxy Correct task success voting Some tasks were incorrectly considered partial_success even when no failure occurred. - Network configuration erroneously marked messages as errors - Update result propagation logic to only use the latest retry The deploy_nodes task ended as incomplete due to a missing subtask assignment Also added a node check step to prepare_nodes so that nodes that are already under provisioner control (MaaS) are not IPMI-rebooted. Tangential changes: - added config item to for leadership claim interval - added some debug logging to bootaction_report task - fix tasks list API endpoint to generate valid JSON Improve task concurrency When tasks are started with a scope of multiple nodes, split the main task so each node is managed independently to de-link the progression of nodes. - Split the prepare_nodes task - Begin reducing cyclomatic complexity to allow for better unit testing - Improved tox testing to include coverage by default - Include postgresql integration tests in coverage Closes #73 Change-Id: I600c2a4db74dd42e809bc3ee499fb945ebdf31f6
24 lines
1.0 KiB
Bash
Executable File
24 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
set -ex
|
|
|
|
CMD="drydock"
|
|
PORT=${PORT:-9000}
|
|
# Number of uWSGI workers to handle API requests
|
|
DRYDOCK_API_WORKERS=${DRYDOCK_API_WORKERS:-"1"}
|
|
# Threads per worker
|
|
DRYDOCK_API_THREADS=${DRYDOCK_API_THREADS:-"4"}
|
|
|
|
if [ "$1" = 'server' ]; then
|
|
# Run Drydock under uWSGI
|
|
# --http - Port to listen for requests on
|
|
# --paste - Use DeployPaste for handling requests and use the specified config INI file
|
|
# --enable-threads - Enable the Python GIL so that service can be multithreaded
|
|
# -L - Turn off uWSGI request logging, rely totally on logging within the application
|
|
# --pyargs - Provide some command line arguments to the Python executable
|
|
# --threads - Number of threads each uWSGI worker should use for handling requests
|
|
# --workers - Number of uWSGI workers/processes for handling requests
|
|
exec uwsgi --http :${PORT} --paste config:/etc/drydock/api-paste.ini --enable-threads -L --pyargv "--config-file /etc/drydock/drydock.conf" --threads $DRYDOCK_API_THREADS --workers $DRYDOCK_API_WORKERS
|
|
fi
|
|
|
|
exec ${CMD} $@
|