|
1 |
| -FROM registry.access.redhat.com/ubi8/ubi as pmcollector |
| 1 | +FROM registry.access.redhat.com/ubi8/python-36 |
2 | 2 |
|
| 3 | +RUN pip3 install --upgrade pip |
| 4 | +RUN pip3 install setuptools |
| 5 | +RUN pip3 install cherrypy |
3 | 6 |
|
4 |
| -# |
5 |
| -# Installing tools required by pmcollector. |
6 |
| -# |
| 7 | +CMD python3 -V |
| 8 | +CMD pip3 list |
7 | 9 |
|
8 |
| -RUN yum install -y libicu gdbm-devel boost-devel python27 |
| 10 | +USER root |
9 | 11 |
|
10 |
| -#RUN yum install -y libicu |
| 12 | +RUN mkdir -p /opt/IBM/bridge |
| 13 | +ADD . /opt/IBM/bridge |
11 | 14 |
|
12 |
| -#RUN yum install -y boost-regex |
13 | 15 |
|
14 |
| -#RUN yum list all |
| 16 | +RUN mkdir -p /var/mmfs/gen |
| 17 | +RUN mkdir -p /opt/IBM/zimon |
| 18 | +COPY ./gpfsConfig/mmsdrfs* /var/mmfs/gen/ |
| 19 | +COPY ./gpfsConfig/ZIMon* /opt/IBM/zimon/ |
15 | 20 |
|
16 |
| -# |
17 |
| -# Installing few tools in the image that help to debug it easier. |
18 |
| -# |
19 |
| -RUN yum install -y gcc gcc-c++ make net-tools m4 libaio ksh which iproute procps-ng util-linux openssh-clients openssh-server setup elfutils-libelf-devel hostname kmod pciutils iputils bind-utils |
20 | 21 |
|
21 |
| -#RUN yum list all |
22 | 22 |
|
| 23 | +ARG PMCOLLECTORIP=0.0.0.0 |
| 24 | +ENV SERVER=$PMCOLLECTORIP |
| 25 | +RUN echo "the pmcollector server ip is set to $SERVER" |
23 | 26 |
|
24 | 27 |
|
25 |
| -# |
26 |
| -# Installing Spectrum Scale pmcollector |
27 |
| -# |
28 |
| -ARG ARTIKEY |
29 |
| -RUN curl --fail -H "X-Jfrog-Art-Api: $ARTIKEY" -O https://na.artifactory.swg-devops.com/artifactory/res-fsaas-generic-local/ScaleRPMs/gpfs.gss.pmcollector-5.0.4-2.el8.x86_64.rpm |
30 |
| -RUN mkdir -p /opt/IBM/zimon/config |
31 |
| -RUN mkdir -p /opt/IBM/zimon/zdata |
32 |
| -RUN rpm -ivh gpfs.gss.pmcollector-5.0.4-2.el8.x86_64.rpm |
| 28 | +WORKDIR /opt/IBM/bridge |
33 | 29 |
|
| 30 | +ARG DEFAULTLOGPATH='./logs/zserver.log' |
| 31 | +ENV LOGPATH=$DEFAULTLOGPATH |
| 32 | +RUN mkdir -p $(dirname $LOGPATH) |
| 33 | +RUN echo "the log will use $(dirname $LOGPATH)" |
| 34 | +RUN echo "$(pwd)" |
34 | 35 |
|
35 |
| -COPY ZIMonCollector.cfg /opt/IBM/zimon/config/ZIMonCollector.cfg |
| 36 | +RUN touch $LOGPATH |
| 37 | +RUN echo "log path: $(dirname $LOGPATH)" >> $LOGPATH |
| 38 | +RUN echo "pmcollector_server: $SERVER" >> $LOGPATH |
36 | 39 |
|
37 |
| -# |
38 |
| -# Create a user 'scalepm' under 'root' group |
39 |
| -# |
40 |
| -RUN groupadd -g 1099 scalepm |
41 |
| -RUN useradd -rm -d /home/1001 -s /bin/bash -g 1099 -u 1001 scalepm |
| 40 | +CMD ["sh", "-c", "python3 zimonGrafanaIntf.py -c 10 -s $SERVER"] |
42 | 41 |
|
43 |
| -# |
44 |
| -# Chown all the files to the zimon 'scalepm' user. |
45 |
| -# |
46 |
| -RUN chown -R 1001:1099 /opt/IBM/zimon |
47 |
| -RUN chown -R 1001:1099 /var/log/zimon |
48 |
| -RUN chown -R 1001:1099 /var/run/perfmon |
| 42 | +EXPOSE 4242 |
49 | 43 |
|
50 |
| -# |
51 |
| -# Switch to user 'scalepm' |
52 |
| -# |
53 |
| -USER 1001 |
54 |
| - |
55 |
| -CMD ["/opt/IBM/zimon/sbin/pmcollector", "-C", "/opt/IBM/zimon/config/ZIMonCollector.cfg", "-R", "/var/run/perfmon"] |
56 |
| - |
57 |
| -# helpful for debugging |
58 | 44 | #CMD ["tail", "-f", "/dev/null"]
|
59 |
| - |
60 |
| - |
61 |
| -EXPOSE 4739 9085 9084 9094 |
0 commit comments