-
-
Notifications
You must be signed in to change notification settings - Fork 6
Add experimental support for NiFi 2.0.0 #917
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
4f215da
add support for nifi 2.0.0
maltesander 22dbf94
adapt changelog
maltesander 1ed59d5
improve upload
maltesander c78a4c7
remove test artefact
maltesander 5786c65
attempt to fix precommit
maltesander 69212e3
attempt fix 2
maltesander d95e2bc
adapt comment
maltesander 42de492
fix typo
maltesander b4f1bf6
Merge branch 'main' into nifi-2.0.0
NickLarsenNZ File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -19,69 +19,41 @@ RUN microdnf update && \ | |
| # | ||
| WORKDIR /tmp | ||
| RUN if [[ "${PRODUCT}" == 2.* ]] ; then \ | ||
| curl "https://repo.stackable.tech/repository/packages/maven/apache-maven-${MAVEN_VERSION}-bin.tar.gz" | tar -xzC . && \ | ||
| ln -sf /tmp/apache-maven-${MAVEN_VERSION}/bin/mvn /usr/bin/mvn ; \ | ||
| curl "https://repo.stackable.tech/repository/packages/maven/apache-maven-${MAVEN_VERSION}-bin.tar.gz" | tar -xzC . && \ | ||
| ln -sf /tmp/apache-maven-${MAVEN_VERSION}/bin/mvn /usr/bin/mvn ; \ | ||
| fi | ||
|
|
||
| USER ${STACKABLE_USER_UID} | ||
| WORKDIR /stackable | ||
|
|
||
| COPY --chown=${STACKABLE_USER_UID}:0 nifi/stackable/patches /stackable/patches | ||
|
|
||
| # NOTE: NiFi 1.21.0 source build does not work with the current arm64 git runners due to java heap issues: | ||
| # | ||
| # [ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:3.5.0:single (make shared resource) on project nifi-registry-assembly: | ||
| # Failed to create assembly: Error creating assembly archive bin: Problem creating zip: Execution exception: Java heap space | ||
| # | ||
| # Since this will be deprecated in the release 24.7 and then removed we copy the NiFi 1.21.0 binaries instead | ||
| # of building from source. The if condition can be removed once 1.21.0 is no longer supported and only the | ||
| # else branch is required to build from source. | ||
| # | ||
| RUN if [[ "${PRODUCT}" == "1.21.0" ]] ; then \ | ||
| curl 'https://repo.stackable.tech/repository/m2/tech/stackable/nifi/stackable-bcrypt/1.0-SNAPSHOT/stackable-bcrypt-1.0-20240508.153334-1-jar-with-dependencies.jar' \ | ||
| # This used to be located in /bin/stackable-bcrypt.jar. We create a softlink for /bin/stackable-bcrypt.jar in the main container for backwards compatibility. | ||
| -o /stackable/stackable-bcrypt.jar && \ | ||
| # zip is different than tar and cannot be just piped, therefore the intermediate save and remove step to unzip | ||
| curl https://repo.stackable.tech/repository/packages/nifi/nifi-${PRODUCT}-bin.zip -o /stackable/nifi-${PRODUCT}-bin.zip && \ | ||
| unzip /stackable/nifi-${PRODUCT}-bin.zip && \ | ||
| rm /stackable/nifi-${PRODUCT}-bin.zip && \ | ||
| # Remove generated docs in binary | ||
| rm -rf /stackable/nifi-${PRODUCT}/docs && \ | ||
| # Add Iceberg extensions as they are not included by default and are important enough | ||
| # They need to be build from source, as https://mvnrepository.com/artifact/org.apache.nifi/nifi-iceberg-processors-nar does not ship the org.apache.hadoop.fs.s3a.S3AFileSystem (see https://github.com/apache/nifi/pull/6368#issuecomment-1502175258) | ||
| # See https://repo.stackable.tech/repository/packages/nifi/iceberg-nars/README.md for details on how to build them | ||
| cd /stackable/nifi-${PRODUCT}/lib/ && \ | ||
| curl -O "https://repo.stackable.tech/repository/packages/nifi/iceberg-nars/nifi-iceberg-processors-nar-${PRODUCT}-with-aws.nar" && \ | ||
| curl -O "https://repo.stackable.tech/repository/packages/nifi/iceberg-nars/nifi-iceberg-services-nar-${PRODUCT}-with-aws.nar" && \ | ||
| curl -O "https://repo.stackable.tech/repository/packages/nifi/iceberg-nars/nifi-iceberg-services-api-nar-${PRODUCT}-with-aws.nar" ; \ | ||
| else \ | ||
| curl 'https://repo.stackable.tech/repository/m2/tech/stackable/nifi/stackable-bcrypt/1.0-SNAPSHOT/stackable-bcrypt-1.0-20240508.153334-1-jar-with-dependencies.jar' \ | ||
| # This used to be located in /bin/stackable-bcrypt.jar. We create a softlink for /bin/stackable-bcrypt.jar in the main container for backwards compatibility. | ||
| -o /stackable/stackable-bcrypt.jar && \ | ||
| # Get the source release from nexus | ||
| curl "https://repo.stackable.tech/repository/packages/nifi/nifi-${PRODUCT}-source-release.zip" -o "/stackable/nifi-${PRODUCT}-source-release.zip" && \ | ||
| unzip "nifi-${PRODUCT}-source-release.zip" && \ | ||
| # Clean up downloaded source after unzipping | ||
| rm -rf "nifi-${PRODUCT}-source-release.zip" && \ | ||
| # The NiFi "binary" ends up in a folder named "nifi-${PRODUCT}" which should be copied to /stackable | ||
| # from /stackable/nifi-${PRODUCT}-src/nifi-assembly/target/nifi-${PRODUCT}-bin/nifi-${PRODUCT} (see later steps) | ||
| # Therefore we add the suffix "-src" to be able to copy the binary and remove the unzipped sources afterwards. | ||
| mv nifi-${PRODUCT} nifi-${PRODUCT}-src && \ | ||
| # Apply patches | ||
| chmod +x patches/apply_patches.sh && \ | ||
| patches/apply_patches.sh ${PRODUCT} && \ | ||
| # Build NiFi | ||
| cd /stackable/nifi-${PRODUCT}-src/ && \ | ||
| mvn clean install -Dmaven.javadoc.skip=true -DskipTests --activate-profiles include-iceberg,include-hadoop-aws && \ | ||
| # Copy the binaries to the /stackable folder | ||
| mv /stackable/nifi-${PRODUCT}-src/nifi-assembly/target/nifi-${PRODUCT}-bin/nifi-${PRODUCT} /stackable/nifi-${PRODUCT} && \ | ||
| # Copy the SBOM as well | ||
| mv /stackable/nifi-${PRODUCT}-src/nifi-assembly/target/bom.json /stackable/nifi-${PRODUCT}/nifi-${PRODUCT}.cdx.json && \ | ||
| # Remove the unzipped sources | ||
| rm -rf /stackable/nifi-${PRODUCT}-src && \ | ||
| # Remove generated docs in binary | ||
| rm -rf /stackable/nifi-${PRODUCT}/docs ; \ | ||
| fi | ||
| RUN curl 'https://repo.stackable.tech/repository/m2/tech/stackable/nifi/stackable-bcrypt/1.0-SNAPSHOT/stackable-bcrypt-1.0-20240508.153334-1-jar-with-dependencies.jar' \ | ||
| # This used to be located in /bin/stackable-bcrypt.jar. We create a softlink for /bin/stackable-bcrypt.jar in the main container for backwards compatibility. | ||
| -o /stackable/stackable-bcrypt.jar && \ | ||
| # Get the source release from nexus | ||
| curl "https://repo.stackable.tech/repository/packages/nifi/nifi-${PRODUCT}-source-release.zip" -o "/stackable/nifi-${PRODUCT}-source-release.zip" && \ | ||
| unzip "nifi-${PRODUCT}-source-release.zip" && \ | ||
| # Clean up downloaded source after unzipping | ||
| rm -rf "nifi-${PRODUCT}-source-release.zip" && \ | ||
| # The NiFi "binary" ends up in a folder named "nifi-${PRODUCT}" which should be copied to /stackable | ||
| # from /stackable/nifi-${PRODUCT}-src/nifi-assembly/target/nifi-${PRODUCT}-bin/nifi-${PRODUCT} (see later steps) | ||
| # Therefore we add the suffix "-src" to be able to copy the binary and remove the unzipped sources afterwards. | ||
| mv nifi-${PRODUCT} nifi-${PRODUCT}-src && \ | ||
| # Apply patches | ||
| chmod +x patches/apply_patches.sh && \ | ||
| patches/apply_patches.sh ${PRODUCT} && \ | ||
| # Build NiFi | ||
| cd /stackable/nifi-${PRODUCT}-src/ && \ | ||
| mvn clean install -Dmaven.javadoc.skip=true -DskipTests --activate-profiles include-iceberg,include-hadoop-aws && \ | ||
| # Copy the binaries to the /stackable folder | ||
| mv /stackable/nifi-${PRODUCT}-src/nifi-assembly/target/nifi-${PRODUCT}-bin/nifi-${PRODUCT} /stackable/nifi-${PRODUCT} && \ | ||
| # Copy the SBOM as well | ||
| mv /stackable/nifi-${PRODUCT}-src/nifi-assembly/target/bom.json /stackable/nifi-${PRODUCT}/nifi-${PRODUCT}.cdx.json && \ | ||
| # Remove the unzipped sources | ||
| rm -rf /stackable/nifi-${PRODUCT}-src && \ | ||
| # Remove generated docs in binary | ||
| rm -rf /stackable/nifi-${PRODUCT}/docs | ||
|
|
||
| FROM stackable/image/java-base AS final | ||
|
|
||
|
|
@@ -90,12 +62,12 @@ ARG RELEASE | |
| ARG STACKABLE_USER_UID | ||
|
|
||
| LABEL name="Apache NiFi" \ | ||
| maintainer="[email protected]" \ | ||
| vendor="Stackable GmbH" \ | ||
| version="${PRODUCT}" \ | ||
| release="${RELEASE}" \ | ||
| summary="The Stackable image for Apache NiFi." \ | ||
| description="This image is deployed by the Stackable Operator for Apache NiFi." | ||
| maintainer="[email protected]" \ | ||
| vendor="Stackable GmbH" \ | ||
| version="${PRODUCT}" \ | ||
| release="${RELEASE}" \ | ||
| summary="The Stackable image for Apache NiFi." \ | ||
| description="This image is deployed by the Stackable Operator for Apache NiFi." | ||
|
|
||
| COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-builder /stackable/nifi-${PRODUCT} /stackable/nifi-${PRODUCT}/ | ||
| COPY --chown=${STACKABLE_USER_UID}:0 --from=nifi-builder /stackable/stackable-bcrypt.jar /stackable/stackable-bcrypt.jar | ||
|
|
||
2 changes: 1 addition & 1 deletion
2
...4/001-NIFI-no-zip-assembly-2.0.0-M4.patch → ....0.0/001-NIFI-no-zip-assembly-2.0.0.patch
This file contains hidden or 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 hidden or 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
4 changes: 2 additions & 2 deletions
4
...2.0.0-M4/003-patch-cyclonedx-plugin.patch → ...es/2.0.0/003-patch-cyclonedx-plugin.patch
This file contains hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.