Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(feature request) Adding tasks to set up cluster configuration in the RabbitMQ role #119

Open
userlocalhost opened this issue Feb 14, 2017 · 4 comments

Comments

@userlocalhost
Copy link
Member

userlocalhost commented Feb 14, 2017

This is a much-needed project for us. I want to build StackStorm in production environment with this.

The current tasks in the RabbitMQ role just only install package and start service.
But the RabbitMQ servers that I expect are set up a cluster configuration.

I want some tasks to set up cluster configuration in the RabbitMQ role.

Thank you.

@arm4b
Copy link
Member

arm4b commented Feb 15, 2017

Thanks for the feature request!
I agree, cluster and HA-friendly deployment is must have story for production use.

And while it may take a lot of time to implement it, - all dependent services we have like RabbitMQ, Mongo, PostgreSQL could have a lot of advanced configuration to handle.

But for now I'd suggest alternative approach.
st2 role was written without hard dependency on internal rabbitmq role.
So instead of #120 you can use external rabbitmq role
and Configure with Existing Mongo, RabbitMQ, PostgreSQL installations #17

All we need now is to add respective st2.conf messaging setting (done) in ansible-st2 so you could configure st2 to work with external rabbitmq cluster, deployed by another Ansible role.

Resulting play may look this way:

---
- name: Configure RabbitMQ cluster
  hosts: rabbitmq-cluster
  roles:
    # See: https://github.com/alexey-medvedchikov/ansible-rabbitmq
    - alexeymedvedchikov.rabbitmq
      vars:
        rabbitmq_create_cluster: yes
        rabbitmq_erlang_cookie: st2-mq
        rabbitmq_users:
          - user: st2
            password: st2
            vhost: /
            configure_priv: .*
            read_priv: .*
            write_priv: .*
            tags: st2

- name: Install StackStorm
  hosts: st2
  roles:
    - name: Install and Configure `st2` itself
      role: st2
      vars:
        st2_messaging_url: "amqp://st2:st2@rabbitmq-cluster001:5672//"

    - st2mistral
    - st2web
    - st2smoketests

Just for reference I found external Ansible Galaxy role alexeymedvedchikov.rabbitmq which configures rabbitmq cluster https://github.com/alexey-medvedchikov/ansible-rabbitmq just to give an idea (I haven't tested it).

Approach like that with external rabbitmq cluster would be fast to do & efficient and I'd suggest to follow that way, but if you prefer long-term, - I'm fine with contributions too 👍
@userlocalhost Let me know your opinion.

@arm4b arm4b added the HA label Feb 15, 2017
@arm4b
Copy link
Member

arm4b commented Feb 15, 2017

cc @bigmstone I remember you was interested in deploying entire StackStorm in HA way internally.
This might be useful discussion for you.

@userlocalhost
Copy link
Member Author

Thank you for your reply. I agree with you.
It's reasonable to use some external playbook that specialize in a specific target, as you say.

So I'll close #120, then seek a playbook that suits the following requirements.

  • can set up a cluster and HA queue.
  • can add a user and set permissions of it for connecting from external node.

After that, I think I'll write a test for it.

@mrlesmithjr
Copy link

Thought I would also chime in here and share an already available RabbitMQ Ansible role of mine which also provides HA. I would also be interested in helping out in anyway possible as well.

https://github.com/mrlesmithjr/ansible-rabbitmq

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants