From: Mike Marchetti Date: Fri, 21 Sep 2018 15:36:05 +0000 (-0400) Subject: setup policy container to use policy packages X-Git-Tag: v5.0.0~111 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F37%2F6537%2F1;p=osm%2Fdevops.git setup policy container to use policy packages Change-Id: I21e4b8261b547bf76d8e1649aefc404902c51948 Signed-off-by: Mike Marchetti --- diff --git a/docker/mk/Makefile.include b/docker/mk/Makefile.include index a918c9fb..a1242341 100644 --- a/docker/mk/Makefile.include +++ b/docker/mk/Makefile.include @@ -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: diff --git a/docker/pm/Dockerfile b/docker/pm/Dockerfile index 9fec7c4c..64097404 100644 --- a/docker/pm/Dockerfile +++ b/docker/pm/Dockerfile @@ -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 diff --git a/docker/pm/Makefile b/docker/pm/Makefile index e6381005..d64462ab 100644 --- a/docker/pm/Makefile +++ b/docker/pm/Makefile @@ -1,6 +1,3 @@ include ../mk/Makefile.include -# Currently LW-UI needs no-cache (binary version packages not yet available) -DOCKER_ARGS += $(NO_CACHE) - MDG=$(shell basename $(CURDIR))