Files
Mike Hansen 2d0f260f5d Add support for PKI 2.0 with schema v5.0.0 updates
This commit completes the PKI 2.0 implementation by integrating schema
v5.0.0 and fixing runtime configuration handling.

PKI 2.0 Testing:
- Tested with simulated switch (ols-ucentral-client) running in Docker container
- Successfully connected to cloud instance using PKI 2.0 birth certificates
- Verified automatic EST enrollment and operational certificate retrieval
- Confirmed gateway connectivity with operational certificates

Version Update:
- Update client version from 4.1.0 → 5.0.0
- Aligns with PKI 2.0 feature release

Schema Update:
- Update schema reference to release/v5.0.0
- Add version.json and schema.json to /etc/ for runtime capabilities reporting
- Update config-samples/ucentral.schema.pretty.json to v5.0.0
  - New fields: autoneg, qos-priority-mapping
- Regenerate property databases for test suite:
  - property-database-base.c (418 properties)
  - property-database-platform-brcm-sonic.c (418 properties)

Configuration Fixes:
- Fix UC_GATEWAY_ADDRESS parsing to support host:port format
  - Previously required separate -s and -P flags
  - Now supports single environment variable: UC_GATEWAY_ADDRESS=host:port
2026-02-26 13:38:18 -05:00

85 lines
2.4 KiB
Docker

FROM debian:bullseye
LABEL Description="Ucentral client (Build) environment"
ARG HOME /root
ARG SCHEMA="release/v5.0.0"
ARG SCHEMA_VERSION="${SCHEMA}"
ARG SCHEMA_ZIP_FILE="${SCHEMA_VERSION}.zip"
ARG SCHEMA_UNZIPPED="ols-ucentral-schema-${SCHEMA}"
ARG OLS_SCHEMA_SRC="https://github.com/Telecominfraproject/ols-ucentral-schema/archive/refs/heads/${SCHEMA_ZIP_FILE}"
SHELL ["/bin/bash", "-c"]
RUN apt-get update -q -y && apt-get -q -y --no-install-recommends install \
build-essential \
g++ \
gcc \
cmake \
curl \
libcurl4-openssl-dev \
libev-dev \
libssl-dev \
libnl-route-3-dev \
libnl-3-dev \
apt-utils \
git \
wget \
autoconf \
libtool \
pkg-config \
libjsoncpp-dev \
unzip \
python3 \
python3-jsonschema
RUN git config --global http.sslverify false
RUN git clone https://github.com/DaveGamble/cJSON.git ${HOME}/ucentral-external-libs/cJSON/
RUN git clone https://libwebsockets.org/repo/libwebsockets ${HOME}/ucentral-external-libs/libwebsockets/
RUN git clone --recurse-submodules -b v1.50.0 --depth 1 --shallow-submodules https://github.com/grpc/grpc ${HOME}/ucentral-external-libs/grpc/
RUN git clone --recursive --branch v7.1.4 https://github.com/zhaojh329/rtty.git ${HOME}/ucentral-external-libs/rtty/
ADD ${OLS_SCHEMA_SRC} /tmp/
# The following libs should be prebuilt in docker-build-env img to speed-up
# recompilation of only the ucentral-client itself
RUN cd ${HOME}/ucentral-external-libs/cJSON/ && \
mkdir build && \
cd build && \
cmake .. && \
make -j 4 && \
make install
RUN cd ${HOME}/ucentral-external-libs/libwebsockets/ && \
git branch --all && \
git checkout a9b8fe7ebf61b8c0e7891e06e70d558412933a33 && \
mkdir build && \
cd build && \
cmake .. && \
make -j 4 && \
make install
RUN cd ${HOME}/ucentral-external-libs/grpc/ && \
mkdir cbuild && \
cd cbuild && \
cmake -DgRPC_INSTALL=ON \
-DgRPC_BUILD_TESTS=OFF \
-DCMAKE_INSTALL_PREFIX=/usr/local \
.. && \
make -j4 && \
make install
RUN cd ${HOME}/ucentral-external-libs/rtty/ && \
mkdir build && \
cd build && \
cmake .. && \
make -j4
RUN unzip /tmp/${SCHEMA_ZIP_FILE} -d ${HOME}/ucentral-external-libs/
RUN cd ${HOME}/ucentral-external-libs/ && \
mv ${SCHEMA_UNZIPPED} ols-ucentral-schema
# Copy version files to /etc/ for runtime use
COPY version.json /etc/version.json
RUN mkdir -p /etc && \
cp ${HOME}/ucentral-external-libs/ols-ucentral-schema/schema.json /etc/schema.json