Skip to content
Snippets Groups Projects
Commit dc8ea9c6 authored by Mike Marchetti's avatar Mike Marchetti
Browse files

setup policy container to use policy packages


Change-Id: I21e4b8261b547bf76d8e1649aefc404902c51948
Signed-off-by: default avatarMike Marchetti <mmarchetti@sandvine.com>
parent a77bf2a8
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@ LOWER_MDG = $(shell echo $(MDG) | tr '[:upper:]' '[:lower:]')
CMD_DOCKER_ARGS ?= -q
DOCKER_ARGS = $(CMD_DOCKER_ARGS)
DEPS := MON IM LCM RO common osmclient devops NBI
DEPS := MON IM LCM RO common osmclient devops NBI POL
DEPS_TARGETS = $(addprefix $(MKBUILD)/.dep_, $(DEPS))
......@@ -42,6 +42,7 @@ build: $(MKBUILD) $(DEPS_TARGETS)
--build-arg COMMON_VERSION==$(shell cat $(MKBUILD)/.dep_common) \
--build-arg OSMCLIENT_VERSION==$(shell cat $(MKBUILD)/.dep_osmclient) \
--build-arg NBI_VERSION==$(shell cat $(MKBUILD)/.dep_NBI) \
--build-arg POL_VERSION==$(shell cat $(MKBUILD)/.dep_POL) \
$(DOCKER_ARGS) .
clean:
......
......@@ -28,11 +28,23 @@ RUN apt-get --yes update \
&& apt-get --yes install python3 python3-pip libmysqlclient-dev git \
&& pip3 install pip==9.0.3
RUN git clone https://osm.etsi.org/gerrit/osm/MON MON
#COPY requirements.txt /policy_module/requirements.txt
RUN apt-get update && apt-get -y install curl software-properties-common
RUN pip3 install -r /MON/policy_module/requirements.txt
RUN apt-get --yes update \
&& apt-get --yes install git python python-pip python3 python3-pip libmysqlclient-dev libssl-dev libffi-dev \
&& pip3 install pip==9.0.3
ARG REPOSITORY_BASE=http://osm-download.etsi.org/repository/osm/debian
ARG RELEASE=ReleaseFOUR-daily
ARG REPOSITORY_KEY=OSM%20ETSI%20Release%20Key.gpg
ARG REPOSITORY=testing
RUN curl ${REPOSITORY_BASE}/${RELEASE}/${REPOSITORY_KEY} | apt-key add -
RUN add-apt-repository -y "deb ${REPOSITORY_BASE}/${RELEASE} ${REPOSITORY} POL common" && apt update
ARG POL_VERSION
ARG COMMON_VERSION
RUN pip3 install /MON/policy_module
RUN apt-get --yes update && apt-get -y install python3-osm-policy-module${POL_VERSION}
CMD bash /MON/policy_module/scripts/gen_config_from_env.sh && osm-policy-agent --config osm_policy_agent.cfg
#CMD bash /MON/policy_module/scripts/gen_config_from_env.sh && osm-policy-agent --config osm_policy_agent.cfg
include ../mk/Makefile.include
# Currently LW-UI needs no-cache (binary version packages not yet available)
DOCKER_ARGS += $(NO_CACHE)
MDG=$(shell basename $(CURDIR))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment