diff --git a/installer/openshift/Dockerfile b/installer/openshift/Dockerfile new file mode 100644 index 0000000000..1e6b9e1b9c --- /dev/null +++ b/installer/openshift/Dockerfile @@ -0,0 +1,54 @@ +FROM centos:7 + +# Do we need this? +#RUN locale-gen en_US.UTF-8 +#ENV LANG en_US.UTF-8 +#ENV LANGUAGE en_US:en +#ENV LC_ALL en_US.UTF-8 + +USER root + +# Init System +ADD https://github.com/krallin/tini/releases/download/v0.14.0/tini /tini +RUN chmod +x /tini + +# Tower Dependencies Install +# TODO: Probably only need Tower dependencies here +ADD Makefile /tmp/Makefile +RUN mkdir /tmp/requirements +ADD requirements/requirements_ansible.txt \ + requirements/requirements_ansible_uninstall.txt \ + requirements/requirements_ansible_git.txt \ + requirements/requirements.txt \ + requirements/requirements_tower_uninstall.txt \ + requirements/requirements_git.txt \ + /tmp/requirements/ + +# OS Dependencies +RUN yum -y install epel-release && yum -y localinstall http://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm && yum -y update && yum -y install ansible git curl python-psycopg2 python-pip python-setuptools libselinux-python setools-libs yum-utils sudo acl make postgresql-devel nginx python-psutil libxml2-devel libxslt-devel libstdc++.so.6 gcc cyrus-sasl-devel cyrus-sasl openldap-devel libffi-devel python-pip xmlsec1-devel swig krb5-devel xmlsec1-openssl xmlsec1 xmlsec1-openssl-devel libtool-ltdl-devel bubblewrap gcc-c++ python-devel +RUN pip install virtualenv supervisor +WORKDIR /tmp +RUN mkdir -p /var/lib/awx/public/static +# TODO: Handlers could be stripped of this +RUN mkdir -p /var/log/tower +RUN mkdir -p /etc/tower +RUN head -n 10 /dev/random | sha256sum > /etc/tower/SECRET_KEY +RUN VENV_BASE=/var/lib/awx/venv make requirements_ansible && VENV_BASE=/var/lib/awx/venv make requirements_tower +COPY dist/ansible-tower-3.2.0.tar.gz /tmp/ansible-tower-3.2.0.tar.gz +RUN pip install /tmp/ansible-tower-3.2.0.tar.gz +# TODO: Replace this with the actual version +RUN echo "3.2.0" > /var/lib/awx/.tower_version +ADD packaging/docker/nginx.conf /etc/nginx/nginx.conf +ADD packaging/docker/supervisor.conf /supervisor.conf +ADD packaging/docker/launch_tower.sh /usr/bin/launch_tower.sh +ADD packaging/docker/settings.py /etc/tower/settings.py +RUN yum -y remove gcc postgresql-devel libxml2-devel libxslt-devel cyrus-sasl-devel openldap-devel xmlsec1-devel krb5-devel xmlsec1-openssl-devel libtool-ltdl-devel gcc-c++ python-devel && yum -y clean all +RUN rm -rf /root/.cache +RUN chmod g+w /etc/passwd +RUN chgrp -Rf root /var/lib/awx && chmod -Rf g+w /var/lib/awx +RUN chmod -R 777 /var/log/nginx && chmod -R 777 /var/lib/nginx +USER 1000 +EXPOSE 8052 +WORKDIR /var/lib/awx +ENTRYPOINT ["/tini", "--"] +CMD /usr/bin/launch_tower.sh diff --git a/installer/openshift/Dockerfile.celery b/installer/openshift/Dockerfile.celery new file mode 100644 index 0000000000..6852630b45 --- /dev/null +++ b/installer/openshift/Dockerfile.celery @@ -0,0 +1,53 @@ +FROM centos:7 + +# Do we need this? +#RUN locale-gen en_US.UTF-8 +#ENV LANG en_US.UTF-8 +#ENV LANGUAGE en_US:en +#ENV LC_ALL en_US.UTF-8 + +USER root + +# Init System +ADD https://github.com/krallin/tini/releases/download/v0.14.0/tini /tini +RUN chmod +x /tini + +# Tower Dependencies Install +ADD Makefile /tmp/Makefile +RUN mkdir /tmp/requirements +ADD requirements/requirements_ansible.txt \ + requirements/requirements_ansible_uninstall.txt \ + requirements/requirements_ansible_git.txt \ + requirements/requirements.txt \ + requirements/requirements_tower_uninstall.txt \ + requirements/requirements_git.txt \ + /tmp/requirements/ + +# OS Dependencies +RUN yum -y install epel-release && yum -y localinstall http://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm && yum -y update && yum -y install ansible git curl python-psycopg2 python-pip python-setuptools libselinux-python setools-libs yum-utils sudo acl make postgresql-devel python-psutil libxml2-devel libxslt-devel libstdc++.so.6 gcc cyrus-sasl-devel cyrus-sasl openldap-devel libffi-devel python-pip xmlsec1-devel swig krb5-devel xmlsec1-openssl xmlsec1 xmlsec1-openssl-devel libtool-ltdl-devel bubblewrap gcc-c++ python-devel +RUN pip install virtualenv supervisor +WORKDIR /tmp +RUN mkdir -p /var/lib/awx +# TODO: Handlers could be stripped of this +RUN mkdir -p /var/log/tower +RUN mkdir -p /etc/tower +RUN mkdir -p /var/lib/awx/public/static +RUN head -n 10 /dev/random | sha256sum > /etc/tower/SECRET_KEY +RUN VENV_BASE=/var/lib/awx/venv make requirements_ansible && VENV_BASE=/var/lib/awx/venv make requirements_tower +COPY dist/ansible-tower-3.2.0.tar.gz /tmp/ansible-tower-3.2.0.tar.gz +RUN pip install /tmp/ansible-tower-3.2.0.tar.gz +# TODO: Replace this with the actual version +RUN echo "3.2.0" > /var/lib/awx/.tower_version +ADD packaging/docker/nginx.conf /etc/nginx/nginx.conf +ADD packaging/docker/supervisor_task.conf /supervisor_task.conf +ADD packaging/docker/launch_tower_task.sh /usr/bin/launch_tower_task.sh +ADD packaging/docker/settings.py /etc/tower/settings.py +RUN yum -y remove gcc postgresql-devel libxml2-devel libxslt-devel cyrus-sasl-devel openldap-devel xmlsec1-devel krb5-devel xmlsec1-openssl-devel libtool-ltdl-devel gcc-c++ python-devel && yum -y clean all +RUN rm -rf /root/.cache +RUN chmod g+w /etc/passwd +RUN chgrp -Rf root /var/lib/awx && chmod -Rf g+w /var/lib/awx +USER 1000 +EXPOSE 80 443 +WORKDIR /var/lib/awx +ENTRYPOINT ["/tini", "--"] +CMD /usr/bin/launch_tower_task.sh diff --git a/installer/openshift/config/configmap.yml b/installer/openshift/config/configmap.yml new file mode 100644 index 0000000000..fac7563830 --- /dev/null +++ b/installer/openshift/config/configmap.yml @@ -0,0 +1,82 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: tower-config + namespace: tower +data: + secret_key: AAABBBCCC + tower_settings: | + import os + import socket + ADMINS = () + DEBUG = True + + #Autoprovisioning should replace this + CLUSTER_HOST_ID = socket.gethostname() + SYSTEM_UUID = '00000000-0000-0000-0000-000000000000' + CELERY_QUEUES += (Queue(CLUSTER_HOST_ID, Exchange(CLUSTER_HOST_ID), routing_key=CLUSTER_HOST_ID),) + CELERY_ROUTES['awx.main.tasks.cluster_node_heartbeat'] = {'queue': CLUSTER_HOST_ID, 'routing_key': CLUSTER_HOST_ID} + CELERY_ROUTES['awx.main.tasks.purge_old_stdout_files'] = {'queue': CLUSTER_HOST_ID, 'routing_key': CLUSTER_HOST_ID} + + STATIC_ROOT = '/var/lib/awx/public/static' + PROJECTS_ROOT = '/var/lib/awx/projects' + JOBOUTPUT_ROOT = '/var/lib/awx/job_status' + SECRET_KEY = file('/etc/tower/SECRET_KEY', 'rb').read().strip() + ALLOWED_HOSTS = ['*'] + INTERNAL_API_URL = 'http://127.0.0.1:8052' + AWX_TASK_ENV['HOME'] = '/var/lib/awx' + SERVER_EMAIL = 'root@localhost' + DEFAULT_FROM_EMAIL = 'webmaster@localhost' + EMAIL_SUBJECT_PREFIX = '[AWX] ' + EMAIL_HOST = 'localhost' + EMAIL_PORT = 25 + EMAIL_HOST_USER = '' + EMAIL_HOST_PASSWORD = '' + EMAIL_USE_TLS = False + LOGGING['loggers']['django.request']['handlers'] = ['console'] + LOGGING['loggers']['rest_framework.request']['handlers'] = ['console'] + LOGGING['loggers']['awx']['handlers'] = ['console'] + LOGGING['loggers']['awx.main.commands.run_callback_receiver']['handlers'] = ['console'] + LOGGING['loggers']['awx.main.commands.inventory_import']['handlers'] = ['console'] + LOGGING['loggers']['awx.main.tasks']['handlers'] = ['console'] + LOGGING['loggers']['awx.main.scheduler']['handlers'] = ['console'] + LOGGING['loggers']['awx.main.commands.run_fact_cache_receiver']['handlers'] = ['console'] + LOGGING['loggers']['django_auth_ldap']['handlers'] = ['console'] + LOGGING['loggers']['social']['handlers'] = ['console'] + LOGGING['loggers']['system_tracking_migrations']['handlers'] = ['console'] + LOGGING['loggers']['rbac_migrations']['handlers'] = ['console'] + LOGGING['handlers']['callback_receiver'] = {'class': 'logging.NullHandler'} + LOGGING['handlers']['fact_receiver'] = {'class': 'logging.NullHandler'} + LOGGING['handlers']['task_system'] = {'class': 'logging.NullHandler'} + LOGGING['handlers']['tower_warnings'] = {'class': 'logging.NullHandler'} + LOGGING['handlers']['rbac_migrations'] = {'class': 'logging.NullHandler'} + LOGGING['handlers']['system_tracking_migrations'] = {'class': 'logging.NullHandler'} + + DATABASES = { + 'default': { + 'ATOMIC_REQUESTS': True, + 'ENGINE': 'transaction_hooks.backends.postgresql_psycopg2', + 'NAME': "tower", + 'USER': "tower", + 'PASSWORD': "password123", + 'HOST': "postgresql", + 'PORT': "5432", + } + } + BROKER_URL = 'amqp://{}:{}@{}:{}/{}'.format( + "tower", + "abcdefg", + "localhost", + "5672", + "tower") + CHANNEL_LAYERS = { + 'default': {'BACKEND': 'asgi_amqp.AMQPChannelLayer', + 'ROUTING': 'awx.main.routing.channel_routing', + 'CONFIG': {'url': BROKER_URL}} + } + CACHES = { + 'default': { + 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', + 'LOCATION': '{}:{}'.format("localhost", "11211") + }, + } diff --git a/installer/openshift/config/deployment.yml b/installer/openshift/config/deployment.yml new file mode 100644 index 0000000000..b4d7dcaccf --- /dev/null +++ b/installer/openshift/config/deployment.yml @@ -0,0 +1,76 @@ +--- +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: tower + namespace: tower +spec: + replicas: 1 + template: + metadata: + labels: + name: tower-web-deploy + service: django + spec: + containers: + - name: tower-web + image: 172.30.1.1:5000/tower/tower_web:latest + ports: + - containerPort: 8052 + volumeMounts: + - mountPath: /etc/tower + name: tower-application-config + - name: tower-celery + image: 172.30.1.1:5000/tower/tower_task:latest + volumeMounts: + - mountPath: /etc/tower + name: tower-application-config + env: + - name: DATABASE_USER + value: postgres + - name: DATABASE_NAME + value: tower + - name: DATABASE_HOST + value: postgresql + - name: DATABASE_PASSWORD + value: password + - name: tower-rabbit + image: rabbitmq:3 + env: + - name: RABBITMQ_ERLANG_COOKIE + value: secret + - name: RABBITMQ_NODENAME + value: rabbitmq + - name: RABBITMQ_DEFAULT_USER + value: tower + - name: RABBITMQ_DEFAULT_PASS + value: abcdefg + - name: RABBITMQ_DEFAULT_VHOST + value: tower + - name: tower-memcached + image: memcached + volumes: + - name: tower-application-config + configMap: + name: tower-config + items: + - key: tower_settings + path: settings.py + - key: secret_key + path: SECRET_KEY +--- +apiVersion: v1 +kind: Service +metadata: + name: tower-web-svc + namespace: tower + labels: + name: tower-web-svc +spec: + type: "NodePort" + ports: + - name: http + port: 8052 + nodePort: 30083 + selector: + name: tower-web-deploy diff --git a/installer/openshift/config/namespace.yml b/installer/openshift/config/namespace.yml new file mode 100644 index 0000000000..41d4a7ebd9 --- /dev/null +++ b/installer/openshift/config/namespace.yml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: tower diff --git a/installer/openshift/inventory b/installer/openshift/inventory new file mode 100644 index 0000000000..c4f03c7fbc --- /dev/null +++ b/installer/openshift/inventory @@ -0,0 +1,5 @@ +[primary] +localhost + +[all:children] +primary diff --git a/installer/openshift/launch_tower.sh b/installer/openshift/launch_tower.sh new file mode 100755 index 0000000000..cd6cc67352 --- /dev/null +++ b/installer/openshift/launch_tower.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +if [ `id -u` -ge 10000 ]; then + echo "awx:x:`id -u`:`id -g`:,,,:/var/lib/awx:/bin/bash" >> /tmp/passwd + cat /tmp/passwd > /etc/passwd + rm /tmp/passwd +fi +tower-manage collectstatic --noinput --clear +supervisord -c /supervisor.conf diff --git a/installer/openshift/launch_tower_task.sh b/installer/openshift/launch_tower_task.sh new file mode 100755 index 0000000000..acec1f66d3 --- /dev/null +++ b/installer/openshift/launch_tower_task.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +if [ `id -u` -ge 10000 ]; then + echo "awx:x:`id -u`:`id -g`:,,,:/var/lib/awx:/bin/bash" >> /tmp/passwd + cat /tmp/passwd > /etc/passwd + rm /tmp/passwd +fi +ANSIBLE_REMOTE_TEMP=/tmp ANSIBLE_LOCAL_TEMP=/tmp ansible -i "127.0.0.1," -c local -v -m postgresql_db -U $DATABASE_USER -a "name=$DATABASE_NAME owner=$DATABASE_USER login_user=$DATABASE_USER login_host=$DATABASE_HOST login_password=$DATABASE_PASSWORD" all +tower-manage migrate --noinput --fake-initial +echo "from django.contrib.auth.models import User; User.objects.create_superuser('admin', 'root@localhost', 'password')" | tower-manage shell +tower-manage create_preload_data +tower-manage register_instance --hostname=$(hostname) +tower-manage register_queue --queuename=tower --hostnames=$(hostname) +supervisord -c /supervisor_task.conf diff --git a/installer/openshift/nginx.conf b/installer/openshift/nginx.conf new file mode 100644 index 0000000000..ddc41d0f94 --- /dev/null +++ b/installer/openshift/nginx.conf @@ -0,0 +1,86 @@ +user awx; + +worker_processes 1; + +error_log /dev/stdout warn; +pid /tmp/nginx.pid; + +events { + worker_connections 1024; +} + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /dev/stdout main; + + map $http_upgrade $connection_upgrade { + default upgrade; + '' close; + } + + sendfile on; + #tcp_nopush on; + #gzip on; + + + upstream uwsgi { + server localhost:8050; + } + + upstream daphne { + server localhost:8051; + } + + server { + listen 8052 default_server; + + # If you have a domain name, this is where to add it + server_name _; + keepalive_timeout 65; + + # HSTS (ngx_http_headers_module is required) (15768000 seconds = 6 months) + add_header Strict-Transport-Security max-age=15768000; + + location /static/ { + alias /var/lib/awx/public/static/; + } + + location /favicon.ico { alias /var/lib/awx/public/static/favicon.ico; } + + location /websocket { + # Pass request to the upstream alias + proxy_pass http://daphne; + # Require http version 1.1 to allow for upgrade requests + proxy_http_version 1.1; + # We want proxy_buffering off for proxying to websockets. + proxy_buffering off; + # http://en.wikipedia.org/wiki/X-Forwarded-For + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + # enable this if you use HTTPS: + proxy_set_header X-Forwarded-Proto https; + # pass the Host: header from the client for the sake of redirects + proxy_set_header Host $http_host; + # We've set the Host header, so we don't need Nginx to muddle + # about with redirects + proxy_redirect off; + # Depending on the request value, set the Upgrade and + # connection headers + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + } + + location / { + # Add trailing / if missing + rewrite ^(.*[^/])$ $1/ permanent; + uwsgi_read_timeout 120s; + uwsgi_pass uwsgi; + include /etc/nginx/uwsgi_params; + } + } +} diff --git a/installer/openshift/settings.py b/installer/openshift/settings.py new file mode 100644 index 0000000000..06d2dbcb1e --- /dev/null +++ b/installer/openshift/settings.py @@ -0,0 +1,80 @@ +# AWX settings file + +import os + +ADMINS = () + +STATIC_ROOT = '/var/lib/awx/public/static' + +PROJECTS_ROOT = '/var/lib/awx/projects' + +JOBOUTPUT_ROOT = '/var/lib/awx/job_status' + +SECRET_KEY = file('/etc/tower/SECRET_KEY', 'rb').read().strip() + +ALLOWED_HOSTS = ['*'] + +INTERNAL_API_URL = 'http://127.0.0.1:80' + +AWX_TASK_ENV['HOME'] = '/var/lib/awx' + +############################################################################### +# EMAIL SETTINGS +############################################################################### + +SERVER_EMAIL = 'root@localhost' +DEFAULT_FROM_EMAIL = 'webmaster@localhost' +EMAIL_SUBJECT_PREFIX = '[AWX] ' + +EMAIL_HOST = 'localhost' +EMAIL_PORT = 25 +EMAIL_HOST_USER = '' +EMAIL_HOST_PASSWORD = '' +EMAIL_USE_TLS = False + +LOGGING['loggers']['django.request']['handlers'] = ['console'] +LOGGING['loggers']['rest_framework.request']['handlers'] = ['console'] +LOGGING['loggers']['awx']['handlers'] = ['console'] +LOGGING['loggers']['awx.main.commands.run_callback_receiver']['handlers'] = ['console'] +LOGGING['loggers']['awx.main.commands.inventory_import']['handlers'] = ['console'] +LOGGING['loggers']['awx.main.tasks']['handlers'] = ['console'] +LOGGING['loggers']['awx.main.scheduler']['handlers'] = ['console'] +LOGGING['loggers']['awx.main.commands.run_fact_cache_receiver']['handlers'] = ['console'] +LOGGING['loggers']['django_auth_ldap']['handlers'] = ['console'] +LOGGING['loggers']['social']['handlers'] = ['console'] +LOGGING['loggers']['system_tracking_migrations']['handlers'] = ['console'] +LOGGING['loggers']['rbac_migrations']['handlers'] = ['console'] + +DATABASES = { + 'default': { + 'ATOMIC_REQUESTS': True, + 'ENGINE': 'transaction_hooks.backends.postgresql_psycopg2', + 'NAME': os.getenv("DATABASE_NAME", None), + 'USER': os.getenv("DATABASE_USER", None), + 'PASSWORD': os.getenv("DATABASE_PASSWORD", None), + 'HOST': os.getenv("DATABASE_HOST", None), + 'PORT': os.getenv("DATABASE_PORT", None), + } +} + +BROKER_URL = 'amqp://{}:{}@{}:{}/{}'.format( + os.getenv("RABBITMQ_USER", None), + os.getenv("RABBITMQ_PASSWORD", None), + os.getenv("RABBITMQ_HOST", None), + os.getenv("RABBITMQ_PORT", "5672"), + os.getenv("RABBITMQ_VHOST", "tower")) + +CHANNEL_LAYERS = { + 'default': {'BACKEND': 'asgi_amqp.AMQPChannelLayer', + 'ROUTING': 'awx.main.routing.channel_routing', + 'CONFIG': {'url': BROKER_URL}} +} + + +CACHES = { + 'default': { + 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', + 'LOCATION': '{}:{}'.format(os.getenv("MEMCACHED_HOST", None), + os.getenv("MEMCACHED_PORT", "11211")) + }, +} diff --git a/installer/openshift/supervisor.conf b/installer/openshift/supervisor.conf new file mode 100644 index 0000000000..d9574d954a --- /dev/null +++ b/installer/openshift/supervisor.conf @@ -0,0 +1,51 @@ +[supervisord] +nodaemon = True +umask = 022 + +[program:nginx] +command = nginx -g "daemon off;" +autostart = true +autorestart = true +stopwaitsecs = 5 +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 + +[program:uwsgi] +command = /var/lib/awx/venv/tower/bin/uwsgi --socket 127.0.0.1:8050 --module=awx.wsgi:application --vacuum --processes=5 --harakiri=120 --no-orphans --master --max-requests=1000 --master-fifo=/var/lib/awx/awxfifo --lazy-apps -b 32768 +directory = /var/lib/awx +autostart = true +2autorestart = true +stopwaitsecs = 15 +stopsignal = INT +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 + +[program:daphne] +command = /var/lib/awx/venv/tower/bin/daphne -b 127.0.0.1 -p 8051 awx.asgi:channel_layer +directory = /var/lib/awx +autostart = true +autorestart = true +stopwaitsecs = 5 +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 + +[group:tower-processes] +programs=nginx,uwsgi,daphne +priority=5 + +# TODO: Exit Handler + +[unix_http_server] +file=/tmp/supervisor.sock + +[supervisorctl] +serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket + +[rpcinterface:supervisor] +supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface diff --git a/installer/openshift/supervisor_task.conf b/installer/openshift/supervisor_task.conf new file mode 100644 index 0000000000..4103bb61b2 --- /dev/null +++ b/installer/openshift/supervisor_task.conf @@ -0,0 +1,77 @@ +[supervisord] +nodaemon = True +umask = 022 + +[program:celery] +# TODO: Needs to be reworked to dynamically use instance group queues +command = tower-manage celery worker -l debug --autoscale=4 -Ofair -Q tower_scheduler,tower_broadcast_all,tower,%(host_node_name)s -n celery@localhost +directory = /var/lib/awx +environment = LANGUAGE="en_US.UTF-8",LANG="en_US.UTF-8",LC_ALL="en_US.UTF-8",LC_CTYPE="en_US.UTF-8" +#user = {{ aw_user }} +autostart = true +autorestart = true +stopwaitsecs = 5 +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 + +[program:awx-celeryd-beat] +command = /usr/bin/tower-manage celery beat -l debug --pidfile= -s /var/lib/awx/beat.db +directory = /var/lib/awx +autostart = true +autorestart = true +stopwaitsecs = 5 +redirect_stderr=true +stdout_logfile = /dev/stdout +stdout_logfile_maxbytes = 0 +stderr_logfile = /dev/stderr +stderr_logfile_maxbytes = 0 + +[program:callback-receiver] +command = tower-manage run_callback_receiver +directory = /var/lib/awx +autostart = true +autorestart = true +stopwaitsecs = 5 +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 + +[program:fact-cache-receiver] +command = tower-manage run_fact_cache_receiver +directory = /var/lib/awx +autostart = true +autorestart = true +stopwaitsecs = 5 +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 + +[program:channels-worker] +command = tower-manage runworker --only-channels websocket.* +directory = /var/lib/awx +autostart = true +autorestart = true +stopwaitsecs = 5 +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 + +[group:tower-processes] +programs=celery,callback-receiver,channels-worker,fact-cache-receiver +priority=5 + +# TODO: Exit Handler + +[unix_http_server] +file=/tmp/supervisor.sock + +[supervisorctl] +serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket + +[rpcinterface:supervisor] +supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface diff --git a/installer/openshift/tower_setup_conf.yml b/installer/openshift/tower_setup_conf.yml new file mode 100644 index 0000000000..53453a5dcc --- /dev/null +++ b/installer/openshift/tower_setup_conf.yml @@ -0,0 +1,5 @@ +admin_password: password +database: internal +pg_password: CJUWsyKHp5P9AZZqC8Rgk7qFnVVFAPBCJbkzr3bb +primary_machine: localhost +redis_password: xrQ5uWpfH8ELWyKzfkS8UCRVAjaFruKQq3EvR4a6 \ No newline at end of file