Upgrade

Upgrade Cisco IoT FND

Here are the instructions to upgrade your Cisco IoT FND application:

Before you begin

  • Perform a back up of the application directory. For example, if you want to upgrade cgms RPM, then you must back up the /opt/cgms folder.

  • Perform a back up of the Cisco IoT FND database.

  • The steps mentioned in this topic needs to be performed sequentially.

Procedure


Step 1

Obtain the latest verion of Cisco IoT FND ISO from Cisco.

Step 2

Extract cgms rpms into a directory from Cisco IoT FND release ISO file.

Step 3

Run the following command on your command terminal to get a list of rpms isntalled in the Cisco IoT FND application:

rpm -qa | grep cgms

Step 4

Run the following command to stop Cisco IoT FND.

systemctl stop cgms

Note

 

The application typically takes approximately 10 seconds to stop.

Step 5

Run the following command to verify if no Java processes are running.

ps | grep java

Step 6

Run the following command to make sure that the cgms service has stopped.

systemctl status cgms

Step 7

Run the following command to upgrade the Cisco IoT FND RPM:

rpm -Uvh <new_cgms_rpm_filename> --force
Here's an example:
rpm -Uvh cgms-4.11.0-46.x86_69.rpm --force

Note

 

We recommend you to upgrade all the installed rpms with the same Cisco IoT FND version that you will upgrade to. The new rpm files overwrite the existing files in /opt/cgms.

Step 8

Run the following command to upgrade the database:

./db-migrate in /opt/cgms/bin

Step 9

Enter the database password when prompted.

Note

 

The default password is cgms123.

Step 10

Run the following command to start the Cisco IoT FND application after an upgrade:

systemctl start cgms

What to do next

Upgrade Cisco IoT FND TPS Proxy

Here are the instructions to upgrade the TPS proxy server manually:

Before you begin

Based on the RHEL version, choose either systemctl or service commands.

RHEL Version Command
8.x systemctl stop tpsproxy.service
7.x service tpsproxy stop

Procedure


Step 1

Perform a back up of the following files in the /opt/cgms-tpsproxy/conf directory.

  • tpsproxy.properties

  • cgms_keystore

Step 2

Using the following command, ensure that the following services are running:

systemctl status tpsproxy.service

Here's an example:

[root@iot-tps opt]# systemctl status tpsproxy.service
● tpsproxy.service - SYSV: CGMS Tunnel Provisioning proxy server
   Loaded: loaded (/etc/rc.d/init.d/tpsproxy; generated)
   Active: active (running) since Mon 2023-11-06 23:51:00 IST; 6 months 2 days ago
     Docs: man:systemd-sysv-generator(8)
  Process: 35730 ExecStart=/etc/rc.d/init.d/tpsproxy start (code=exited, status=0/SUCCESS)
    Tasks: 45 (limit: 152533)
   Memory: 204.1M
   CGroup: /system.slice/tpsproxy.service
           └─35748 java -server -Xms128m -Xmx2g -XX:MaxPermSize=256m -server -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/cgms-tpsproxy/log -XX:-OmitStackTraceInFastThrow -XX:-Use>

Nov 06 23:50:58 iot-tps systemd[1]: Starting SYSV: CGMS Tunnel Provisioning proxy server...
Nov 06 23:50:59 iot-tps runuser[35746]: pam_unix(runuser:session): session opened for user root by (uid=0)
Nov 06 23:50:59 iot-tps runuser[35746]: pam_unix(runuser:session): session closed for user root
Nov 06 23:51:00 iot-tps tpsproxy[35730]: [36B blob data]
Nov 06 23:51:00 iot-tps systemd[1]: Started SYSV: CGMS Tunnel Provisioning proxy server.

Step 3

Run the following command to stop the tpsproxy services:

systemctl stop tpsproxy

Step 4

Copy the cgms-tpsproxy.rpm downloaded from software.cisco.com to a directory in the TPS server.

Step 5

Run the following command to upgrade the tpsproxy server:

[root@iot-tps opt]# rpm -Uvh cgms-tpsproxy-<fnd-version>.rpm
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:cgms-tpsproxy-4.12.0-56          ################################# [ 50%]
PSK key already present
05-09-2024 15:36:02 IST: INFO: Looking for /opt/cgms-tpsproxy/conf/tpsproxy.properties
05-09-2024 15:36:02 IST: INFO: cgms-keystore-password-hidden already exists. Doing nothing.
Cleaning up / removing...
   2:cgms-tpsproxy-4.10.0-45          ################################# [100%]

Step 6

Run the following command to start the tpsproxy services:

systemctl start tpsproxy.service

Here's an example:

