1 # Copyright 2020 ArctosLabs Scandinavia AB
2 # *************************************************************
4 # This file is part of OSM Placement module
5 # All Rights Reserved to ArctosLabs Scandinavia AB
7 # Licensed under the Apache License, Version 2.0 (the "License"); you may
8 # not use this file except in compliance with the License. You may obtain
9 # a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
15 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
16 # License for the specific language governing permissions and limitations
20 LABEL authors="Martin Björklund, Lars-Göran Magnusson"
22 RUN apt-get --yes update \
23 && apt-get --yes install git python3 python3-pip libgl1-mesa-glx \
24 && pip3 install pip==9.0.3
26 COPY requirements.txt /pla/requirements.txt
28 RUN pip3 install -r /pla/requirements.txt
30 ADD https://github.com/MiniZinc/MiniZincIDE/releases/download/2.3.1/MiniZincIDE-2.3.1-bundle-linux-x86_64.tgz /minizinc.tgz
31 #COPY MiniZincIDE-2.3.1-bundle-linux-x86_64.tgz /minizinc.tgz
33 RUN tar -zxf /minizinc.tgz && \
34 mv /MiniZincIDE-2.3.1-bundle-linux /minizinc
36 RUN mkdir /entry_data \
37 && mkdir /entry_data/mzn-lib \
38 && ln -s /entry_data/mzn-lib /minizinc/share/minizinc/exec
45 COPY ./osm_pla/test/pil_price_list.yaml /placement/.
46 COPY ./osm_pla/test/vnf_price_list.yaml /placement/.
48 ENV OSMPLA_MESSAGE_DRIVER kafka
49 ENV OSMPLA_MESSAGE_HOST kafka
50 ENV OSMPLA_MESSAGE_PORT 9092
52 ENV OSMPLA_DATABASE_DRIVER mongo
53 ENV OSMPLA_DATABASE_URI mongodb://mongo:27017
55 ENV OSMPLA_SQL_DATABASE_URI sqlite:///pla_sqlite.db
56 ENV OSMPLA_GLOBAL_REQUEST_TIMEOUT 10
57 ENV OSMPLA_GLOBAL_LOGLEVEL INFO
58 ENV OSMPLA_VCA_HOST localhost
59 ENV OSMPLA_VCA_SECRET secret
60 ENV OSMPLA_VCA_USER admin
61 ENV OSMPLA_DATABASE_COMMONKEY changeme
63 ENV FZNEXEC "/entry_data/fzn-exec"
64 ENV PATH "/minizinc/bin:${PATH}"
65 ENV LD_LIBRARY_PATH "/minizinc/lib:${LD_LIBRARY_PATH}"
69 #HEALTHCHECK --interval=5s --timeout=2s --retries=12 \
70 # CMD osm-pla-healthcheck || exit 1
72 CMD /bin/bash pla/docker/scripts/start.sh