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

add support for RPM package builds #7291

Merged
merged 1 commit into from
Jul 18, 2023

Conversation

tangledbytes
Copy link
Member

@tangledbytes tangledbytes commented May 3, 2023

Explain the changes

This PR:

  1. Adds support for building RPM packages for noobaa-core.

How to use?

Prerequisites:

  1. Docker (If on macos then docker in a qemu based VM).
  2. Run docker run --privileged --rm tonistiigi/binfmt --install all

Build:

  1. Checkout this PR (or master if and when merged).
  2. From the root of the project run, make rpm. This will create an RPM package and will dump it inside ./build/rpm/<name>.
    1. The RPM packages entire noobaa-core as well as nodejs (version from .nvmrc).
    2. noobaa-core S3 Select is enabled. This requires boost shared objects to be present on the machine where noobaa is supposed to be installed. This feature can be disabled if not required (due to additional dependency) by running make rpm BUILD_S3SELECT=0.
    3. In order to build RPM packages for other architectures simply run make rpm CONTAINER_PLATFORM=linux/amd64 or make rpm CONTAINER_PLATFORM=linux/ppc64le.

Post install expectations:

  1. node, npm, npx should be installed.
  2. noobaa-core files should be present in /usr/local/noobaa-core.
  3. If this was an upgrade run then NooBaa's upgrade manager should perform the necessary upgrade scripts (require database to reachable).

NOTE:
NooBaa uses jemalloc as its allocator optionally. jemalloc is not bundled with noobaa-core RPM and needs to be installed manually. If epel-release repository is available and dnf package manager is being used in that case it will try to install jemalloc automatically but can be ignored by passing --setopt=install_weak_deps=False to dnf.

Testing

Follow the above Build and Post install expectations guide.

Previously tested build process on arm64, amd64, ppc64le.
Recent build tested on arm64 and amd64 only.

  • Doc added/updated
  • Tests added

@tangledbytes tangledbytes force-pushed the utkarsh-pro/add/rpm-builds branch 5 times, most recently from 7453939 to 1311061 Compare May 10, 2023 15:22
@tangledbytes tangledbytes marked this pull request as ready for review May 10, 2023 15:29
Copy link
Member

@guymguym guymguym left a comment

Choose a reason for hiding this comment

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

@Utkarsh-pro This is a great PR! Let's get it into master.

  1. Please rebase.
  2. I wonder - is it possible to use the final noobaa image as base instead of noobaa-base image?
  3. Let's get @liranmauda review if we haven't yet.

@madhuthorat
Copy link
Collaborator

@Utkarsh-pro I pulled this PR and tried to run make rpm but towards end it stopped with error as ./build/rpm directory didn't exist. I created this directory and ran make rpm again which then completed successfully. Can you please update the PR to create ./build/rpm directory if it doesn't exist ?

src/deploy/NVA_build/install_nodejs.sh Outdated Show resolved Hide resolved
src/deploy/NVA_build/install_nodejs.sh Outdated Show resolved Hide resolved
src/deploy/NVA_build/install_nodejs.sh Outdated Show resolved Hide resolved
src/deploy/NVA_build/install_nodejs.sh Outdated Show resolved Hide resolved
src/deploy/NVA_build/install_nodejs.sh Outdated Show resolved Hide resolved
src/deploy/RPM_build/packagerpm.sh Outdated Show resolved Hide resolved
src/deploy/RPM_build/packagerpm.sh Outdated Show resolved Hide resolved
src/deploy/RPM_build/packagerpm.sh Outdated Show resolved Hide resolved
src/deploy/RPM_build/packagerpm.sh Outdated Show resolved Hide resolved
src/deploy/RPM_build/packagerpm.sh Outdated Show resolved Hide resolved
@nimrod-becker
Copy link
Contributor

I'm reviving this discussion as we finally have a way forward with our RPM offering.
What are the open items left here?

From a dependencies point of view, node binary should be inside the RPM.
@Utkarsh-pro @liranmauda

@tangledbytes tangledbytes changed the title add support for multiplatform builds and RPM package builds add support for RPM package builds Jul 17, 2023
@tangledbytes
Copy link
Member Author

Tried uploading the built RPMs here for others to try it out and play around with it but GH won't let me upload files > 25M.

Copy link
Contributor

@liranmauda liranmauda left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Utkarsh Srivastava <srivastavautkarsh8097@gmail.com>

transient

Signed-off-by: Utkarsh Srivastava <srivastavautkarsh8097@gmail.com>

add support for multiplatform builds and RPM package builds

Signed-off-by: Utkarsh Srivastava <srivastavautkarsh8097@gmail.com>

revert transient changes

Signed-off-by: Utkarsh Srivastava <srivastavautkarsh8097@gmail.com>

fix node version

Signed-off-by: Utkarsh Srivastava <srivastavautkarsh8097@gmail.com>

make "jemalloc" a weak dependency

Signed-off-by: Utkarsh Srivastava <srivastavautkarsh8097@gmail.com>

add support for dynamic changelog

Signed-off-by: Utkarsh Srivastava <srivastavautkarsh8097@gmail.com>

add support for upgrade script trigger post install

Signed-off-by: Utkarsh Srivastava <srivastavautkarsh8097@gmail.com>

remove redundant build copy

Signed-off-by: Utkarsh Srivastava <srivastavautkarsh8097@gmail.com>
@tangledbytes tangledbytes merged commit 8450738 into noobaa:master Jul 18, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants