Modifying the UForge IP¶
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 Modifying the UForge IP in a Multi-Node Environment.
To modify the UForge IP you will need to:
Stop the following services:
service tomcat stop service oar-server stop service squid stop service rabbitmq-server stop service eventcontroller stop
Clean the squid cache as follows:
[root@db ~]# grep cache_dir /etc/squid/squid.conf cache_dir ufs /data/proxy 10000 16 256 [root@db ~]# rm -rf /data/proxy/*
Modify all occurences of the old IP to the new IP in the following files:
/etc/UShareSoft/uforge/uforge.conf
/var/opt/UShareSoft/uforge-client/gwt/uforge/templates/forge-config.xml
/etc/httpd/conf.d/uforge-ui.conf
/etc/squid/squid.conf
For example:
sed -i.bak "s/192\.168\.2\.177/192.168.2.200/g" /etc/UShareSoft/uforge/uforge.conf /var/opt/UShareSoft/uforge-client/gwt/uforge/templates/forge-config.xml /etc/httpd/conf.d/uforge-ui.conf /etc/squid/squid.conf
Modify all occurences of the old IP to the new IP in the following files:
/etc/sysconfig/network-scripts/ifcfg-ens160
/etc/hosts
For exemple:
sed -i "s/192\.168\.2\.177/192.168.2.200/g" /etc/sysconfig/network-scripts/ifcfg-ens160 /etc/hosts
Restart the network service:
service network restart
Note
You will need to open a new terminal and connect to the machine using the new IP.
Restart the services as follows:
$ /opt/UShareSoft/uforge/tools/update_scripts/uforge_update.sh $ /opt/UShareSoft/uforge-client/bin/uforge_ui_update.sh $ service oar-server start
Note
While oar-server is down, root user may receive emails with an error message about UForge cron execution.
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
Stop the following services:
On the WS node and UI node run:
$ service tomcat stop
On the DB node run:
$ service oar-server stop $ service squid stop $ service rabbitmq-server stop $ service eventcontroller stop
Clean the Squid cache as follows:
Search and delete the cache directory in the DB node
$ grep cache_dir /etc/squid/squid.conf cache_dir ufs /data/proxy 10000 16 256 $ rm -rf /data/proxy/*
Modify all occurences of the old IP to the new IP in the following files:
Modify
uforge.conf
andsquid.conf
modification in all nodes:$ 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
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$ sed -i "s/10.1.2.180/10.1.2.25/g" /etc/sysconfig/network-scripts/ifcfg-ens192
Modify
/etc/hosts
on all nodes$ sed -i "s/10.1.2.180/10.1.2.25/g" /etc/hosts for each node
Restart the network service only for the node where the IP has been changed:
$ service network restart
Restart the services as follows:
Execute
uforge_update.sh
script on all nodes in the next order:- Compute node
- DB node
- WS node
- UI node
$ /opt/UShareSoft/uforge/tools/update_scripts/uforge_update.sh
Start oar-server in the DB node:
$ service oar-server start
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