Removing old ucentral. properties to openwifi.

This commit is contained in:
stephb9959
2021-08-31 10:20:57 -07:00
parent 96c27ce1fd
commit 7824d1eed4
7 changed files with 52 additions and 51 deletions

2
build
View File

@@ -1 +1 @@
109
111

View File

@@ -5,35 +5,35 @@
#
# REST API access
#
owprov.restapi.host.0.backlog = 100
owprov.restapi.host.0.security = relaxed
owprov.restapi.host.0.rootca = $OWPROV_ROOT/certs/restapi-ca.pem
owprov.restapi.host.0.address = *
owprov.restapi.host.0.port = 16005
owprov.restapi.host.0.cert = $OWPROV_ROOT/certs/restapi-cert.pem
owprov.restapi.host.0.key = $OWPROV_ROOT/certs/restapi-key.pem
owprov.restapi.host.0.key.password = mypassword
openwifi.restapi.host.0.backlog = 100
openwifi.restapi.host.0.security = relaxed
openwifi.restapi.host.0.rootca = $OWPROV_ROOT/certs/restapi-ca.pem
openwifi.restapi.host.0.address = *
openwifi.restapi.host.0.port = 16005
openwifi.restapi.host.0.cert = $OWPROV_ROOT/certs/restapi-cert.pem
openwifi.restapi.host.0.key = $OWPROV_ROOT/certs/restapi-key.pem
openwifi.restapi.host.0.key.password = mypassword
owprov.internal.restapi.host.0.backlog = 100
owprov.internal.restapi.host.0.security = relaxed
owprov.internal.restapi.host.0.rootca = $OWPROV_ROOT/certs/restapi-ca.pem
owprov.internal.restapi.host.0.address = *
owprov.internal.restapi.host.0.port = 17005
owprov.internal.restapi.host.0.cert = $OWPROV_ROOT/certs/restapi-cert.pem
owprov.internal.restapi.host.0.key = $OWPROV_ROOT/certs/restapi-key.pem
owprov.internal.restapi.host.0.key.password = mypassword
openwifi.internal.restapi.host.0.backlog = 100
openwifi.internal.restapi.host.0.security = relaxed
openwifi.internal.restapi.host.0.rootca = $OWPROV_ROOT/certs/restapi-ca.pem
openwifi.internal.restapi.host.0.address = *
openwifi.internal.restapi.host.0.port = 17005
openwifi.internal.restapi.host.0.cert = $OWPROV_ROOT/certs/restapi-cert.pem
openwifi.internal.restapi.host.0.key = $OWPROV_ROOT/certs/restapi-key.pem
openwifi.internal.restapi.host.0.key.password = mypassword
#
# Generic section that all microservices must have
#
ucentral.service.key = $OWPROV_ROOT/certs/restapi-key.pem
ucentral.service.key.password = mypassword
ucentral.system.data = $OWPROV_ROOT/data
ucentral.system.debug = false
ucentral.system.uri.private = https://localhost:17005
ucentral.system.uri.public = https://ucentral.dpaas.arilia.com:16005
ucentral.system.commandchannel = /tmp/app.ucentraltopo
ucentral.system.uri.ui = ucentral-ui.arilia.com
openwifi.service.key = $OWPROV_ROOT/certs/restapi-key.pem
openwifi.service.key.password = mypassword
openwifi.system.data = $OWPROV_ROOT/data
openwifi.system.debug = false
openwifi.system.uri.private = https://localhost:17005
openwifi.system.uri.public = https://ucentral.dpaas.arilia.com:16005
openwifi.system.commandchannel = /tmp/app.owprov
openwifi.system.uri.ui = owprov-ui.arilia.com
#############################
# Generic information for all micro services
@@ -47,13 +47,13 @@ alb.port = 16104
#
# Kafka
#
ucentral.kafka.group.id = prov
ucentral.kafka.client.id = prov1
ucentral.kafka.enable = false
ucentral.kafka.brokerlist = a1.arilia.com:9092
# ucentral.kafka.brokerlist = debfarm1-node-c.arilia.com:9092
ucentral.kafka.auto.commit = false
ucentral.kafka.queue.buffering.max.ms = 50
openwifi.kafka.group.id = prov
openwifi.kafka.client.id = prov1
openwifi.kafka.enable = false
openwifi.kafka.brokerlist = a1.arilia.com:9092
# openwifi.kafka.brokerlist = debfarm1-node-c.arilia.com:9092
openwifi.kafka.auto.commit = false
openwifi.kafka.queue.buffering.max.ms = 50
#
# This section select which form of persistence you need

View File

