Verified Commit 2aba4561 authored by Tomáš Sapák's avatar Tomáš Sapák
Browse files

Add parameters for setting up worker counts

parent 9e8226a1
......@@ -18,6 +18,10 @@ kypo_crp_oidc_django_processed_lists:
kypo_crp_oidc_angular_processed_lists:
logout_uris: '{{ kypo_crp_oidc_configurations | map(attribute="end_session_endpoint") | list }}'
kypo_crp_openstack_workers: 2
kypo_crp_ansible_workers: 2
kypo_crp_default_workers: 2
kypo_crp_required_vars:
- kypo_crp_host
- kypo_crp_os_auth_url
......
[unix_http_server]
file=/var/run/supervisor.sock ; (the path to the socket file)
chmod=0700 ; sockef file mode (default 0700)
[supervisord]
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP)
nodaemon = true
; the below section must remain in the config file for RPC
; (supervisorctl/web interface) to work, additional interfaces may be
; added by defining them in separate rpcinterface: sections
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket
; KYPO specific configuration
[program:redis]
command=redis-server /etc/redis/redis.conf --daemonize no
priority=1
stopsignal=TERM
autostart=true
autorestart=true
[program:postgresql]
command=postgres
user=postgres
priority=1
stopsignal=TERM
autostart=true
autorestart=true
[program:sandbox-service]
command=bin/run-sandbox-service.sh
environment=LC_ALL=C.UTF-8,LANG=C.UTF-8
priority=2
directory=/app
stopsignal=TERM
autostart=true
autorestart=true
[program:nginx]
command=/usr/sbin/nginx -g "daemon off;"
priority=3
directory=/app
stopsignal=TERM
autostart=true
autorestart=true
[program:sandbox-service-rq-worker-openstack]
command=pipenv run python3 manage.py rqworker openstack
process_name=%(program_name)s-%(process_num)s
environment=LC_ALL=C.UTF-8,LANG=C.UTF-8
numprocs={{ kypo_crp_openstack_workers }}
directory=/app
stopsignal=TERM
autostart=true
autorestart=true
[program:sandbox-service-rq-worker-ansible]
command=pipenv run python3 manage.py rqworker ansible
process_name=%(program_name)s-%(process_num)s
environment=LC_ALL=C.UTF-8,LANG=C.UTF-8
numprocs={{ kypo_crp_ansible_workers }}
directory=/app
stopsignal=TERM
autostart=true
autorestart=true
[program:sandbox-service-rq-worker-default]
command=pipenv run python3 manage.py rqworker default
process_name=%(program_name)s-%(process_num)s
environment=LC_ALL=C.UTF-8,LANG=C.UTF-8
numprocs={{ kypo_crp_default_workers }}
directory=/app
stopsignal=TERM
autostart=true
autorestart=true
[group:sandbox-service]
programs=redis,postgresql,sandbox-service,sandbox-service-rq-worker-openstack,sandbox-service-rq-worker-ansible,sandbox-service-rq-worker-default
# vim: set syn=dosini :
......@@ -18,6 +18,7 @@ services:
SERVICE_PRECONDITION: "uag-service:8084"
volumes:
- ./configuration/sandbox-service/kypo-sandbox-service-config.yml:/app/config.yml:ro
- ./configuration/sandbox-service/supervisord.conf:/etc/supervisord.conf
- ./runtime-data/{{ kypo_crp_git.server }}:/root/.ssh/{{ kypo_crp_git.server }}:ro
- ./runtime-data/{{ kypo_crp_cert_name }}:/etc/ssl/certs/{{ kypo_crp_cert_hash }}.0
- ./runtime-data/{{ kypo_crp_proxy_key_name }}:/root/.ssh/{{ kypo_crp_proxy_key_name }}:ro
......@@ -89,7 +90,7 @@ services:
- sandbox-service
- training
- adaptive-training
- smart-assistant
- smart-assistant
- frontend
volumes:
db_data_uag:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment