Compare commits

...

21 Commits

Author SHA1 Message Date
TIP Automation User
455dd0edec Chg: update image tag in helm values to v2.7.0 2022-10-05 11:33:07 +00:00
TIP Automation User
42d67c3383 Chg: update image tag in helm values to v2.7.0-RC6 2022-10-05 02:46:09 +00:00
Stephane Bourque
2e01b76163 Merge pull request #41 from Telecominfraproject/main
Cutting 2.7.0 RC
2022-10-04 19:38:10 -07:00
stephb9959
c7c91360a2 Merge remote-tracking branch 'origin/main' 2022-10-04 08:08:22 -07:00
stephb9959
8e148a6d33 https://telecominfraproject.atlassian.net/browse/WIFI-10942
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-10-04 08:08:07 -07:00
Dmitry Dunaev
d2f4130ccf Merge pull request #39 from Telecominfraproject/main
[WIFI-10581] Fix: securityContext fsGroup in helm
2022-10-03 15:49:59 +03:00
Dmitry Dunaev
b9128f1b50 [WIFI-10581] Fix: securityContext fsGroup in helm
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
2022-10-03 15:49:05 +03:00
TIP Automation User
6f802f4de2 Chg: update image tag in helm values to v2.7.0-RC5 2022-10-03 11:14:29 +00:00
Dmitry Dunaev
e047b25a71 Merge pull request #37 from Telecominfraproject/main
https://telecominfraproject.atlassian.net/browse/WIFI-10942
2022-10-03 14:08:49 +03:00
Dmitry Dunaev
da80ab49cd [WIFI-10581] Fix: Helm image to main
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
2022-10-03 12:07:01 +03:00
Dmitry Dunaev
bf0fd21eae Merge pull request #38 from Telecominfraproject/fix/wifi-10581--postgres-client
[WIFI-10581] Add: postgresql-client in Dockerfile
2022-10-03 11:25:20 +03:00
Dmitry Dunaev
829efdfec8 [WIFI-10581] Add: postgresql-client in Dockerfile
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
2022-10-03 11:25:07 +03:00
Stephane Bourque
d258bbb414 Merge branch 'release/v2.7.0' into main 2022-10-02 11:40:07 -07:00
Stephane Bourque
972bbbafdc Merge pull request #36 from Telecominfraproject/WIFI-10942
https://telecominfraproject.atlassian.net/browse/WIFI-10942
2022-10-02 11:38:54 -07:00
Stephane Bourque
f0442d4c8e Merge branch 'main' into WIFI-10942 2022-10-02 11:38:48 -07:00
Stephane Bourque
f3713df910 https://telecominfraproject.atlassian.net/browse/WIFI-10942 2022-10-02 11:37:37 -07:00
Stephane Bourque
085fbfcdf3 Merge pull request #23 from Telecominfraproject/WIFI-10581-switch-images-to-debian-slim
[WIFI-10581] Switch microservice Docker images from Alpine to Debian-slim
2022-10-02 11:33:57 -07:00
Johann Hoffmann
25397c80c9 Fix self-signed cert file extension for Debian
Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>
2022-08-19 17:18:59 +02:00
Johann Hoffmann
2e046340e3 Create necessary library links in Docker image
Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>
2022-08-19 16:06:39 +02:00
Johann Hoffmann
61dff87583 Fix curl-dev package name
Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>
2022-08-18 16:35:05 +02:00
Johann Hoffmann
c73fd21b94 Switch to Debian-slim base images
Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>
2022-08-18 14:15:38 +02:00
8 changed files with 36 additions and 29 deletions

View File

