This picks up a fix to dynamic route-table distribution features.
Drop mention of ricmanifest from the installation guide.
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Change-Id: I7e91b9bd4e7ee1eb8a2efb5056218c4d9c31dc3f
###########
# 2nd stage
FROM python:3.8-alpine
+
+# copy rmr libraries from builder image in lieu of an Alpine package
+COPY --from=nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-alpine3-rmr:4.0.2 /usr/local/lib64/librmr* /usr/local/lib64/
+
# dir that rmr routing file temp goes into
RUN mkdir -p /opt/route/
# python copy; this basically makes the 2 stage python build work
COPY --from=compile-image /home/a1user/.local /home/a1user/.local
-# copy rmr .so from builder image in lieu of an Alpine package
-COPY --from=nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-alpine3-rmr:3.8.0 /usr/local/lib64/librmr_si.so /usr/local/lib64/librmr_si.so
+
# Switch to a non-root user for security reasons. a1 does not currently write into any dirs so no chowns are needed at this time.
RUN addgroup -S a1user && adduser -S -G a1user a1user
USER a1user
# ==================================================================================
FROM python:3.8-alpine
-# copy rmr .so from builder image in lieu of an Alpine package
-COPY --from=nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-alpine3-rmr:3.8.0 /usr/local/lib64/librmr_si.so /usr/local/lib64/librmr_si.so
+# copy rmr libraries from builder image in lieu of an Alpine package
+COPY --from=nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-alpine3-rmr:4.0.2 /usr/local/lib64/librmr* /usr/local/lib64/
# dir that rmr routing file temp goes into
RUN mkdir -p /opt/route/
-# Gevent needs gcc
-RUN apk add gcc musl-dev
+# Gevent needs gcc, make, file, ffi
+RUN apk update && apk add gcc musl-dev make file libffi-dev
# Upgrade pip, install tox (gevent is installed as a speed hack in local dev where tox is run many times)
RUN pip install --upgrade pip && pip install tox gevent
COPY setup.py tox.ini /tmp/
WORKDIR /tmp
-# Run the unit tests
-RUN tox -e py38,flake8
+# Run the unit tests but skip doc
+RUN tox -e code,flake8
Version bumping RMR
-------------------
-As of 2020/02/13, A1 (Dockerfile), Dockerfile-Unit-Test, and all three integration test receivers use a base image from o-ran-sc.
-The rmr version is in that base image.
-When version changes are made in that image, rebuilding those 5 containers in the A1 repo will pick it up (or just A1 itself for prod usage).
+As of 2020/02/13, A1 (Dockerfile), Dockerfile-Unit-Test, and all three
+integration test receivers use an Alpine base image and install RMR
+from a base builder image. Must update and rebuild all 5 containers
+in the A1 repo (or just A1 itself for prod usage).
-However, there are two items in this repo that must be kept in sync: ``rmr-version.yaml``, which controls what rmr gets installed for unit testing in Jenkins, and ``integration_tests/install_rmr.sh`` which is a useful script for a variety of local testing.
+In addition these items in this repo must be kept in sync:
+* ``rmr-version.yaml`` controls what rmr gets installed for unit testing in Jenkins
+* ``integration_tests/install_rmr.sh`` is a useful script for a variety of local testing.
Version bumping Python
----------------------
Unit Testing
------------
-Note, before this will work, for the first time on the machine running the tests, run ``./install_deps.sh``. This is only needed once on the machine.
-Also, this requires the python packages ``tox`` and ``pytest``.
+Note, before this will work, for the first time on the machine running
+the tests, run ``./install_deps.sh``. This is only needed once on the
+machine. Also, this requires the python packages ``tox`` and
+``pytest``.
::
tox
open htmlcov/index.html
-Alternatively, you can run the unit tests in Docker (this is somewhat less nice because you don't get the pretty HTML)
+Alternatively, you can run the unit tests in Docker (this is somewhat
+less nice because you don't get the pretty HTML)
::
Integration testing
-------------------
-This tests A1’s external API with three test receivers. This requires docker, kubernetes and helm.
+This tests A1’s external API with three test receivers. This requires
+docker, kubernetes and helm.
Build all the images:
::
- docker run -dt -p 10000:10000 -v /path/to/localrt:/opt/route/local.rt -v /path/to/ricmanifest:/opt/ricmanifest.json a1:X.Y.Z -v
+ docker run -dt -p 10000:10000 -v /path/to/localrt:/opt/route/local.rt a1:X.Y.Z -v
:depth: 3
:local:
-[2.1.7] - 2020-04-27
+[2.1.7] - 2020-04-28
--------------------
-* Upgrade to rmr 3.8.0
+* Upgrade to rmr 4.0.2
* Upgrade integration tests to xapp-frame-go version 0.4.8 which drops NNG
* Extend exception handler to return error details in HTTP response
* Ensure that policy type ID on path matches ID in object
#!/bin/sh
-git clone --branch 3.8.0 https://gerrit.oran-osc.org/r/ric-plt/lib/rmr \
+git clone --branch 4.0.2 https://gerrit.oran-osc.org/r/ric-plt/lib/rmr \
&& cd rmr \
&& mkdir .build; cd .build \
&& echo "<<<installing rmr devel headers>>>" \
# ==================================================================================
# This Dockerfile uses a two stage Docker build
-FROM nexus3.o-ran-sc.org:10004/bldr-alpine3:10-a3.11-rmr3
+FROM nexus3.o-ran-sc.org:10004/o-ran-sc/bldr-alpine3:12-a3.11
+
+# copy rmr headers and libraries from builder image in lieu of an Alpine package
+COPY --from=nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-alpine3-rmr:4.0.2 /usr/local/include/rmr /usr/local/include/rmr
+COPY --from=nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-alpine3-rmr:4.0.2 /usr/local/lib64/librmr* /usr/local/lib64/
# go will complain if there is a go.mod at the root of the GOPATH so we can't.
RUN mkdir myxapp
# 2nd stage
FROM alpine:3.11
-# copy rmr .so from builder image in lieu of an Alpine package
-COPY --from=nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-alpine3-rmr:3.8.0 /usr/local/lib64/librmr_si.so* /usr/local/lib64/
+# copy rmr libraries from builder image in lieu of an Alpine package
+COPY --from=nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-alpine3-rmr:4.0.2 /usr/local/lib64/librmr* /usr/local/lib64/
COPY --from=0 /myxapp/receiver .
COPY delay-config-file.yaml .
# ==================================================================================
# This Dockerfile uses a two stage Docker build
-FROM nexus3.o-ran-sc.org:10004/bldr-alpine3:10-a3.11-rmr3
+FROM nexus3.o-ran-sc.org:10004/o-ran-sc/bldr-alpine3:12-a3.11
+
+# copy rmr headers and libraries from builder image in lieu of an Alpine package
+COPY --from=nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-alpine3-rmr:4.0.2 /usr/local/include/rmr /usr/local/include/rmr
+COPY --from=nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-alpine3-rmr:4.0.2 /usr/local/lib64/librmr* /usr/local/lib64/
# go will complain if there is a go.mod at the root of the GOPATH so we can't.
RUN mkdir myxapp
# 2nd stage
FROM alpine:3.11
-# copy rmr .so from builder image in lieu of an Alpine package
-COPY --from=nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-alpine3-rmr:3.8.0 /usr/local/lib64/librmr_si.so* /usr/local/lib64/
+# copy rmr libraries from builder image in lieu of an Alpine package
+COPY --from=nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-alpine3-rmr:4.0.2 /usr/local/lib64/librmr* /usr/local/lib64/
COPY --from=0 /myxapp/receiver .
COPY query-config-file.yaml .
# ==================================================================================
# This Dockerfile uses a two stage Docker build
-FROM nexus3.o-ran-sc.org:10004/bldr-alpine3:10-a3.11-rmr3
+FROM nexus3.o-ran-sc.org:10004/o-ran-sc/bldr-alpine3:12-a3.11
+
+# copy rmr headers and libraries from builder image in lieu of an Alpine package
+COPY --from=nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-alpine3-rmr:4.0.2 /usr/local/include/rmr /usr/local/include/rmr
+COPY --from=nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-alpine3-rmr:4.0.2 /usr/local/lib64/librmr* /usr/local/lib64/
# go will complain if there is a go.mod at the root of the GOPATH so we can't.
RUN mkdir myxapp
# 2nd stage
FROM alpine:3.11
-# copy rmr .so from builder image in lieu of an Alpine package
-COPY --from=nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-alpine3-rmr:3.8.0 /usr/local/lib64/librmr_si.so* /usr/local/lib64/
+# copy rmr libraries from builder image in lieu of an Alpine package
+COPY --from=nexus3.o-ran-sc.org:10002/o-ran-sc/bldr-alpine3-rmr:4.0.2 /usr/local/lib64/librmr* /usr/local/lib64/
COPY --from=0 /myxapp/receiver .
COPY test-config-file.yaml .
# CI script installs RMR from PackageCloud using this version
---
-version: 3.8.0
+version: 4.0.2