
This updates the base image of stx-ceph-manager to docker.io/openstackhelm/ceph-config-helper:ubuntu_jammy_19.2.1-1-20250207. This is required by the rook-ceph upversion [1], which updated ceph to v19.2.1. [1]: https://review.opendev.org/c/starlingx/app-rook-ceph/+/936933 Test Plan: - PASS: Build stx-ceph-manager image - PASS: Change the stx-ceph-manager deployment in the rook-ceph app to use this image - PASS: Access the stx-ceph-manager pod and check the ceph version - PASS: Check the pod logs to verify if there are any errors - PASS: Tested with cluster with Ceph v18.2.2 and v19.2.1 Story: 2011372 Task: 51750 Change-Id: Ibe316af00f385784a3c44ad53e75c65ece6301ff Signed-off-by: Ítalo Vieira <italo.gomesvieira@windriver.com>
72 lines
2.0 KiB
Docker
72 lines
2.0 KiB
Docker
ARG BASE
|
|
FROM ${BASE} AS stx-debian
|
|
FROM docker.io/openstackhelm/ceph-config-helper:ubuntu_jammy_19.2.1-1-20250207
|
|
|
|
RUN mkdir -p /tmp/build
|
|
WORKDIR /tmp/build
|
|
|
|
# Copy the STX sources list from the $BASE image
|
|
COPY --from=stx-debian /etc/apt/sources.list.d/stx.list /etc/apt/sources.list.d/
|
|
|
|
RUN apt-get update -y
|
|
|
|
# Install python3.9
|
|
RUN apt-get install -y \
|
|
python3.9 \
|
|
libpython3.9 \
|
|
software-properties-common
|
|
|
|
RUN add-apt-repository ppa:deadsnakes/ppa -y
|
|
RUN apt-get install python3.9-distutils -y
|
|
RUN add-apt-repository --remove ppa:deadsnakes/ppa -y
|
|
|
|
# Install pip3.9
|
|
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
|
RUN python3.9 get-pip.py
|
|
|
|
# Install pip dependencies
|
|
RUN pip3.9 install greenlet yappi
|
|
|
|
# Install apt dependencies
|
|
RUN apt-get install -y \
|
|
python3-ldap=3.2.0-4ubuntu7.1 \
|
|
libpq5 libldap-2.4-2 \
|
|
python3-pyasn1 \
|
|
python3-pyasn1-modules
|
|
|
|
# Create fm user
|
|
RUN useradd -ms /bin/bash fm
|
|
|
|
# Change Python dependency version
|
|
RUN apt-get download fm-common
|
|
RUN dpkg-deb -x fm-common*.deb fm-common
|
|
RUN dpkg-deb --control fm-common*.deb fm-common/DEBIAN
|
|
RUN sed -i 's/<< 3.10/<< 3.11/g' fm-common/DEBIAN/control
|
|
RUN dpkg-deb -b fm-common
|
|
RUN dpkg -i fm-common.deb
|
|
|
|
# Install STX packages
|
|
RUN apt-get install -y \
|
|
fm-rest-api \
|
|
python3-fm-api \
|
|
python3-fmclient \
|
|
python3-cephclient \
|
|
ceph-manager
|
|
|
|
# Ensures that ceph-manager will run on python3.9
|
|
RUN sed -i 's/python3\.*[0-9]*/python3.9/g' /usr/bin/ceph-manager
|
|
|
|
# Suppress warning messages because the mgr restful module is configured with a self-signed certificate
|
|
ENV PYTHONWARNINGS="ignore:Unverified HTTPS request"
|
|
RUN sed -i '/import sys/a import os\nos.environ["CURL_CA_BUNDLE"] = ""' /usr/bin/ceph-manager
|
|
|
|
# Cleanup
|
|
RUN rm -rf /tmp/build
|
|
RUN rm -rf /var/lib/apt/lists/*
|
|
RUN rm -f /etc/apt/sources.list.d/stx.list
|
|
RUN apt-get clean
|
|
|
|
WORKDIR /
|
|
|
|
CMD ["bash"]
|