Install RabbitMQ
[root@controller1 ~]# yum install erlang rabbitmq-server -y
[root@controller2 ~]# yum install erlang rabbitmq-server -y
[root@controller3 ~]# yum install erlang rabbitmq-server -y
[root@controller1 ~]# systemctl enable rabbitmq-server.service
Created symlink from /etc/systemd/system/multi-user.target.wants/rabbitmq-server.service to /usr/lib/systemd/system/rabbitmq-server.service.
[root@controller2 ~]# systemctl enable rabbitmq-server.service
Created symlink from /etc/systemd/system/multi-user.target.wants/rabbitmq-server.service to /usr/lib/systemd/system/rabbitmq-server.service.
[root@controller3 ~]# systemctl enable rabbitmq-server.service
Created symlink from /etc/systemd/system/multi-user.target.wants/rabbitmq-server.service to /usr/lib/systemd/system/rabbitmq-server.service.
[root@controller1 ~]# systemctl start rabbitmq-server.service
[root@controller1 ~]# rabbitmq-plugins enable rabbitmq_management
The following plugins have been enabled:
mochiweb
webmachine
rabbitmq_web_dispatch
amqp_client
rabbitmq_management_agent
rabbitmq_management
Applying plugin configuration to rabbit@controller1... started 6 plugins.
[root@controller2 ~]# rabbitmq-plugins enable rabbitmq_management
The following plugins have been enabled:
mochiweb
webmachine
rabbitmq_web_dispatch
amqp_client
rabbitmq_management_agent
rabbitmq_management
Applying plugin configuration to rabbit@controller2... started 6 plugins.
[root@controller3 ~]# rabbitmq-plugins enable rabbitmq_management
The following plugins have been enabled:
mochiweb
webmachine
rabbitmq_web_dispatch
amqp_client
rabbitmq_management_agent
rabbitmq_management
Applying plugin configuration to rabbit@controller3... started 6 plugins.
Configure RabbitMQ for HA queues
[root@controller1 ~]# scp /var/lib/rabbitmq/.erlang.cookie root@controller2:/var/lib/rabbitmq/.erlang.cookie
.erlang.cookie 100% 20 19.8KB/s 00:00
[root@controller1 ~]# scp /var/lib/rabbitmq/.erlang.cookie root@controller3:/var/lib/rabbitmq/.erlang.cookie
.erlang.cookie 100% 20 34.2KB/s 00:00
On Each Nodes
# chown rabbitmq:rabbitmq /var/lib/rabbitmq/.erlang.cookie
# chmod 400 /var/lib/rabbitmq/.erlang.cookie
# systemctl enable rabbitmq-server.service
# systemctl start rabbitmq-server.service
[root@controller1 ~]# rabbitmqctl cluster_status
Cluster status of node rabbit@controller1 ...
[{nodes,[{disc,[rabbit@controller1]}]},
{running_nodes,[rabbit@controller1]},
{cluster_name,<<"rabbit@controller1">>},
{partitions,[]},
{alarms,[{rabbit@controller1,[]}]}]
[root@controller2 ~]# rabbitmqctl cluster_status
Cluster status of node rabbit@controller2 ...
[{nodes,[{disc,[rabbit@controller2]}]},
{running_nodes,[rabbit@controller2]},
{cluster_name,<<"rabbit@controller2">>},
{partitions,[]},
{alarms,[{rabbit@controller2,[]}]}]
[root@controller3 ~]# rabbitmqctl cluster_status
Cluster status of node rabbit@controller3 ...
[{nodes,[{disc,[rabbit@controller3]}]},
{running_nodes,[rabbit@controller3]},
{cluster_name,<<"rabbit@controller3">>},
{partitions,[]},
{alarms,[{rabbit@controller3,[]}]}]
On Other Nodes
[root@controller2 ~]# rabbitmqctl stop_app
Stopping node rabbit@controller2 ...
[root@controller3 ~]# rabbitmqctl stop_app
Stopping node rabbit@controller3 ...
[root@controller2 ~]# rabbitmqctl join_cluster --ram rabbit@controller1
Clustering node rabbit@controller2 with rabbit@controller1 ...
[root@controller3 ~]# rabbitmqctl join_cluster --ram rabbit@controller1
Clustering node rabbit@controller3 with rabbit@controller1 ...
[root@controller2 ~]# rabbitmqctl start_app
Starting node rabbit@controller2 ...
[root@controller3 ~]# rabbitmqctl start_app
Starting node rabbit@controller3 ...
Set the HA-Mode Policy
[root@controller1 ~]# rabbitmqctl cluster_status
Cluster status of node rabbit@controller1 ...
[{nodes,[{disc,[rabbit@controller1]},
{ram,[rabbit@controller3,rabbit@controller2]}]},
{running_nodes,[rabbit@controller3,rabbit@controller2,rabbit@controller1]},
{cluster_name,<<"rabbit@controller1">>},
{partitions,[]},
{alarms,[{rabbit@controller3,[]},
{rabbit@controller2,[]},
{rabbit@controller1,[]}]}]
[root@controller2 ~]# rabbitmqctl cluster_status
Cluster status of node rabbit@controller2 ...
[{nodes,[{disc,[rabbit@controller1]},
{ram,[rabbit@controller3,rabbit@controller2]}]},
{running_nodes,[rabbit@controller3,rabbit@controller1,rabbit@controller2]},
{cluster_name,<<"rabbit@controller1">>},
{partitions,[]},
{alarms,[{rabbit@controller3,[]},
{rabbit@controller1,[]},
{rabbit@controller2,[]}]}]
[root@controller3 ~]# rabbitmqctl set_policy ha-all '^(?!amq\.).*' '{"ha-mode": "all"}'
Setting policy "ha-all" for pattern "^(?!amq\\.).*" to "{\"ha-mode\": \"all\"}" with priority "0" ...
[root@controller3 ~]#
[root@controller3 ~]#
[root@controller3 ~]# rabbitmqctl cluster_status
Cluster status of node rabbit@controller3 ...
[{nodes,[{disc,[rabbit@controller1]},
{ram,[rabbit@controller3,rabbit@controller2]}]},
{running_nodes,[rabbit@controller2,rabbit@controller1,rabbit@controller3]},
{cluster_name,<<"rabbit@controller1">>},
{partitions,[]},
{alarms,[{rabbit@controller2,[]},
{rabbit@controller1,[]},
{rabbit@controller3,[]}]}]
[root@controller1 ~]# rabbitmqctl set_policy ha-all '^(?!amq\.).*' '{"ha-mode": "all"}'
Setting policy "ha-all" for pattern "^(?!amq\\.).*" to "{\"ha-mode\": \"all\"}" with priority "0" ...
[root@controller2 ~]# rabbitmqctl set_policy ha-all '^(?!amq\.).*' '{"ha-mode": "all"}'
Setting policy "ha-all" for pattern "^(?!amq\\.).*" to "{\"ha-mode\": \"all\"}" with priority "0" ...
[root@controller3 ~]# rabbitmqctl set_policy ha-all '^(?!amq\.).*' '{"ha-mode": "all"}'
Setting policy "ha-all" for pattern "^(?!amq\\.).*" to "{\"ha-mode\": \"all\"}" with priority "0" ...
Now, Take the Browser
http://192.168.220.21:15672
username/password :
guest/guest
Configure OpenStack services to use RabbitMQ HA queues
transport_url = rabbit://RABBIT_USER:RABBIT_PASS@rabbit1:5672,
RABBIT_USER:RABBIT_PASS@rabbit2:5672,RABBIT_USER:RABBIT_PASS@rabbit3:5672
rabbit_retry_interval=1
rabbit_retry_backoff=2
rabbit_max_retries=0
rabbit_durable_queues=true
rabbit_ha_queues=true
For the Old Set-Up
# rabbitmqctl stop_app
# rabbitmqctl reset
# rabbitmqctl start_app
Create RabbitMQ Admin
[root@controller1 ~]# rabbitmqctl add_user admin admin
Creating user "admin" ...
[root@controller1 ~]# rabbitmqctl set_user_tags admin administrator
Setting tags for user "admin" to [administrator] ...
[root@controller1 ~]# rabbitmqctl add_user openstack openstack
Creating user "openstack" ...
[root@controller1 ~]# rabbitmqctl set_permissions openstack ".*" ".*" ".*"
Setting permissions for user "openstack" in vhost "/" ...
[root@controller1 ~]# rabbitmqctl set_user_tags openstack administrator
Setting tags for user "openstack" to [administrator] ...
[root@controller1 ~]# systemctl restart rabbitmq-server.service
这个可以有,很6
Thank you for every other fantastic article.
Where else may anyone get that kind of info in such a perfect
method of writing? I have a presentation next week, and I’m on the
look for such info.
I could not refrain from commenting. Exceptionally well written!
I am sure this paragraph has touched all the internet users, its
really really nice piece of writing on building up new web site.
Hi, I do believe this is an excellent blog. I stumbledupon it 😉 I will revisit once again since
i have book marked it. Money and freedom is the greatest way to change, may you
be rich and continue to help others. http://foxnews.org
The process begins from the uncomplicated activity of the account option.
Cherry blossom tattoos represent various things in numerous cultures.
Now you’ve taken that all-important first step and they are
looking over this report about flash games and social
network, you might be within the unique and privideged position to be
amongst a small grouping of pioneering entreprenuers who may have learned about it and therefore are taking affirmative action.
Terrific work! Thaat is the type oof info that are meant to be shared across the web.
Disgrace on Google for not positioning this publish higher!
Come on over and talk over with my web site . Thanks
=)
If you want to increase your experience just keep visiting this web page and be updated
with the latest gossip posted here.
Hello there! Do you know if they make any plugins to help with SEO?
I’m trying to get my blog to rank for some targeted keywords
but I’m not seeing very good gains. If you know of any please share.
Many thanks!
I think everyone in the world has their own characteristics, so be yourself as you like.
SEO is a commercial activity that I don’t think it’s a good way to get your own blog to rank.
I do believe all of the ideas you have presented in your post.
They are really convincing and will definitely work.
Nonetheless, the posts are too brief for newbies.
May you please prolong them a little from subsequent time?
Thank you for the post.
Fortnite could be performed on a console, LAPTOP or through an app.
Great ? I should definitely pronounce, impressed with your site.
I had no trouble navigating through all the tabs as well as related information ended up being truly easy to do
to access. I recently found what I hoped for before you know
it at all. Reasonably unusual. Is likely to appreciate it for those who add forums or something, web site theme .
a tones way for your client to communicate.
Nice task.
I’m not sure where you are getting your info, but great topic.
I needs to spend some time learning much more or understanding more.
Thanks for excellent info I was looking for this information for
my mission.
Greetings, I do believe your web site might be having browser compatibility problems.
When I look at your blog in Safari, it looks
fine however, when opening in I.E., it’s got some overlapping issues.
I merely wanted to provide you with a quick heads up! Apart from that,
fantastic site!
Thanks for your reminder, but I hava no time to solve this compatibility problems.
Luckily, Microsoft recommends that everyone use chrome, so it’s not a big problem now, right?
Thank you for every other informative web site.
Where else could I am getting that type of info written in such a
perfect means? I’ve a project that I am just now operating on, and I’ve been at the look out for such information.
Thanks for posting this awesome article. I’m a long time reader but I’ve never been compelled
to leave a comment. I subscribed to your blog and shared this on my Facebook.
Thanks again for a great post!
I as well as my friends happened to be going through the great tactics found on your site and so all of a sudden got a terrible feeling I had not expressed respect
to the site owner for those tips. The young boys are already certainly excited to learn all
of them and already have pretty much been having fun with them.
Appreciate your turning out to be simply considerate and then for making a decision on varieties of impressive information most people are really desirous to
be informed on. My sincere apologies for not saying thanks to earlier.
I am actually thankful to the owner of this web site who has shared this enormous post at at this place.
My brother recommended I might like this web site.
He was totally right. This post truly made my day.
You can not imagine simply how much time I had spent for this
information! Thanks!
Hey just wanted to give you a brief heads up and let you know a few of the
images aren’t loading properly. I’m not sure
why but I think its a linking issue. I’ve tried it in two different internet browsers and both
show the same outcome.
Use google’s chrome and have a try.
If the issue is still exist,
the problem is network speed which maybe yours or my server(China).
Woah! I’m really enjoying the template/theme of this website.
It’s simple, yet effective. A lot of times it’s tough to get
that “perfect balance” between superb usability and visual appeal.
I must say you’ve done a amazing job with this.
Also, the blog loads extremely fast for me on Chrome.
Superb Blog!
I see you don’t monetize your site, don’t waste your traffic, you can earn additional bucks every month.
If you want to read about this method, simply search in gooogle:
dracko’s tricks
It’s a pity you don’t have a donate button! I’d most certainly donate to this excellent
blog! I guess for now i’ll settle for bookmarking and adding your RSS feed to my Google account.
I look forward to fresh updates and will talk about this site with my Facebook group.
Talk soon!
Hello! Someone in my Facebook group shared this site with
us so I came to give it a look. I’m definitely enjoying the information. I’m book-marking
and will be tweeting this to my followers! Superb blog and excellent design.
Hi, I read your new stuff regularly. Your writing style is witty, keep
doing what you’re doing!
Hi there! This is kind of off topic but I need sme
advice frokm aan established blog. Is it very hard to set up your own blog?
I’m not very techincal but I can figure things out prretty fast.
I’m thinkinhg about making my own but I’m not sure where to begin. Do
you have any tips or suggestions? Thanks
Maybe you can search keyword ‘vps’ and ‘how to create a blog’ with google which is a better way to look for some advice!
However, you can contace me if you can not established blog yet.
Thank you for writing this awesome article. I’m a long time reader but I’ve never been compelled to
leave a comment. I subscribed to your blog and shared this on my Facebook.
Thanks again for a great post!
Thanks for finally writing about >RabbitMQ Cluster Setup – Water’s Home <Liked it!
Greetings from Idaho! I’m bored to death at work so I decided to browse your blog on my iphone during lunch break.
I love the information you present here and can’t wait to take a look when I get
home. I’m surprised at how quick your blog loaded on my mobile ..
I’m not even using WIFI, just 3G .. Anyhow, great site!
Ԍrеat article.
Thanks for ones marvelous posting! I actually enjoyed reading
it, you can be a great author.I will be sure to bookmark
your blog and definitely will come back someday.
I want to encourage you continue your great job, have a nice holiday weekend!
If some one wants to be updated with most up-to-date technologies after that he must be visit this site and
be up to date every day.
Hello, I enjoy reading all of your article. I wanted to write a
little comment to support you.
Hi water, I like your article, he gave me a lot of technical guidance. I hope you can continue to write, and I will continue to pay attention to your articles. Come on
Greetings! This is my first visit to your blog! We are a collection of volunteers and
starting a new initiative in a community in the same niche.
Your blog provided us valuable information to work on. You have done a marvellous job!
Does your blog have a contact page? I’m having problems
locating it but, I’d like to shoot you an email.
I’ve got some creative ideas for your blog you might be interested in hearing.
Either way, great site and I look forward to seeing it improve over time.
Hi, I think your website might be having browser compatibility issues.
When I look at your blog site in Chrome, it looks fine but when opening in Internet
Explorer, it has some overlapping. I just wanted to give you a quick heads up!
Other then that, fantastic blog!
I’m really impressed with your writing skills and also with
the layout on your weblog. Is this a paid theme or did you modify it yourself?
Anyway keep up the nice quality writing, it’s rare to see a great blog
like this one nowadays.
It’s in fact very difficult in this full of activity
life to listen news on Television, thus I just use web for that purpose,
and take the most recent news.
With havin so much content and articles do you ever run into any problems of plagorism or copyright violation? My website has a
lot of exclusive content I’ve either created myself or outsourced
but it looks like a lot of it is popping it up all over the web without my permission. Do you
know any solutions to help stop content from being stolen?
I’d really appreciate it.
I don’t care the copyright if they not to do some bad things with my articles.
Very shortly this web page will be famous amid all blog users,
due to it’s pleasant articles or reviews
Hi there, You’ve done a great job. I’ll definitely
digg it and personally suggest to my friends.
I am sure they will be benefited from this web site.
You need to be a part of a contest for one of the
finest blogs online. I’m going to highly recommend this
site!
Hi there! Do you use Twitter? I’d like to follow you if tyat would be okay.
I’m absolutely enjoying your blog and look forwqrd to new updates.
Twitter ? Yes .
I really love your blog.. Very nice colors & theme.
Did you create this web site yourself? Please reply back as I’m attempting to create my own site and want to learn where you got this from or what the theme
is named. Many thanks!
You can search “wordpress” with google
It is appropriate time to make some plans for the future and it’s time to
be happy. I’ve read this post and if I could I wish to
suggest you few interesting things or advice.
Maybe you can write next articles referring
to this article. I want to read more things about it!
Hi there! This post couldn’t be written much better!
Going through this post reminds me of my previous roommate!
He continually kept talking about this. I
will send this information to him. Pretty sure he’s
going to have a good read. Thank you for sharing! It is appropriate time to make
some plans for the future and it is time to be happy.
I have read this post and if I could I wish to suggest you few interesting things or
advice. Perhaps you can write next articles referring to
this article. I wish to read even more things about it! http://starbucks.com
I have been absent for a while, but now I remember why I used to love this website.
Thanks, I will try and check back more frequently.
How frequently you update your website?
Simply desire to say your article is as surprising.
The clearness in your post is just great and i could assume you’re an expert
on this subject. Fine with your permission let me to grab your
RSS feed to keep updated with forthcoming post.
Thanks a million and please continue the gratifying work.
Hi there it’s me, I am also visiting this site regularly, this web
page is in fact good and the people are in fact sharing pleasant thoughts.
I was very happy to find this page. I wanted to thank you for your time for this fantastic read!!
I definitely appreciated every bit of it and I have
you saved to fav to check out new stuff in your web site.
Simply want to say your article is as astounding.
The clearness in your post is just excellent and i can assume you are an expert on this subject.
Fine with your permission let me to grab your RSS feed to keep updated with forthcoming post.
Thanks a million and please carry on the enjoyable work.
The other day, while I was at work, my sister stole my
iphone and tested to see if it can survive a
30 foot drop, just so she can be a youtube sensation. My iPad
is now broken and she has 83 views. I know this is completely off topic but I had to share it with someone!
Hi! I could have sworn I’ve been to this site before but after browsing through a few of the
articles I realized it’s new to me. Nonetheless, I’m definitely haqppy I stumbled upon it and I’ll bee bookmarking it
and checkingg back often!
My spouse and I stumbled over here coming from a different website and thought I might
check things out. I like what I see so now i am following
you. Look forward to going ovber your web page repeatedly.
I got this web site from my pal who shared with me about this site and at thhe momnt this time I am browsing this web page and reading very informative posts here.
I have been surfing online more than three hours nowadays,
yet I never found any interesting article like yours.
It is lovely price enough for me. In my view, if all webmasters
and bloggers made excellent content material
as you did, the net will be much more helpful than ever before.
I’m really enjoying the design and layout of your blog.
It’s a very easy on the eyes which makes it
much more enjoyable for me to come here and visit
more often. Did you hire out a developer to create your theme?
Excellent work!
I like what you guys are usually up too. This kind of clever work
and reporting! Keep up the superb works guys
I’ve incorporated you guys to my personal blogroll.
I am not sure where you’re getting your info, but good topic.
I needs to spend some time learning much more or understanding more.
Thanks for great information I was looking for this info for my mission.
Hi, i read your blog from time to time and i own a similar
one and i was just curious if you get a lot of spam comments?
If so how do you reduce it, any plugin or anything you can advise?
I get so much lately it’s driving me insane so any support
is very much appreciated.
Have you ever considered publishing an e-book or guest authoring on other sites?
I have a blog centered on the same subjects you discuss and
would really like to have you share some stories/information.
I know my audience would appreciate your work.
If you are even remotely interested, feel free to send me an e mail.
Hi! I know this is kinda off topic however , I’d
figured I’d ask. Would you be interested in exchanging links or maybe guest authoring a blog article or vice-versa?
My website discusses a lot of the same subjects as yours and I feel we could greatly benefit from each other.
If you are interested feel free to send me an e-mail.
I look forward to hearing from you! Excellent blog by the way!
I’d like to thank you for the efforts you’ve put in penning this website.
I really hope to view the same high-grade content from
you later on as well. In fact, your creative writing abilities has motivated me to get my own site now 😉
Thanks for the marvelous posting! I serioysly enjoyed reading it, you happen to be a great author.
I will remember to bookmark your blog and will come
back very soon.I want to encourage yourself to continue
your great work, have a nice morning!
Thanks for the post you shared!