@@ -17,13 +17,13 @@ namespace OpenWifi {
class KafkaManager *KafkaManager::instance_ = nullptr;
KafkaManager::KafkaManager() noexcept:
SubSystemServer("KafkaManager", "KAFKA-SVR", "ucentral.kafka")
SubSystemServer("KafkaManager", "KAFKA-SVR", "openwifi.kafka")
{
}
void KafkaManager::initialize(Poco::Util::Application & self) {
SubSystemServer::initialize(self);
KafkaEnabled_ = Daemon()->ConfigGetBool("ucentral.kafka.enable",false);
KafkaEnabled_ = Daemon()->ConfigGetBool("openwifi.kafka.enable",false);
}
#ifdef SMALL_BUILD
@@ -55,8 +55,8 @@ namespace OpenWifi {
void KafkaManager::ProducerThr() {
cppkafka::Configuration Config({
{ "client.id", Daemon()->ConfigGetString("ucentral.kafka.client.id") },
{ "metadata.broker.list", Daemon()->ConfigGetString("ucentral.kafka.brokerlist") }
{ "client.id", Daemon()->ConfigGetString("openwifi.kafka.client.id") },
{ "metadata.broker.list", Daemon()->ConfigGetString("openwifi.kafka.brokerlist") }
});
SystemInfoWrapper_ = R"lit({ "system" : { "id" : )lit" +
std::to_string(Daemon()->ID()) +
@@ -96,10 +96,10 @@ namespace OpenWifi {
void KafkaManager::ConsumerThr() {
cppkafka::Configuration Config({
{ "client.id", Daemon()->ConfigGetString("ucentral.kafka.client.id") },
{ "metadata.broker.list", Daemon()->ConfigGetString("ucentral.kafka.brokerlist") },
{ "group.id", Daemon()->ConfigGetString("ucentral.kafka.group.id") },
{ "enable.auto.commit", Daemon()->ConfigGetBool("ucentral.kafka.auto.commit",false) },
{ "client.id", Daemon()->ConfigGetString("openwifi.kafka.client.id") },
{ "metadata.broker.list", Daemon()->ConfigGetString("openwifi.kafka.brokerlist") },
{ "group.id", Daemon()->ConfigGetString("openwifi.kafka.group.id") },
{ "enable.auto.commit", Daemon()->ConfigGetBool("openwifi.kafka.auto.commit",false) },
{ "auto.offset.reset", "latest" } ,
{ "enable.partition.eof", false }
});
@@ -125,8 +125,8 @@ namespace OpenWifi {
}
});
bool AutoCommit = Daemon()->ConfigGetBool("ucentral.kafka.auto.commit",false);
auto BatchSize = Daemon()->ConfigGetInt("ucentral.kafka.consumer.batchsize",20);
bool AutoCommit = Daemon()->ConfigGetBool("openwifi.kafka.auto.commit",false);
auto BatchSize = Daemon()->ConfigGetInt("openwifi.kafka.consumer.batchsize",20);
Types::StringVec Topics;
for(const auto &i:Notifiers_)

View File

@@ -187,7 +187,7 @@ namespace OpenWifi {
} else {
config().setString(LogFilePathKey, LogDir_);
}
Poco::File DataDir(ConfigPath("ucentral.system.data"));
Poco::File DataDir(ConfigPath("openwifi.system.data"));
DataDir_ = DataDir.path();
if(!DataDir.exists()) {
try {
@@ -196,16 +196,16 @@ namespace OpenWifi {
logger().log(E);
}
}
std::string KeyFile = ConfigPath("ucentral.service.key");
std::string KeyFilePassword = ConfigPath("ucentral.service.key.password" , "" );
std::string KeyFile = ConfigPath("openwifi.service.key");
std::string KeyFilePassword = ConfigPath("openwifi.service.key.password" , "" );
AppKey_ = Poco::SharedPtr<Poco::Crypto::RSAKey>(new Poco::Crypto::RSAKey("", KeyFile, KeyFilePassword));
Cipher_ = CipherFactory_.createCipher(*AppKey_);
ID_ = Utils::GetSystemId();
if(!DebugMode_)
DebugMode_ = ConfigGetBool("ucentral.system.debug",false);
MyPrivateEndPoint_ = ConfigGetString("ucentral.system.uri.private");
MyPublicEndPoint_ = ConfigGetString("ucentral.system.uri.public");
UIURI_ = ConfigGetString("ucentral.system.uri.ui");
DebugMode_ = ConfigGetBool("openwifi.system.debug",false);
MyPrivateEndPoint_ = ConfigGetString("openwifi.system.uri.private");
MyPublicEndPoint_ = ConfigGetString("openwifi.system.uri.public");
UIURI_ = ConfigGetString("openwifi.system.uri.ui");
MyHash_ = CreateHash(MyPublicEndPoint_);
InitializeSubSystemServers();
ServerApplication::initialize(self);

View File

@@ -38,6 +38,7 @@ namespace OpenWifi {
static const std::string uSERVICE_FIRMWARE{ "ucentralfms"};
static const std::string uSERVICE_TOPOLOGY{ "owtopo"};
static const std::string uSERVICE_PROVISIONING{ "owprov"};
static const std::string uSERVICE_OWLS{ "owls"};
class MyErrorHandler : public Poco::ErrorHandler {
public:

View File

@@ -19,7 +19,7 @@ namespace OpenWifi {
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")
{
}

View File

@@ -37,7 +37,7 @@ namespace OpenWifi {
class RESTAPI_server *RESTAPI_server::instance_ = nullptr;
RESTAPI_server::RESTAPI_server() noexcept:
SubSystemServer("RESTAPIServer", "RESTAPIServer", "owprov.restapi")
SubSystemServer("RESTAPIServer", "RESTAPIServer", "openwifi.restapi")
{
}