Page MenuHomeClusterLabs Projects

quickstart-suse.html
No OneTemporary

quickstart-suse.html

---
layout: pacemaker
title: ClusterLabs - SLES 12 Quickstart
---
<section id="main">
{% include quickstart-common.html %}
<h1>SLES 12</h1>
<h2>Install</h2>
<p>
Pacemaker ships as part of the
SUSE <a href="https://www.suse.com/products/highavailability/">High
Availability Extension</a>. To install, follow the provided
documentation. It is also available in openSUSE Leap and openSUSE
Tumbleweed.
</p>
<h2>Create the Cluster</h2>
<p>
The supported stack on SLES12 is based on Corosync 2.x.
</p>
<p>
To get started, install the cluster stack on all nodes.
</p>
<p class="command">
[ALL] # zypper install ha-cluster-bootstrap
</p>
<p>
First we initialize the cluster on the first machine (node1):
</p>
<p class="command">
[ONE] # ha-cluster-init
</p>
<p>
Now we can join the cluster from the second machine (node2):
</p>
<p class="command">
[ONE] # ha-cluster-join -c node1
</p>
<p>
These two steps create and start a basic cluster together with the
<a href="https://hawk-ui.github.io/">HAWK</a> web interface. If given
additional arguments, <tt>ha-cluster-init</tt> can also configure
STONITH, OCFS2 and an administration IP address as part of initial
configuration. It is also possible to choose whether to use multicast
or unicast for corosync communication.
</p>
<p>
For more details on <tt>ha-cluster-init</tt>, see the output of
<tt>ha-cluster-init --help</tt>.
</p>
<h2>Set Cluster Options</h2>
<p>
For demonstration purposes, we will force the cluster to
move services after a single failure:
</p>
<p class="command">
[ONE] # crm configure property migration-threshold=1
</p>
<h2>Add a Resource</h2>
<p>
Lets add a cluster service, we'll choose one doesn't
require any configuration and works everywhere to make
things easy. Here's the command:
</p>
<p class="command">
[ONE] # crm configure primitive my_first_svc Dummy op monitor interval=120s
</p>
<p>
"<strong>my_first_svc</strong>" is the name the service
will be known as.
</p>
<p>
"<strong>Dummy</strong>" tells Pacemaker
which script to use
(<a href="https://github.com/ClusterLabs/pacemaker/blob/master/extra/resources/Dummy">Dummy</a>
- an agent that's useful as a template and for guides like
this one), which namespace it is in (pacemaker) and what
standard it conforms to
(<a href="/doc/en-US/Pacemaker/1.1-crmsh/html/Pacemaker_Explained/s-resource-supported.html#_open_cluster_framework">OCF</a>).
</p>
<p>
"<strong>op monitor interval=120s</strong>" tells Pacemaker to
check the health of this service every 2 minutes by
calling the agent's <strong>monitor</strong> action.
</p>
<p>
You should now be able to see the service running using:
</p>
<p class="command">
[ONE] # crm status
</p>
<h2>Simulate a Service Failure</h2>
<p>
We can simulate an error by telling the service stop
directly (without telling the cluster):
</p>
<p class="command">
[ONE] # crm_resource --resource my_first_svc --force-stop
</p>
<p>
If you now run <strong>crm_mon</strong> in interactive
mode (the default), you should see (within the monitor
interval - 2 minutes) the cluster notice
that <strong>my_first_svc</strong> failed and move it to
another node.
</p>
<p>
You can also watch the transition from the HAWK dashboard, by going
to <tt>https://node1:7630</tt>.
</p>
<h2>Next Steps</h2>
<p>
<ul>
<li>Configure <a href="/doc/en-US/Pacemaker/1.1-crmsh/html/Clusters_from_Scratch/ch09.html">Fencing</a></li>
<li>Add more services - see <a href="/doc/en-US/Pacemaker/1.1-crmsh/html/Clusters_from_Scratch/ch06.html">Clusters from Scratch</a> for examples of how to add IP address, Apache and DRBD to a cluster</li>
<li>Learn how to make services <a href="/doc/en-US/Pacemaker/1.1-crmsh/html/Clusters_from_Scratch/_specifying_a_preferred_location.html">prefer a specific host</a></li>
<li>Learn how to make services <a href="/doc/en-US/Pacemaker/1.1-crmsh/html/Clusters_from_Scratch/_ensuring_resources_run_on_the_same_host.html">run on the same host</a></li>
<li>Learn how to make services <a href="/doc/en-US/Pacemaker/1.1-crmsh/html/Clusters_from_Scratch/_controlling_resource_start_stop_ordering.html">start and stop</a> in a specific order</li>
<li>Find out what else Pacemaker can do - see <a href="/doc/en-US/Pacemaker/1.1-crmsh/html/Pacemaker_Explained/index.html">Pacemaker Explained</a> for an comprehensive list of concepts and options</li>
</ul>
</p>
</section>

File Metadata

Mime Type
text/html
Expires
Sat, Jan 25, 6:50 AM (1 d, 8 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1313523
Default Alt Text
quickstart-suse.html (4 KB)

Event Timeline