You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Note:  This document is a work in progress and heavily derived from the NiFi Release guide generated by the community.  The idea is that with processes fully established for each project we can consolidate at a later point.

Apache MiNiFi Release Guidelines

The purpose of this document is to capture and describe the steps involved in producing an official release of Apache NiFi MiNiFI for both Java and C++ versions. It is written specifically to someone acting in the capacity of a Release Manager (RM).

The objective

Our aim is to produce an official Apache NiFi MiNiFi C++ release from an existing release branch.

Background Material

Terms

  • Release Manager (RM) - the Apache NiFi PMC Member or Committer acting as Release Manager for a particular release of Apache NiFi MiNiFi C++.
  • Release Candidate (RC) - an iteration of the release process that is proposed for a vote by the Apache NiFi Community.
  • Community - the community of people with an interest in the improvement and advancement of Apache NiFi, and its associated projects, including end-users, developers, evangelists, and advisers.
  • PMC - within the Apache NiFi community, members of the PMC oversee the ongoing project.
  • Committer - with the Apache NiFi community, committers have gain the privilege to commit changes to the Apache NiFi codebase.

High level flow of a release

  • The Apache NiFi community is constantly contributing to JIRA tickets assigned to the next release.
  • At some point the number of tickets open/remaining for the next release begins to approach zero.
  • A member of the community suggests a release and initiates a discussion.
  • Someone volunteers to perform the Release Manager (RM) role for the release. (This can be a committer but Apache guides indicate a preference for a PMC member.)
  • The RM validate the proposed release and stages the source code, Maven artifacts, and distributable files for a Release Candidate (RC).
  • The RM initiates a vote on the RC by the NiFi community.
  • If the NiFi community rejects the RC, the issues noted are resolved and another RC is generated.
  • If the NiFi community accepts the RC, the staged source code, artifacts, and distribution files are moved to the appropriately locations for public release.

Variable reference substitutions

Throughout this guide, references must be made to names and values that will vary from release to release. For clarity those variable values have been written like Bash variable references. When a term like "/tmp/src/nifi-${MINIFI_VERSION}" is seen in an instruction or email template it should be replaced with "/tmp/src/nifi-0.7.0" when working the release of "Apache NiFi 0.7.0".
  • Subtitutions used in tasks and email templates

    Reference            Example value       Description
    =========            ==============      ===========
    ${BRANCH}            0.7.0-SNAPSHOT      the development branch on which the release is based.
    ${MINIFI_VERSION}      0.7.0               the version currently in development on the release branch.
    ${NEXT_VERSION}      0.7.1-SNAPSHOT      the future version for development on the release branch.
    ${JIRA_TICKET}       MINIFI-2112           the JIRA ticket created by the release manager for the release tasks.
    ${RC}                2                   the Release Candidate index start at 1 for the first release candidate.
    ${RC_TAG_COMMIT_ID}                      the commit ID of the RC tag created during the Maven release process.
    ${RM_USERID}         johndoe             the Apache account ID of Release Manager.
    ${RELEASE_TAG}       rel/minifi-0.7.0      the Git repository tag for the source code as released.
    ${VOTE_THREAD_URL}   [0.7.0 vote thread][070-rc2-vote]   the URL for the Apache Pony Mail archive of the release vote thread.

    To be practical but avoid confusion with future release details, these example values reflect the previous release NiFi 0.7.0 RC2 release details.

What to validate and how to validate a release

