Upgrade to Python RMR ver 0.10.8 61/761/1
authorLott, Christopher (cl778h) <cl778h@att.com>
Tue, 20 Aug 2019 19:22:45 +0000 (15:22 -0400)
committerLott, Christopher (cl778h) <cl778h@att.com>
Tue, 20 Aug 2019 19:22:45 +0000 (15:22 -0400)
Repair integration tests

Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
Change-Id: I150598860a575b0c4f816d4179f80e7389967ff3

a1/openapi.yaml
container-tag.yaml
docs/developer-guide.rst
docs/release-notes.rst
integration_tests/Dockerfile
integration_tests/a1mediator/Chart.yaml
setup.py

index e2d17cc..66094ef 100644 (file)
@@ -16,7 +16,7 @@
 # ==================================================================================
 openapi: 3.0.0
 info:
-  version: 0.10.0
+  version: 0.10.3
   title: RIC A1
 paths:
   '/a1-p/healthcheck':
index e64fcd7..f8af088 100644 (file)
@@ -1,4 +1,4 @@
 # The Jenkins job uses this string for the tag in the image name
 # for example nexus3.o-ran-sc.org:10004/my-image-name:my-tag
 ---
-tag: 0.10.2
+tag: 0.10.3
index 660bd62..9ce6e51 100644 (file)
@@ -43,6 +43,18 @@ This project follows semver. When changes are made, the versions are in:
 
 7) in the it/dep repo that contains a1 helm chart, ``values.yaml``, ``Chart.yml``
 
+Version bumping rmr-python
+==========================
+rmr-python is a critial dependency of A1. Bumping the rmr version dependency requires changes in:
+
+1) ``setup.py``
+
+2) ``Dockerfile``
+
+3) ``integration_tests/Dockerfile``
+
+Run the integration tests after attempting this.
+
 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.
@@ -79,8 +91,6 @@ If you've never run the integration tests before, build the test receiver, which
     cd integration_tests
     docker build  --no-cache -t testreceiver:latest .
 
-You do not need the "bombarder" image as they are not currently used in the integration tests (that is more for load testing).
-
 Finally, run all the tests from the root (this requires the python packages ``tox``, ``pytest``, and ``tavern``).
 ::
 
@@ -101,8 +111,7 @@ Running locally
 
 1. Before this will work, for the first time on that machine, run ``./install_deps.sh``
 
-2. It also requires rmr-python >= 0.10.1 installed. (The dockerfile also
-   does this)
+2. It also requires rmr-python installed. (The dockerfile does this)
 
 3. Create a ``local.rt`` file and copy it into ``/opt/route/local.rt``.
    Note, the example one in ``integration_tests`` will need to be modified for
@@ -155,11 +164,3 @@ while it is sleeping, and both responses should be correct.
    curl -v -X PUT -H "Content-Type: application/json" -d '{ "enforce":true, "window_length":10, "blocking_rate":20, "trigger_threshold":10 }' localhost:10000/ric/policies/admission_control_policy
    curl -v localhost:10000/ric/policies/admission_control_policy
    curl -v localhost:10000/a1-p/healthcheck
-
-Finally, there is a test “bombarder” that will flood A1 with messages
-with good message types but bad transaction IDs, to test A1’s resilience
-against queue-overflow attacks
-
-::
-
-   set -x LD_LIBRARY_PATH /usr/local/lib/; set -x RMR_SEED_RT /opt/route/local.rt ;  python bombard.py
index 3775134..5dea627 100644 (file)
@@ -23,6 +23,15 @@ All notable changes to this project will be documented in this file.
 The format is based on `Keep a Changelog <http://keepachangelog.com/>`__
 and this project adheres to `Semantic Versioning <http://semver.org/>`__.
 
+[0.10.3] - 8/20/2019
+
+::
+
+    * Update to later rmr-python
+    * Add docs about upgrading rmr
+    * remove bombarder since tavern runs apache bench
+
+
 [0.10.2] - 8/14/2019
 
 ::
index fc912b4..60ea6cd 100644 (file)
 #   limitations under the License.
 # ==================================================================================
 # TODO: switch to alpine once rmr apk available
-FROM python:3.7
+FROM python:3.7-alpine
 
 COPY receiver.py /
 
-# copy NNG out of the  CI builder nng
-COPY --from=nexus3.o-ran-sc.org:10004/bldr-debian-python-nng:2-py3.7-nng1.1.1 /usr/local/lib/libnng.so /usr/local/lib/libnng.so
-
-# Installs RMr using debian package hosted at packagecloud.io
-RUN wget --content-disposition https://packagecloud.io/o-ran-sc/master/packages/debian/stretch/rmr_1.0.36_amd64.deb/download.deb
-RUN dpkg -i rmr_1.0.36_amd64.deb
+# copy NNG and rmr out of the  CI builder nng
+COPY --from=nexus3.o-ran-sc.org:10004/bldr-alpine3:3-a3.9 /usr/local/lib64/libnng.so /usr/local/lib64/libnng.so
+COPY --from=nexus3.o-ran-sc.org:10004/bldr-alpine3:3-a3.9 /usr/local/lib64/librmr_nng.so /usr/local/lib64/librmr_nng.so
 
 # Install RMr python bindings
 RUN pip install --upgrade pip
-RUN pip install rmr==0.10.1
+RUN pip install rmr==0.10.8
 
 # rmr setups
 RUN mkdir -p /opt/route/
-ENV LD_LIBRARY_PATH /usr/local/lib
+ENV LD_LIBRARY_PATH /usr/local/lib:/usr/local/lib64
 ENV RMR_SEED_RT /opt/route/local.rt
 
 WORKDIR /
index 68be66b..83fa694 100644 (file)
@@ -1,4 +1,4 @@
 apiVersion: v1
 description: A1 Helm chart for Kubernetes
 name: a1mediator
-version: 0.10.2
+version: 0.10.3
index 85d8ddb..61d1382 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -18,14 +18,13 @@ from setuptools import setup, find_packages
 
 setup(
     name="a1",
-    version="0.10.2",
+    version="0.10.3",
     packages=find_packages(exclude=["tests.*", "tests"]),
     author="Tommy Carpenter",
     description="RIC A1 Mediator for policy/intent changes",
     url="https://gerrit.o-ran-sc.org/r/admin/repos/ric-plt/a1",
     entry_points={"console_scripts": ["run.py=a1.run:main"]},
     # we require jsonschema, should be in that list, but connexion already requires a specific version of it
-    # rmr 0.10.4 has a bugfix required on alpine
-    install_requires=["requests", "Flask", "connexion[swagger-ui]", "gevent", "rmr>=0.10.7"],
+    install_requires=["requests", "Flask", "connexion[swagger-ui]", "gevent", "rmr>=0.10.8"],
     package_data={"a1": ["openapi.yaml"]},
 )