Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Having fun-with-os-ha

47 views

Published on

HA (High availability) and clustering might be a quite unknown feature inside openSUSE (Pacemaker, Corosync, crmsh, resource agents, etc), but it provides really interesting and powerful options.

In order to explain how HA cluster works in a more visible and funnier way, I will expose a didactic demonstration with a cluster created with some Raspberries and Webcams. The main idea is to create a high available video security system with the tools provided in openSUSE (and some custom code, of course). In this use case, the cluster will host a Webcam service where if the current Webcam (or raspberry with the connected Webcam) fails the whole system is migrated to the seconde node, and the service continues working in the same address and without downtime. This will help to understand what is application or service level redundancy and some of the advantages of it.

Published in: Software
  • Be the first to comment

Having fun-with-os-ha

  1. 1. Xabier Arbulu Insausti Software Engineer at Suse xarbulu@suse.com Having fun with openSUSE, Raspberries and HA cluster
  2. 2. Let me present myself
  3. 3. ● From the Basque Country (Spain) but living in the Canary Islands. ● Studied computer science in the University of Basque Country (UPV). ● Working at Suse since last October in the SLES4SAP and HA team as software engineer (with Python, Salt and Terraform mainly). ● Hobbies: Surf, time in nature, friki things (anime, videogames, etc) .
  4. 4. How this project started?
  5. 5. Christmas dinner 2018... My brother and I got a new job. Now he works in a company that builds elevators. So as always: My parents: “Oh!! I see. And how fast they move? How many people can use them? Which material do you use?”
  6. 6. So they talk about that until... Dad: “Xabi, sorry, we could talk about what you do, but, you know...” Me: “You don’t know what I do, right? Mmm... you work with a computer, don’t you?
  7. 7. So I decided to do something to make them understand what I do!
  8. 8. Let’s do something cool! Something visual!
  9. 9. But not more SAP for this time, please...
  10. 10. Maybe out of budget...
  11. 11. Let’s do a High Available webcams service! I can use Motion for that. Motion: https://motion-project.github.io/ So I decided to do something simpler…
  12. 12. And I started working...
  13. 13. “Oh man, and now I have to configure all the raspberry pi-s… And redo everything every time I fail… So annoying” “Dude! But you are working with Salt all the time! Create some states to configure everything! But...
  14. 14. And finally the project was born! https://github.com/arbulu89/ha-webcams-raspberry
  15. 15. Who knows about HA and Salt?
  16. 16. Open Source High Availability Cluster Stack https://clusterlabs.org/ Old but Gold!!!
  17. 17. Salt https://docs.saltstack.com/en/latest/ https://github.com/saltstack/salt
  18. 18. So, what’s the project about?
  19. 19. But let’s show the project using a demo What can go wrong?
  20. 20. Let’s leverage Salt for everything! ● Configure the Salt Master using Salt ● Configure the nodes Salt Minion using salt (WTF!!) – salt-ssh ● Configure HA and Motion using Salt
  21. 21. Configure Salt Master 1. Install Salt Master 2. Auto accept Salt Minions connection 3. Install HA salt formula https://github.com/arbulu89/ha-webcams- raspberry/tree/master/salt/setup
  22. 22. But… What is a salt formula? Basically, a bunch of states to configure certain components (HA for example). IDEMPOTENCY ASSURED!
  23. 23. HA salt formula https://github.com/SUSE/habootstrap-formula ● Create the cluster ● Join to the cluster ● Configure resource agents ● etc
  24. 24. Configure the nodes with salt-ssh We can use salt-ssh to run salt states in nodes without salt-minion. Isn’t it great?!!! We need to define a roster for that:
  25. 25. And finally configure Motion and HA Now we have everything ready, we only need run Motion and HA cluster states. Easy! High Available Cluster!!
  26. 26. And what about HA?
  27. 27. HA cluster will assure that there is not downtime! ● What if the Motion daemon stops working? – I will restart the daemon! ● What if the node crashes? – I will migrate Motion daemon to the 2n node ● But the IP address to monitor the service will be different! – I will create a virtual address and migrate with Motion
  28. 28. How are going to do that? Simple! HA cluster monitors resources (instead of machines). We can monitor a systemd daemon for example.
  29. 29. Disclaimer!!! So, you will be thinking: “Hey! Why are you not just using the 2 webcams together?!!” Remember! This is just a demonstration to show how to use Salt and HA in a more visual way.
  30. 30. So… Mom, Dad, do you understand now what I do?
  31. 31. You do… webcams? We will try other time again….
  32. 32. Join Us at www.opensuse.org
  33. 33. License This slide deck is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license. It can be shared and adapted for any purpose (even commercially) as long as Attribution is given and any derivative work is distributed under the same license. Details can be found at https://creativecommons.org/licenses/by-sa/4.0/ General Disclaimer This document is not to be construed as a promise by any participating organisation to develop, deliver, or market a product. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. openSUSE makes no representations or warranties with respect to the contents of this document, and specifically disclaims any express or implied warranties of merchantability or fitness for any particular purpose. The development, release, and timing of features or functionality described for openSUSE products remains at the sole discretion of openSUSE. Further, openSUSE reserves the right to revise this document and to make changes to its content, at any time, without obligation to notify any person or entity of such revisions or changes. All openSUSE marks referenced in this presentation are trademarks or registered trademarks of SUSE LLC, in the United States and other countries. All third-party trademarks are the property of their respective owners. Credits Template Richard Brown rbrown@opensuse.org Design & Inspiration openSUSE Design Team http://opensuse.github.io/branding- guidelines/

×