GithubHelp home page GithubHelp logo

rabbitmq-statefulset's Introduction

rabbitmq-statefulset helm chart

An example helm chart of RabbitMQ on Kubernetes (GKE) using StatefulSet.

Caveats:

  1. This example is GKE specific (it uses Persistent Volume Claims). There are no plans to support other providers.
  2. Does not support SSL for now.

Build/push your image:

docker build -t gcr.io/your-project/rabbitmq .
gcloud docker -- push gcr.io/your-project/rabbitmq

Install using helm

# First make sure you configure your chart values, etc.. to your own liking then:
helm upgrade -i rmq --set environment=production charts/rabbitmq/

Check that you have them

$ kubectl get storageclass standard
NAME       TYPE
standard   kubernetes.io/gce-pd

# kubectl get service rmq
NAME      CLUSTER-IP   EXTERNAL-IP   PORT(S)                                 AGE
rmq       None         <none>        4369/TCP,5672/TCP,15672/TCP,25672/TCP   1s 

Check everything is working as expected

# check that they are up and then check their logs.
kubectl get pod

kubectl logs rmq-0
kubectl logs rmq-1
kubectl logs rmq-2

# in case they are not up check the master logs to see what's happening 
kubectl describe pod rmq-0

Config

Environment variables can be used to configure your cluster.

  • RABBITMQ_USERNAME - create a username if it doesn't exist (useful for testing, but not recommended in production - do it manually or use secrets)
  • RABBITMQ_PASSWORD - username's password
  • RABBITMQ_VHOST - a vhost to which the username will be attached.
  • RABBITMQ_ERLANG_COOKIE - make sure you specify this in your values.yaml

An important note about hosts

Make sure your app connects to the right hosts because of the domain name prefix that is added to StatefulSets. Example:

amqp://USERNAME:[email protected]:5672/VHOST
amqp://USERNAME:[email protected]:5672/VHOST
amqp://USERNAME:[email protected]:5672/VHOST

rabbitmq-statefulset's People

Contributors

xarg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

rabbitmq-statefulset's Issues

MQTT login failed for "username" auth_failure: Refused

hello

can you give some insight as to why i get these errors ?

kubectl logs rabbitmq-0

              RabbitMQ 3.6.14. Copyright (C) 2007-2017 Pivotal Software, Inc.
  ##  ##      Licensed under the MPL.  See http://www.rabbitmq.com/
  ##  ##
  ##########  Logs: tty
  ######  ##        tty
  ##########
              Starting broker...

=INFO REPORT==== 27-Nov-2017::14:47:56 ===
Starting RabbitMQ 3.6.14 on Erlang 19.2.1
Copyright (C) 2007-2017 Pivotal Software, Inc.
Licensed under the MPL.  See http://www.rabbitmq.com/

=INFO REPORT==== 27-Nov-2017::14:47:56 ===
node           : rabbit@rabbitmq-0
home dir       : /var/lib/rabbitmq
config file(s) : /etc/rabbitmq/rabbitmq.config
cookie hash    : O7rCJeUuDjZW050KDHGMJw==
log            : tty
sasl log       : tty
database dir   : /var/lib/rabbitmq/mnesia/rabbit@rabbitmq-0

=INFO REPORT==== 27-Nov-2017::14:47:56 ===
Memory high watermark set to 25624 MiB (26869143961 bytes) of 64061 MiB (67172859904 bytes) total

=INFO REPORT==== 27-Nov-2017::14:47:56 ===
Enabling free disk space monitoring

=INFO REPORT==== 27-Nov-2017::14:47:56 ===
Disk free limit set to 50MB

=INFO REPORT==== 27-Nov-2017::14:47:56 ===
Limiting to approx 1048476 file handles (943626 sockets)

=INFO REPORT==== 27-Nov-2017::14:47:56 ===
FHC read buffering:  OFF
FHC write buffering: ON

=INFO REPORT==== 27-Nov-2017::14:47:56 ===
Database directory at /var/lib/rabbitmq/mnesia/rabbit@rabbitmq-0 is empty. Initialising from scratch...

=INFO REPORT==== 27-Nov-2017::14:47:56 ===
    application: mnesia
    exited: stopped
    type: temporary

=INFO REPORT==== 27-Nov-2017::14:47:58 ===
Waiting for Mnesia tables for 30000 ms, 9 retries left

=INFO REPORT==== 27-Nov-2017::14:47:58 ===
Waiting for Mnesia tables for 30000 ms, 9 retries left

=INFO REPORT==== 27-Nov-2017::14:47:58 ===
Waiting for Mnesia tables for 30000 ms, 9 retries left

=INFO REPORT==== 27-Nov-2017::14:47:58 ===
Priority queues enabled, real BQ is rabbit_variable_queue

=INFO REPORT==== 27-Nov-2017::14:47:58 ===
Starting rabbit_node_monitor

=INFO REPORT==== 27-Nov-2017::14:47:58 ===
Management plugin: using rates mode 'basic'

=INFO REPORT==== 27-Nov-2017::14:47:58 ===
msg_store_transient: using rabbit_msg_store_ets_index to provide index