The following is a list of the sorts of things that will be validated and are the basics to check when evaluating a release for a vote.
  • Are the LICENSE and NOTICE files present in the source root and complete?
    • Specifically look in the nifi-${MINIFI_VERSION}-sources-release.zip artifact and ensure these files are present at the root of the archive.
  • Evaluate the sources and dependencies.
    • Does the overall LICENSE and NOTICE appear correct?
    • Do all licenses fit within the ASF approved licenses?
  • Is there a README available that explains how to build the application and to execute it?
    • Look in the *-sources.zip artifact root for the readme.
  • Are the signatures and hashes correct for the source release?
    • Validate the hashes of the sources artifact do in fact match
    • Validate the signature of the source artifact.
    • Need a quick reminder on how to verify a signature?
  • Do all sources have necessary headers?
    • Unzip the sources file into a directory and execute mvn install -Pcontrib-check
  • Are there no unexpected binary files in the release?
    • The only thing we'd expect would be potentially test resources files.
  • Does the app (if appropriate) execute and function as expected?
This list is reflected in the Release Vote and Release Helper Guide emails that are sent once the release has been staged in the Git and Nexus repositories.

The Release Process

The release process includes steps to be performed by the Release Manager as well as the Apache NiFi developer community.

Step 1. Configure the build environment (RM and community)

  1. Follow the steps outlined in the https://github.com/apache/nifi-minifi-cpp#getting-started to prepare the development system.
  2. Confirm that the local Git workspace is configured with an origin remote pointing to the RM's personal fork of the NiFi source and an "ASF" remote pointing to the Apache Git Repository for NiFi.
    $ git remote -v
    asf    https://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp.git (fetch)
    asf    https://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp.git (push)
    origin    https://github.com/${RM_USERID}/nifi-minifi-cpp.git (fetch)
    origin    https://github.com/${RM_USERID}/nifi-minifi-cpp.git (push)
    Additional remotes will not cause a problem if these two are correct. Other configurations are perfectly acceptable but the appropriate adjustments to the steps in this guide must be made by the release manager.
  3. Confirm that source code can be checked out for the branch being released.
    git checkout ${BRANCH}
  4. Confirm that the entire application builds correctly in the build environment.

Step 2. Prepare and stage the release (RM)

  1. Create a JIRA ticket for the release tasks for version ${MINIFI_VERSION}.
    _The resulting JIRA ticket number is referred to as ${JIRA_TICKET} in this guide.
  2. Create the next version in JIRA, if it doesn't already exist, so work can continue towards that release.  Versions can be managed at https://issues.apache.org/jira/projects/MINIFICPP?selectedItem=com.atlassian.jira.jira-projects-plugin%3Arelease-page
  3. Create meaningful release notes for this version if not already created. Enter them here https://cwiki.apache.org/confluence/display/MINIFI/Release+Notes#ReleaseNotes-MiNiFi(C++) on the MiNiFi wiki.
    1. May be useful to add links to processor documentation so it is easier to diff releases. 
  4. Create a new branch off 'master' named after the JIRA ticket.
    $ git checkout -b MINIFICPP-${JIRA_TICKET}-RC${RC} ${BRANCH}
  5. Verify that you have the needed dependencies to build and run MiNiFi
  6. Ensure the the full application builds, all tests work, and source passes linting by executing the following:
    TODO/DISCUSS:  Since we don't have a dependency management framework we will include only base extensions.
    mkdir build && cd build && cmake -DPORTABLE=ON .. && make package && make package_source && make test && make linter && make docker

  7. Startup and test the application with from the build folder:
    tar xf nifi-minifi-cpp-${MINIFI_VERSION}-bin.tar.gz && ./nifi-minifi-cpp-${MINIFI_VERSION}/bin/minifi.sh start

  8. Evaluate and ensure the appropriate license headers are present on all source files.

  9. Ensure LICENSE and NOTICE files are complete and accurate. (Developers should always be keeping these up to date as they go along adding source and modifying dependencies to keep this burden manageable.)
  1. The validated artifacts all look good then push the branch to origin release branch to the ASF repository.

    $ git push asf MINIFI-CPP-${JIRA_TICKET}-RC${RC}

Generate convenience binaries
TODO/DISCUSS:  Since we don't have a dependency management framework we will include only base extensions.
    OS X
    Linux - RHEL based
    Linux - Debian based
  • Create the signature and hashes for the source release and convenience binary files.
