Skip to content

Commit

Permalink
Merge pull request #836 from emuus/3.8-10864
Browse files Browse the repository at this point in the history
add example for modify ip in multi-node
  • Loading branch information
emuus committed Jul 10, 2018
2 parents 52a7dea + 6b6eccd commit 0761937
Showing 1 changed file with 100 additions and 1 deletion.
101 changes: 100 additions & 1 deletion admin/en/source/pages/config/modify-ip.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Modifying the UForge IP
-----------------------

.. note:: This procedure is only valid for mono node UForge platforms.
.. note:: This procedure is only valid for mono node UForge platforms. For an example of modify the IP in a multi-node environment, refer to :ref:`modify-multinode-ip`.

To modify the UForge IP you will need to:

Expand Down Expand Up @@ -64,3 +64,102 @@ For exemple:
$ service oar-server start

.. note:: While oar-server is down, root user may receive emails with an error message about UForge cron execution.


.. _modify-multinode-ip:

Modifying the UForge IP in a Multi-Node Environment
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The following is an example of modifying the UForge IP in a multi-node environment. This example should be modified to correspond to your platform configuration.

The environment in this example has four nodes:

* Node 1 for the UI
* Node 2 for the Web Service
* Node 3 for the DB with the OAR service Manager, RabbitMQ and UForge Event Controller
* Node 4 for the Compute Node

Old DB IP: 10.1.2.180

New DB IP: 10.1.2.25

1. Stop the following services:

On the WS node and UI node run:

.. code-block:: shell
$ service tomcat stop
On the DB node run:

.. code-block:: shell
$ service oar-server stop
$ service squid stop
$ service rabbitmq-server stop
$ service eventcontroller stop

2. Clean the Squid cache as follows:

Search and delete the cache directory in the DB node

.. code-block:: shell
$ grep cache_dir /etc/squid/squid.conf
cache_dir ufs /data/proxy 10000 16 256
$ rm -rf /data/proxy/*
3. Modify all occurences of the old IP to the new IP in the following files:

Modify ``uforge.conf`` and ``squid.conf`` modification in all nodes:

.. code-block:: shell
$ sed -i.bak "s/10.1.2.180/10.1.2.25/g" /etc/UShareSoft/uforge/uforge.conf
$ sed -i.bak "s/10.1.2.180/10.1.2.25/g" /etc/squid/squid.conf
If the IP of the UI node or WS node was changed, the following files have to be modified on UI node:

* /var/opt/UShareSoft/uforge-client/gwt/uforge/templates/forge-config.xml
* /etc/httpd/conf.d/uforge-ui.conf

4. Modify all occurences of the old IP to the new IP in the following files:

Modify ``ifcfg-ens160`` only on the node which IP will be changed

.. code-block:: shell
$ sed -i "s/10.1.2.180/10.1.2.25/g" /etc/sysconfig/network-scripts/ifcfg-ens192
Modify ``/etc/hosts`` on all nodes

.. code-block:: shell
$ sed -i "s/10.1.2.180/10.1.2.25/g" /etc/hosts for each node

5. Restart the network service only for the node where the IP has been changed::
$ service network restart

6. Restart the services as follows:

a) Execute ``uforge_update.sh`` script on all nodes in the next order:

* Compute node
* DB node
* WS node
* UI node

.. code-block:: shell
$ /opt/UShareSoft/uforge/tools/update_scripts/uforge_update.sh
b) Start oar-server in the DB node::

$ service oar-server start

c) If the IP of the UI node or WS node was changed, the next script has to be executed in the UI node::

$ /opt/UShareSoft/uforge-client/bin/uforge_ui_update.sh

0 comments on commit 0761937

Please sign in to comment.