Skip to content

Commit

Permalink
Split csync section to flow better in yast chapter
Browse files Browse the repository at this point in the history
  • Loading branch information
tahliar committed Jul 12, 2024
1 parent 6982778 commit a13caa8
Showing 1 changed file with 127 additions and 140 deletions.
267 changes: 127 additions & 140 deletions xml/ha_yast_cluster.xml
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,115 @@
</figure>
</sect1>

<sect1 xml:id="sec-ha-installation-setup-csync2">
<title>Configuring &csync; to synchronize files</title>
<para>
Instead of copying the configuration files to all nodes
manually, use the <command>csync2</command> tool for replication across
all nodes in the cluster. &csync; helps you to keep track of configuration changes
and to keep files synchronized across the cluster nodes:
</para>
<itemizedlist>
<listitem>
<para>
You can define a list of files that are important for operation.
</para>
</listitem>
<listitem>
<para>
You can show changes to these files (against the other cluster nodes).
</para>
</listitem>
<listitem>
<para>
You can synchronize the configured files with a single command.
</para>
</listitem>
<listitem>
<para>
With a simple shell script in <filename>~/.bash_logout</filename>, you
can be reminded about unsynchronized changes before logging out of the
system.
</para>
</listitem>
</itemizedlist>
<para>
Find detailed information about &csync; at
<link xlink:href="https://oss.linbit.com/csync2/"/> and
<link xlink:href="https://oss.linbit.com/csync2/paper.pdf"/>.
</para>
<important>
<title>Pushing synchronization after any changes</title>
<para>
&csync; only pushes changes. It does <emphasis>not</emphasis> continuously
synchronize files between the machines. Each time you update files that need
to be synchronized, you need to push the changes to the other machines.
Using <command>csync2</command> to push changes is described later, after
the cluster configuration with &yast; is complete.
</para>
</important>
<procedure xml:id="pro-ha-installation-setup-csync2-yast">
<title>Configuring &csync; with &yast;</title>
<step>
<para> Start the &yast; cluster module and switch to the
<guimenu>&csync;</guimenu> category. </para>
</step>
<step>
<para> To specify the synchronization group, click <guimenu>Add</guimenu>
in the <guimenu>Sync Host</guimenu> group and enter the local host names
of all nodes in your cluster. For each node, you must use exactly the
strings that are returned by the <command>hostname</command> command. </para>
<tip>
<title>Host name resolution</title>
<para> If host name resolution does not work properly in your
network, you can also specify a combination of host name and IP address
for each cluster node. To do so, use the string
<replaceable>HOSTNAME@IP</replaceable> such as
<literal>&node1;@&wsIip;</literal>, for example. &csync;
then uses the IP addresses when connecting. </para>
</tip>
</step>
<step xml:id="step-csync2-generate-key">
<para> Click <guimenu>Generate Pre-Shared-Keys</guimenu> to create a key
file for the synchronization group. The key file is written to
<filename>/etc/csync2/key_hagroup</filename>. After it has been created,
it must be copied manually to all members of the cluster. </para>
</step>
<step>
<para> To populate the <guimenu>Sync File</guimenu> list with the files
that usually need to be synchronized among all nodes, click <guimenu>Add
Suggested Files</guimenu>. </para>
</step>
<step>
<para> To <guimenu>Edit</guimenu>, <guimenu>Add</guimenu> or
<guimenu>Remove</guimenu> files from the list of files to be synchronized
use the respective buttons. You must enter the absolute path for each
file. </para>
</step>
<step>
<para> Activate &csync; by clicking <guimenu>Turn &csync;
ON</guimenu>. This executes the following command to start
&csync; automatically at boot time: </para>
<screen>&prompt.root;<command>systemctl enable csync2.socket</command></screen>
</step>
<step>
<para>Click <guimenu>Finish</guimenu>. &yast; writes the &csync;
configuration to <filename>/etc/csync2/csync2.cfg</filename>.</para>
</step>
</procedure>
<figure>
<title>&yast; <guimenu>Cluster</guimenu>&mdash;&csync;</title>
<mediaobject>
<imageobject role="fo">
<imagedata fileref="yast_cluster_sync.png" width="100%"/>
</imageobject>
<imageobject role="html">
<imagedata fileref="yast_cluster_sync.png" width="75%"/>
</imageobject>
</mediaobject>
</figure>
</sect1>

