Child pages
  • sipXcom 18.04

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A new ISO is available for 18.04 at: http://download.sipxcom.org/pub/sipXecs/ISO/

...

Upgrade from previous versions

New Procedure

We will be utilizing an upgrade script to ensure upgrades proceed as intended and so that customers have the appropriate warnings and information before upgrading.

Warning!

Make sure you you backup your  your system (configuration and voicemail at a minimum) prior to installation. You'll be upgrading mongodb to a new version!

...

Do it now... before you go any further.

Download upgrade.

...

Set Repository

To update please edit your /etc/yum.repos.d/sipxecs.repo file and reference the new download server (download.sipxcom.org).  The repo should look as follows:

[sipXcom]
name=sipXecs software for CentOS $releasever - $basearch
baseurl=http://download.sipxcom.org/pub/sipXecs/18.04/CentOS_$releasever/$basearch
gpgcheck=0

 

To edit this file, login to your sipX server as root and then use either vi or nano (easier).  

vi /etc/yum.repos.d/sipxecs.repo

   or

nano /etc/yum.repos.d/sipxecs.repo

Copy Database

On server backup replica set configuration and databases by running following commands: 

mongo --quiet --eval "var cfg=rs.config();cfg.version=1;printjson(cfg)" > /var/sipxdata/tmp/config.json 
mongodump --db=profiles --out=/var/sipxdata/tmp
mongodump --db=node --out=/var/sipxdata/tmp
mongodump --db=vmdb --out=/var/sipxdata/tmp 

Stop MongoDB

Stop mongo database on primary by issuing: 

crontab -r
service sipxsupervisor stop
service mongod stop
kill -9 `cat /var/run/mongodb/mongodb.pid` && rm -rf /var/run/mongodb/mongodb.pid && rm -rf /var/lib/mongodb/* && rm -rf /tmp/mongodb-27017.sock && rm -rf /var/lib/mongo/*

Update to 18.04

yum clean all
yum update
sipxagent
reboot

Restore Mongo Data

Verify mongo service up and running

service mongod status

 

Run:

config=$(cat /var/sipxdata/tmp/config.json)
mongo --eval "rs.initiate($config)"
mongorestore --db profiles /var/sipxdata/tmp/profiles && rm -rf /var/sipxdata/tmp/profiles
mongorestore --db node /var/sipxdata/tmp/node && rm -rf /var/sipxdata/tmp/node
mongorestore --db vmdb /var/sipxdata/tmp/vmdb && rm -rf /var/sipxdata/tmp/vmdb/
reboot

Send Server Profiles

Login to web interface as superadmin.

Navigate to System -> Servers page. Place check mark next to server name and click 'Send Profiles'.

 

Upgrade to 18.04 for Multi-Server Clusters with Multiple Database Servers

Prepare update from 17.10 to 18.04:

...

sh

Login to the primary server as root.

Execute the following:

wget http://download.sipxcom.org/upgrade.sh
chmod +x upgrade.sh

Run upgrade.sh

Execute the upgrade script and answer 'Yes' to continue:

./upgrade.sh

 

The following will be displayed:

sipXcom 18.04 Upgrade Script
 
IMPORTANT: If this is a multi-server cluster, all databases except the Primary (which must be on the configuration server) should be removed.
IMPORTANT: You should run a system backup and copy your config and voicemail backups to another system. If the upgrade fails, you will need to build a new server and restore from backup.
IMPORTANT: Ensure that you have enough disk space available for a copy of the Mongo databases. (roughly your Config + Voicemail backups).
 
This script will do the following:
- Back up mongo config and dbs
- Stop mongo instance and remove old mongo files
- Change 17.10 occurrences in /etc/yum.repos.d with 18.04
- Perform yum update and then reboot the machine
 
On sipxconfig service startup following steps are taken (in case there is a backup still on the disk):
- Restore mongo config and dbs, then remove from disk
- Reboot machine
 
For other cluster servers:
- Run same script
- Re-add databases that were removed.
 
Continue? (you must enter Yes or No as shown and press Enter):

Enter 'Yes' and press Enter to continue. The system will reboot a couple of times as part of the process.

Upgrade to 18.04 for Multi-Server Clusters with Multiple Database Servers

Backup your System

Login to the Admin GUI and click on System -> Backup and at a minimum backup configuration and voicemail.

Do it now... before you go any further.

Set Repository

To update please edit your /etc/yum.repos.d/sipxecs.repo file and reference the new download server (download.sipxcom.org).  The repo should look as follows:

[sipXcom]
name=sipXecs software for CentOS $releasever - $basearch
baseurl=http://download.sipxcom.org/pub/sipXecs/18.04/CentOS_$releasever/$basearch
gpgcheck=0

 

To edit this file, login to your sipX server as root and then use either vi or nano (easier).  

vi /etc/yum.repos.d/sipxecs.repo

   or

nano /etc/yum.repos.d/sipxecs.repo

Remove Secondary Database Nodes

From the Admin UI remove databases from all other nodes except for primary node. Click on System -> Databases do accomplish this.

Copy Database

On server backup replica set configuration and databases by running following commands:  

mongo --quiet --eval "var cfg=rs.config();cfg.version=1;printjson(cfg)" > /var/sipxdata/tmp/config.json 
mongodump --db=profiles --out=/var/sipxdata/tmp 
mongodump --db=node --out=/var/sipxdata/tmp 
mongodump --db=vmdb --out=/var/sipxdata/tmp 

Stop MongoDB

Stop mongo database on primary by issuing: 

crontab -r
service sipxsupervisor stop
service mongod stop
kill -9 `cat /var/run/mongodb/mongodb.pid` && rm -rf /var/run/mongodb/mongodb.pid && rm -rf /var/lib/mongodb/* && rm -rf /tmp/mongodb-27017.sock && rm -rf /var/lib/mongo/*

Update to 18.04

Al all nodes, update to 18.04.

yum clean all
yum update
sipxagent
reboot

Restore Mongo Data

Verify mongo service up and running

service mongod status

 

Run:

config=$(cat /var/sipxdata/tmp/config.json)
mongo --eval "rs.initiate($config)"
mongorestore --db profiles /var/sipxdata/tmp/profiles && rm -rf /var/sipxdata/tmp/profiles
mongorestore --db node /var/sipxdata/tmp/node && rm -rf /var/sipxdata/tmp/node
mongorestore --db vmdb /var/sipxdata/tmp/vmdb && rm -rf /var/sipxdata/tmp/vmdb/
reboot

- reboot primary node

reboot 

Add Database Nodes

...

Remove All Secondary Databases from Cluster Nodes

From the Admin UI remove databases from all nodes except for the primary node. Click on System -> Databases do accomplish this.

Proceed as with Single Server for Primary

Proceed as above with the 'Download upgrade.sh' section and then the 'Run upgrade.sh' section.

Secondary Servers in Cluster

After the Primary Server has completed, repeat for each of the Secondary Servers in the cluster until all are completed. 

Add Database Nodes

After the secondary nodes are complete and done with their reboots, login to the Admin UI and add back the database nodes that were removed.

Send Server Profiles

Login to web interface as superadmin.

Navigate to System -> Servers page. Place check mark checkmark next to server name names and click 'Send Profiles'.

...