-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The O2IMS request O-Cloud (StarlingX) depends on the clients from StarlingX community. This commit will upgrade the fault client and cgts client to the latest to support the latest StarlingX version. And update the local test Dockerfile, to make sure the local test with the latest image and latest clients. Test Plan: 1. Image build succeeded with the local test Dockerfile. 2. O2 watcher service queried the O-Cloud resource and alarm successfully. Issue-ID: INF-451 Change-Id: I84236678fcef262dcd20f6bf2265b86f905d6989 Signed-off-by: Zhang Rong(Jon) <[email protected]>
- Loading branch information
Showing
3 changed files
with
68 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,89 @@ | ||
FROM python:3.11-slim-buster | ||
|
||
RUN apt-get update && apt-get install -y git gcc \ | ||
vim curl procps ssh | ||
FROM nexus3.onap.org:10001/onap/integration-python:12.0.0 | ||
# https://nexus3.onap.org/#browse/search=keyword%3Dintegration-python:d406d405e4cfbf1186265b01088caf9a | ||
# https://git.onap.org/integration/docker/onap-python/tree/Dockerfile | ||
|
||
USER root | ||
|
||
ARG user=orano2 | ||
ARG group=orano2 | ||
|
||
# Create a group and user | ||
RUN addgroup -S $group && adduser -S -D -h /home/$user $user $group && \ | ||
chown -R $user:$group /home/$user && \ | ||
mkdir /var/log/$user && \ | ||
mkdir -p /src && \ | ||
mkdir -p /configs/ && \ | ||
mkdir -p /src/o2app/ && \ | ||
mkdir -p /src/helm_sdk/ && \ | ||
mkdir -p /etc/o2/ && \ | ||
chown -R $user:$group /var/log/$user && \ | ||
chown -R $user:$group /src && \ | ||
chown -R $user:$group /configs && \ | ||
chown -R $user:$group /etc/o2/ | ||
|
||
COPY requirements.txt requirements-test.txt requirements-stx.txt constraints.txt /tmp/ | ||
|
||
# in case git repo is not accessable | ||
RUN mkdir -p /cgtsclient && mkdir -p /distcloud-client | ||
COPY temp/config /cgtsclient/ | ||
COPY temp/distcloud-client /distcloud-client/ | ||
COPY temp/fault /faultclient/ | ||
|
||
RUN pip install -e cgtsclient/sysinv/cgts-client/cgts-client/ \ | ||
&& pip install -e /distcloud-client/distributedcloud-client \ | ||
&& pip install -e /faultclient/python-fmclient/fmclient/ | ||
# in case git repo is not accessable | ||
|
||
COPY requirements.txt constraints.txt requirements-test.txt /tmp/ | ||
|
||
RUN pip install -r /tmp/requirements.txt -c /tmp/constraints.txt \ | ||
&& pip install -r /tmp/requirements-test.txt | ||
|
||
|
||
RUN mkdir -p /src | ||
COPY o2ims/ /src/o2ims/ | ||
COPY o2dms/ /src/o2dms/ | ||
COPY o2common/ /src/o2common/ | ||
|
||
RUN mkdir -p /src/o2app/ | ||
COPY o2app/ /src/o2app/ | ||
COPY setup.py /src/ | ||
|
||
RUN mkdir -p /src/helm_sdk/ | ||
COPY helm_sdk/ /src/helm_sdk/ | ||
|
||
COPY setup.py /src/ | ||
|
||
COPY configs/ /etc/o2/ | ||
COPY configs/ /configs/ | ||
|
||
RUN apk add --no-cache \ | ||
git \ | ||
curl \ | ||
bluez-dev \ | ||
bzip2-dev \ | ||
dpkg-dev dpkg \ | ||
expat-dev \ | ||
gcc \ | ||
libc-dev \ | ||
libffi-dev \ | ||
libnsl-dev \ | ||
libtirpc-dev \ | ||
linux-headers \ | ||
make \ | ||
ncurses-dev \ | ||
openssl-dev \ | ||
pax-utils \ | ||
sqlite-dev \ | ||
tcl-dev \ | ||
tk \ | ||
tk-dev \ | ||
util-linux-dev \ | ||
xz-dev \ | ||
zlib-dev | ||
|
||
RUN set -ex \ | ||
&& apk add --no-cache bash \ | ||
&& apk add --no-cache --virtual .fetch2-deps \ | ||
&& pip install -r /tmp/requirements.txt -c /tmp/constraints.txt \ | ||
&& pip install -r /tmp/requirements-test.txt \ | ||
&& pip install -e /cgtsclient/sysinv/cgts-client/cgts-client/ \ | ||
&& pip install -e /distcloud-client/distributedcloud-client \ | ||
&& pip install -e /faultclient/python-fmclient/fmclient/ \ | ||
&& pip install -e /src \ | ||
&& apk del --no-network .fetch2-deps | ||
|
||
# RUN mkdir -p /helmsdk | ||
# COPY temp/helmsdk /helmsdk/ | ||
# # RUN git clone --depth 1 --branch master https://github.com/cloudify-incubator/cloudify-helm-plugin.git helmsdk | ||
# COPY /helmsdk/helm_sdk /src/helm_sdk | ||
|
||
# RUN pip install -e /src | ||
COPY tests/ /tests/ | ||
|
||
#RUN apt-get install -y procps vim | ||
|
||
#RUN apt-get install -y curl | ||
RUN curl -O https://get.helm.sh/helm-v3.3.1-linux-amd64.tar.gz; | ||
RUN tar -zxvf helm-v3.3.1-linux-amd64.tar.gz; cp linux-amd64/helm /usr/local/bin | ||
|
||
RUN mkdir -p /etc/kubeconfig/ | ||
# COPY temp/kubeconfig/config /etc/kubeconfig/ | ||
|
||
RUN mkdir -p /var/log/orano2 | ||
|
||
WORKDIR /src | ||
|
||
# USER $user | ||
ENV PYTHONHASHSEED=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters