Upgrade A1 to use RMR library version 4.0.2 93/3493/4 2.1.7
authorLott, Christopher (cl778h) <cl778h@att.com>
Mon, 27 Apr 2020 21:25:05 +0000 (17:25 -0400)
committerLott, Christopher (cl778h) <cl778h@att.com>
Tue, 28 Apr 2020 14:30:14 +0000 (10:30 -0400)
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

Dockerfile
Dockerfile-Unit-Test
docs/developer-guide.rst
docs/installation-guide.rst
docs/release-notes.rst
integration_tests/install_rmr.sh
integration_tests/testxappcode/Dockerfile-delay-receiver
integration_tests/testxappcode/Dockerfile-query-receiver
integration_tests/testxappcode/Dockerfile-test-receiver
rmr-version.yaml

index bd18fe7..c8ef420 100644 (file)
@@ -35,12 +35,15 @@ RUN pip install --user /home/a1user
 ###########
 # 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
index 097d4f3..8aba74f 100644 (file)
 # ==================================================================================
 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
@@ -34,5 +34,5 @@ COPY tests/ /tmp/tests
 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
index f562c7c..4c0d38d 100644 (file)
@@ -37,11 +37,14 @@ This project follows semver. When changes are made, the versions are in:
 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
 ----------------------
@@ -57,15 +60,18 @@ If you want to update the version of python itself (ie just done from 37 to 38):
 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)
 
 ::
 
@@ -74,7 +80,8 @@ Alternatively, you can run the unit tests in Docker (this is somewhat less nice
 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:
 
index d59cb87..ff12eca 100644 (file)
@@ -40,5 +40,5 @@ running
 
 ::
 
-   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
 
index 3ced56e..14d0612 100644 (file)
@@ -14,10 +14,10 @@ and this project adheres to `Semantic Versioning <http://semver.org/>`__.
    :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
index 95f6beb..1ccc6b4 100755 (executable)
@@ -1,5 +1,5 @@
 #!/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>>>" \
index 42303e0..420aeb8 100644 (file)
 # ==================================================================================
 
 # 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
@@ -33,8 +37,8 @@ RUN go build -a -installsuffix cgo -o receiver receiver.go
 # 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 .
index c3c98e0..6004d11 100644 (file)
 # ==================================================================================
 
 # 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
@@ -33,8 +37,8 @@ RUN go build -a -installsuffix cgo -o receiver receiver.go
 # 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 .
index b7afc4a..1d59467 100644 (file)
 # ==================================================================================
 
 # 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
@@ -33,8 +37,8 @@ RUN go build -a -installsuffix cgo -o receiver receiver.go
 # 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 .
index 7f7e478..48cb15e 100644 (file)
@@ -1,3 +1,3 @@
 # CI script installs RMR from PackageCloud using this version
 ---
-version: 3.8.0
+version: 4.0.2