Yang, Tong 6182f91ba8 MRS component operation guide_normal 2.0.38.SP20 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Yang, Tong <yangtong2@huawei.com>
Co-committed-by: Yang, Tong <yangtong2@huawei.com>
2022-12-09 14:55:21 +00:00

72 lines
22 KiB
HTML

<a name="mrs_01_2130"></a><a name="mrs_01_2130"></a>
<h1 class="topictitle1">Updating a Client (Versions Earlier Than 3.x)</h1>
<div id="body8662426"><div class="note" id="mrs_01_2130__en-us_topic_0264269034_note16414146133716"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="mrs_01_2130__en-us_topic_0264269034_p2414144614373">This section applies to clusters of versions earlier than MRS 3.x. For MRS 3.x or later, see <a href="mrs_01_2129.html">Updating a Client (Version 3.x or Later)</a>.</p>
</div></div>
<div class="section" id="mrs_01_2130__en-us_topic_0264269034_section49706223568"><h4 class="sectiontitle">Updating a Client Configuration File</h4><p id="mrs_01_2130__en-us_topic_0264269034_p131917475562"><strong id="mrs_01_2130__en-us_topic_0264269034_b101199311165">Scenario</strong></p>
</div>
<p id="mrs_01_2130__en-us_topic_0264269034_p4167525595418">An MRS cluster provides a client for you to connect to a server, view task results, or manage data. Before using an MRS client, you need to download and update the client configuration file if service configuration parameters are modified and a service is restarted or the service is merely restarted on MRS Manager.</p>
<p id="mrs_01_2130__en-us_topic_0264269034_p1078664816296">During cluster creation, the original client is stored in the <span class="filepath" id="mrs_01_2130__en-us_topic_0264269034_filepath9371355185019"><b>/opt/client</b></span> directory on all nodes in the cluster by default. After the cluster is created, only the client of a Master node can be directly used. To use the client of a Core node, you need to update the client configuration file first.</p>
<p id="mrs_01_2130__en-us_topic_0264269034_p237381316574"><strong id="mrs_01_2130__en-us_topic_0264269034_b1164413519">Procedure</strong></p>
<p id="mrs_01_2130__en-us_topic_0264269034_p1847181284820"><strong id="mrs_01_2130__en-us_topic_0264269034_b19893622181112">Method 1: </strong></p>
<ol id="mrs_01_2130__en-us_topic_0264269034_ol45312184151955"><li id="mrs_01_2130__en-us_topic_0264269034_li0460185474017"><span>Log in to MRS Manager. For details, see <a href="mrs_01_0102.html">Accessing MRS Manager (Versions Earlier Than MRS 3.x)</a>. Then, choose <strong id="mrs_01_2130__en-us_topic_0264269034_b12807132133818">Services</strong>.</span></li><li id="mrs_01_2130__en-us_topic_0264269034_li27347702152031"><span>Click <span class="uicontrol" id="mrs_01_2130__en-us_topic_0264269034_uicontrol82379591462"><b>Download Client</b></span>.</span><p><p id="mrs_01_2130__en-us_topic_0264269034_p5142550152031">Set <span class="parmname" id="mrs_01_2130__en-us_topic_0264269034_parmname113671022173820"><b>Client Type</b></span> to <span class="uicontrol" id="mrs_01_2130__en-us_topic_0264269034_uicontrol4373162263812"><b>Only configuration files</b></span>, <span class="parmname" id="mrs_01_2130__en-us_topic_0264269034_parmname1037362283818"><b>Download To</b></span> to <span class="parmvalue" id="mrs_01_2130__en-us_topic_0264269034_parmvalue5374172213811"><b>Server</b></span>, and click <span class="uicontrol" id="mrs_01_2130__en-us_topic_0264269034_uicontrol173743221388"><b>OK</b></span> to generate the client configuration file. The generated file is saved in the <span class="filepath" id="mrs_01_2130__en-us_topic_0264269034_filepath037492223815"><b>/tmp/MRS-client</b></span> directory on the active management node by default. You can customize the file path.</p>
</p></li><li id="mrs_01_2130__en-us_topic_0264269034_li3915627204617"><span>Query and log in to the active Master node.</span></li><li id="mrs_01_2130__en-us_topic_0264269034_li25265380151955"><span>If you use the client in the cluster, run the following command to switch to user <strong id="mrs_01_2130__en-us_topic_0264269034_b1254673445215">omm</strong>. If you use the client outside the cluster, switch to user <strong id="mrs_01_2130__en-us_topic_0264269034_b205471834175210">root</strong>.</span><p><p id="mrs_01_2130__en-us_topic_0264269034_p26061832151955"><strong id="mrs_01_2130__en-us_topic_0264269034_b33229899151955">sudo su - omm</strong></p>
</p></li><li id="mrs_01_2130__en-us_topic_0264269034_li30633638151955"><span>Run the following command to switch to the client directory, for example, <span class="filepath" id="mrs_01_2130__en-us_topic_0264269034_filepath204211149133916"><b>/opt/Bigdata/client</b></span>:</span><p><p id="mrs_01_2130__en-us_topic_0264269034_p7267290151955"><strong id="mrs_01_2130__en-us_topic_0264269034_b65405617151955">cd /opt/Bigdata/client</strong></p>
</p></li><li id="mrs_01_2130__en-us_topic_0264269034_li1470645152711"><span>Run the following command to update client configurations:</span><p><p id="mrs_01_2130__en-us_topic_0264269034_p13235811152711"><strong id="mrs_01_2130__en-us_topic_0264269034_b171918243404">sh refreshConfig.sh</strong> <em id="mrs_01_2130__en-us_topic_0264269034_i11725172419409">Client installation directory</em> <em id="mrs_01_2130__en-us_topic_0264269034_i8725524154013">Full path of the client configuration file package</em></p>
<p id="mrs_01_2130__en-us_topic_0264269034_p1290068152711">For example, run the following command:</p>
<p id="mrs_01_2130__en-us_topic_0264269034_p11610615152711"><strong id="mrs_01_2130__en-us_topic_0264269034_b37386679152711">sh refreshConfig.sh /opt/Bigdata/client /tmp/MRS-client/MRS_Services_Client.tar</strong></p>
<p id="mrs_01_2130__en-us_topic_0264269034_p935796152711">If the following information is displayed, the configurations have been updated successfully.</p>
<pre class="screen" id="mrs_01_2130__en-us_topic_0264269034_screen8422167152711">ReFresh components client config is complete.
Succeed to refresh components client config.</pre>
</p></li></ol>
<p id="mrs_01_2130__en-us_topic_0264269034_p15726172834610"><strong id="mrs_01_2130__en-us_topic_0264269034_b5401856163920">Method 2: applicable to MRS 1.9.2 or later</strong></p>
<ol id="mrs_01_2130__en-us_topic_0264269034_ol5576102913553"><li id="mrs_01_2130__en-us_topic_0264269034_li82944456565"><span>After the cluster is installed, run the following command to switch to user <strong id="mrs_01_2130__en-us_topic_0264269034_b186946193314">omm</strong>. If you use the client outside the cluster, switch to user <strong id="mrs_01_2130__en-us_topic_0264269034_b1287174643311">root</strong>.</span><p><p id="mrs_01_2130__en-us_topic_0264269034_p5448944135717"><strong id="mrs_01_2130__en-us_topic_0264269034_b16448164412571">sudo su - omm</strong></p>
</p></li><li id="mrs_01_2130__en-us_topic_0264269034_li2051110417585"><span>Run the following command to switch to the client directory, for example, <span class="filepath" id="mrs_01_2130__en-us_topic_0264269034_filepath656618219402"><b>/opt/Bigdata/client</b></span>:</span><p><p id="mrs_01_2130__en-us_topic_0264269034_p051194195817"><strong id="mrs_01_2130__en-us_topic_0264269034_b1851115455812">cd /opt/Bigdata/client</strong></p>
</p></li><li id="mrs_01_2130__en-us_topic_0264269034_li1087892195813"><span>Run the following command and enter the name of an MRS Manager user with the download permission and its password (for example, the username is <strong id="mrs_01_2130__en-us_topic_0264269034_b14917162844311">admin</strong> and the password is the one set during cluster creation) as prompted to update client configurations.</span><p><p id="mrs_01_2130__en-us_topic_0264269034_p6878921195810"><strong id="mrs_01_2130__en-us_topic_0264269034_b178781121105814">sh autoRefreshConfig.sh</strong></p>
</p></li><li id="mrs_01_2130__en-us_topic_0264269034_li0296115215011"><span>After the command is executed, the following information is displayed, where <em id="mrs_01_2130__en-us_topic_0264269034_i121052577354">XXX </em>indicates the name of the component installed in the cluster. To update client configurations of all components, press <strong id="mrs_01_2130__en-us_topic_0264269034_b1410725773511">Enter</strong>. To update client configurations of some components, enter the component names and separate them with commas (,).</span><p><pre class="screen" id="mrs_01_2130__en-us_topic_0264269034_screen18255312155413">Components "xxx" have been installed in the cluster. Please input the comma-separated names of the components for which you want to update client configurations. If you press Enter without inputting any component name, the client configurations of all components will be updated:</pre>
<p id="mrs_01_2130__en-us_topic_0264269034_p1678112144124">If the following information is displayed, the configurations have been updated successfully.</p>
<pre class="screen" id="mrs_01_2130__en-us_topic_0264269034_screen15364931215">Succeed to refresh components client config.</pre>
<p id="mrs_01_2130__en-us_topic_0264269034_p15741910130">If the following information is displayed, the username or password is incorrect.</p>
<pre class="screen" id="mrs_01_2130__en-us_topic_0264269034_screen28401516146">login manager failed,Incorrect username or password.</pre>
<div class="note" id="mrs_01_2130__en-us_topic_0264269034_note66371463118"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="mrs_01_2130__en-us_topic_0264269034_ul13801188313"><li id="mrs_01_2130__en-us_topic_0264269034_li48011381030">This script automatically connects to the cluster and invokes the <strong id="mrs_01_2130__en-us_topic_0264269034_b14579959103612">refreshConfig.sh</strong> script to download and update the client configuration file.</li><li id="mrs_01_2130__en-us_topic_0264269034_li35580574148">By default, the client uses the floating IP address specified by <strong id="mrs_01_2130__en-us_topic_0264269034_b111952723710">wsom=xxx</strong> in the <strong id="mrs_01_2130__en-us_topic_0264269034_b18196187153716">Version </strong>file in the installation directory to update the client configurations. To update the configuration file of another cluster, modify the value of<strong id="mrs_01_2130__en-us_topic_0264269034_b131971471378"> wsom=xxx</strong> in the <strong id="mrs_01_2130__en-us_topic_0264269034_b71989716378">Version </strong>file to the floating IP address of the corresponding cluster before performing this step.</li></ul>
</div></div>
</p></li></ol>
<div class="section" id="mrs_01_2130__en-us_topic_0264269034_section92959464575"><h4 class="sectiontitle">Fully Updating the Original Client of the Active Master Node</h4><p id="mrs_01_2130__en-us_topic_0264269034_p10496135914819"><strong id="mrs_01_2130__en-us_topic_0264269034_b1491016533473">Scenario</strong></p>
<p id="mrs_01_2130__en-us_topic_0264269034_p1067417421014">During cluster creation, the original client is stored in the <span class="filepath" id="mrs_01_2130__en-us_topic_0264269034_filepath1228938135116"><b>/opt/client</b></span> directory on all nodes in the cluster by default. The following uses <strong id="mrs_01_2130__en-us_topic_0264269034_b12986102514324">/opt/Bigdata/client</strong> as an example.</p>
<ul id="mrs_01_2130__en-us_topic_0264269034_ul4711194551015"><li id="mrs_01_2130__en-us_topic_0264269034_li18711114561018">For a normal MRS cluster, you will use the pre-installed client on a Master node to submit a job on the management console page.</li><li id="mrs_01_2130__en-us_topic_0264269034_li01351149161016">You can also use the pre-installed client on the Master node to connect to a server, view task results, and manage data.</li></ul>
<p id="mrs_01_2130__en-us_topic_0264269034_p126757431015">After installing the patch on the cluster, you need to update the client on the Master node to ensure that the functions of the built-in client are available.</p>
<p id="mrs_01_2130__en-us_topic_0264269034_p495495081012"><strong id="mrs_01_2130__en-us_topic_0264269034_b1849614414386">Procedure</strong></p>
<ol id="mrs_01_2130__en-us_topic_0264269034_ol13453112165817"><li id="mrs_01_2130__en-us_topic_0264269034_li6500547131416"><a name="mrs_01_2130__en-us_topic_0264269034_li6500547131416"></a><a name="en-us_topic_0264269034_li6500547131416"></a><span>Log in to MRS Manager. For details, see <a href="mrs_01_0102.html">Accessing MRS Manager (Versions Earlier Than MRS 3.x)</a>. Then, choose <strong id="mrs_01_2130__en-us_topic_0264269034_b22396138519">Services</strong>.</span></li><li id="mrs_01_2130__en-us_topic_0264269034_li1454122195814"><span>Click <span class="uicontrol" id="mrs_01_2130__en-us_topic_0264269034_uicontrol18881136103813"><b>Download Client</b></span>.</span><p><p id="mrs_01_2130__en-us_topic_0264269034_p2045610215815">Set <span class="parmname" id="mrs_01_2130__en-us_topic_0264269034_parmname1896033125114"><b>Client Type</b></span> to <span class="uicontrol" id="mrs_01_2130__en-us_topic_0264269034_uicontrol590217339511"><b>All client files</b></span>, <span class="parmname" id="mrs_01_2130__en-us_topic_0264269034_parmname290210332510"><b>Download To</b></span> to <span class="parmvalue" id="mrs_01_2130__en-us_topic_0264269034_parmvalue2090213330511"><b>Server</b></span>, and click <span class="uicontrol" id="mrs_01_2130__en-us_topic_0264269034_uicontrol13902233105115"><b>OK</b></span> to generate the client configuration file. The generated file is saved in the <span class="filepath" id="mrs_01_2130__en-us_topic_0264269034_filepath9903033135111"><b>/tmp/MRS-client</b></span> directory on the active management node by default. You can customize the file path.</p>
</p></li><li id="mrs_01_2130__en-us_topic_0264269034_li14850170195112"><a name="mrs_01_2130__en-us_topic_0264269034_li14850170195112"></a><a name="en-us_topic_0264269034_li14850170195112"></a><span>Query and log in to the active Master node.</span></li><li id="mrs_01_2130__en-us_topic_0264269034_li3635762195625"><a name="mrs_01_2130__en-us_topic_0264269034_li3635762195625"></a><a name="en-us_topic_0264269034_li3635762195625"></a><span>On the ECS, switch to user <strong id="mrs_01_2130__en-us_topic_0264269034_b63325773510342">root</strong> and copy the installation package to the <span class="filepath" id="mrs_01_2130__en-us_topic_0264269034_filepath188678181710348"><b>/opt</b></span> directory.</span><p><p id="mrs_01_2130__en-us_topic_0264269034_p48215431132834"><strong id="mrs_01_2130__en-us_topic_0264269034_b45350733132836">sudo su - root</strong></p>
<p id="mrs_01_2130__en-us_topic_0264269034_p383515891068"><strong id="mrs_01_2130__en-us_topic_0264269034_b60207094132016">cp /tmp/MRS-client/MRS_Services_Client.tar /opt</strong></p>
</p></li><li id="mrs_01_2130__en-us_topic_0264269034_li1649774418830"><span>Run the following command in the <span class="filepath" id="mrs_01_2130__en-us_topic_0264269034_filepath97252870910640"><b>/opt</b></span> directory to decompress the package and obtain the verification file and the configuration package of the client:</span><p><p id="mrs_01_2130__en-us_topic_0264269034_p5556163418125"><strong id="mrs_01_2130__en-us_topic_0264269034_b3999988132850">tar -xvf MRS</strong><strong id="mrs_01_2130__en-us_topic_0264269034_b686791718137">_Services_Client.tar</strong></p>
</p></li><li id="mrs_01_2130__en-us_topic_0264269034_li664034951893"><span>Run the following command to verify the configuration file package of the client:</span><p><p id="mrs_01_2130__en-us_topic_0264269034_p54709019181312"><strong id="mrs_01_2130__en-us_topic_0264269034_b66867090132852">sha256sum -c MRS</strong><strong id="mrs_01_2130__en-us_topic_0264269034_b5690940181436">_Services_ClientConfig.tar.sha256</strong></p>
<p id="mrs_01_2130__en-us_topic_0264269034_p3263777181412">The command output is as follows:</p>
<pre class="screen" id="mrs_01_2130__en-us_topic_0264269034_screen24131131181456">MRS_Services_ClientConfig.tar: OK</pre>
</p></li><li id="mrs_01_2130__en-us_topic_0264269034_li4683734818919"><span>Run the following command to decompress <span class="filepath" id="mrs_01_2130__en-us_topic_0264269034_filepath1739724880114532"><b>MRS_Services_ClientConfig.tar</b></span>:</span><p><p id="mrs_01_2130__en-us_topic_0264269034_p36596134181537"><strong id="mrs_01_2130__en-us_topic_0264269034_b3722216132857">tar -xvf MRS</strong><strong id="mrs_01_2130__en-us_topic_0264269034_b9824444181613">_Services_ClientConfig.tar</strong></p>
</p></li><li id="mrs_01_2130__en-us_topic_0264269034_li1053954121520"><span>Run the following command to move the original client to the <strong id="mrs_01_2130__en-us_topic_0264269034_b19490059153616">/opt/Bigdata/client_bak</strong> directory:</span><p><p id="mrs_01_2130__en-us_topic_0264269034_p32701316315"><strong id="mrs_01_2130__en-us_topic_0264269034_b2973811151920">mv /opt/Bigdata/client</strong> <strong id="mrs_01_2130__en-us_topic_0264269034_b520016014190">/opt/</strong><strong id="mrs_01_2130__en-us_topic_0264269034_b66926662134534">Bigdata/</strong><strong id="mrs_01_2130__en-us_topic_0264269034_b192011100198">client_bak</strong></p>
</p></li><li id="mrs_01_2130__en-us_topic_0264269034_li15501741632"><span>Run the following command to install the client in a new directory. The client path must be <span class="filepath" id="mrs_01_2130__en-us_topic_0264269034_filepath10568125665219"><b>/opt/Bigdata/client</b></span>.</span><p><p id="mrs_01_2130__en-us_topic_0264269034_p052279632"><strong id="mrs_01_2130__en-us_topic_0264269034_b8750476132859">sh /opt/MRS</strong><strong id="mrs_01_2130__en-us_topic_0264269034_b39103504181849">_Services_ClientConfig/install.sh /opt/Bigdata/client</strong></p>
<p id="mrs_01_2130__en-us_topic_0264269034_p37392995181857">If the following information is displayed, the client has been successfully installed:</p>
<pre class="screen" id="mrs_01_2130__en-us_topic_0264269034_screen654652418195">Components client installation is complete.</pre>
</p></li><li id="mrs_01_2130__en-us_topic_0264269034_li11580525172611"><span>Run the following command to modify the user and user group of the <strong id="mrs_01_2130__en-us_topic_0264269034_b15862111412370">/opt/Bigdata/client</strong> directory:</span><p><p id="mrs_01_2130__en-us_topic_0264269034_p921285320266"><strong id="mrs_01_2130__en-us_topic_0264269034_b42481210103720">chown omm:wheel /opt/Bigdata/client -R</strong></p>
</p></li><li id="mrs_01_2130__en-us_topic_0264269034_li6406429718107"><span>Run the following command to configure environment variables:</span><p><p id="mrs_01_2130__en-us_topic_0264269034_p3970776518107"><strong id="mrs_01_2130__en-us_topic_0264269034_b54117066175450">source /opt/Bigdata/client/bigdata_env</strong></p>
</p></li><li id="mrs_01_2130__en-us_topic_0264269034_li59218459111521"><span>If Kerberos authentication is enabled for the current cluster, run the following command to authenticate the user. If Kerberos authentication is disabled for the current cluster, skip this step.</span><p><p id="mrs_01_2130__en-us_topic_0264269034_p3903911193255"><strong id="mrs_01_2130__en-us_topic_0264269034_b1380904515535">kinit</strong> <em id="mrs_01_2130__en-us_topic_0264269034_i381514458537">MRS cluster user</em></p>
<p id="mrs_01_2130__en-us_topic_0264269034_p23308555145027">Example: <strong id="mrs_01_2130__en-us_topic_0264269034_b1436025993715">kinit admin</strong></p>
</p></li><li id="mrs_01_2130__en-us_topic_0264269034_li6221236418107"><a name="mrs_01_2130__en-us_topic_0264269034_li6221236418107"></a><a name="en-us_topic_0264269034_li6221236418107"></a><span>Run the client command of a component.</span><p><p id="mrs_01_2130__en-us_topic_0264269034_p7053392132957">For example, run the following command to query the HDFS directory:</p>
<p id="mrs_01_2130__en-us_topic_0264269034_p1719355913307"><strong id="mrs_01_2130__en-us_topic_0264269034_b17667152133012">hdfs dfs -ls /</strong></p>
</p></li></ol>
</div>
<div class="section" id="mrs_01_2130__en-us_topic_0264269034_section1129715468573"><h4 class="sectiontitle">Fully Updating the Original Client of the Standby Master Node</h4><ol id="mrs_01_2130__en-us_topic_0264269034_ol1299394782110"><li id="mrs_01_2130__en-us_topic_0264269034_li1699315475218"><span>Repeat <a href="#mrs_01_2130__en-us_topic_0264269034_li6500547131416">1</a> to <a href="#mrs_01_2130__en-us_topic_0264269034_li14850170195112">3</a> to log in to the standby Master node, and run the following command to switch to user <strong id="mrs_01_2130__en-us_topic_0264269034_b1733123954318">omm</strong>:</span><p><p id="mrs_01_2130__en-us_topic_0264269034_p370582942416"><strong id="mrs_01_2130__en-us_topic_0264269034_b1535214111501">sudo su - omm</strong></p>
</p></li><li id="mrs_01_2130__en-us_topic_0264269034_li36641306259"><span>Run the following command on the standby master node to copy the downloaded client package from the active master node:</span><p><p id="mrs_01_2130__en-us_topic_0264269034_p243545712511"><strong id="mrs_01_2130__en-us_topic_0264269034_b7832235124310">scp omm@</strong><em id="mrs_01_2130__en-us_topic_0264269034_i5342436204312">master1 node</em><em id="mrs_01_2130__en-us_topic_0264269034_i851183812402">IP address</em><strong id="mrs_01_2130__en-us_topic_0264269034_b16493038184020">:/tmp/MRS-client/MRS_Services_Client.tar <strong id="mrs_01_2130__en-us_topic_0264269034_b1949373804020">/tmp/MRS-client/</strong></strong></p>
<div class="note" id="mrs_01_2130__en-us_topic_0264269034_note159250592913"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="mrs_01_2130__en-us_topic_0264269034_ul17174119121214"><li id="mrs_01_2130__en-us_topic_0264269034_li181741094124">In this command, <strong id="mrs_01_2130__en-us_topic_0264269034_b111911934192315">master1</strong> node is the active master node.</li><li id="mrs_01_2130__en-us_topic_0264269034_li017415951212"><strong id="mrs_01_2130__en-us_topic_0264269034_b640063314244">/tmp/MRS-client/</strong> is an example target directory of the standby master node.</li></ul>
</div></div>
</p></li><li id="mrs_01_2130__en-us_topic_0264269034_li2081083715267"><span>Repeat <a href="#mrs_01_2130__en-us_topic_0264269034_li3635762195625">4</a> to <a href="#mrs_01_2130__en-us_topic_0264269034_li6221236418107">13</a> to update the client of the standby Master node.</span></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_2126.html">Using an MRS Client</a></div>
</div>
</div>