[root@iot-tps opt]# systemctl start tpsproxy.service
[root@iot-tps opt]# systemctl status tpsproxy.service
● tpsproxy.service - SYSV: CGMS Tunnel Provisioning proxy server
   Loaded: loaded (/etc/rc.d/init.d/tpsproxy; generated)
   Active: active (running) since Thu 2024-05-09 15:36:45 IST; 4s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 209931 ExecStart=/etc/rc.d/init.d/tpsproxy start (code=exited, status=0/SUCCESS)
    Tasks: 39 (limit: 152533)
   Memory: 71.1M
   CGroup: /system.slice/tpsproxy.service
           └─209949 java -server -Xms128m -Xmx2g -XX:MaxPermSize=256m -server -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/cgms-tpsproxy/log -XX:-OmitStackTraceInFastThrow -XX:-Us>

May 09 15:36:44 iot-tps systemd[1]: Starting SYSV: CGMS Tunnel Provisioning proxy server...
May 09 15:36:44 iot-tps runuser[209947]: pam_unix(runuser:session): session opened for user root by (uid=0)
May 09 15:36:44 iot-tps runuser[209947]: pam_unix(runuser:session): session closed for user root
May 09 15:36:45 iot-tps tpsproxy[209931]: [36B blob data]
May 09 15:36:45 iot-tps systemd[1]: Started SYSV: CGMS Tunnel Provisioning proxy server.

Step 7

Run the following command to check the log

tail -f /opt/cgms-tpsproxy/log/tpsproxy.log

Here's an example:

[root@iot-tps opt]# tail -f /opt/cgms-tpsproxy/log/tpsproxy.log
32: iot-tps: May 09 2024 06:06:45.108 -0400: %CGMS-6-UNSPECIFIED: %[ch=BootstrapProxy][sev=INFO][tid=main]: bootstrap-proxy-listen-port=9125
33: iot-tps: May 09 2024 06:06:45.108 -0400: %CGMS-6-UNSPECIFIED: %[ch=BootstrapProxy][sev=INFO][tid=main]: inbound-proxy-destination=http://<fnd hostname/ip address>:9125
34: iot-tps: May 09 2024 06:06:45.108 -0400: %CGMS-6-UNSPECIFIED: %[ch=BootstrapProxy][sev=INFO][tid=main]: inbound-proxy-timeout=300000
35: iot-tps: May 09 2024 06:06:45.108 -0400: %CGMS-6-UNSPECIFIED: %[ch=BootstrapProxy][sev=INFO][tid=main]: inbound-proxy-idle-timeout=300000
36: iot-tps: May 09 2024 06:06:45.108 -0400: %CGMS-6-UNSPECIFIED: %[ch=BootstrapProxy][sev=INFO][tid=main]: inbound-proxy-connections=30
37: iot-tps: May 09 2024 06:06:45.108 -0400: %CGMS-6-UNSPECIFIED: %[ch=BootstrapProxy][sev=INFO][tid=main]: inbound-proxy-max-response-timeout=305000
38: iot-tps: May 09 2024 06:06:45.110 -0400: %CGMS-6-UNSPECIFIED: %[ch=Server][sev=INFO][tid=main]: jetty-9.2.19.v20160908
39: iot-tps: May 09 2024 06:06:45.111 -0400: %CGMS-6-UNSPECIFIED: %[ch=ContextHandler][sev=INFO][tid=main]: Started o.e.j.s.ServletContextHandler@4d41cee{/,null,AVAILABLE}
40: iot-tps: May 09 2024 06:06:45.112 -0400: %CGMS-6-UNSPECIFIED: %[ch=ServerConnector][sev=INFO][tid=main]: Started ServerConnector@3712b94{HTTP/1.1}{0.0.0.0:9125}
41: iot-tps: May 09 2024 06:06:45.112 -0400: %CGMS-6-UNSPECIFIED: %[ch=Server][sev=INFO][tid=main]: Started @697ms

Step 8

Check the tpsproxy service status using the following command:

systemctl status tpsproxy.service

Here's an example:

[root@iot-tps opt]# systemctl status tpsproxy.service
● tpsproxy.service - SYSV: CGMS Tunnel Provisioning proxy server
   Loaded: loaded (/etc/rc.d/init.d/tpsproxy; generated)
   Active: active (running) since Thu 2024-05-09 15:36:45 IST; 1min 52s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 209931 ExecStart=/etc/rc.d/init.d/tpsproxy start (code=exited, status=0/SUCCESS)
    Tasks: 39 (limit: 152533)
   Memory: 71.1M
   CGroup: /system.slice/tpsproxy.service
           └─209949 java -server -Xms128m -Xmx2g -XX:MaxPermSize=256m -server -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/cgms-tpsproxy/log -XX:-OmitStackTraceInFastThrow -XX:-Us>

May 09 15:36:44 iot-tps systemd[1]: Starting SYSV: CGMS Tunnel Provisioning proxy server...
May 09 15:36:44 iot-tps runuser[209947]: pam_unix(runuser:session): session opened for user root by (uid=0)
May 09 15:36:44 iot-tps runuser[209947]: pam_unix(runuser:session): session closed for user root
May 09 15:36:45 iot-tps tpsproxy[209931]: [36B blob data]
May 09 15:36:45 iot-tps systemd[1]: Started SYSV: CGMS Tunnel Provisioning proxy server.