<sect1 xml:id="sec-ha-installation-setup-conntrackd">
<title>Synchronizing connection status between cluster nodes</title>
<para>
Expand Down Expand Up @@ -782,138 +891,22 @@
</figure>
</sect1>

<sect1 xml:id="sec-ha-installation-setup-csync2">
<sect1 xml:id="sec-ha-setup-yast-csync2-sync">
<title>Transferring the configuration to all nodes</title>
<para>
Instead of copying the resulting configuration files to all nodes
manually, use the <command>csync2</command> tool for replication across
all nodes in the cluster.
</para>
<para>
This requires the following basic steps:
</para>
<procedure>
<step>
<para>
<xref linkend="pro-ha-installation-setup-csync2-yast" xrefstyle="select:title"/>.
</para>
</step>
<step>
<para>
<xref linkend="pro-ha-installation-setup-csync2-start" xrefstyle="select:title"/>.
</para>
</step>
</procedure>
<para>
&csync; helps you to keep track of configuration changes and to keep
files synchronized across the cluster nodes:
After the cluster configuration with &yast; is complete, use <command>csync2</command>
to copy the configuration files to the rest of the cluster nodes. To receive the files,
nodes must be included in the <guimenu>Sync Host</guimenu> group you configured in
<xref linkend="pro-ha-installation-setup-csync2-yast"/>.
</para>
<itemizedlist>
<listitem>
<para>
You can define a list of files that are important for operation.
</para>
</listitem>
<listitem>
<para>
You can show changes to these files (against the other cluster nodes).
</para>
</listitem>
<listitem>
<para>
You can synchronize the configured files with a single command.
</para>
</listitem>
<listitem>
<para>
With a simple shell script in <filename>~/.bash_logout</filename>, you
can be reminded about unsynchronized changes before logging out of the
system.
</para>
</listitem>
</itemizedlist>
<para>
Find detailed information about &csync; at
<link xlink:href="https://oss.linbit.com/csync2/"/> and
<link xlink:href="https://oss.linbit.com/csync2/paper.pdf"/>.
</para>

<sect2 xml:id="pro-ha-installation-setup-csync2-yast">
<title>Configuring &csync; with &yast;</title>
<procedure>
<title>Configuring &csync; with &yast;</title>
<step>
<para> Start the &yast; cluster module and switch to the
<guimenu>&csync;</guimenu> category. </para>
</step>
<step>
<para> To specify the synchronization group, click <guimenu>Add</guimenu>
in the <guimenu>Sync Host</guimenu> group and enter the local host names
of all nodes in your cluster. For each node, you must use exactly the
strings that are returned by the <command>hostname</command> command. </para>
<!--https://fate.suse.com/314956: csync2-->
<tip>
<title>Host name resolution</title>
<para> If host name resolution does not work properly in your
network, you can also specify a combination of host name and IP address
for each cluster node. To do so, use the string
<replaceable>HOSTNAME@IP</replaceable> such as
<literal>&node1;@&wsIip;</literal>, for example. &csync;
then uses the IP addresses when connecting. </para>
</tip>
</step>
<step xml:id="step-csync2-generate-key">
<para> Click <guimenu>Generate Pre-Shared-Keys</guimenu> to create a key
file for the synchronization group. The key file is written to
<filename>/etc/csync2/key_hagroup</filename>. After it has been created,
it must be copied manually to all members of the cluster. </para>
</step>
<step>
<para> To populate the <guimenu>Sync File</guimenu> list with the files
that usually need to be synchronized among all nodes, click <guimenu>Add
Suggested Files</guimenu>. </para>
</step>
<step>
<para> To <guimenu>Edit</guimenu>, <guimenu>Add</guimenu> or
<guimenu>Remove</guimenu> files from the list of files to be synchronized
use the respective buttons. You must enter the absolute path for each
file. </para>
</step>
<step>
<para> Activate &csync; by clicking <guimenu>Turn &csync;
ON</guimenu>. This executes the following command to start
&csync; automatically at boot time: </para>
<screen>&prompt.root;<command>systemctl enable csync2.socket</command></screen>
</step>
<step>
<para>Click <guimenu>Finish</guimenu>. &yast; writes the &csync;
configuration to <filename>/etc/csync2/csync2.cfg</filename>.</para>
</step>
</procedure>
<figure>
<title>&yast; <guimenu>Cluster</guimenu>&mdash;&csync;</title>
<mediaobject>
<imageobject role="fo">
<imagedata fileref="yast_cluster_sync.png" width="100%"/>
</imageobject>
<imageobject role="html">
<imagedata fileref="yast_cluster_sync.png" width="75%"/>
</imageobject>
</mediaobject>
</figure>
</sect2>