@@ -79,6 +79,7 @@ add_executable(owanalytics
src/framework/ow_constants.h
src/framework/MicroServiceErrorHandler.h
src/framework/WebSocketClientNotifications.h
src/framework/MicroServiceErrorHandler.h
src/RESTObjects/RESTAPI_SecurityObjects.h src/RESTObjects/RESTAPI_SecurityObjects.cpp
src/RESTObjects/RESTAPI_ProvObjects.cpp src/RESTObjects/RESTAPI_ProvObjects.h
src/RESTObjects/RESTAPI_GWobjects.h src/RESTObjects/RESTAPI_GWobjects.cpp

View File

@@ -1,17 +1,16 @@
ARG ALPINE_VERSION=3.16.2
ARG DEBIAN_VERSION=11.4-slim
ARG POCO_VERSION=poco-tip-v1
ARG FMTLIB_VERSION=9.0.0
ARG CPPKAFKA_VERSION=tip-v1
ARG JSON_VALIDATOR_VERSION=2.1.0
FROM alpine:$ALPINE_VERSION AS build-base
FROM debian:$DEBIAN_VERSION AS build-base
RUN apk add --update --no-cache \
RUN apt-get update && apt-get install --no-install-recommends -y \
make cmake g++ git \
unixodbc-dev postgresql-dev mariadb-dev \
librdkafka-dev boost-dev openssl-dev \
zlib-dev nlohmann-json \
curl-dev
libpq-dev libmariadb-dev libmariadbclient-dev-compat \
librdkafka-dev libboost-all-dev libssl-dev \
zlib1g-dev nlohmann-json3-dev ca-certificates libcurl4-openssl-dev
FROM build-base AS poco-build
@@ -91,21 +90,21 @@ WORKDIR /owanalytics/cmake-build
RUN cmake ..
RUN cmake --build . --config Release -j8
FROM alpine:$ALPINE_VERSION
FROM debian:$DEBIAN_VERSION
ENV OWANALYTICS_USER=owanalytics \
OWANALYTICS_ROOT=/owanalytics-data \
OWANALYTICS_CONFIG=/owanalytics-data
RUN addgroup -S "$OWANALYTICS_USER" && \
adduser -S -G "$OWANALYTICS_USER" "$OWANALYTICS_USER"
RUN useradd "$OWANALYTICS_USER"
RUN mkdir /openwifi
RUN mkdir -p "$OWANALYTICS_ROOT" "$OWANALYTICS_CONFIG" && \
chown "$OWANALYTICS_USER": "$OWANALYTICS_ROOT" "$OWANALYTICS_CONFIG"
RUN apk add --update --no-cache librdkafka su-exec gettext ca-certificates bash jq curl \
mariadb-connector-c libpq unixodbc postgresql-client
RUN apt-get update && apt-get install --no-install-recommends -y \
librdkafka++1 gosu gettext ca-certificates bash jq curl wget \
libmariadb-dev-compat libpq5 unixodbc postgresql-client
COPY readiness_check /readiness_check
COPY test_scripts/curl/cli /cli
@@ -114,12 +113,14 @@ COPY owanalytics.properties.tmpl /
COPY docker-entrypoint.sh /
COPY wait-for-postgres.sh /
RUN wget https://raw.githubusercontent.com/Telecominfraproject/wlan-cloud-ucentral-deploy/main/docker-compose/certs/restapi-ca.pem \
-O /usr/local/share/ca-certificates/restapi-ca-selfsigned.pem
-O /usr/local/share/ca-certificates/restapi-ca-selfsigned.crt
COPY --from=owanalytics-build /owanalytics/cmake-build/owanalytics /openwifi/owanalytics
COPY --from=cppkafka-build /cppkafka/cmake-build/src/lib/* /usr/local/lib
COPY --from=poco-build /poco/cmake-build/lib/* /usr/local/lib
RUN ldconfig
EXPOSE 16009 17009 16109
ENTRYPOINT ["/docker-entrypoint.sh"]

2
build
View File

@@ -1 +1 @@
21
23

View File

@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
set -e
if [ "$SELFSIGNED_CERTS" = 'true' ]; then
@@ -49,7 +49,7 @@ if [ "$1" = '/openwifi/owanalytics' -a "$(id -u)" = '0' ]; then
if [ "$RUN_CHOWN" = 'true' ]; then
chown -R "$OWANALYTICS_USER": "$OWANALYTICS_ROOT" "$OWANALYTICS_CONFIG"
fi
exec su-exec "$OWANALYTICS_USER" "$@"
exec gosu "$OWANALYTICS_USER" "$@"
fi
exec "$@"

View File

@@ -131,8 +131,10 @@ spec:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.securityContext }}
securityContext:
fsGroup: 101
{{- toYaml . | nindent 8 }}
{{- end }}
imagePullSecrets:
{{- range $image, $imageValue := .Values.images }}

View File

@@ -9,7 +9,7 @@ fullnameOverride: ""
images:
owanalytics:
repository: tip-tip-wlan-cloud-ucentral.jfrog.io/owanalytics
tag: v2.7.0-RC4
tag: v2.7.0
pullPolicy: Always
# regcred:
# registry: tip-tip-wlan-cloud-ucentral.jfrog.io
@@ -91,6 +91,9 @@ resources: {}
# cpu: 100m
# memory: 128Mi
securityContext:
fsGroup: 1000
nodeSelector: {}
tolerations: []

View File

@@ -3075,7 +3075,7 @@ namespace OpenWifi {
private:
std::vector<std::unique_ptr<Poco::Net::HTTPServer>> RESTServers_;
Poco::ThreadPool Pool_{"x-rest",32,128};
Poco::ThreadPool Pool_{"x-rest",8,128};
RESTAPI_GenericServer Server_;
RESTAPI_ExtServer() noexcept:
@@ -3209,7 +3209,7 @@ namespace OpenWifi {
const Poco::ThreadPool & Pool() { return Pool_; }
private:
std::vector<std::unique_ptr<Poco::Net::HTTPServer>> RESTServers_;
Poco::ThreadPool Pool_{"i-rest",32,96};
Poco::ThreadPool Pool_{"i-rest",4,64};
RESTAPI_GenericServer Server_;
RESTAPI_IntServer() noexcept:
@@ -3406,7 +3406,7 @@ namespace OpenWifi {
bool NoBuiltInCrypto_=false;
Poco::JWT::Signer Signer_;
Poco::Logger &Logger_;
Poco::ThreadPool TimerPool_{"timer:pool",2,16};
Poco::ThreadPool TimerPool_{"timer:pool",2,32};
std::unique_ptr<BusEventManager> BusEventManager_;
};
@@ -3571,7 +3571,7 @@ namespace OpenWifi {
auto LoggingDestination = MicroService::instance().ConfigGetString("logging.type", "file");
auto LoggingFormat = MicroService::instance().ConfigGetString("logging.format",
"%Y-%m-%d %H:%M:%S %s: [%p] %t");
"%Y-%m-%d %H:%M:%S.%i %s: [%p][thr:%I] %t");
if (LoggingDestination == "console") {
Poco::AutoPtr<Poco::ConsoleChannel> Console(new Poco::ConsoleChannel);
Poco::AutoPtr<Poco::AsyncChannel> Async(new Poco::AsyncChannel(Console));
@@ -3602,14 +3602,14 @@ namespace OpenWifi {
FileChannel->setProperty("archive", "timestamp");
FileChannel->setProperty("path", LoggingLocation);
Poco::AutoPtr<Poco::AsyncChannel> Async_File(new Poco::AsyncChannel(FileChannel));
Poco::AutoPtr<Poco::AsyncChannel> Async_Muxer(new Poco::AsyncChannel(LogMuxer()));
Poco::AutoPtr<Poco::SplitterChannel> Splitter(new Poco::SplitterChannel);
Splitter->addChannel(Async_File);
Splitter->addChannel(Async_Muxer);
// Poco::AutoPtr<Poco::AsyncChannel> Async_Muxer(new Poco::AsyncChannel(LogMuxer()));
// Poco::AutoPtr<Poco::SplitterChannel> Splitter(new Poco::SplitterChannel);
// Splitter->addChannel(Async_File);
// Splitter->addChannel(Async_Muxer);
Poco::AutoPtr<Poco::PatternFormatter> Formatter(new Poco::PatternFormatter);
Formatter->setProperty("pattern", LoggingFormat);
Poco::AutoPtr<Poco::FormattingChannel> FormattingChannel(
new Poco::FormattingChannel(Formatter, Splitter));
new Poco::FormattingChannel(Formatter, Async_File));
Poco::Logger::root().setChannel(FormattingChannel);
}
auto Level = Poco::Logger::parseLevel(MicroService::instance().ConfigGetString("logging.level", "debug"));

View File

@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# wait-for-postgres.sh
set -e
@@ -20,7 +20,7 @@ if [ "$1" = '/openwifi/owanalytics' -a "$(id -u)" = '0' ]; then
if [ "$RUN_CHOWN" = 'true' ]; then
chown -R "$OWANALYTICS_USER": "$OWANALYTICS_ROOT" "$OWANALYTICS_CONFIG"
fi
exec su-exec "$OWANALYTICS_USER" "$@"
exec gosu "$OWANALYTICS_USER" "$@"
fi
exec "$@"