blob: 1ca2663d9bcc797d96241a4149d976fe19fd1e89 [file] [log] [blame]
tiernoc0e42e22018-05-11 11:36:10 +02001FROM ubuntu:16.04
2
3# Set the working directory to /app
4WORKDIR /app/osm_lcm
5
6# Copy the current directory contents into the container at /app
7ADD . /app
8
9RUN apt-get update && apt-get install -y git python3 \
10 python3-pip python3-pymongo python3-yaml python3-aiohttp \
11 python3-stdeb python3-setuptools python3-all python-all \
12 python3-bitarray python3-regex python3-lxml debhelper dh-python tox wget \
13 python3-cffi \
14 && pip3 install pip==9.0.3 \
15 && pip3 install -U aiokafka pyang lxml six enum34
16
17RUN git clone https://osm.etsi.org/gerrit/osm/N2VC.git \
18 && cd N2VC \
garciadeblas7807fb82018-10-02 12:29:37 +020019 && git checkout v4.0 \
Adam Israel0ba8fed2018-05-22 10:05:24 -040020 && pip3 install websockets==4.0.1 \
21 && pip3 install requests \
tiernoc0e42e22018-05-11 11:36:10 +020022 && cd modules/libjuju && python3 setup.py develop && cd ../.. \
23 && pip3 install -U -r requirements.txt \
24 && python3 setup.py develop \
25 && cd ..
26
27RUN git clone https://osm.etsi.org/gerrit/osm/common.git \
garciadeblas7807fb82018-10-02 12:29:37 +020028 && cd common && git checkout v4.0 && python3 setup.py develop && cd ..
tiernoc0e42e22018-05-11 11:36:10 +020029# && pip3 install -U -r requirements.txt \
30# && cd ..
31
32RUN mkdir -p /app/storage/kafka && mkdir -p /app/log
33
34
35LABEL Maintainer="alfonso.tiernosepulveda@telefonica.com" \
tierno8d950012018-05-22 12:27:48 +020036 Description="This implements the Life Cicle Management module of OSM" \
tiernoc0e42e22018-05-11 11:36:10 +020037 Version="1.0" \
38 Author="Alfonso Tierno"
39
40# Used for local storage
41VOLUME /app/storage
42# Used for logs
43VOLUME /app/log
44
45# The following ENV can be added with "docker run -e xxx' to configure LCM
46ENV OSMLCM_RO_HOST ro
47ENV OSMLCM_RO_PORT 9090
48ENV OSMLCM_RO_TENANT osm
49
50# VCA
51ENV OSMLCM_VCA_HOST vca
52ENV OSMLCM_VCA_PORT: 17070
53ENV OSMLCM_VCA_USER: admin
54ENV OSMLCM_VCA_SECRET: secret
55
56# database
57ENV OSMLCM_DATABASE_DRIVER mongo
58ENV OSMLCM_DATABASE_HOST mongo
59ENV OSMLCM_DATABASE_PORT 27017
60ENV OSMLCM_STORAGE_DRIVER local
61ENV OSMLCM_STORAGE_PATH /app/storage
62
63# message
64ENV OSMLCM_MESSAGE_DRIVER kafka
65ENV OSMLCM_MESSAGE_HOST kafka
66ENV OSMLCM_MESSAGE_PORT 9092
67
tierno275411e2018-05-16 14:33:32 +020068# logs
69ENV OSMLCM_GLOBAL_LOGFILE /app/log/lcm.log
70ENV OSMLCM_GLOBAL_LOGLEVEL DEBUG
71
tiernoc0e42e22018-05-11 11:36:10 +020072# Run app.py when the container launches
73CMD ["python3", "lcm.py"]