Дерево страниц

Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.

Оглавление
stylesquare

General information

SoftWLC controller backup is performed according to the master-slave model. Files critical for system operation (configuration files, firmware files, upload data files), MySQL database files (in master-master mode), MongoDB database files and DHCP server logs are synchronized. Such a model provides service availability and relevance of data on both controllers if one of them fails, network is inaccessible or power supply problems occur.
In configuration examples of this section, IP addresses will be referred to as <ip_server1>, <ip_server2> and <virtual_ip>, where:

...

  • installing and configuring keepalived
  • configuring rsync
  • Configuring MySQL replication
  • configuring replicaSet MongoDB
  • configuring Eltex-PCRF operation in cluster mode
  • changing configuration of modules for them to use virtual IP

Installing and configuring keepalived

The main component for controller backup. Provides master role passing and system operation problems detecting. To install keepalived, contact the Wi-Fi Service center and get a relevant distribution kit.

Configuring rsync

In backup scheme, rsync manages synchronization of Eltex-EMS and Eltex-APB service files, and also firmware, configuration and AP configuration upload files. Rsync is a client-server software. Master server acts as a client and synchronizes slave server's directories with local ones.

Starting/stopping procedure

To enable rsync server, define the following value in the file /etc/default/rsync:

...

Без форматирования
* rsync is not running 

if it is not.

Configuring rsync server

The main configuration file of rsync server is located in /etc/rsyncd.conf. The listing is given below. 

...

Блок кода
languagetext
root@swlc01-server:/# chmod 600 /etc/rsyncd.secrets

Configuring synchronization launch

Create files /etc/rsync_client.secrets, specify the following password there:

...

Информация

cron service should be started on both servers


Configuring MySQL replication

Backup of data stored in MySQL database is carried out by master-master replication. That means each server is both master and slave at the same time. The scheme implies writing all database updates of the first server to a special binary log. The second server reads the log and applies the changes. The second server replicates data from the first server, and vice versa (http://dev.mysql.com/doc/refman/5.5/en/replication.html). That allows having a relevant copy of a database on two hosts simultaneously. If connection fails, changes are accumulated and then synchronized after reconnection.

Data dump transfer and transfer to the second server

When configuring backup during operation (i.e. if the current server's MySQL already has data in it), it is necessary to replicate data to the second server. This can be done using the mysqldump utility.
Block the tables, take the dump, unblock the tables and copy the file to the second server:

...

Блок кода
themeRDark
root@swlc01-server:/# mysql -uroot -proot < /home/<username>/mysqldump_master.sql

MySQL configuration

mysql daemon configuration aims at specifying binary logs writing parameters. The words first server and second server are conditional and used to refer to differences in server configurations.

...

Блок кода
themeRDark
root@swlc01-server:/# service mysql restart

Creating user accounts

For replication to work, a service account should be created on both servers. The server will connect master server and get data changes using this account.
Create an account for replication on the first server:

...

Информация

SELECT privilege is used to check replication performance from GUI EMS


Starting replication

Starting replication on the second server

Run the show master status command in MySQL console of the first server and analyze the values obtained:

...

If Slave_IO_Running and Slave_SQL_Running are set to «Yes», replication has been started successfully.

Starting replication on the first server

On the second server run:

...

the output given is incomplete, since other data is less important
If Slave_IO_Running and Slave_SQL_Running parameters are set to «Yes», Master_Log_File and Read_Master_Log_Pos values are given, replication is performed in both directions.

Checking replication from EMS-GUI

MySQL replication state can be controlled from GUI EMS. To do that, edit /etc/eltex-ems/check-ems-replication.conf configuration file. The changes should be made on both servers:

...


Results of replication state check on both servers and brief summary of check results are given in the section.

Configuring MongoDB

In MongoDB, replication is performed via grouping several (3 for standart configuration) nodes into Replica Set. Replica Set consists of one Primary node and several Secondary nodes (more information on https://docs.mongodb.com/v2.4/administration/replica-sets.

...

Предупреждение

In the default configuration, Replica Set that consists of two nodes completely goes down when a failure in one of them (even in Secondary).

replicaSet configuration

In /etc/mongodb.conf  on both nodes:
add the line

...

The same should be done for other nodes. Replica Set state can be checked by running the command rs.status() in MongoDB console.

Eltex-PCRF operation in cluster mode

Configuring PCRF cluster

Open 5701 tcp and 5801 tcp ports between PCRF servers 
On servers, in /etc/eltex-pcrf/hazelcast-cluster-network.xml configuration files, specify network interfaces' addresses (lines 5 and 22 of the example contain the server's address, and lines 14 and 15 contain the list of all cluster members).

...

Блок кода
themeRDark
{
  "data" : {
    "enabled" : true,
    "state" : "ACTIVE",
    "members" : [ {
      "address" : "ip_server1",
      "local" : true,
      "active" : true
    }, {
      "address" : "ip_server2",
      "local" : false,
      "active" : true
    } ],
    "messagesStats" : {
      "received" : 45157,
      "sent" : 45144
    },
    "mongo" : {
      "available" : false,
      "error" : "not running with --replSet"
    }
  },
  "key" : "PcrfErrorCode.success",
  "message" : "Success",
  "code" : 0,
  "args" : [ ]
}

Configuring SoftWLC modules

It is necessary to configure SoftWLC modules on both servers to interact with controller via virtual ip. The following configuration files should be changed:

...

Change localhost to <virtualip> in the lines 4, 17, 26, 35, 48, 57, 66, 75, 84, 98

Changing configuration via GUI

SoftWLC modules should also be configured via graphical interface.

Admin Panel

In the section Settings → Integration replace localhost with a virtual IP address in PCRF URL and URL NGW-клиента parameters:

Portal Constructor

Replace localhost with a virtual IP address in the following sections:
System settings → Portal Constructor

...


System settings → PCRF access

EMS-GUI

In EMS GUI, replace localhost (or 127.0.0.1) with a virtual IP address in the following sections:
Administration → EMS server configuration → System modules settings → pcrf

...