for artifact in $(find . -type f -name '*.tar.gz'); 
do
    echo $artifact;
    echo Generating ASCII armored GPG signature”;
    gpg -a -b --digest-algo=SHA512 ${artifact};
    echo Generating md5sum hash”;
    md5sum ${artifact} | cut -d" " -f1 > ${artifact}.md5
    echo Generating sha1sum hash”;
    gsha1sum ${artifact} | cut -d" " -f1 > ${artifact}.sha1
    echo Generating sha25sum hash”;
    gsha256sum ${artifact} | cut -d" " -f1 > ${artifact}.sha256
  done
    1. ASCII armored GPG signatures (--digest-algo=SHA512 select the SHA512 hash algorithm). Configure GPG to always prefer stronger hashes.
      $ gpg -a -b --digest-algo=SHA512 nifi-${MINIFI_VERSION}-source-release.zip  # produces nifi-${MINIFI_VERSION}-source-release.zip.asc
      $ gpg -a -b --digest-algo=SHA512 nifi-${MINIFI_VERSION}-bin.tar.gz          # produces nifi-${MINIFI_VERSION}-bin.tar.gz.asc
      $ gpg -a -b --digest-algo=SHA512 nifi-${MINIFI_VERSION}-bin.zip             # produces nifi-${MINIFI_VERSION}-bin.zip.asc
    2. Generate md5 hash summaries.
      $ md5sum nifi-${MINIFI_VERSION}-source-release.zip | cut -d" " -f1 > nifi-${MINIFI_VERSION}-source-release.zip.md5
      $ md5sum nifi-${MINIFI_VERSION}-bin.tar.gz | cut -d" " -f1 > nifi-${MINIFI_VERSION}-bin.tar.gz.md5
      $ md5sum nifi-${MINIFI_VERSION}-bin.zip | cut -d" " -f1 > nifi-${MINIFI_VERSION}-bin.zip.md5
    3. Generate SHA1 hash summaries.
      $ sha1sum nifi-${MINIFI_VERSION}-source-release.zip | cut -d" " -f1 >  nifi-${RELEASAE}-source-release.zip.sha1
      $ sha1sum nifi-${MINIFI_VERSION}-bin.tar.gz | cut -d" " -f1 >  nifi-${RELEASAE}-bin.tar.gz.sha1
      $ sha1sum nifi-${MINIFI_VERSION}-bin.zip | cut -d" " -f1 >  nifi-${RELEASAE}-bin.zip.sha1
    4. Generate SHA256 hash summaries.
      $ shasum -a 256 nifi-${MINIFI_VERSION}-source-release.zip | cut -d" " -f1 >  nifi-${MINIFI_VERSION}-source-release.zip.sha256
      $ shasum -a 256 nifi-${MINIFI_VERSION}-bin.tar.gz | cut -d" " -f1 >  nifi-${MINIFI_VERSION}-bin.tar.gz.sha256
      $ shasum -a 256 nifi-${MINIFI_VERSION}-bin.zip | cut -d" " -f1 >  nifi-${MINIFI_VERSION}-bin.zip.sha256
  1. For reviewing of the release candidate, commit the source release and convenience binaries files along with their hashes and signatures to https://dist.apache.org/repos/dist/dev/nifi/nifi-minifi-cpp/${VERSION}

Step 4. Error recovery (RM)

If anything isn't correct about the staged artifacts you can drop the staged repo from repository.apache.org and delete the local tag in git. If you also delete the local branch and clear your local maven repository under org/apache/nifi then it is as if the release never happened. Before doing that though try to figure out what went wrong so the Release Guide can be updated or corrected if necessary.
So, as has been described here you can test the release process until you get it right. The mvn versions:set and mvn versions:commit commands can come in handy to help do this so you can set versions to something clearly release test related.

Step 5. Release Vote (RM and community)