=INFO REPORT==== 27-Nov-2017::14:47:58 ===
msg_store_persistent: using rabbit_msg_store_ets_index to provide index

=WARNING REPORT==== 27-Nov-2017::14:47:58 ===
msg_store_persistent: rebuilding indices from scratch

=INFO REPORT==== 27-Nov-2017::14:47:58 ===
Adding vhost '/'

=INFO REPORT==== 27-Nov-2017::14:47:58 ===
Creating user 'guest'

=INFO REPORT==== 27-Nov-2017::14:47:58 ===
Setting user tags for user 'guest' to [administrator]

=INFO REPORT==== 27-Nov-2017::14:47:58 ===
Setting permissions for 'guest' in '/' to '.*', '.*', '.*'

=INFO REPORT==== 27-Nov-2017::14:47:58 ===
started TCP Listener on [::]:5672

=INFO REPORT==== 27-Nov-2017::14:47:58 ===
MQTT retained message store: rabbit_mqtt_retained_msg_store_dets

=WARNING REPORT==== 27-Nov-2017::14:47:58 ===
Transport option binary unknown or invalid.

=WARNING REPORT==== 27-Nov-2017::14:47:58 ===
Transport option {packet,raw} unknown or invalid.

=WARNING REPORT==== 27-Nov-2017::14:47:58 ===
Transport option {reuseaddr,true} unknown or invalid.

=INFO REPORT==== 27-Nov-2017::14:47:58 ===
started MQTT TCP Listener on [::]:1883

=INFO REPORT==== 27-Nov-2017::14:47:58 ===
rabbit_web_mqtt: listening for HTTP connections on 0.0.0.0:15675

=INFO REPORT==== 27-Nov-2017::14:47:58 ===
Management plugin started. Port: 15672

=INFO REPORT==== 27-Nov-2017::14:47:58 ===
Statistics database started.
 completed with 8 plugins.

=INFO REPORT==== 27-Nov-2017::14:47:59 ===
Server startup complete; 8 plugins started.
 * rabbitmq_management
 * rabbitmq_web_mqtt
 * rabbitmq_mqtt
 * rabbitmq_management_agent
 * rabbitmq_web_dispatch
 * cowboy
 * cowlib
 * amqp_client

=INFO REPORT==== 27-Nov-2017::14:48:59 ===
MQTT vhost picked using plugin configuration or default

=ERROR REPORT==== 27-Nov-2017::14:48:59 ===
MQTT login failed for "username" auth_failure: Refused

=INFO REPORT==== 27-Nov-2017::14:49:00 ===
MQTT vhost picked using plugin configuration or default

=ERROR REPORT==== 27-Nov-2017::14:49:00 ===
MQTT login failed for "username" auth_failure: Refused

=INFO REPORT==== 27-Nov-2017::14:49:00 ===
MQTT vhost picked using plugin configuration or default

=ERROR REPORT==== 27-Nov-2017::14:49:00 ===
MQTT login failed for "username" auth_failure: Refused

=INFO REPORT==== 27-Nov-2017::14:49:00 ===
MQTT vhost picked using plugin configuration or default

=ERROR REPORT==== 27-Nov-2017::14:49:00 ===
MQTT login failed for "username" auth_failure: Refused

=INFO REPORT==== 27-Nov-2017::14:49:00 ===
MQTT vhost picked using plugin configuration or default

=ERROR REPORT==== 27-Nov-2017::14:49:00 ===
MQTT login failed for "username" auth_failure: Refused

=INFO REPORT==== 27-Nov-2017::14:49:00 ===
MQTT vhost picked using plugin configuration or default

=ERROR REPORT==== 27-Nov-2017::14:49:00 ===
MQTT login failed for "username" auth_failure: Refused

=INFO REPORT==== 27-Nov-2017::14:49:00 ===
MQTT vhost picked using plugin configuration or default

=ERROR REPORT==== 27-Nov-2017::14:49:00 ===
MQTT login failed for "username" auth_failure: Refused

=INFO REPORT==== 27-Nov-2017::14:49:00 ===
MQTT vhost picked using plugin configuration or default

=ERROR REPORT==== 27-Nov-2017::14:49:00 ===
MQTT login failed for "username" auth_failure: Refused

=INFO REPORT==== 27-Nov-2017::14:49:00 ===
MQTT vhost picked using plugin configuration or default

=ERROR REPORT==== 27-Nov-2017::14:49:00 ===
MQTT login failed for "username" auth_failure: Refused

=INFO REPORT==== 27-Nov-2017::14:49:00 ===
MQTT vhost picked using plugin configuration or default

=ERROR REPORT==== 27-Nov-2017::14:49:00 ===
MQTT login failed for "username" auth_failure: Refused

=INFO REPORT==== 27-Nov-2017::14:49:00 ===
MQTT vhost picked using plugin configuration or default

=ERROR REPORT==== 27-Nov-2017::14:49:00 ===
MQTT login failed for "username" auth_failure: Refused

=INFO REPORT==== 27-Nov-2017::14:49:00 ===
MQTT vhost picked using plugin configuration or default

=ERROR REPORT==== 27-Nov-2017::14:49:00 ===
MQTT login failed for "username" auth_failure: Refused

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.