<sect2 xml:id="sec-ha-setup-yast-csync2-sync">
<title>Synchronizing changes with &csync;</title>
<para> Before running &csync; for the first time, you need to make the
following preparations: </para>

<procedure>
<title>Preparing for initial synchronization with &csync;</title>
<step>
<para>Copy the file <filename>/etc/csync2/csync2.cfg</filename>
manually to all nodes after you have configured it as described in <xref
linkend="pro-ha-installation-setup-csync2-yast"/>. </para>
<para>
Copy the file <filename>/etc/csync2/csync2.cfg</filename> manually to all nodes.
</para>
</step>
<step>
<para> Copy the file <filename>/etc/csync2/key_hagroup</filename> that you
Expand All @@ -925,24 +918,19 @@
regenerate the file on the other nodes&mdash;it needs to be the same
file on all nodes. </para>
</step>
<!--taroth 2016-10-13. in contrast to csync2 section in GEO Quick, not needed
here because this is done in the yast csync2 conf step already:
<step>
<para>Execute the following command on all nodes to make the csync2
service start automatically at boot time:</para>
<screen>&prompt.root;<command>systemctl enable csync2.socket</command></screen>
</step>-->
<step>
<para>Execute the following command on all nodes to start the service now: </para>
<para>Run the following command on all nodes to start the service now: </para>
<screen>&prompt.root;<command>systemctl start csync2.socket</command></screen>
</step>
</procedure>

<para>
Use the following procedure to transfer the configuration files to all cluster nodes:
</para>
<procedure xml:id="pro-ha-installation-setup-csync2-start">
<title>Synchronizing the configuration files with &csync;</title>

<title>Synchronizing changes with &csync;</title>
<step>
<para>To initially synchronize all files once, execute the following
<para>To synchronize all files once, run the following
command on the machine that you want to copy the configuration
<emphasis>from</emphasis>: </para>
<screen>&prompt.root;<command>csync2 -xv</command></screen>
Expand All @@ -966,17 +954,16 @@ Finished with 1 errors.</screen>
</procedure>
<para> For more information on the &csync; options, run</para>
<screen>&prompt.root;<command>csync2&nbsp;-help</command></screen>
<note>
<important>
<title>Pushing synchronization after any changes</title>
<para> &csync; only pushes changes. It does <emphasis>not</emphasis>
continuously synchronize files between the machines. </para>
<para> Each time you update files that need to be synchronized, you need to
push the changes to the other machines by running <command>csync2&nbsp;</command>
<option>-xv</option> on the machine where you did the changes. If you run
push the changes to the other machines by running <command>csync2&nbsp;-xv</command>
on the machine where you did the changes. If you run
the command on any of the other machines with unchanged files, nothing
happens. </para>
</note>
</sect2>
</important>
</sect1>

<sect1 xml:id="sec-ha-installation-start">
Expand Down

0 comments on commit a13caa8

Please sign in to comment.