Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade to manticore and RHEL9 #11

Merged
merged 6 commits into from
Mar 7, 2024
Merged

upgrade to manticore and RHEL9 #11

merged 6 commits into from
Mar 7, 2024

Conversation

akostadinov
Copy link
Collaborator

No description provided.

@akostadinov akostadinov force-pushed the manticore branch 3 times, most recently from 0926560 to f7030f9 Compare November 3, 2023 22:13
@akostadinov akostadinov force-pushed the manticore branch 8 times, most recently from 2e66084 to 47f6c18 Compare November 9, 2023 10:42
@akostadinov akostadinov force-pushed the manticore branch 6 times, most recently from b303363 to d7764d8 Compare November 9, 2023 19:01
@akostadinov akostadinov requested a review from a team November 9, 2023 19:35
Containerfile Outdated
CC=clang-16 \
CXX=clang++-16 \
BUILD_PATH=/tmp/manticore_uselessly_long_path_to_prevent_rpm_build_issues \
BUILD_FLAGS="-DUSE_SYSLOG=0 -DWITH_GALERA=0 -DWITH_RE2=0 -DWITH_STEMMER=0 -DWITH_ICU=1 -DWITH_SSL=1 -DWITH_ZLIB=1 -DWITH_ODBC=0 -DWITH_EXPAT=0 -DWITH_ICONV=1 -DWITH_POSTGRESQL=0 -DWITH_MYSQL=0 -DBUILD_TESTING=0"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wondering, are any of the BUILD_FLAGS set to some default values, or do we need to explicitly define all of them?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure about -DWITH_ICONV=1 and -DUSE_SYSLOG=0 but I find it useful to see the settings on a glance

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not documented what are the defautls, so I prefer to keep them. But now I notice that icu can be used from RHEL too with -DWITH_ICU_FORCE_STATIC=1

Containerfile Outdated
chmod 770 /var/lib/searchd /var/run/sphinx
COPY --from=builder /tmp/manticore_uselessly_long_path_to_prevent_rpm_build_issues/build/*.rpm /tmp/rpms/
COPY --from=$PORTA_IMAGE /opt/system/config/standalone.sphinx.conf "/etc/manticoresearch/manticore.conf"
ENV MANTICORE_RPMS="manticore-converter* manticore-icudata* manticore-common* manticore-server-core* manticore-server*"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just manticore-* ? or would it contain something that we don't need?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, some RPMs have deps that are not satisfied. And we don't really need them.

Containerfile Outdated
rpm -iv --excludedocs $MANTICORE_RPMS && \
cd - && rm -rf /tmp/rpms && \
microdnf clean all && \
sed -i -e 's#/var/run/sphinx/#/var/run/manticore/#' -e 's#/var/lib/searchd#/var/lib/manticore#' /etc/manticoresearch/manticore.conf && \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is temporary, and when it's all finalized and deployed, we can just update the paths in the productized build?
Maybe we can leave a #TODO here for this task?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to do at some point. I don't consider it a big issue though. If you find it important I can add a TODO.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think it would be nice to add a TODO, so we don't forget to do this eventually.
Not very important indeed, but it would be cleaner.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@akostadinov
Copy link
Collaborator Author

@mayorova , if you want to deploy this, the image is quay.io/3scale/searchd:manticore and in operator you can merge this into your object:

spec:
  system:
     searchdSpec:
       image: quay.io/3scale/searchd:manticore

Copy link

@jlledom jlledom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to build the image, I ran:

$ buildah build .

And it works until it gets stuck at 36%:
[ 36%] Building CXX object src/CMakeFiles/lmanticore.dir/sphinxsort.cpp.o

AFAIK I'm not cross-compiling, right? I'm compiling for linux/amd64.

Any idea what happens?

Comment on lines +45 to +51
- name: Sanitize Platforms
id: platforms
run: |
platforms="${{ inputs.platforms == '' && 'linux/amd64' || inputs.platforms }}"
archs="$( sed -e 's#linux/##g' <<< $platforms )"
echo "platforms=$platforms" >> $GITHUB_OUTPUT
echo "archs=$archs" >> $GITHUB_OUTPUT
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need all of this just because clang is broken in s390x. Couldn't we just use gcc?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part just selects platforms to build for. It's not because of s390 and will be equally needed if gcc was used. Presently build is too slow to complete for non-native platforms regardless of compiler. So we can only build for x86 in github. If we find no solution, we may need to use circleci in case we want community image to support all archs.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw the s390x and ppc64le clang builda were fixed upstream

@jlledom
Copy link

jlledom commented Nov 16, 2023

And it works until it gets stuck at 36%: [ 36%] Building CXX object src/CMakeFiles/lmanticore.dir/sphinxsort.cpp.o

Actually, it just finishes eventually.

Copy link

@jlledom jlledom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

SEARCHD_REPO=https://github.com/manticoresoftware/manticoresearch.git \
CC=clang \
CXX=clang++ \
BUILD_PATH=/tmp/manticore_uselessly_long_path_to_prevent_rpm_build_issues \
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a comment here to understand the issue?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just fails with short path, if you have a better wording, happy to update :)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But why does it fail?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some requirement of the RPM build tools. I have no idea and don't really care. Upstream they use directory with a long string of a characters as a suffix.

Containerfile Show resolved Hide resolved
Containerfile Show resolved Hide resolved
@akostadinov akostadinov merged commit 41dcd03 into main Mar 7, 2024
3 checks passed
@akostadinov akostadinov deleted the manticore branch March 7, 2024 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants