joystick: separate config files
Signed-off-by: Michal Konečný <mkonecny@redhat.com>
This commit is contained in:
parent
65876c4d0d
commit
6b8e9bfdd2
2 changed files with 80 additions and 78 deletions
78
roles/openshift-apps/joystick/templates/config.toml
Normal file
78
roles/openshift-apps/joystick/templates/config.toml
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
# Example configuration for Fedora Messaging
|
||||||
|
# For complete documentation check
|
||||||
|
# https://fedora-messaging.readthedocs.io/en/latest/configuration.html.
|
||||||
|
|
||||||
|
amqp_url = "amqps://joystick:@rabbitmq01{{ env_suffix }}.phx2.fedoraproject.org/%2Fpubsub"
|
||||||
|
|
||||||
|
{% if env == "staging" %}
|
||||||
|
topic_prefix = "org.fedoraproject.stg"
|
||||||
|
{% else %}
|
||||||
|
topic_prefix = "org.fedoraproject.prod"
|
||||||
|
{% endif %}
|
||||||
|
passive_declares = true
|
||||||
|
publish_exchange = "amq.topic"
|
||||||
|
callback = "joystick.consumers.fedora_messaging_consumer:JoyStickController"
|
||||||
|
|
||||||
|
[[bindings]]
|
||||||
|
queue = "joystick{{env_suffix}}"
|
||||||
|
exchange = "amq.topic"
|
||||||
|
routing_keys = ["org.fedoraproject.*.pungi.compose.status.change"]
|
||||||
|
|
||||||
|
[tls]
|
||||||
|
ca_cert = "/etc/fedora-messaging/cacert.pem"
|
||||||
|
keyfile = "/etc/fedora-messaging/fedora-key.pem"
|
||||||
|
certfile = "/etc/fedora-messaging/fedora-cert.pem"
|
||||||
|
|
||||||
|
[client_properties]
|
||||||
|
app = "joystick"
|
||||||
|
|
||||||
|
[exchanges."amq.topic"]
|
||||||
|
type = "topic"
|
||||||
|
durable = true
|
||||||
|
auto_delete = false
|
||||||
|
arguments = {}
|
||||||
|
|
||||||
|
[queues."joystick{{env_suffix}}"]
|
||||||
|
durable = true
|
||||||
|
auto_delete = false
|
||||||
|
exclusive = false
|
||||||
|
arguments = {}
|
||||||
|
|
||||||
|
[qos]
|
||||||
|
prefetch_size = 0
|
||||||
|
prefetch_count = 25
|
||||||
|
|
||||||
|
[log_config]
|
||||||
|
version = 1
|
||||||
|
disable_existing_loggers = true
|
||||||
|
|
||||||
|
[log_config.formatters.simple]
|
||||||
|
format = "[%(name)s %(levelname)s] %(message)s"
|
||||||
|
|
||||||
|
[log_config.handlers.console]
|
||||||
|
class = "logging.StreamHandler"
|
||||||
|
formatter = "simple"
|
||||||
|
stream = "ext://sys.stdout"
|
||||||
|
|
||||||
|
[log_config.loggers.fedora_messaging]
|
||||||
|
level = "INFO"
|
||||||
|
propagate = false
|
||||||
|
handlers = ["console"]
|
||||||
|
|
||||||
|
[log_config.root]
|
||||||
|
level = "DEBUG"
|
||||||
|
handlers = ["console"]
|
||||||
|
|
||||||
|
# joystick consumer configuration
|
||||||
|
[consumer_config]
|
||||||
|
topic_prefix = 'org.fedoraproject'
|
||||||
|
{% if env == "staging" %}
|
||||||
|
environment = 'stg'
|
||||||
|
{% else %}
|
||||||
|
environment = 'prod'
|
||||||
|
{% endif %}
|
||||||
|
{% if env == "staging" %}
|
||||||
|
regions = ["us-east-2"]
|
||||||
|
{% else %}
|
||||||
|
regions = ["us-east-2"]
|
||||||
|
{% endif %}
|
|
@ -1,3 +1,4 @@
|
||||||
|
{% macro load_file(filename) %}{% include filename %}{%- endmacro -%}
|
||||||
----
|
----
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: List
|
kind: List
|
||||||
|
@ -11,81 +12,4 @@ items:
|
||||||
app: joystick
|
app: joystick
|
||||||
data:
|
data:
|
||||||
config.toml: |-
|
config.toml: |-
|
||||||
# Example configuration for Fedora Messaging
|
{{ load_file('config.toml') | indent }}
|
||||||
# For complete documentation check
|
|
||||||
# https://fedora-messaging.readthedocs.io/en/latest/configuration.html.
|
|
||||||
|
|
||||||
amqp_url = "amqps://joystick:@rabbitmq01{{ env_suffix }}.phx2.fedoraproject.org/%2Fpubsub"
|
|
||||||
|
|
||||||
{% if env == "staging" %}
|
|
||||||
topic_prefix = "org.fedoraproject.stg"
|
|
||||||
{% else %}
|
|
||||||
topic_prefix = "org.fedoraproject.prod"
|
|
||||||
{% endif %}
|
|
||||||
passive_declares = true
|
|
||||||
publish_exchange = "amq.topic"
|
|
||||||
callback = "joystick.consumers.fedora_messaging_consumer:JoyStickController"
|
|
||||||
|
|
||||||
[[bindings]]
|
|
||||||
queue = "joystick{{env_suffix}}"
|
|
||||||
exchange = "amq.topic"
|
|
||||||
routing_keys = ["org.fedoraproject.*.pungi.compose.status.change"]
|
|
||||||
|
|
||||||
[tls]
|
|
||||||
ca_cert = "/etc/fedora-messaging/cacert.pem"
|
|
||||||
keyfile = "/etc/fedora-messaging/fedora-key.pem"
|
|
||||||
certfile = "/etc/fedora-messaging/fedora-cert.pem"
|
|
||||||
|
|
||||||
[client_properties]
|
|
||||||
app = "joystick"
|
|
||||||
|
|
||||||
[exchanges."amq.topic"]
|
|
||||||
type = "topic"
|
|
||||||
durable = true
|
|
||||||
auto_delete = false
|
|
||||||
arguments = {}
|
|
||||||
|
|
||||||
[queues."joystick{{env_suffix}}"]
|
|
||||||
durable = true
|
|
||||||
auto_delete = false
|
|
||||||
exclusive = false
|
|
||||||
arguments = {}
|
|
||||||
|
|
||||||
[qos]
|
|
||||||
prefetch_size = 0
|
|
||||||
prefetch_count = 25
|
|
||||||
|
|
||||||
[log_config]
|
|
||||||
version = 1
|
|
||||||
disable_existing_loggers = true
|
|
||||||
|
|
||||||
[log_config.formatters.simple]
|
|
||||||
format = "[%(name)s %(levelname)s] %(message)s"
|
|
||||||
|
|
||||||
[log_config.handlers.console]
|
|
||||||
class = "logging.StreamHandler"
|
|
||||||
formatter = "simple"
|
|
||||||
stream = "ext://sys.stdout"
|
|
||||||
|
|
||||||
[log_config.loggers.fedora_messaging]
|
|
||||||
level = "INFO"
|
|
||||||
propagate = false
|
|
||||||
handlers = ["console"]
|
|
||||||
|
|
||||||
[log_config.root]
|
|
||||||
level = "DEBUG"
|
|
||||||
handlers = ["console"]
|
|
||||||
|
|
||||||
# joystick consumer configuration
|
|
||||||
[consumer_config]
|
|
||||||
topic_prefix = 'org.fedoraproject'
|
|
||||||
{% if env == "staging" %}
|
|
||||||
environment = 'stg'
|
|
||||||
{% else %}
|
|
||||||
environment = 'prod'
|
|
||||||
{% endif %}
|
|
||||||
{% if env == "staging" %}
|
|
||||||
regions = ["us-east-2"]
|
|
||||||
{% else %}
|
|
||||||
regions = ["us-east-2"]
|
|
||||||
{% endif %}
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue