fuel-ccp-rabbitmq/service/rabbitmq.yaml

88 lines
2.3 KiB
YAML

dsl_version: 0.1.0
service:
name: rabbitmq
kind: DaemonSet
ports:
- {{ rabbitmq.port }}
containers:
- name: rabbitmq
image: rabbitmq
probes:
readiness: "/opt/ccp/bin/rabbitmq-readiness.sh"
liveness:
command: "/opt/ccp/bin/rabbitmq-liveness.sh"
type: "exec"
volumes:
- name: rabbitmq-logs
path: "/var/log/ccp/rabbitmq"
type: host
readOnly: False
pre:
- name: chown-logs-dir
command: "sudo /bin/chown rabbitmq: /var/log/ccp/rabbitmq"
daemon:
dependencies:
- etcd
command: /usr/lib/rabbitmq/bin/rabbitmq-server
files:
- rabbitmq-conf
- erlang-cookie
- rabbitmq-env-conf
- enabled-plugins
- rabbitmq-readiness
- rabbitmq-liveness
- rabbitmq-check-helpers
# {% if security.tls.enabled %}
- server_certificate
- server_key
- ca_certificate
- combined
# {% endif %}
post:
- name: create-startup-marker
command: "date +%s > /tmp/rabbit-startup-marker"
files:
rabbitmq-conf:
path: /etc/rabbitmq/rabbitmq.config
content: rabbitmq.config.j2
rabbitmq-env-conf:
path: /etc/rabbitmq/rabbitmq-env.conf
content: rabbitmq-env.conf.j2
enabled-plugins:
path: /etc/rabbitmq/enabled_plugins
content: enabled_plugins.j2
erlang-cookie:
path: /var/lib/rabbitmq/.erlang.cookie
content: erlang.cookie.j2
perm: "400"
rabbitmq-readiness:
path: /opt/ccp/bin/rabbitmq-readiness.sh
content: rabbitmq-readiness.sh.j2
perm: "755"
rabbitmq-liveness:
path: /opt/ccp/bin/rabbitmq-liveness.sh
content: rabbitmq-liveness.sh.j2
perm: "755"
rabbitmq-check-helpers:
path: /opt/ccp/bin/rabbitmq-check-helpers.sh
content: rabbitmq-check-helpers.sh.j2
perm: "644"
# {% if security.tls.enabled %}
server_certificate:
path: /opt/ccp/etc/tls/rabbitmq_certificate.pem
content: server.pem.j2
perm: "0644"
server_key:
path: /opt/ccp/etc/tls/rabbitmq_server_key.pem
content: server-key.pem.j2
perm: "0644"
ca_certificate:
path: /opt/ccp/etc/tls/ca.pem
content: ca.pem.j2
perm: "0644"
combined:
path: /opt/ccp/etc/tls/rabbitmq.pem
content: rabbitmq_combined.pem.j2
perm: "0644"
# {% endif %}