Skip to content

Commit

Permalink
Further testing and updates for csync2
Browse files Browse the repository at this point in the history
  • Loading branch information
tahliar committed Nov 15, 2024
1 parent c114b3c commit a9283e3
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 31 deletions.
12 changes: 9 additions & 3 deletions xml/ha_autoyast_deploy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,17 @@
<title>Bringing the cloned node online</title>
<step>
<para>
Transfer the key configuration files from the already configured nodes
to the cloned node with &csync; as described in
<xref linkend="sec-ha-installation-setup-csync2"/>.
Add the new node to the &csync; <guimenu>Sync Host</guimenu> list
as described in <xref linkend="sec-ha-installation-setup-csync2"/>.
</para>
</step>
<step>
<para>
Transfer the key configuration files from the already configured nodes
to the cloned node with &csync; as described in
<xref linkend="sec-ha-setup-yast-csync2-sync"/>.
</para>
</step>
<step>
<para>
To bring the node online, start the cluster services on the cloned
Expand Down
26 changes: 20 additions & 6 deletions xml/ha_config_cli.xml
Original file line number Diff line number Diff line change
Expand Up @@ -169,16 +169,30 @@ crm cluster join --use-ssh-agent -c <replaceable>USER@NODE1</replaceable></comma
you can use the <literal>ssh</literal> stage of the bootstrap scripts on its own. Run these
commands after configuring the cluster in &yast;, but before bringing the cluster online.
</para>
<para>
Run the following command on the first node:
</para>
<procedure xml:id="pro-ha-manual-config-crm-user-privileges-ssh-keys">
<title>Configuring passwordless SSH (and SSH agent forwarding) with crmsh</title>
<step>
<para>
Run the following command on the first node:
</para>
<screen><prompt>user@node1&gt; </prompt><command>sudo --preserve-env=SSH_AUTH_SOCK \
crm cluster init ssh --use-ssh-agent</command></screen>
<para>
Run the following command on all other nodes:
</para>
</step>
<step>
<para>
Start the cluster services on the first node so that the other nodes can
use the <command>crm cluster join</command> command:
</para>
<screen><prompt>user@node1&gt; </prompt><command>sudo crm cluster start</command></screen>
</step>
<step>
<para>
Run the following command on all other nodes:
</para>
<screen><prompt>user@node2&gt; </prompt><command>sudo --preserve-env=SSH_AUTH_SOCK \
crm cluster join ssh --use-ssh-agent -c <replaceable>USER@NODE1</replaceable></command></screen>
</step>
</procedure>
</sect2>

<sect2 xml:id="sec-ha-manual-config-crm-help">
Expand Down
37 changes: 15 additions & 22 deletions xml/ha_yast_cluster.xml
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,11 @@
<listitem>
<para>
&csync; helps you to keep track of configuration changes and to
keep files synchronized across the cluster nodes. For details, see
<xref linkend="sec-ha-installation-setup-csync2"/>.
keep files synchronized across the cluster nodes. If you are using
&yast; to set up the cluster for the first time, we strongly recommend
configuring &csync;. If you do not use &csync;, you must manually copy
all configuration files from the first node to the rest of the nodes in
the cluster. For details, see <xref linkend="sec-ha-installation-setup-csync2"/>.
</para>
</listitem>
</varlistentry>
Expand Down Expand Up @@ -1089,6 +1092,12 @@
following preparations: </para>
<procedure>
<title>Preparing for initial synchronization with &csync;</title>
<step>
<para>
Make sure passwordless SSH is configured between the nodes. This is required for
cluster communication.
</para>
</step>
<step>
<para>
Copy the file <filename>/etc/csync2/csync2.cfg</filename> manually
Expand Down Expand Up @@ -1152,26 +1161,6 @@ Finished with 1 errors.</screen>

<sect1 xml:id="sec-ha-installation-start">
<title>Bringing the cluster online</title>
<para>
Before starting the cluster, make sure passwordless SSH is configured between the nodes.
If you did not already configure passwordless SSH before setting up the cluster, you can
do so now by using the <literal>ssh</literal> stage of the bootstrap script:
</para>
<procedure xml:id="pro-ha-installation-start-ssh">
<title>Configuring passwordless SSH with &crmsh;</title>
<step>
<para>
On the first node, run the following command:
</para>
<screen>&prompt.root;<command>crm cluster init ssh</command></screen>
</step>
<step>
<para>
On the rest of the nodes, run the following command:
</para>
<screen>&prompt.root;<command>crm cluster join ssh -c <replaceable>NODE1</replaceable></command></screen>
</step>
</procedure>
<para>
After the initial cluster configuration is done, start the cluster
services on all cluster nodes to bring the stack online:
Expand All @@ -1188,6 +1177,10 @@ Finished with 1 errors.</screen>
Start the cluster services on all cluster nodes:
</para>
<screen>&prompt.root;<command>crm cluster start --all</command></screen>
<para>
This command requires passwordless SSH access between the nodes. You can also
start individual nodes with <command>crm cluster start</command>.
</para>
</step>
<step>
<para>
Expand Down

0 comments on commit a9283e3

Please sign in to comment.