&& tar -zxvf helm-v${HELM_VERSION}.tar.gz \
&& mv linux-amd64/helm /usr/local/bin/helm3 \
&& rm -rf linux-amd64 helm-v${HELM_VERSION}.tar.gz
-WORKDIR /app/osm_lcm
+WORKDIR /app
# Isolate dependencies in a venv
-RUN python -m venv /app/osm_lcm/.venv
-ENV PATH="/app/osm_lcm/.venv/bin:$PATH"
+RUN python -m venv /app/.venv
+ENV PATH="/app/.venv/bin:$PATH"
ARG COMMON_GERRIT_REFSPEC=master
# Install OSM dependency modules with no cache
COPY . .
RUN pip install --no-cache-dir .
-RUN find /app/osm_lcm -type d -name ".tox" -exec rm -rf {} +
+RUN find /app -type d -name ".tox" -exec rm -rf {} +
#########################################################################################################################################################################
ENV VIRTUAL_ENV=/app/.venv \
PATH="/app/.venv/bin:$PATH"
-COPY --from=build --chown=appuser:appuser /app/osm_lcm/.venv /app/.venv
-COPY --from=build --chown=appuser:appuser /app/osm_lcm/osm_lcm/n2vc /app/osm_lcm/n2vc
-COPY --from=build --chown=appuser:appuser /app/osm_lcm/scripts/ /app/scripts/
+COPY --from=build --chown=appuser:appuser /app/.venv /app/.venv
+COPY --from=build --chown=appuser:appuser /app/osm_lcm/n2vc/post-renderer-scripts/ /app/osm_lcm/n2vc/post-renderer-scripts/
+COPY --from=build --chown=appuser:appuser /app/scripts/ /app/scripts/
EXPOSE 9090
OSMLCM_VCA_HOST=vca \
OSMLCM_VCA_PORT=17070 \
OSMLCM_VCA_USER=admin \
- OSMLCM_VCA_SECRET=secret \
OSMLCM_VCA_CLOUD=localhost \
OSMLCM_VCA_HELMPATH=/usr/local/bin/helm3 \
OSMLCM_VCA_KUBECTLPATH=/usr/bin/kubectl \
--- /dev/null
+#!/bin/bash
+
+###############################################################################
+# Copyright 2021 Canonical Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+###############################################################################
+
+if [ "$OSMLCM_VCA_HELM_CA_CERTS" ]; then
+ echo "$OSMLCM_VCA_HELM_CA_CERTS" >> /etc/ssl/certs/ca-certificates.crt
+fi
+
+python3 -m osm_lcm.lcm