Basic version of rabbitmq.
Signed-off-by: DTadrzak <daniel.tadrzak@intel.com>
This commit is contained in:
parent
7ffc2299b4
commit
5b8b476efb
23
rabbitmq/.helmignore
Normal file
23
rabbitmq/.helmignore
Normal file
@ -0,0 +1,23 @@
|
||||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
|
||||
|
4
rabbitmq/Chart.yaml
Executable file
4
rabbitmq/Chart.yaml
Executable file
@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
description: A Helm chart for Kubernetes
|
||||
name: rabbitmq
|
||||
version: 0.1.0
|
39
rabbitmq/templates/deployment.yaml
Normal file
39
rabbitmq/templates/deployment.yaml
Normal file
@ -0,0 +1,39 @@
|
||||
kind: Deployment
|
||||
apiVersion: extensions/v1beta1
|
||||
metadata:
|
||||
name: rabbitmq
|
||||
spec:
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
name: rabbitmq
|
||||
spec:
|
||||
nodeSelector:
|
||||
{{.Values.global.label.control_node}}: enabled
|
||||
volumes:
|
||||
- name: rabbitmq-emptydir
|
||||
emptyDir: {}
|
||||
- name: start-rabbitmq
|
||||
configMap:
|
||||
name: start-rabbitmq
|
||||
containers:
|
||||
- name: rabbitmq
|
||||
image: rabbitmq:3-management
|
||||
command:
|
||||
- bash
|
||||
- /tmp/start_rabbitmq.sh
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: {{.Values.global.rabbitmq_port_public}}
|
||||
initialDelaySeconds: 60
|
||||
timeoutSeconds: 5
|
||||
ports:
|
||||
- name: rabbitmq
|
||||
containerPort: {{.Values.global.rabbitmq_port_public}}
|
||||
volumeMounts:
|
||||
- name: rabbitmq-emptydir
|
||||
mountPath: /var/lib/rabbitmq
|
||||
- mountPath: /tmp/start_rabbitmq.sh
|
||||
name: start-rabbitmq
|
||||
subPath: start_rabbitmq.sh
|
9
rabbitmq/templates/service.yaml
Normal file
9
rabbitmq/templates/service.yaml
Normal file
@ -0,0 +1,9 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: rabbitmq
|
||||
spec:
|
||||
ports:
|
||||
- port: {{.Values.global.rabbitmq_port_public}}
|
||||
selector:
|
||||
app: rabbitmq
|
31
rabbitmq/templates/start_rabbitmq.yaml
Normal file
31
rabbitmq/templates/start_rabbitmq.yaml
Normal file
@ -0,0 +1,31 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: start-rabbitmq
|
||||
labels:
|
||||
system: openstack
|
||||
type: configuration
|
||||
component: messaging
|
||||
|
||||
data:
|
||||
start_rabbitmq.sh: |
|
||||
|
||||
chown -R rabbitmq:rabbitmq /var/lib/rabbitmq
|
||||
|
||||
/etc/init.d/rabbitmq-server start
|
||||
|
||||
rabbitmq-plugins enable rabbitmq_tracing
|
||||
rabbitmqctl trace_on
|
||||
|
||||
rabbitmqctl add_user {{ .Values.global.rabbitmq_default_user }} {{ .Values.global.rabbitmq_default_pass }} || true
|
||||
rabbitmqctl set_permissions {{ .Values.global.rabbitmq_default_user }} ".*" ".*" ".*" || true
|
||||
|
||||
rabbitmqctl add_user {{ .Values.global.rabbitmq_admin_user }} {{ .Values.global.rabbitmq_admin_pass }}|| true
|
||||
rabbitmqctl set_permissions {{ .Values.global.rabbitmq_admin_user }} ".*" ".*" ".*" || true
|
||||
rabbitmqctl set_user_tags {{ .Values.global.rabbitmq_admin_user }} administrator || true
|
||||
|
||||
rabbitmqctl change_password guest {{ .Values.global.rabbitmq_default_pass }} || true
|
||||
rabbitmqctl set_user_tags guest monitoring || true
|
||||
/etc/init.d/rabbitmq-server stop
|
||||
exec rabbitmq-server
|
||||
|
17
rabbitmq/values.yaml
Normal file
17
rabbitmq/values.yaml
Normal file
@ -0,0 +1,17 @@
|
||||
# Default values for rabbitmq.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare name/value pairs to be passed into your templates.
|
||||
# name: value
|
||||
global:
|
||||
rabbitmq_default_user: openstack
|
||||
rabbitmq_admin_user: rabbitmq
|
||||
rabbitmq_port_public: '5672'
|
||||
rabbitmq_port_management: '15672'
|
||||
|
||||
rabbitmq_default_pass: password
|
||||
rabbitmq_admin_pass: password
|
||||
label:
|
||||
control_node: "openstack-control-plane"
|
||||
# TODO(DTadrzak): delete me
|
||||
local:
|
||||
image: "quay.io/stackanetes/stackanetes-rabbitmq:newton"
|
Loading…
Reference in New Issue
Block a user