# 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 the builder image
-COPY --from=nexus3.o-ran-sc.org:10004/bldr-alpine3-go:3-rmr-si95-nng-3.6.1 /usr/local/lib64/librmr_si.so /usr/local/lib64/librmr_si.so
+COPY --from=nexus3.o-ran-sc.org:10004/bldr-alpine3-go:5-a3.11-nng-rmr3 /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 the builder image
-COPY --from=nexus3.o-ran-sc.org:10004/bldr-alpine3-go:3-rmr-si95-nng-3.6.1 /usr/local/lib64/librmr_si.so /usr/local/lib64/librmr_si.so
+COPY --from=nexus3.o-ran-sc.org:10004/bldr-alpine3-go:5-a3.11-nng-rmr3 /usr/local/lib64/librmr_si.so /usr/local/lib64/librmr_si.so
# dir that rmr routing file temp goes into
RUN mkdir -p /opt/route/
import time
import json
from threading import Thread
-from rmr import rmr, helpers
+from ricxappframe.rmr import rmr, helpers
from mdclogpy import Logger
from a1 import data, messages
from a1.exceptions import PolicyTypeNotFound, PolicyInstanceNotFound
"""
class represents an rmr loop that constantly reads from rmr and performs operations based on waiting messages
this launches a thread, it should probably only be called once; the public facing method to access these ensures this
+
+ TODO: the xapp frame has a version of this looping structure. See if A1 can switch to that.
"""
def __init__(self, init_func_override=None, rcv_func_override=None):
# 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: 2.1.5
+tag: 2.1.6
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.
-Version bumping pyrmr
----------------------
-rmr-python is the python binding to rmr . Installing rmr per the above does not install it.
-Bumping the rmr python version is done via ``setup.py``
-
Version bumping python itself
-----------------------------
If you want to update the version of python itself (ie just done from 37 to 38):
tox -c tox-integration.ini
This script:
-1. Deploys 2 helm charts (4 containers) into a local kubernetes installation
+1. Deploys 3 helm charts (5 containers) into a local kubernetes installation
2. Port forwards a pod ClusterIP to localhost
3. Uses “tavern” to run some tests against the server
4. Barrages the server with apache bench
:depth: 3
:local:
+[2.1.6] - 4/7/2020
+-------------------
+::
+
+ * Switch to rmr 3.6.3
+ * Switch to using rmr in the ricxappframe
+
[2.1.5] - 3/19/2020
-------------------
apiVersion: v1
description: A1 Helm chart for Kubernetes
name: a1mediator
-version: 2.1.5
+version: 2.1.6
#!/bin/sh
-git clone --branch 3.6.1 https://gerrit.oran-osc.org/r/ric-plt/lib/rmr \
+git clone --branch 3.6.3 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-go:3-rmr-si95-nng-3.6.1
+FROM nexus3.o-ran-sc.org:10004/bldr-alpine3-go:5-a3.11-nng-rmr3
# go will complain if there is a go.mod at the root of the GOPATH so we can't.
RUN mkdir myxapp
# ==================================================================================
# This Dockerfile uses a two stage Docker build
-FROM nexus3.o-ran-sc.org:10004/bldr-alpine3-go:3-rmr-si95-nng-3.6.1
+FROM nexus3.o-ran-sc.org:10004/bldr-alpine3-go:5-a3.11-nng-rmr3
# go will complain if there is a go.mod at the root of the GOPATH so we can't.
RUN mkdir myxapp
# ==================================================================================
# This Dockerfile uses a two stage Docker build
-
-# The first stage is defined here: https://gerrit.o-ran-sc.org/r/gitweb?p=ci-management.git;a=blob;f=docker/bldr-alpine3-go/Dockerfile;h=a1e31f07e6113d4a02202793ace6ebc780d71583;hb=3711ffcbfe06f6c872bf4a0871eb5f2a2fcd83ae
-FROM nexus3.o-ran-sc.org:10004/bldr-alpine3-go:3-rmr-si95-nng-3.6.1
+FROM nexus3.o-ran-sc.org:10004/bldr-alpine3-go:5-a3.11-nng-rmr3
# go will complain if there is a go.mod at the root of the GOPATH so we can't.
RUN mkdir myxapp
# CI script installs RMR from PackageCloud using this version
---
-version: 3.6.1
+version: 3.6.3
setup(
name="a1",
- version="2.1.5",
+ version="2.1.6",
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
- install_requires=[
- "requests",
- "Flask",
- "connexion[swagger-ui]",
- "gevent",
- "rmr>=4.0.0,<5.0.0",
- "mdclogpy",
- "ricxappframe>=0.4.0",
- ],
+ install_requires=["requests", "Flask", "connexion[swagger-ui]", "gevent", "mdclogpy", "ricxappframe>=1.0.0,<2.0.0"],
package_data={"a1": ["openapi.yaml"]},
)
# ==================================================================================
import time
import json
-from rmr.rmr_mocks import rmr_mocks
+from ricxappframe.rmr.rmr_mocks import rmr_mocks
from ricxappframe.xapp_sdl import SDLWrapper
from ricsdl.exceptions import RejectedByBackend, NotConnected, BackendError
from a1 import a1rmr, data
def _test_put_patch(monkeypatch):
rmr_mocks.patch_rmr(monkeypatch)
# assert that rmr bad states don't cause problems
- monkeypatch.setattr("rmr.rmr.rmr_send_msg", rmr_mocks.send_mock_generator(10))
+ monkeypatch.setattr("ricxappframe.rmr.rmr.rmr_send_msg", rmr_mocks.send_mock_generator(10))
def _no_ac(client):