After the release source and artifacts are staged in the repositories it's time for the RM to send a release vote to the NiFi community.
Once the release vote is called for, members of the NiFi developer community have 72 hours to evaluate the RC and cast their vote by replying to the "[VOTE] Release ..." email sent by the RM.
NOTE: The release vote is majority rule vote that must include at least 3 binding +1 votes Apache NiFi PMC members and more positive than negative binding votes.
  1. RM sends a vote request email to the NiFi Developers Mailing List.

  2. RM sends the following helper email to the NiFi Developers Mailing List.

  3. Developers in the community review the release candiate and reply to the vote email with their vote.

  4. After 72 hours if

    • at least 3 binding (PMC members) cast +1 votes, and
    • the positive binding votes out number any negative binding votes
  5. the vote passes and the release candidate is officially released. If the vote does not pass, corrections are made on the release branch and a new release candidate is put forward for a new vote.
  6. RM sends vote result email.

    • TO: dev@nifi.apache.org
    • FROM: ${RM_USERID}@apache.org
    • SUBJECT: [RESULT][VOTE] Release Apache NiFi MiNiFi C++ ${NIFI_VERSION}

      Apache NiFi Community,

      I am pleased to announce that the ${NIFI_VERSION} release of Apache NiFi MiNiFi C++ passes with
        X +1 (binding) votes
        Y -1 (binding) votes
        0 0 votes
        0 -1 votes

      Thanks to all who helped make this release possible.

      Here is the PMC vote thread: ${VOTE_THREAD_URL}

Step 6. Finalize the Release

After the vote is complete and the release is approved, these steps complete the release process.
  1. Move convenience binaries and related artifacts from dist/dev to dist/release:
    $ svn move -m MINIFI-${JIRA_TICKET} https://dist.apache.org/repos/dist/dev/nifi/nifi-minifi-cpp/${MINIFI_VERSION} https://dist.apache.org/repos/dist/release/nifi/nifi-minifi-cpp/${MINIFI_VERSION}
  1. Update the MiNiFi website to point to the new download(s). Remove older release artifacts from download page (leave the current release and the previous one). For the release just previous to this new one change the links to point to the archive location. See current page as an example of the needed URL changes. In addition to updating the download page as described delete artifacts other than the current/new release from the dist/nifi SVN storage. They are already in the archive location so no need to do anything else.

  2. Update the NiFi Web Page to indicate NEWS of the release as appropriate

  3. Create a proper signed tag of the released codebase based on the RC Tag craeted during the Maven release process.

    $ git tag -s rel/minifi-cpp-${MINIFI_VERSION} -m "${JIRA_TICKET} signed release tag for approved release of NiFi MiNiFi C++ ${MINIFI_VERSION}" ${RC_TAG_COMMIT_ID}
    For instructions on setting up to sign your tag see here.

  4. Push the release tag to the official ASF repository.

    $ git push asf rel/minifi-cpp-${MINIFI_VERSION} rel/minifi-cpp-${MINIFI_VERSION}
  5. Update the release notes with the final date of the release.

  6. After the release has been complete for 24 hours send the release announcement.

Release Supporting and Helper Resources

Sample NiFi and MiNiFi Configuration to transmit data from MiNiFi to NiFi via Site to Site

The following archive contains a flow.xml.gz to configure a flow with a known input port UUID to communicate with a configuration for MiNiFI C++ with the included flow.yml. 

minifi-sample-config.tgz

Hashes

  • md5sum: 871b465492eb6cb0d9072c50b08fe4b1

  • sha1sum: 5b3797924eee1a59421ff216c542cb28c3564bfe

  • sha256sum: 9323165a2086053f8d1ad5478e2b7cc97f01fbc38ba133afe77badba1a446833

Signature

Signed with the key at http://people.apache.org/keys/committer/aldrin.asc

minifi-sample-config.tgz.gpg

 

  • No labels