# See the License for the specific language governing permissions and
# limitations under the License.
-FROM ubuntu:18.04
+FROM ubuntu:20.04
# Set the working directory to /app
WORKDIR /app/LCM
&& echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | tee -a /etc/apt/sources.list.d/kubernetes.list \
&& apt-get update && apt-get install -y kubectl
-RUN curl https://get.helm.sh/helm-v2.15.2-linux-amd64.tar.gz --output helm-v2.15.2.tar.gz \
- && tar -zxvf helm-v2.15.2.tar.gz \
+RUN curl https://get.helm.sh/helm-v2.17.0-linux-amd64.tar.gz --output helm-v2.17.0.tar.gz \
+ && tar -zxvf helm-v2.17.0.tar.gz \
&& mv linux-amd64/helm /usr/local/bin/helm \
&& rm -r linux-amd64/
+RUN curl https://get.helm.sh/helm-v3.7.2-linux-amd64.tar.gz --output helm-v3.7.2.tar.gz \
+ && tar -zxvf helm-v3.7.2.tar.gz \
+ && mv linux-amd64/helm /usr/local/bin/helm3 \
+ && rm -r linux-amd64/
+
RUN curl -L https://launchpad.net/juju/2.7/2.7.6/+download/juju-2.7.6-k8s.tar.xz --output juju-2.7.6-k8s.tar.xz \
&& tar -xvf juju-2.7.6-k8s.tar.xz \
&& mv juju /usr/local/bin/juju
&& python3 -m pip install -e /app/common
# python3-pymongo python3-yaml pycrypto aiokafka
+RUN python3 -m pip install \
+ -r /app/common/requirements.txt \
+ -r /app/N2VC/requirements.txt
+
+RUN python3 -m pip install grpcio-tools grpclib
+
RUN mkdir -p /app/storage/kafka && mkdir -p /app/log
# ENV OSMLCM_DATABASE_USER xxx
# ENV OSMLCM_DATABASE_PASSWORD xxx
-#storage
+# storage
ENV OSMLCM_STORAGE_DRIVER local
ENV OSMLCM_STORAGE_PATH /app/storage
-#ENV OSMLCM_STORAGE_DRIVER mongo
-#ENV OSMNBI_STORAGE_URI mongodb://mongo:27017
-#ENV OSMLCM_STORAGE_COLLECTION files
+# ENV OSMLCM_STORAGE_DRIVER mongo
+# ENV OSMLCM_STORAGE_URI mongodb://mongo:27017
+# ENV OSMLCM_STORAGE_COLLECTION files
# message
ENV OSMLCM_MESSAGE_DRIVER kafka
ENV OSMLCM_MESSAGE_HOST kafka
ENV OSMLCM_MESSAGE_PORT 9092
+# tsdb
+# ENV OSMLCM_TSDB_DRIVER prometheus
+# ENV OSMLCM_TSDB_PATH /etc/prometheus
+# ENV OSMLCM_TSDB_URI http://prometheus:9090/
# logs
# ENV OSMLCM_GLOBAL_LOGFILE /app/log/lcm.log
# Copy the current directory contents into the container at /app/LCM
ADD . /app/LCM
+RUN python3 -m pip install \
+ -r requirements.txt
+
# Run app.py when the container launches
CMD python3 -m osm_lcm.lcm