mirror of
https://github.com/Telecominfraproject/wlan-cloud-owprov.git
synced 2025-10-29 17:52:28 +00:00
Removing old ucentral. properties to openwifi.
This commit is contained in:
@@ -5,35 +5,35 @@
|
|||||||
#
|
#
|
||||||
# REST API access
|
# REST API access
|
||||||
#
|
#
|
||||||
owprov.restapi.host.0.backlog = 100
|
openwifi.restapi.host.0.backlog = 100
|
||||||
owprov.restapi.host.0.security = relaxed
|
openwifi.restapi.host.0.security = relaxed
|
||||||
owprov.restapi.host.0.rootca = $OWPROV_ROOT/certs/restapi-ca.pem
|
openwifi.restapi.host.0.rootca = $OWPROV_ROOT/certs/restapi-ca.pem
|
||||||
owprov.restapi.host.0.address = *
|
openwifi.restapi.host.0.address = *
|
||||||
owprov.restapi.host.0.port = 16005
|
openwifi.restapi.host.0.port = 16005
|
||||||
owprov.restapi.host.0.cert = $OWPROV_ROOT/certs/restapi-cert.pem
|
openwifi.restapi.host.0.cert = $OWPROV_ROOT/certs/restapi-cert.pem
|
||||||
owprov.restapi.host.0.key = $OWPROV_ROOT/certs/restapi-key.pem
|
openwifi.restapi.host.0.key = $OWPROV_ROOT/certs/restapi-key.pem
|
||||||
owprov.restapi.host.0.key.password = mypassword
|
openwifi.restapi.host.0.key.password = mypassword
|
||||||
|
|
||||||
owprov.internal.restapi.host.0.backlog = 100
|
openwifi.internal.restapi.host.0.backlog = 100
|
||||||
owprov.internal.restapi.host.0.security = relaxed
|
openwifi.internal.restapi.host.0.security = relaxed
|
||||||
owprov.internal.restapi.host.0.rootca = $OWPROV_ROOT/certs/restapi-ca.pem
|
openwifi.internal.restapi.host.0.rootca = $OWPROV_ROOT/certs/restapi-ca.pem
|
||||||
owprov.internal.restapi.host.0.address = *
|
openwifi.internal.restapi.host.0.address = *
|
||||||
owprov.internal.restapi.host.0.port = 17005
|
openwifi.internal.restapi.host.0.port = 17005
|
||||||
owprov.internal.restapi.host.0.cert = $OWPROV_ROOT/certs/restapi-cert.pem
|
openwifi.internal.restapi.host.0.cert = $OWPROV_ROOT/certs/restapi-cert.pem
|
||||||
owprov.internal.restapi.host.0.key = $OWPROV_ROOT/certs/restapi-key.pem
|
openwifi.internal.restapi.host.0.key = $OWPROV_ROOT/certs/restapi-key.pem
|
||||||
owprov.internal.restapi.host.0.key.password = mypassword
|
openwifi.internal.restapi.host.0.key.password = mypassword
|
||||||
|
|
||||||
#
|
#
|
||||||
# Generic section that all microservices must have
|
# Generic section that all microservices must have
|
||||||
#
|
#
|
||||||
ucentral.service.key = $OWPROV_ROOT/certs/restapi-key.pem
|
openwifi.service.key = $OWPROV_ROOT/certs/restapi-key.pem
|
||||||
ucentral.service.key.password = mypassword
|
openwifi.service.key.password = mypassword
|
||||||
ucentral.system.data = $OWPROV_ROOT/data
|
openwifi.system.data = $OWPROV_ROOT/data
|
||||||
ucentral.system.debug = false
|
openwifi.system.debug = false
|
||||||
ucentral.system.uri.private = https://localhost:17005
|
openwifi.system.uri.private = https://localhost:17005
|
||||||
ucentral.system.uri.public = https://ucentral.dpaas.arilia.com:16005
|
openwifi.system.uri.public = https://ucentral.dpaas.arilia.com:16005
|
||||||
ucentral.system.commandchannel = /tmp/app.ucentraltopo
|
openwifi.system.commandchannel = /tmp/app.owprov
|
||||||
ucentral.system.uri.ui = ucentral-ui.arilia.com
|
openwifi.system.uri.ui = owprov-ui.arilia.com
|
||||||
|
|
||||||
#############################
|
#############################
|
||||||
# Generic information for all micro services
|
# Generic information for all micro services
|
||||||
@@ -47,13 +47,13 @@ alb.port = 16104
|
|||||||
#
|
#
|
||||||
# Kafka
|
# Kafka
|
||||||
#
|
#
|
||||||
ucentral.kafka.group.id = prov
|
openwifi.kafka.group.id = prov
|
||||||
ucentral.kafka.client.id = prov1
|
openwifi.kafka.client.id = prov1
|
||||||
ucentral.kafka.enable = false
|
openwifi.kafka.enable = false
|
||||||
ucentral.kafka.brokerlist = a1.arilia.com:9092
|
openwifi.kafka.brokerlist = a1.arilia.com:9092
|
||||||
# ucentral.kafka.brokerlist = debfarm1-node-c.arilia.com:9092
|
# openwifi.kafka.brokerlist = debfarm1-node-c.arilia.com:9092
|
||||||
ucentral.kafka.auto.commit = false
|
openwifi.kafka.auto.commit = false
|
||||||
ucentral.kafka.queue.buffering.max.ms = 50
|
openwifi.kafka.queue.buffering.max.ms = 50
|
||||||
|
|
||||||
#
|
#
|
||||||
# This section select which form of persistence you need
|
# This section select which form of persistence you need
|
||||||
|
|||||||
@@ -17,13 +17,13 @@ namespace OpenWifi {
|
|||||||
class KafkaManager *KafkaManager::instance_ = nullptr;
|
class KafkaManager *KafkaManager::instance_ = nullptr;
|
||||||
|
|
||||||
KafkaManager::KafkaManager() noexcept:
|
KafkaManager::KafkaManager() noexcept:
|
||||||
SubSystemServer("KafkaManager", "KAFKA-SVR", "ucentral.kafka")
|
SubSystemServer("KafkaManager", "KAFKA-SVR", "openwifi.kafka")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void KafkaManager::initialize(Poco::Util::Application & self) {
|
void KafkaManager::initialize(Poco::Util::Application & self) {
|
||||||
SubSystemServer::initialize(self);
|
SubSystemServer::initialize(self);
|
||||||
KafkaEnabled_ = Daemon()->ConfigGetBool("ucentral.kafka.enable",false);
|
KafkaEnabled_ = Daemon()->ConfigGetBool("openwifi.kafka.enable",false);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SMALL_BUILD
|
#ifdef SMALL_BUILD
|
||||||
@@ -55,8 +55,8 @@ namespace OpenWifi {
|
|||||||
|
|
||||||
void KafkaManager::ProducerThr() {
|
void KafkaManager::ProducerThr() {
|
||||||
cppkafka::Configuration Config({
|
cppkafka::Configuration Config({
|
||||||
{ "client.id", Daemon()->ConfigGetString("ucentral.kafka.client.id") },
|
{ "client.id", Daemon()->ConfigGetString("openwifi.kafka.client.id") },
|
||||||
{ "metadata.broker.list", Daemon()->ConfigGetString("ucentral.kafka.brokerlist") }
|
{ "metadata.broker.list", Daemon()->ConfigGetString("openwifi.kafka.brokerlist") }
|
||||||
});
|
});
|
||||||
SystemInfoWrapper_ = R"lit({ "system" : { "id" : )lit" +
|
SystemInfoWrapper_ = R"lit({ "system" : { "id" : )lit" +
|
||||||
std::to_string(Daemon()->ID()) +
|
std::to_string(Daemon()->ID()) +
|
||||||
@@ -96,10 +96,10 @@ namespace OpenWifi {
|
|||||||
|
|
||||||
void KafkaManager::ConsumerThr() {
|
void KafkaManager::ConsumerThr() {
|
||||||
cppkafka::Configuration Config({
|
cppkafka::Configuration Config({
|
||||||
{ "client.id", Daemon()->ConfigGetString("ucentral.kafka.client.id") },
|
{ "client.id", Daemon()->ConfigGetString("openwifi.kafka.client.id") },
|
||||||
{ "metadata.broker.list", Daemon()->ConfigGetString("ucentral.kafka.brokerlist") },
|
{ "metadata.broker.list", Daemon()->ConfigGetString("openwifi.kafka.brokerlist") },
|
||||||
{ "group.id", Daemon()->ConfigGetString("ucentral.kafka.group.id") },
|
{ "group.id", Daemon()->ConfigGetString("openwifi.kafka.group.id") },
|
||||||
{ "enable.auto.commit", Daemon()->ConfigGetBool("ucentral.kafka.auto.commit",false) },
|
{ "enable.auto.commit", Daemon()->ConfigGetBool("openwifi.kafka.auto.commit",false) },
|
||||||
{ "auto.offset.reset", "latest" } ,
|
{ "auto.offset.reset", "latest" } ,
|
||||||
{ "enable.partition.eof", false }
|
{ "enable.partition.eof", false }
|
||||||
});
|
});
|
||||||
@@ -125,8 +125,8 @@ namespace OpenWifi {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
bool AutoCommit = Daemon()->ConfigGetBool("ucentral.kafka.auto.commit",false);
|
bool AutoCommit = Daemon()->ConfigGetBool("openwifi.kafka.auto.commit",false);
|
||||||
auto BatchSize = Daemon()->ConfigGetInt("ucentral.kafka.consumer.batchsize",20);
|
auto BatchSize = Daemon()->ConfigGetInt("openwifi.kafka.consumer.batchsize",20);
|
||||||
|
|
||||||
Types::StringVec Topics;
|
Types::StringVec Topics;
|
||||||
for(const auto &i:Notifiers_)
|
for(const auto &i:Notifiers_)
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ namespace OpenWifi {
|
|||||||
} else {
|
} else {
|
||||||
config().setString(LogFilePathKey, LogDir_);
|
config().setString(LogFilePathKey, LogDir_);
|
||||||
}
|
}
|
||||||
Poco::File DataDir(ConfigPath("ucentral.system.data"));
|
Poco::File DataDir(ConfigPath("openwifi.system.data"));
|
||||||
DataDir_ = DataDir.path();
|
DataDir_ = DataDir.path();
|
||||||
if(!DataDir.exists()) {
|
if(!DataDir.exists()) {
|
||||||
try {
|
try {
|
||||||
@@ -196,16 +196,16 @@ namespace OpenWifi {
|
|||||||
logger().log(E);
|
logger().log(E);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
std::string KeyFile = ConfigPath("ucentral.service.key");
|
std::string KeyFile = ConfigPath("openwifi.service.key");
|
||||||
std::string KeyFilePassword = ConfigPath("ucentral.service.key.password" , "" );
|
std::string KeyFilePassword = ConfigPath("openwifi.service.key.password" , "" );
|
||||||
AppKey_ = Poco::SharedPtr<Poco::Crypto::RSAKey>(new Poco::Crypto::RSAKey("", KeyFile, KeyFilePassword));
|
AppKey_ = Poco::SharedPtr<Poco::Crypto::RSAKey>(new Poco::Crypto::RSAKey("", KeyFile, KeyFilePassword));
|
||||||
Cipher_ = CipherFactory_.createCipher(*AppKey_);
|
Cipher_ = CipherFactory_.createCipher(*AppKey_);
|
||||||
ID_ = Utils::GetSystemId();
|
ID_ = Utils::GetSystemId();
|
||||||
if(!DebugMode_)
|
if(!DebugMode_)
|
||||||
DebugMode_ = ConfigGetBool("ucentral.system.debug",false);
|
DebugMode_ = ConfigGetBool("openwifi.system.debug",false);
|
||||||
MyPrivateEndPoint_ = ConfigGetString("ucentral.system.uri.private");
|
MyPrivateEndPoint_ = ConfigGetString("openwifi.system.uri.private");
|
||||||
MyPublicEndPoint_ = ConfigGetString("ucentral.system.uri.public");
|
MyPublicEndPoint_ = ConfigGetString("openwifi.system.uri.public");
|
||||||
UIURI_ = ConfigGetString("ucentral.system.uri.ui");
|
UIURI_ = ConfigGetString("openwifi.system.uri.ui");
|
||||||
MyHash_ = CreateHash(MyPublicEndPoint_);
|
MyHash_ = CreateHash(MyPublicEndPoint_);
|
||||||
InitializeSubSystemServers();
|
InitializeSubSystemServers();
|
||||||
ServerApplication::initialize(self);
|
ServerApplication::initialize(self);
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ namespace OpenWifi {
|
|||||||
static const std::string uSERVICE_FIRMWARE{ "ucentralfms"};
|
static const std::string uSERVICE_FIRMWARE{ "ucentralfms"};
|
||||||
static const std::string uSERVICE_TOPOLOGY{ "owtopo"};
|
static const std::string uSERVICE_TOPOLOGY{ "owtopo"};
|
||||||
static const std::string uSERVICE_PROVISIONING{ "owprov"};
|
static const std::string uSERVICE_PROVISIONING{ "owprov"};
|
||||||
|
static const std::string uSERVICE_OWLS{ "owls"};
|
||||||
|
|
||||||
class MyErrorHandler : public Poco::ErrorHandler {
|
class MyErrorHandler : public Poco::ErrorHandler {
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace OpenWifi {
|
|||||||
|
|
||||||
class RESTAPI_InternalServer *RESTAPI_InternalServer::instance_ = nullptr;
|
class RESTAPI_InternalServer *RESTAPI_InternalServer::instance_ = nullptr;
|
||||||
|
|
||||||
RESTAPI_InternalServer::RESTAPI_InternalServer() noexcept: SubSystemServer("RESTAPIInternalServer", "REST-ISRV", "owprov.internal.restapi")
|
RESTAPI_InternalServer::RESTAPI_InternalServer() noexcept: SubSystemServer("RESTAPIInternalServer", "REST-ISRV", "openwifi.internal.restapi")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ namespace OpenWifi {
|
|||||||
class RESTAPI_server *RESTAPI_server::instance_ = nullptr;
|
class RESTAPI_server *RESTAPI_server::instance_ = nullptr;
|
||||||
|
|
||||||
RESTAPI_server::RESTAPI_server() noexcept:
|
RESTAPI_server::RESTAPI_server() noexcept:
|
||||||
SubSystemServer("RESTAPIServer", "RESTAPIServer", "owprov.restapi")
|
SubSystemServer("RESTAPIServer", "RESTAPIServer", "openwifi.restapi")
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user