Added RabbitMQ Chart

This commit is contained in:
Fran
2016-07-05 16:12:56 +02:00
parent 697afa4fcd
commit ba844232e4
6 changed files with 234 additions and 0 deletions

10
rabbitmq/Chart.yaml Normal file
View File

@@ -0,0 +1,10 @@
name: rabbitmq
home: https://www.rabbitmq.com
source:
- https://github.com/bitnami/bitnami-docker-rabbitmq
version: 0.2.0
description: Open source message broker software that implements the Advanced Message Queuing Protocol (AMQP)
maintainers:
- Bitnami <containers@bitnami.com>
details: |-
RabbitMQ is an open source message broker software that implements the Advanced Message Queuing Protocol (AMQP).

66
rabbitmq/README.md Normal file
View File

@@ -0,0 +1,66 @@
# Rabbitmq
> RabbitMQ is an open source message broker software that implements the Advanced Message Queuing Protocol (AMQP).
Based on the [Bitnami RabbitMQ](https://github.com/bitnami/bitnami-docker-rabbitmq) image for docker, this Chart bootstraps a [RabbitMQ](https://www.rabbitmq.com/) deployment on a [Kubernetes](http://kubernetes.io) cluster using [Helm Classic](https://helm.sh).
## Persistence
> *You may skip this section if your only interested in testing the Joomla Chart and have not yet made the decision to use it for your production workloads.*
For persistence of the RabbitMQ configuration, mount a [storage volume](http://kubernetes.io/v1.0/docs/user-guide/volumes.html) at the `/bitnami/rabbitmq` path of the RabbitMQ pod.
By default the RabbitMQ Chart mounts an [emptyDir](http://kubernetes.io/docs/user-guide/volumes/#emptydir) volume.
## Configuration
To edit the default RabbitMQ configuration, run
```bash
$ helmc edit rabbitmq
```
Here you can update the RabbitMQ admin username and password in `tpl/values.toml`. When not specified, the default values are used.
Refer to the Environment variables](https://github.com/bitnami/bitnami-docker-rabbitmq/#environment-variables) section of the [Bitnami RabbitMQ](https://github.com/bitnami/bitnami-docker-rabbitmq) image for the default values.
> Tip: If you have issues running the above command, add `se autochdir` to your `~/.vimrc` profile or simply edit `~/.helmc/workspace/charts/rabbitmq/tpl/values.toml` in your favourite editor.
Finally, generate the chart to apply your changes to the configuration.
```bash
$ helmc generate --force rabbitmq
```
## Access your RabbitMQ server
You should now be able to access the manager interface using the external IP configured for the RabbitMQ service.
> Note:
>
> On GKE, the service will automatically configure a firewall rule so that the RabbitMQ instance is accessible from the internet, for which you will be charged additionally.
>
> On other cloud platforms you may have to setup a firewall rule manually. Please refer your cloud providers documentation.
Get the external IP address of your RabbitMQ instance using:
```bash
$ kubectl get services rabbitmq
NAME CLUSTER_IP EXTERNAL_IP PORT(S) AGE
rabbitmq 10.63.246.116 146.148.20.117 15672/TCP 15m
```
Access your RabbitMQ deployment using the IP address listed under the `EXTERNAL_IP` column.
The default credentials are:
- Username: `user`
- Password: `bitnami`
## Cleanup
To delete the RabbitMQ deployment completely:
```bash
$ helmc uninstall -n default rabbitmq
```

View File

@@ -0,0 +1,66 @@
#helm:generate helmc tpl -d tpl/values.toml -o manifests/rabbitmq-rc.yaml $HELM_GENERATE_FILE
apiVersion: v1
kind: ReplicationController
metadata:
name: rabbitmq
labels:
app: rabbitmq
provider: rabbitmq-server
heritage: bitnami
spec:
replicas: 1
selector:
app: rabbitmq
provider: rabbitmq-server
version: 3.6.2-r0
template:
metadata:
labels:
app: rabbitmq
provider: rabbitmq-server
version: 3.6.2-r0
heritage: bitnami
spec:
containers:
- name: rabbitmq
image: bitnami/rabbitmq:3.6.2-r0
env:
- name: RABBITMQ_USERNAME
value: "user"
- name: RABBITMQ_PASSWORD
value: "bitnami"
- name: RABBITMQ_ERLANGCOOKIE
value: ""
- name: RABBITMQ_NODEPORT
value: "5672"
- name: RABBITMQ_NODETYPE
value: "stats"
- name: RABBITMQ_NODENAME
value: "rabbit"
- name: RABBITMQ_CLUSTERNODENAME
value: ""
- name: RABBITMQ_VHOST
value: "/"
- name: RABBITMQ_MANAGERBINDIP
value: "0.0.0.0"
ports:
- name: rabbitmq
containerPort: 15672
livenessProbe:
httpGet:
path: /
port: rabbitmq
initialDelaySeconds: 120
timeoutSeconds: 5
readinessProbe:
httpGet:
path: /
port: rabbitmq
initialDelaySeconds: 5
timeoutSeconds: 1
volumeMounts:
- name: rabbitmq-data
mountPath: /bitnami/rabbitmq
volumes:
- name: rabbitmq-data
emptyDir: {}

View File

@@ -0,0 +1,17 @@
apiVersion: v1
kind: Service
metadata:
name: rabbitmq
labels:
app: rabbitmq
provider: rabbitmq-server
heritage: bitnami
spec:
type: LoadBalancer
ports:
- name: rabbitmq
port: 15672
targetPort: rabbitmq
selector:
app: rabbitmq
provider: rabbitmq-server

View File

@@ -0,0 +1,66 @@
#helm:generate helmc tpl -d tpl/values.toml -o manifests/rabbitmq-rc.yaml $HELM_GENERATE_FILE
apiVersion: v1
kind: ReplicationController
metadata:
name: rabbitmq
labels:
app: rabbitmq
provider: rabbitmq-server
heritage: bitnami
spec:
replicas: 1
selector:
app: rabbitmq
provider: rabbitmq-server
version: 3.6.2-r0
template:
metadata:
labels:
app: rabbitmq
provider: rabbitmq-server
version: 3.6.2-r0
heritage: bitnami
spec:
containers:
- name: rabbitmq
image: bitnami/rabbitmq:3.6.2-r0
env:
- name: RABBITMQ_USERNAME
value: {{ .rabbitmqUsername | quote }}
- name: RABBITMQ_PASSWORD
value: {{ .rabbitmqPassword | quote }}
- name: RABBITMQ_ERLANGCOOKIE
value: {{ .rabbitmqErlangcookie | quote }}
- name: RABBITMQ_NODEPORT
value: {{ .rabbitmqNodeport | quote }}
- name: RABBITMQ_NODETYPE
value: {{ .rabbitmqNodetype | quote }}
- name: RABBITMQ_NODENAME
value: {{ .rabbitmqNodename | quote }}
- name: RABBITMQ_CLUSTERNODENAME
value: {{ .rabbitmqClusternodename | quote }}
- name: RABBITMQ_VHOST
value: {{ .rabbitmqVhost | quote }}
- name: RABBITMQ_MANAGERBINDIP
value: {{ .rabbitmqManagerbindip | quote }}
ports:
- name: rabbitmq
containerPort: 15672
livenessProbe:
httpGet:
path: /
port: rabbitmq
initialDelaySeconds: 120
timeoutSeconds: 5
readinessProbe:
httpGet:
path: /
port: rabbitmq
initialDelaySeconds: 5
timeoutSeconds: 1
volumeMounts:
- name: rabbitmq-data
mountPath: /bitnami/rabbitmq
volumes:
- name: rabbitmq-data
emptyDir: {}

9
rabbitmq/tpl/values.toml Normal file
View File

@@ -0,0 +1,9 @@
rabbitmqUsername = "user"
rabbitmqPassword = "bitnami"
rabbitmqErlangcookie = ""
rabbitmqNodeport = "5672"
rabbitmqNodetype = "stats"
rabbitmqNodename = "rabbit"
rabbitmqClusternodename = ""
rabbitmqVhost = "/"
rabbitmqManagerbindip = "0.0.0.0"