ci: Rabbitmq progress (wip) (#7233)
* ci: rabbitmq service (wip) * ci: customize rabbitmq config
This commit is contained in:
parent
f6db3e8e1b
commit
c987bacc95
|
@ -5,3 +5,59 @@ metadata:
|
|||
data:
|
||||
settings_local.py: |-
|
||||
{{- .Files.Get "settings_local.py" | indent 4 }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: rabbitmq-configmap
|
||||
data:
|
||||
definitions.json: |-
|
||||
{
|
||||
"permissions": [
|
||||
{
|
||||
"configure": ".*",
|
||||
"read": ".*",
|
||||
"user": "datatracker",
|
||||
"vhost": "dt",
|
||||
"write": ".*"
|
||||
}
|
||||
],
|
||||
"users": [
|
||||
{
|
||||
"hashing_algorithm": "rabbit_password_hashing_sha256",
|
||||
"limits": {},
|
||||
"name": "datatracker",
|
||||
"password_hash": "HJxcItcpXtBN+R/CH7dUelfKBOvdUs3AWo82SBw2yLMSguzb",
|
||||
"tags": []
|
||||
}
|
||||
],
|
||||
"vhosts": [
|
||||
{
|
||||
"limits": [],
|
||||
"metadata": {
|
||||
"description": "",
|
||||
"tags": []
|
||||
},
|
||||
"name": "dt"
|
||||
}
|
||||
]
|
||||
}
|
||||
rabbitmq.conf: |-
|
||||
# prevent guest from logging in over tcp
|
||||
loopback_users.guest = true
|
||||
|
||||
# load saved definitions
|
||||
load_definitions = /etc/rabbitmq/definitions.json
|
||||
|
||||
# Ensure that enough disk is available to flush to disk. To do this, need to limit the
|
||||
# memory available to the container to something reasonable. See
|
||||
# https://www.rabbitmq.com/production-checklist.html#monitoring-and-resource-usage
|
||||
# for recommendations.
|
||||
|
||||
# 1-1.5 times the memory available to the container is adequate for disk limit
|
||||
disk_free_limit.absolute = 6000MB
|
||||
|
||||
# This should be ~40% of the memory available to the container. Use an
|
||||
# absolute number because relative will be proprtional to the full machine
|
||||
# memory.
|
||||
vm_memory_high_watermark.absolute = 1600MB
|
||||
|
|
20
helm/templates/services/rabbitmq.yaml
Normal file
20
helm/templates/services/rabbitmq.yaml
Normal file
|
@ -0,0 +1,20 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: rabbitmq
|
||||
labels: {{- include "datatracker.labels" . | nindent 4 }}
|
||||
{{- with .Values.rabbitmq.service.annotations }}
|
||||
annotations:
|
||||
{{- range $key, $value := . }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{.Values.rabbitmq.service.type}}
|
||||
clusterIP: None # headless service
|
||||
ports:
|
||||
- port: {{ default "5672" .Values.rabbitmq.service.port}}
|
||||
targetPort: amqp
|
||||
protocol: TCP
|
||||
name: amqp
|
||||
selector: {{- include "datatracker.selectorLabels" . | nindent 4}}
|
|
@ -1,5 +1,5 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ include "datatracker.rabbitmq.fullname" . }}
|
||||
labels:
|
||||
|
@ -41,8 +41,8 @@ spec:
|
|||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8000
|
||||
- name: amqp
|
||||
containerPort: 5672
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
{{- toYaml $podValues.livenessProbe | nindent 12 }}
|
|
@ -387,11 +387,11 @@ beat:
|
|||
# -------------------------------------------------------------
|
||||
|
||||
rabbitmq:
|
||||
name: rabbitmq
|
||||
name: "rabbitmq"
|
||||
image:
|
||||
repository: "ghcr.io/ietf-tools/datatracker-mq"
|
||||
repository: "rabbitmq"
|
||||
pullPolicy: IfNotPresent
|
||||
tag: "latest"
|
||||
tag: "3.13"
|
||||
|
||||
imagePullSecrets: []
|
||||
nameOverride: ""
|
||||
|
@ -433,7 +433,7 @@ rabbitmq:
|
|||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 80
|
||||
port: 5672
|
||||
|
||||
serviceAccount:
|
||||
# Specifies whether a service account should be created
|
||||
|
@ -456,14 +456,19 @@ rabbitmq:
|
|||
command: ["rabbitmq-diagnostics", "-q", "ping"]
|
||||
|
||||
# Additional volumes on the output Deployment definition.
|
||||
volumes: []
|
||||
volumes:
|
||||
- name: "rabbitmq-config"
|
||||
configMap:
|
||||
name: "rabbitmq-configmap"
|
||||
# - name: foo
|
||||
# secret:
|
||||
# secretName: mysecret
|
||||
# optional: false
|
||||
|
||||
# Additional volumeMounts on the output Deployment definition.
|
||||
volumeMounts: []
|
||||
volumeMounts:
|
||||
- name: "rabbitmq-config"
|
||||
mountPath: "/etc/rabbitmq"
|
||||
# - name: foo
|
||||
# mountPath: "/etc/foo"
|
||||
# readOnly: true
|
||||
|
@ -557,3 +562,4 @@ env:
|
|||
DBUSER: "django"
|
||||
DBPASS: "RkTkDPFnKpko"
|
||||
DJANGO_SECRET_KEY: "PDwXboUq!=hPjnrtG2=ge#N$Dwy+wn@uivrugwpic8mxyPfHk"
|
||||
CELERY_BROKER_URL: "amqp://datatracker:frog@rabbitmq/dt"
|
||||
|
|
Loading…
Reference in a new issue