Общее описание
С версии SoftWLC 1.27 возможен запуск сервиса eltex-PCRF в контейнере.
При запуске сервиса в контейнере надо учитывать, что доступ к БД Mysql и MongoDB потребуется разрешить с любого адреса.
Подготовка окружения
Разрешить доступ к БД
Mysql
Чтобы разрешить доступ до БД с любого адреса:
- закомментировать параметр
bind-address
в /etc/mysql/mysql
.conf.d
/mysqld
.cnf
- перезапустить сервис
mysql
sudo cp /etc/mysql/mysql.conf.d/mysqld.cnf /etc/mysql/mysql.conf.d/mysqld.cnf.bak
sudo sed -i -e "s/\(bind-address.*=.*\)/#\1/" /etc/mysql/mysql.conf.d/mysqld.cnf
sudo systemctl restart mysql.service
Добавить права для доступа к БД:
GRANT ALL ON eltex_auth_service.* TO 'javauser'@'%' IDENTIFIED BY 'javapassword';
GRANT ALL ON eltex_ems.* TO 'javauser'@'%' IDENTIFIED BY 'javapassword';
GRANT ALL ON wireless.* TO 'javauser'@'%' IDENTIFIED BY 'javapassword';
GRANT ALL ON radius.* TO 'javauser'@'%' IDENTIFIED BY 'javapassword';
FLUSФалы H PRIVILEGES;
MongoDB
Чтобы разрешить доступ до БД с любого адреса:
- можно указать
bindIp: 0.0.0.0
в /etc/mongod.conf
- перезапустить сервис
mongod
sudo cp /etc/mongod.conf /etc/mongod.conf.bak
sudo sed -i -e "s/\(.*bindIp:\)\(.*\)/#\1\2\n\1 0.0.0.0/g" /etc/mongod.conf
sudo systemctl restart mongod.service
Разрешить доступ в RADIUS с хоста eltex-PCRF
Открыть Eltex-EMS, открыть меню "RADIUS" → "Управление точками доступа" и нажать кнопку "Добавить":
![](/download/attachments/458591853/image2023-5-29_15-27-34.png?version=1&modificationDate=1706266988000&api=v2)
заполнить поля:
- "Адрес" - IP-адрес хоста. на котором запущен контейнер с eltex-PCRF.
- "Домен" - выбрать "root".
- "Имя" - имя сервиса "PCRF".
- "Ключ" - ключ, с которым будет обращаться сервис eltex-PCRF "testing123".
нажать кнопку "Принять".
Файлы конфигурации
Для запуска сервиса требуется создать папку для запуска контейнера и в ней подготовить файлы с переменными окружения ".env", "eltex-pcrf.env", файл конфигурации для запуска сервиса с помощью docker-compose "docker-compose.yml" и файлы: "hazelcast-local.xml", "hazelcast-cluster.xml", "hazelcast-cluster-network.xml".
version: '3'
services:
eltex-pcrf:
container_name: eltex-pcrf
image: ${ELTEX_HUB}/eltex-pcrf:${SWLC_VERSION}
hostname: eltex-pcrf
restart: unless-stopped
network_mode: host
env_file: eltex-pcrf.env
environment:
# Настройки таймзоны
- TZ=${TZ}
# Настройки логирования
- LOG_LEVEL=INFO
- CONSOLE_LEVEL=INFO
- LOGFILE_HIKARI_LEVEL=OFF
- LOGFILE_SERVICE_LEVEL=OFF
- LOGFILE_HAZELCAST_LEVEL=OFF
- LOGFILE_RADIUS_LEVEL=OFF
- LOGFILE_GENERIC_AP_LEVEL=OFF
- LOGFILE_LEASE_SAVER_LEVEL=OFF
- LOGFILE_SHAPER_LEVEL=OFF
- LOGFILE_I18N_LEVEL=OFF
- LOGGER_MONGODB_DRIVER_LEVEL=OFF
# Настройки Graylog
- GELF_LEVEL=${GELF_LEVEL}
- GELF_HOST=${GELF_HOST}
- GELF_PORT=${GELF_PORT}
volumes:
- .hazelcast-cluster-network.xml:/etc/eltex-pcrf/hazelcast-cluster-network.xml
- .hazelcast-cluster.xml:/etc/eltex-pcrf/hazelcast-cluster.xml
- .hazelcast-local.xml:/etc/eltex-pcrf/hazelcast-local.xml
# HeapDumpPath
# execute before: sudo chown -R 100001:100001 ./eltex-pcrf/java-heap-dump
#- /var/log/eltex-pcrf/java-heap-dump:/var/log/java-heap-dump
# Logs
# execute before: sudo mkdir -p /var/log/eltex-pcrf && sudo chown -R 100001:100001 /var/log/eltex-pcrf
#- /var/log/eltex-pcrf:/var/log/eltex-pcrf
#JAVA_INIT_HEAP=256m
#JAVA_MAX_HEAP=512m
#JAVA_ARGS
#JAVA_OPTS
# Публичный docker registry: hub.eltex-co.ru/softwlc
ELTEX_HUB=hub.eltex-co.ru/softwlc
SWLC_VERSION=<tag>
# Настройки таймзоны
TZ=Asia/Novosibirsk
# Настройки Graylog
# Вместо <graylog_server_ip> нужно указать настоящий адрес сервера Graylog или localhost
GELF_LEVEL=OFF
GELF_HOST=udp:localhost
GELF_PORT=12201
Вместо <tag> необходимо указать последнюю актуальную версию SoftWLC (например 1.27).
PCRF_auth.address=0.0.0.0
PCRF_auth.port=31812
PCRF_auth.mac.open.timeout.s=3600
PCRF_auth.mac.welcome.service=WELCOME
PCRF_acct.address=0.0.0.0
PCRF_acct.ports__0=1813
PCRF_acct.ports__1=31813
PCRF_aaa.host=<IP-адрес сервиса eltex-radius>
PCRF_aaa.secret=testing123
PCRF_aaa.auth.port=1812
PCRF_aaa.acct.port=1813
PCRF_aaa.rest.port=7080
PCRF_aaa.timeout=10
PCRF_aaa.attempts=1
PCRF_web.monitoring.port=7070
PCRF_cluster.enable=false
PCRF_cluster.eventBusPort=5801
PCRF_radius__url=jdbc:mysql://<IP-адрес БД MySQL>/radius?useUnicode=true&characterEncoding=utf8&connectTimeout=5000&socketTimeout=5000&autoReconnect=true&useSSL=false
PCRF_radius__user=javauser
PCRF_radius__password=javapassword
PCRF_radius__max_pool_size=16
PCRF_mongo.pcrf__connection_string=mongodb://<IP-адрес БД Mongo>:27017/pcrf?waitQueueMultiple=500&connectTimeoutMS=10000&socketTimeoutMS=0&readPreference=secondaryPreferred
PCRF_mongo.pcrf__db_name=pcrf
PCRF_mongo.ott__connection_string=mongodb://<IP-адрес БД Mongo>:27017/ott?waitQueueMultiple=500&connectTimeoutMS=10000&socketTimeoutMS=0&readPreference=secondaryPreferred
PCRF_mongo.ott__db_name=ott
PCRF_session.storage__session.check.period.s=300
PCRF_session.storage__unauth.store.time.s=600
PCRF_session.storage__interval.number.expired=3
PCRF_session.storage__min.interval.s=45
PCRF_session.storage__default.interval.s=600
PCRF_bras.coa__coa.timeout=10
PCRF_bras.coa__coa.attempts=1
PCRF_bras.coa__coa.secret=testing123
PCRF_bras.coa__remote.coa.port=3799
PCRF_bras.coa__log.clean.period.s=600
PCRF_bras.coa__log.store.period__period=14
PCRF_bras.coa__log.store.period__unit=D
PCRF_bras.coa__worker.pool.size=20
PCRF_sql.ems__url=jdbc:mysql://<IP-адрес БД MySQL>/eltex_ems?useUnicode=true&characterEncoding=utf8&connectTimeout=5000&socketTimeout=5000&autoReconnect=true&useSSL=false
PCRF_sql.ems__user=javauser
PCRF_sql.ems__password=javapassword
PCRF_sql.ems__max_pool_size=16
PCRF_sql.wireless__url=jdbc:mysql://<IP-адрес БД MySQL>/wireless?useUnicode=true&characterEncoding=utf8&connectTimeout=5000&socketTimeout=5000&autoReconnect=true&useSSL=false
PCRF_sql.wireless__user=javauser
PCRF_sql.wireless__password=javapassword
PCRF_sql.wireless__max_pool_size=16
PCRF_sql.auth.service__url=jdbc:mysql://<IP-адрес БД MySQL>/eltex_auth_service?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf8&connectTimeout=5000&socketTimeout=5000&useSSL=false
PCRF_sql.auth.service__user=javauser
PCRF_sql.auth.service__password=javapassword
PCRF_sql.auth.service__max_pool_size=4
PCRF_language=en
PCRF_radius.nbi__wdsl.url=http://<IP-адрес проксирующего сервера nginx>:8080/axis2/services/RadiusNbiService?wsdl
PCRF_radius.nbi__username=softwlc_service
PCRF_radius.nbi__password=softwlc
PCRF_radius.nbi__connection.timeout.ms=30000
PCRF_radius.nbi__request.timeout.ms=120000
PCRF_tariffs.update.interval__interval=1
PCRF_tariffs.update.interval__unit=hours
PCRF_tariffs.update.interval__apb_enabled=false
PCRF_tariffs.update.interval__apb_host=localhost
PCRF_tariffs.update.interval__apb_port=8090
PCRF_filters.cache.dir=/var/lib/eltex-pcrf/filters/
PCRF_clickhouse__url=jdbc:clickhouse://<IP-адрес БД Clickhouse>:8123/radius
PCRF_clickhouse__user_name=javauser
PCRF_clickhouse__user_password=javapassword
PCRF_accounting.options__use_clickhouse=false
PCRF_accounting.options__use_mysql=true
PCRF_accounting.options__batch_interval_ms=300000
PCRF_accounting.options__max_queue_load=100
PCRF_generic.ap.registrar__max_aps_in_queue=30
PCRF_generic.ap.registrar__ap_register_interval_ms=600000
PCRF_generic.ap.registrar__added_ap_cache_ttl_ms=600000
PCRF_generic.ap.registrar__host=localhost
PCRF_generic.ap.registrar__port=8080
PCRF_generic.ap.registrar__worker_pool_size=8
PCRF_kafka__mcd.enabled=false
PCRF_kafka__circuit.breaker__timeout.ms=30000
PCRF_kafka__circuit.breaker__max.failures=60000
PCRF_kafka__circuit.breaker__reset.ms=3
PCRF_kafka__producer__bootstrap.servers=<IP-адрес сервиса Kafka>:9092
PCRF_kafka__producer__linger.ms=1000
PCRF_kafka__producer__topic=mcd
PCRF_kafka__producer__max.block.ms=30000
PCRF_kafka__producer__request.timeout.ms=14000
PCRF_kafka__producer__delivery.timeout.ms=30000
PCRF_kafka__producer__acks=1
PCRF_kafka__producer__retries=1
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2008-2016, Hazelcast, Inc. All Rights Reserved.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
-->
<hazelcast xsi:schemaLocation="http://www.hazelcast.com/schema/config http://www.hazelcast.com/schema/config/hazelcast-config-3.6.xsd"
xmlns="http://www.hazelcast.com/schema/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<group>
<name>dev</name>
</group>
<management-center enabled="false">http://localhost:8080/mancenter</management-center>
<network>
<port auto-increment="false" port-count="100">5701</port>
<outbound-ports>
<ports>0</ports>
</outbound-ports>
<join>
<multicast enabled="false"/>
<tcp-ip enabled="false"/>
<discovery-strategies>
</discovery-strategies>
</join>
<interfaces enabled="false"/>
<ssl enabled="false"/>
<socket-interceptor enabled="false"/>
<symmetric-encryption enabled="false">
<algorithm>PBEWithMD5AndDES</algorithm>
<!-- salt value to use when generating the secret key -->
<salt>thesalt</salt>
<!-- pass phrase to use when generating the secret key -->
<password>thepass</password>
<!-- iteration count to use when generating the secret key -->
<iteration-count>19</iteration-count>
</symmetric-encryption>
</network>
<partition-group enabled="false"/>
<map name="__vertx.subs">
<backup-count>1</backup-count>
<time-to-live-seconds>0</time-to-live-seconds>
<max-idle-seconds>0</max-idle-seconds>
<eviction-policy>NONE</eviction-policy>
<max-size policy="PER_NODE">0</max-size>
<eviction-percentage>25</eviction-percentage>
<merge-policy>com.hazelcast.map.merge.LatestUpdateMapMergePolicy</merge-policy>
</map>
<semaphore name="__vertx.*">
<initial-permits>1</initial-permits>
</semaphore>
<!--map name="serviceOnlineMap">
<in-memory-format>OBJECT</in-memory-format>
<backup-count>0</backup-count>
<async-backup-count>0</async-backup-count>
<time-to-live-seconds>0</time-to-live-seconds>
<max-idle-seconds>0</max-idle-seconds>
<eviction-policy>NONE</eviction-policy>
<max-size policy="PER_NODE">0</max-size>
<eviction-percentage>25</eviction-percentage>
<min-eviction-check-millis>100</min-eviction-check-millis>
<merge-policy>com.hazelcast.map.merge.PutIfAbsentMapMergePolicy</merge-policy>
<cache-deserialized-values>INDEX-ONLY</cache-deserialized-values>
</map-->
<map name="session">
<map-store enabled="true">
<class-name>org.eltex.softwlc.pcrf.hazelcast.user.UserSessionStore</class-name>
<write-delay-seconds>1</write-delay-seconds>
<properties>
<property name="configPath">/etc/eltex-pcrf/eltex-pcrf.json</property>
</properties>
</map-store>
<in-memory-format>BINARY</in-memory-format>
<backup-count>0</backup-count>
<async-backup-count>0</async-backup-count>
<time-to-live-seconds>0</time-to-live-seconds>
<max-idle-seconds>0</max-idle-seconds>
<eviction-policy>LRU</eviction-policy>
<max-size policy="FREE_HEAP_PERCENTAGE">10</max-size>
<eviction-percentage>25</eviction-percentage>
<min-eviction-check-millis>5000</min-eviction-check-millis>
<merge-policy>com.hazelcast.map.merge.PutIfAbsentMapMergePolicy</merge-policy>
<cache-deserialized-values>INDEX-ONLY</cache-deserialized-values>
</map>
<map name="sourceIpNodeIdMap">
<map-store enabled="false"></map-store>
<in-memory-format>BINARY</in-memory-format>
<backup-count>0</backup-count>
<async-backup-count>0</async-backup-count>
<time-to-live-seconds>60</time-to-live-seconds>
<max-idle-seconds>0</max-idle-seconds>
<eviction-policy>LRU</eviction-policy>
<max-size policy="FREE_HEAP_PERCENTAGE">10</max-size>
<eviction-percentage>25</eviction-percentage>
<min-eviction-check-millis>5000</min-eviction-check-millis>
<merge-policy>com.hazelcast.map.merge.PutIfAbsentMapMergePolicy</merge-policy>
<cache-deserialized-values>INDEX-ONLY</cache-deserialized-values>
</map>
<map name="subnets">
<map-store enabled="true">
<class-name>org.eltex.softwlc.hazelcast.mongo.SubnetLoader</class-name>
<properties>
<property name="configPath">/etc/eltex-pcrf/eltex-pcrf.json</property>
</properties>
</map-store>
<in-memory-format>BINARY</in-memory-format>
<backup-count>0</backup-count>
<async-backup-count>0</async-backup-count>
<time-to-live-seconds>600</time-to-live-seconds>
<max-idle-seconds>0</max-idle-seconds>
<eviction-policy>LRU</eviction-policy>
<max-size policy="FREE_HEAP_PERCENTAGE">10</max-size>
<eviction-percentage>25</eviction-percentage>
<min-eviction-check-millis>5000</min-eviction-check-millis>
<merge-policy>com.hazelcast.map.merge.PutIfAbsentMapMergePolicy</merge-policy>
<cache-deserialized-values>INDEX-ONLY</cache-deserialized-values>
</map>
<map name="mysqlSsid">
<map-store enabled="true">
<class-name>org.eltex.softwlc.pcrf.hazelcast.wireless.SsidLoader</class-name>
<properties>
<property name="configPath">/etc/eltex-pcrf/eltex-pcrf.json</property>
</properties>
</map-store>
<in-memory-format>BINARY</in-memory-format>
<backup-count>0</backup-count>
<async-backup-count>0</async-backup-count>
<time-to-live-seconds>600</time-to-live-seconds>
<max-idle-seconds>0</max-idle-seconds>
<eviction-policy>LRU</eviction-policy>
<max-size policy="FREE_HEAP_PERCENTAGE">5</max-size>
<eviction-percentage>25</eviction-percentage>
<min-eviction-check-millis>5000</min-eviction-check-millis>
<merge-policy>com.hazelcast.map.merge.PutIfAbsentMapMergePolicy</merge-policy>
<cache-deserialized-values>INDEX-ONLY</cache-deserialized-values>
</map>
<map name="mysqlSsidLink">
<map-store enabled="true">
<class-name>org.eltex.softwlc.pcrf.hazelcast.wireless.SsidLinkLoader</class-name>
<properties>
<property name="configPath">/etc/eltex-pcrf/eltex-pcrf.json</property>
</properties>
</map-store>
<in-memory-format>BINARY</in-memory-format>
<backup-count>0</backup-count>
<async-backup-count>0</async-backup-count>
<time-to-live-seconds>600</time-to-live-seconds>
<max-idle-seconds>0</max-idle-seconds>
<eviction-policy>LRU</eviction-policy>
<max-size policy="FREE_HEAP_PERCENTAGE">5</max-size>
<eviction-percentage>25</eviction-percentage>
<min-eviction-check-millis>5000</min-eviction-check-millis>
<merge-policy>com.hazelcast.map.merge.PutIfAbsentMapMergePolicy</merge-policy>
<cache-deserialized-values>INDEX-ONLY</cache-deserialized-values>
</map>
<map name="mysqlGeoObj">
<map-store enabled="true">
<class-name>org.eltex.softwlc.pcrf.hazelcast.geo.GeoObjectLoader</class-name>
<properties>
<property name="configPath">/etc/eltex-pcrf/eltex-pcrf.json</property>
</properties>
</map-store>
<in-memory-format>BINARY</in-memory-format>
<backup-count>0</backup-count>
<async-backup-count>0</async-backup-count>
<time-to-live-seconds>600</time-to-live-seconds>
<max-idle-seconds>0</max-idle-seconds>
<eviction-policy>LRU</eviction-policy>
<max-size policy="FREE_HEAP_PERCENTAGE">5</max-size>
<eviction-percentage>25</eviction-percentage>
<min-eviction-check-millis>5000</min-eviction-check-millis>
<merge-policy>com.hazelcast.map.merge.PutIfAbsentMapMergePolicy</merge-policy>
<cache-deserialized-values>INDEX-ONLY</cache-deserialized-values>
</map>
<map name="mysqlCell">
<map-store enabled="true">
<class-name>org.eltex.softwlc.pcrf.hazelcast.cell.CellLoader</class-name>
<properties>
<property name="configPath">/etc/eltex-pcrf/eltex-pcrf.json</property>
</properties>
</map-store>
<in-memory-format>BINARY</in-memory-format>
<backup-count>0</backup-count>
<async-backup-count>0</async-backup-count>
<time-to-live-seconds>600</time-to-live-seconds>
<max-idle-seconds>0</max-idle-seconds>
<eviction-policy>LRU</eviction-policy>
<max-size policy="FREE_HEAP_PERCENTAGE">5</max-size>
<eviction-percentage>25</eviction-percentage>
<min-eviction-check-millis>5000</min-eviction-check-millis>
<merge-policy>com.hazelcast.map.merge.PutIfAbsentMapMergePolicy</merge-policy>
<cache-deserialized-values>INDEX-ONLY</cache-deserialized-values>
</map>
<map name="mysqlNas">
<map-store enabled="true">
<class-name>org.eltex.softwlc.hazelcast.mysql.NasLoader</class-name>
<properties>
<property name="configPath">/etc/eltex-pcrf/eltex-pcrf.json</property>
</properties>
</map-store>
<in-memory-format>BINARY</in-memory-format>
<backup-count>0</backup-count>
<async-backup-count>0</async-backup-count>
<time-to-live-seconds>600</time-to-live-seconds>
<max-idle-seconds>0</max-idle-seconds>
<eviction-policy>LRU</eviction-policy>
<max-size policy="FREE_HEAP_PERCENTAGE">5</max-size>
<eviction-percentage>25</eviction-percentage>
<min-eviction-check-millis>5000</min-eviction-check-millis>
<merge-policy>com.hazelcast.map.merge.PutIfAbsentMapMergePolicy</merge-policy>
<cache-deserialized-values>INDEX-ONLY</cache-deserialized-values>
</map>
<map name="mysqlTariff">
<map-store enabled="true">
<class-name>org.eltex.softwlc.hazelcast.mysql.TariffLoader</class-name>
<properties>
<property name="configPath">/etc/eltex-pcrf/eltex-pcrf.json</property>
</properties>
</map-store>
<in-memory-format>BINARY</in-memory-format>
<backup-count>0</backup-count>
<async-backup-count>0</async-backup-count>
<time-to-live-seconds>600</time-to-live-seconds>
<max-idle-seconds>0</max-idle-seconds>
<eviction-policy>LRU</eviction-policy>
<max-size policy="FREE_HEAP_PERCENTAGE">5</max-size>
<eviction-percentage>25</eviction-percentage>
<min-eviction-check-millis>5000</min-eviction-check-millis>
<merge-policy>com.hazelcast.map.merge.PutIfAbsentMapMergePolicy</merge-policy>
<cache-deserialized-values>INDEX-ONLY</cache-deserialized-values>
</map>
<map name="shapers">
<map-store enabled="true">
<class-name>org.eltex.softwlc.pcrf.hazelcast.shaper.ShaperLoader</class-name>
<properties>
<property name="configPath">/etc/eltex-pcrf/eltex-pcrf.json</property>
</properties>
</map-store>
<in-memory-format>BINARY</in-memory-format>
<backup-count>0</backup-count>
<async-backup-count>0</async-backup-count>
<time-to-live-seconds>600</time-to-live-seconds>
<max-idle-seconds>0</max-idle-seconds>
<eviction-policy>LRU</eviction-policy>
<max-size policy="FREE_HEAP_PERCENTAGE">10</max-size>
<eviction-percentage>25</eviction-percentage>
<min-eviction-check-millis>5000</min-eviction-check-millis>
<merge-policy>com.hazelcast.map.merge.PutIfAbsentMapMergePolicy</merge-policy>
<cache-deserialized-values>INDEX-ONLY</cache-deserialized-values>
</map>
<map name="vrf">
<map-store enabled="true">
<class-name>org.eltex.softwlc.pcrf.hazelcast.vrf.VrfLoader</class-name>
<properties>
<property name="configPath">/etc/eltex-pcrf/eltex-pcrf.json</property>
</properties>
</map-store>
<in-memory-format>BINARY</in-memory-format>
<backup-count>0</backup-count>
<async-backup-count>0</async-backup-count>
<time-to-live-seconds>600</time-to-live-seconds>
<max-idle-seconds>0</max-idle-seconds>
<eviction-policy>LRU</eviction-policy>
<max-size policy="FREE_HEAP_PERCENTAGE">10</max-size>
<eviction-percentage>25</eviction-percentage>
<min-eviction-check-millis>5000</min-eviction-check-millis>
<merge-policy>com.hazelcast.map.merge.PutIfAbsentMapMergePolicy</merge-policy>
<cache-deserialized-values>INDEX-ONLY</cache-deserialized-values>
</map>
<serialization>
<portable-version>0</portable-version>
</serialization>
<services enable-defaults="true"/>
<lite-member enabled="false"/>
<properties>
<property name="hazelcast.logging.type">log4j2</property>
<property name="hazelcast.shutdownhook.enabled">false</property>
<property name="hazelcast.jmx">true</property>
</properties>
</hazelcast>
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2008-2016, Hazelcast, Inc. All Rights Reserved.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
-->
<hazelcast xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-3.6.xsd"
xmlns="http://www.hazelcast.com/schema/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<management-center enabled="false">http://localhost:8080/mancenter</management-center>
<!-- load network configuration from another file -->
<import resource="file:///etc/eltex-pcrf/hazelcast-cluster-network.xml"/>
<partition-group enabled="false"/>
<map name="__vertx.subs">
<backup-count>1</backup-count>
<time-to-live-seconds>0</time-to-live-seconds>
<max-idle-seconds>0</max-idle-seconds>
<eviction-policy>NONE</eviction-policy>
<max-size policy="PER_NODE">0</max-size>
<eviction-percentage>25</eviction-percentage>
<merge-policy>com.hazelcast.map.merge.LatestUpdateMapMergePolicy</merge-policy>
</map>
<semaphore name="__vertx.*">
<initial-permits>1</initial-permits>
</semaphore>
<!--map name="serviceOnlineMap">
<in-memory-format>OBJECT</in-memory-format>
<backup-count>0</backup-count>
<async-backup-count>0</async-backup-count>
<time-to-live-seconds>0</time-to-live-seconds>
<max-idle-seconds>0</max-idle-seconds>
<eviction-policy>NONE</eviction-policy>
<max-size policy="PER_NODE">0</max-size>
<eviction-percentage>25</eviction-percentage>
<min-eviction-check-millis>100</min-eviction-check-millis>
<merge-policy>com.hazelcast.map.merge.PutIfAbsentMapMergePolicy</merge-policy>
<cache-deserialized-values>INDEX-ONLY</cache-deserialized-values>
</map-->
<map name="session">
<map-store enabled="true">
<class-name>org.eltex.softwlc.pcrf.hazelcast.user.UserSessionStore</class-name>
<write-delay-seconds>1</write-delay-seconds>
<properties>
<property name="configPath">/etc/eltex-pcrf/eltex-pcrf.json</property>
</properties>
</map-store>
<in-memory-format>BINARY</in-memory-format>
<backup-count>0</backup-count>
<async-backup-count>0</async-backup-count>
<time-to-live-seconds>0</time-to-live-seconds>
<max-idle-seconds>0</max-idle-seconds>
<eviction-policy>LRU</eviction-policy>
<max-size policy="FREE_HEAP_PERCENTAGE">10</max-size>
<eviction-percentage>25</eviction-percentage>
<min-eviction-check-millis>5000</min-eviction-check-millis>
<merge-policy>com.hazelcast.map.merge.PutIfAbsentMapMergePolicy</merge-policy>
<cache-deserialized-values>INDEX-ONLY</cache-deserialized-values>
</map>
<map name="sourceIpNodeIdMap">
<map-store enabled="false"></map-store>
<in-memory-format>BINARY</in-memory-format>
<backup-count>0</backup-count>
<async-backup-count>0</async-backup-count>
<time-to-live-seconds>60</time-to-live-seconds>
<max-idle-seconds>0</max-idle-seconds>
<eviction-policy>LRU</eviction-policy>
<max-size policy="FREE_HEAP_PERCENTAGE">10</max-size>
<eviction-percentage>25</eviction-percentage>
<min-eviction-check-millis>5000</min-eviction-check-millis>
<merge-policy>com.hazelcast.map.merge.PutIfAbsentMapMergePolicy</merge-policy>
<cache-deserialized-values>INDEX-ONLY</cache-deserialized-values>
</map>
<map name="subnets">
<map-store enabled="true">
<class-name>org.eltex.softwlc.hazelcast.mongo.SubnetLoader</class-name>
<properties>
<property name="configPath">/etc/eltex-pcrf/eltex-pcrf.json</property>
</properties>
</map-store>
<in-memory-format>BINARY</in-memory-format>
<backup-count>0</backup-count>
<async-backup-count>0</async-backup-count>
<time-to-live-seconds>600</time-to-live-seconds>
<max-idle-seconds>0</max-idle-seconds>
<eviction-policy>LRU</eviction-policy>
<max-size policy="FREE_HEAP_PERCENTAGE">10</max-size>
<eviction-percentage>25</eviction-percentage>
<min-eviction-check-millis>5000</min-eviction-check-millis>
<merge-policy>com.hazelcast.map.merge.PutIfAbsentMapMergePolicy</merge-policy>
<cache-deserialized-values>INDEX-ONLY</cache-deserialized-values>
</map>
<map name="mysqlSsid">
<map-store enabled="true">
<class-name>org.eltex.softwlc.pcrf.hazelcast.wireless.SsidLoader</class-name>
<properties>
<property name="configPath">/etc/eltex-pcrf/eltex-pcrf.json</property>
</properties>
</map-store>
<in-memory-format>BINARY</in-memory-format>
<backup-count>0</backup-count>
<async-backup-count>0</async-backup-count>
<time-to-live-seconds>600</time-to-live-seconds>
<max-idle-seconds>0</max-idle-seconds>
<eviction-policy>LRU</eviction-policy>
<max-size policy="FREE_HEAP_PERCENTAGE">5</max-size>
<eviction-percentage>25</eviction-percentage>
<min-eviction-check-millis>5000</min-eviction-check-millis>
<merge-policy>com.hazelcast.map.merge.PutIfAbsentMapMergePolicy</merge-policy>
<cache-deserialized-values>INDEX-ONLY</cache-deserialized-values>
</map>
<map name="mysqlSsidLink">
<map-store enabled="true">
<class-name>org.eltex.softwlc.pcrf.hazelcast.wireless.SsidLinkLoader</class-name>
<properties>
<property name="configPath">/etc/eltex-pcrf/eltex-pcrf.json</property>
</properties>
</map-store>
<in-memory-format>BINARY</in-memory-format>
<backup-count>0</backup-count>
<async-backup-count>0</async-backup-count>
<time-to-live-seconds>600</time-to-live-seconds>
<max-idle-seconds>0</max-idle-seconds>
<eviction-policy>LRU</eviction-policy>
<max-size policy="FREE_HEAP_PERCENTAGE">5</max-size>
<eviction-percentage>25</eviction-percentage>
<min-eviction-check-millis>5000</min-eviction-check-millis>
<merge-policy>com.hazelcast.map.merge.PutIfAbsentMapMergePolicy</merge-policy>
<cache-deserialized-values>INDEX-ONLY</cache-deserialized-values>
</map>
<map name="mysqlGeoObj">
<map-store enabled="true">
<class-name>org.eltex.softwlc.pcrf.hazelcast.geo.GeoObjectLoader</class-name>
<properties>
<property name="configPath">/etc/eltex-pcrf/eltex-pcrf.json</property>
</properties>
</map-store>
<in-memory-format>BINARY</in-memory-format>
<backup-count>0</backup-count>
<async-backup-count>0</async-backup-count>
<time-to-live-seconds>600</time-to-live-seconds>
<max-idle-seconds>0</max-idle-seconds>
<eviction-policy>LRU</eviction-policy>
<max-size policy="FREE_HEAP_PERCENTAGE">5</max-size>
<eviction-percentage>25</eviction-percentage>
<min-eviction-check-millis>5000</min-eviction-check-millis>
<merge-policy>com.hazelcast.map.merge.PutIfAbsentMapMergePolicy</merge-policy>
<cache-deserialized-values>INDEX-ONLY</cache-deserialized-values>
</map>
<map name="mysqlCell">
<map-store enabled="true">
<class-name>org.eltex.softwlc.pcrf.hazelcast.cell.CellLoader</class-name>
<properties>
<property name="configPath">/etc/eltex-pcrf/eltex-pcrf.json</property>
</properties>
</map-store>
<in-memory-format>BINARY</in-memory-format>
<backup-count>0</backup-count>
<async-backup-count>0</async-backup-count>
<time-to-live-seconds>600</time-to-live-seconds>
<max-idle-seconds>0</max-idle-seconds>
<eviction-policy>LRU</eviction-policy>
<max-size policy="FREE_HEAP_PERCENTAGE">5</max-size>
<eviction-percentage>25</eviction-percentage>
<min-eviction-check-millis>5000</min-eviction-check-millis>
<merge-policy>com.hazelcast.map.merge.PutIfAbsentMapMergePolicy</merge-policy>
<cache-deserialized-values>INDEX-ONLY</cache-deserialized-values>
</map>
<map name="mysqlNas">
<map-store enabled="true">
<class-name>org.eltex.softwlc.hazelcast.mysql.NasLoader</class-name>
<properties>
<property name="configPath">/etc/eltex-pcrf/eltex-pcrf.json</property>
</properties>
</map-store>
<in-memory-format>BINARY</in-memory-format>
<backup-count>0</backup-count>
<async-backup-count>0</async-backup-count>
<time-to-live-seconds>600</time-to-live-seconds>
<max-idle-seconds>0</max-idle-seconds>
<eviction-policy>LRU</eviction-policy>
<max-size policy="FREE_HEAP_PERCENTAGE">5</max-size>
<eviction-percentage>25</eviction-percentage>
<min-eviction-check-millis>5000</min-eviction-check-millis>
<merge-policy>com.hazelcast.map.merge.PutIfAbsentMapMergePolicy</merge-policy>
<cache-deserialized-values>INDEX-ONLY</cache-deserialized-values>
</map>
<map name="mysqlTariff">
<map-store enabled="true">
<class-name>org.eltex.softwlc.hazelcast.mysql.TariffLoader</class-name>
<properties>
<property name="configPath">/etc/eltex-pcrf/eltex-pcrf.json</property>
</properties>
</map-store>
<in-memory-format>BINARY</in-memory-format>
<backup-count>0</backup-count>
<async-backup-count>0</async-backup-count>
<time-to-live-seconds>600</time-to-live-seconds>
<max-idle-seconds>0</max-idle-seconds>
<eviction-policy>LRU</eviction-policy>
<max-size policy="FREE_HEAP_PERCENTAGE">5</max-size>
<eviction-percentage>25</eviction-percentage>
<min-eviction-check-millis>5000</min-eviction-check-millis>
<merge-policy>com.hazelcast.map.merge.PutIfAbsentMapMergePolicy</merge-policy>
<cache-deserialized-values>INDEX-ONLY</cache-deserialized-values>
</map>
<map name="shapers">
<map-store enabled="true">
<class-name>org.eltex.softwlc.pcrf.hazelcast.shaper.ShaperLoader</class-name>
<properties>
<property name="configPath">/etc/eltex-pcrf/eltex-pcrf.json</property>
</properties>
</map-store>
<in-memory-format>BINARY</in-memory-format>
<backup-count>0</backup-count>
<async-backup-count>0</async-backup-count>
<time-to-live-seconds>600</time-to-live-seconds>
<max-idle-seconds>0</max-idle-seconds>
<eviction-policy>LRU</eviction-policy>
<max-size policy="FREE_HEAP_PERCENTAGE">10</max-size>
<eviction-percentage>25</eviction-percentage>
<min-eviction-check-millis>5000</min-eviction-check-millis>
<merge-policy>com.hazelcast.map.merge.PutIfAbsentMapMergePolicy</merge-policy>
<cache-deserialized-values>INDEX-ONLY</cache-deserialized-values>
</map>
<map name="vrf">
<map-store enabled="true">
<class-name>org.eltex.softwlc.pcrf.hazelcast.vrf.VrfLoader</class-name>
<properties>
<property name="configPath">/etc/eltex-pcrf/eltex-pcrf.json</property>
</properties>
</map-store>
<in-memory-format>BINARY</in-memory-format>
<backup-count>0</backup-count>
<async-backup-count>0</async-backup-count>
<time-to-live-seconds>600</time-to-live-seconds>
<max-idle-seconds>0</max-idle-seconds>
<eviction-policy>LRU</eviction-policy>
<max-size policy="FREE_HEAP_PERCENTAGE">10</max-size>
<eviction-percentage>25</eviction-percentage>
<min-eviction-check-millis>5000</min-eviction-check-millis>
<merge-policy>com.hazelcast.map.merge.PutIfAbsentMapMergePolicy</merge-policy>
<cache-deserialized-values>INDEX-ONLY</cache-deserialized-values>
</map>
<serialization>
<portable-version>0</portable-version>
</serialization>
<services enable-defaults="true"/>
<lite-member enabled="false"/>
<properties>
<property name="hazelcast.logging.type">log4j2</property>
<property name="hazelcast.shutdownhook.enabled">false</property>
<property name="hazelcast.jmx">true</property>
</properties>
</hazelcast>
<hazelcast xsi:schemaLocation="http://www.hazelcast.com/schema/config http://www.hazelcast.com/schema/config/hazelcast-config-3.6.xsd"
xmlns="http://www.hazelcast.com/schema/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- You can separate your clusters in a simple way by specifying group names. -->
<group>
<name>dev</name>
</group>
<network>
<!-- Write here public address of the node -->
<public-address>192.168.0.1</public-address>
<port auto-increment="false" port-count="100">5701</port>
<outbound-ports>
<ports>0</ports>
</outbound-ports>
<join>
<multicast enabled="false"/>
<tcp-ip enabled="true">
<!-- Write here IP of all members of the cluster (including this) -->
<member>192.168.0.1</member>
<member>192.168.0.2</member>
</tcp-ip>
<discovery-strategies>
</discovery-strategies>
</join>
<interfaces enabled="true">
<!-- Write here IP of the interface to use for cluster -->
<interface>192.168.0.1</interface>
</interfaces>
<ssl enabled="false"/>
<socket-interceptor enabled="false"/>
<symmetric-encryption enabled="false">
<algorithm>PBEWithMD5AndDES</algorithm>
<!-- salt value to use when generating the secret key -->
<salt>thesalt</salt>
<!-- pass phrase to use when generating the secret key -->
<password>thepass</password>
<!-- iteration count to use when generating the secret key -->
<iteration-count>19</iteration-count>
</symmetric-encryption>
</network>
</hazelcast>
Запуск контейнера
Запуск на хосте, где ранее уже была проведена однохостовая установка скриптом-установщиком eltex-softwlc-helper-latest.sh
Если выполняется запуск контейнера на хосте, где ранее уже была проведена однохостовая установка скриптом-установщиком eltex-softwlc-helper-latest.sh - необходимо:
- Выполнить настройку файлов окружения eltex-PCRF.
Остановить службу eltex-PCRF командой:
Удалить пакет eltex-PCRF с сохранением БД:
Запустить контейнер командой:
- Проверить работоспособность сервиса открыв в браузере его консоль по адресу "http://<IP-адрес сервиса PCRF>:7070".
Запуск на отдельном хосте
- Выполнить настройку файлов окружения eltex-PCRF.
Запустить контейнер командой:
- Проверить работоспособность сервиса открыв в браузере его консоль по адресу "http://<IP-адрес сервиса PCRF>:7070".
Управление логированием
В рамках поддержанных переменных окружения можно указать уровень логирования сервиса eltex-pcrf, вывод логов в консоль, отправку на сторонний сервер или использовать папку на хостовой машине для записи логов в файлы. Значения переменных задаются в файлах "docker-compose.yml" и ".env".
Переменные файла"docker-compose.yml":
LOG_LEVEL=INFO - уровень логирования сервиса eltex-pcrf.
- CONSOLE_LEVEL=INFO - уровень логов консоли (но не выше уровня, указанного в настройке "NBI_LOG_LEVEL").
- LOGFILE_HIKARI_LEVEL=OFF - уровень логов взаимодействия с БД MySQL.
- LOGFILE_SERVICE_LEVEL=OFF - уровень логов сервиса eltex-PCRF.
- LOGFILE_HAZELCAST_LEVEL=OFF - уровень логов hazecast.
- LOGFILE_RADIUS_LEVEL=OFF - уровень логов взаимодействия с radius.
- LOGFILE_GENERIC_AP_LEVEL=OFF - уровень логов для generic AP
- LOGFILE_LEASE_SAVER_LEVEL=OFF
- LOGFILE_SHAPER_LEVEL=OFF - уровень логов для shaper, которые могут быть назначены на домен или SSID.
- LOGFILE_I18N_LEVEL=OFF
Переменные файла ".env" (настройки отправки логов на сторонний сервер):
- GELF_LEVEL=OFF - уровень логов, перенаправляемых на сторонний сервер (но не выше уровня, указанного в настройке "NBI_LOG_LEVEL").
- GELF_HOST=udp:localhost - адрес стороннего сервера сбора логов.
- GELF_PORT=12201 - порт стороннего сервера сбора логов.
Для записи файлов логов на хостовую машину требуется:
Приложения
Список используемых переменных
Переменная | Значение по умолчанию |
---|
Файл .env |
ELTEX_HUB | hub.eltex-co.ru/softwlc |
SWLC_VERSION | 1.<актуальная версия SoftWLC> |
TZ | Asia/Novosibirsk |
GELF_LEVEL | OFF |
GELF_HOST | udp:localhost |
GELF_PORT | 12201 |
Файл eltex-pcrf.env |
PCRF_auth.address | 0.0.0.0 |
PCRF_auth.port | 31812 |
PCRF_auth.mac.open.timeout.s | 3600 |
PCRF_auth.mac.welcome.service | WELCOME |
PCRF_acct.address | 0.0.0.0 |
PCRF_acct.ports__0 | 1813 |
PCRF_acct.ports__1 | 31813 |
PCRF_aaa.host | 127.0.0.1 |
PCRF_aaa.secret | testing123 |
PCRF_aaa.auth.port | 1812 |
PCRF_aaa.acct.port | 1813 |
PCRF_aaa.rest.port | 7080 |
PCRF_aaa.timeout | 10 |
PCRF_aaa.attempts | 1 |
PCRF_web.monitoring.port | 7070 |
PCRF_cluster.enable | false |
PCRF_cluster.eventBusPort | 5801 |
PCRF_radius__url | jdbc:mysql://localhost/radius?useUnicode=true&characterEncoding=utf8&connectTimeout=5000&socketTimeout=5000&autoReconnect=true&useSSL=false |
PCRF_radius__user | javauser |
PCRF_radius__password | javapassword |
PCRF_radius__max_pool_size | 16 |
PCRF_mongo.pcrf__connection_string | mongodb://localhost:27017/pcrf?waitQueueMultiple=500&connectTimeoutMS=10000&socketTimeoutMS=0 |
PCRF_mongo.pcrf__db_name | pcrf |
PCRF_mongo.ott__connection_string | mongodb://localhost:27017/ott?waitQueueMultiple=500&connectTimeoutMS=10000&socketTimeoutMS=0 |
PCRF_mongo.ott__db_name | ott |
PCRF_session.storage__session.check.period.s | 300 |
PCRF_session.storage__unauth.store.time.s | 600 |
PCRF_session.storage__interval.number.expired | 3 |
PCRF_session.storage__min.interval.s | 45 |
PCRF_session.storage__default.interval.s | 600 |
PCRF_bras.coa__coa.timeout | 10 |
PCRF_bras.coa__coa.attempts | 1 |
PCRF_bras.coa__coa.secret | testing123 |
PCRF_bras.coa__remote.coa.port | 3799 |
PCRF_bras.coa__log.clean.period.s | 604800 |
PCRF_bras.coa__log.store.period__period | 14 |
PCRF_bras.coa__log.store.period__unit | D |
PCRF_bras.coa__worker.pool.size | 20 |
PCRF_sql.ems__url | jdbc:mysql://localhost/eltex_ems?useUnicode=true&characterEncoding=utf8&connectTimeout=5000&socketTimeout=5000&autoReconnect=true&useSSL=false |
PCRF_sql.ems__user | javauser |
PCRF_sql.ems__password | javapassword |
PCRF_sql.ems__max_pool_size | 16 |
PCRF_sql.wireless__url | jdbc:mysql://localhost/wireless?useUnicode=true&characterEncoding=utf8&connectTimeout=5000&socketTimeout=5000&autoReconnect=true&useSSL=false |
PCRF_sql.wireless__user | javauser |
PCRF_sql.wireless__password | javapassword |
PCRF_sql.wireless__max_pool_size | 16 |
PCRF_sql.auth.service__url | jdbc:mysql://localhost/eltex_auth_service?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf8&connectTimeout=5000&socketTimeout=5000&useSSL=false |
PCRF_sql.auth.service__user | javauser |
PCRF_sql.auth.service__password | javapassword |
PCRF_sql.auth.service__max_pool_size | 4 |
PCRF_language | en |
PCRF_radius.nbi__wdsl.url | http://localhost:8080/axis2/services/RadiusNbiService?wsdl |
PCRF_radius.nbi__username | softwlc_service |
PCRF_radius.nbi__password | softwlc |
PCRF_radius.nbi__connection.timeout.ms | 30000 |
PCRF_radius.nbi__request.timeout.ms | 120000 |
PCRF_tariffs.update.interval__interval | 1 |
PCRF_tariffs.update.interval__unit | hours |
PCRF_tariffs.update.interval__apb_enabled | false |
PCRF_tariffs.update.interval__apb_host | localhost |
PCRF_tariffs.update.interval__apb_port | 8090 |
PCRF_filters.cache.dir | /var/lib/eltex-pcrf/filters/ |
PCRF_clickhouse__url | jdbc:clickhouse://localhost:8123/radius |
PCRF_clickhouse__user_name | javauser |
PCRF_clickhouse__user_password | javapassword |
PCRF_clickhouse__actualization_period_ms | 15000 |
PCRF_accounting.options__use_clickhouse | false |
PCRF_accounting.options__use_mysql | true |
PCRF_accounting.options__batch_interval_ms | 300000 |
PCRF_accounting.options__max_queue_load | 100 |
PCRF_generic.ap.registrar__max_aps_in_queue | 30 |
PCRF_generic.ap.registrar__ap_register_interval_ms | 600000 |
PCRF_generic.ap.registrar__added_ap_cache_ttl_ms | 600000 |
PCRF_generic.ap.registrar__host | localhost |
PCRF_generic.ap.registrar__port | 8080 |
PCRF_generic.ap.registrar__worker_pool_size | 8 |
PCRF_kafka__mcd.enabled | false |
PCRF_kafka__circuit.breaker__timeout.ms | 30000 |
PCRF_kafka__circuit.breaker__max.failures | 60000 |
PCRF_kafka__circuit.breaker__reset.ms | 3 |
PCRF_kafka__producer__bootstrap.servers | localhost:9092 |
PCRF_kafka__producer__linger.ms | 1000 |
PCRF_kafka__producer__topic | mcd |
PCRF_kafka__producer__max.block.ms | 30000 |
PCRF_kafka__producer__request.timeout.ms | 14000 |
PCRF_kafka__producer__delivery.timeout.ms | 30000 |
PCRF_kafka__producer__acks | 1 |
PCRF_kafka__producer__retries | 1 |
Файл docker-compose.yml |
LOG_LEVEL | INFO |
CONSOLE_LEVEL | INFO |
LOGFILE_HIKARI_LEVEL | OFF |
LOGFILE_SERVICE_LEVEL | OFF |
LOGFILE_HAZELCAST_LEVEL | OFF |
LOGFILE_RADIUS_LEVEL | OFF |
LOGFILE_GENERIC_AP_LEVEL | OFF |
LOGFILE_LEASE_SAVER_LEVEL | OFF |
LOGFILE_SHAPER_LEVEL | OFF |
LOGFILE_I18N_LEVEL | OFF |
LOGGER_MONGODB_DRIVER_LEVEL | OFF |