= Manual build link:release_notes.html[< Home] == Prerequisites Building Hc2vpp project requires: * Java 8 * Maven (version 3.2.5 and above should be fine) * Properly set maven settings(displayed below) to access nexus.fd.io == Obtain the hc2vpp source code TIP: Make sure you have https://wiki.fd.io/view/DEV/Setting_up_Gerrit[registered your ssh key with gerrit]. [subs="+attributes"] git clone ssh://[username]@gerrit.fd.io:29418/hc2vpp cd hc2vpp git checkout {project-branch} == Building the code Make sure all the prerequisites are installed. NOTE: To make sure fresh hc2vpp build is compatible with VPP, it is required to make sure the same JVpp version is used preventing out-of-sync exceptions. Compatible JVPP artifacts can be obtained by installing vpp-api-java package or building VPP. In case only hc2vpp needs to be built, skip Building VPP section. === Building VPP Clone VPP according to: https://gerrit.fd.io/r/#/admin/projects/vpp and checkout {project-branch} branch Dive into VPP's build-root folder: cd vpp/build-root/ Build VPP: make distclean && ./bootstrap.sh && make V=0 PLATFORM=vpp TAG=vpp install-deb Install VPP: sudo dpkg -i *.deb Start VPP: sudo start vpp Now current Vpp is up and running and prepared for integration with HC. === Building hc2vpp ==== Setup settings.xml Put the following in your ~/.m2/settings.xml: [source,xml] ---- fd.io-release fd.io-mirror fd.io-mirror https://nexus.fd.io/content/groups/public/ true never false fd.io-mirror fd.io-mirror https://nexus.fd.io/content/repositories/public/ true never false fd.io-snapshots fd.io-snapshot fd.io-snapshot https://nexus.fd.io/content/repositories/fd.io.snapshot/ false true fd.io-snapshot fd.io-snapshot https://nexus.fd.io/content/repositories/fd.io.snapshot/ false true opendaylight-snapshots opendaylight-snapshot opendaylight-snapshot https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/ false true opendaylight-shapshot opendaylight-snapshot https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/ false true fd.io-release fd.io-snapshots opendaylight-snapshots ---- ==== Installing JVpp jars By default hc2vpp build downloads latest JVpp jars from nexus.fd.io. They might not be compatible with installed VPP (e.g. in case of non-backward compatible VPP API changes). In order to prevent API mismatch it is required to use JVpp version corresponding to the VPP installed. Use [subs="+attributes"] ./hc2vpp/jvpp/install_from_vpp_build_dir.sh to install JVpp jars produced during VPP build. If vpp-api-java package is installed, use: [subs="+attributes"] ./hc2vpp/jvpp/install_from_package.sh Now hc2vpp can be built and it will use compatible JVpp artifacts. ==== Building hc2vpp cd hc2vpp/ mvn clean install [NOTE] ===== To perform quick build(no tests, no checks, no docs) run: mvn clean install -DskipTests -Dcheckstyle.skip -Dmaven.javadoc.skip=true -Djacoco.skip ===== Now hc2vpp can be run with: [subs="+attributes"] sudo sh vpp-integration/minimal-distribution/target/vpp-integration-distribution-{project-version}-hc/vpp-integration-distribution-{project-version}/honeycomb === Building packages After the code has been built, you can build an RPM or DEB package for hc2vpp. ==== RPM Export build number variable, e.g.: export BUILD_NUMBER=33 Run package building script from: packaging/rpm/rpmbuild.sh ==== DEB Export build number variable, e.g.: export BUILD_NUMBER=33 Run package building script from: packaging/deb/xenial/debuild.sh or packaging/deb/trusty/debuild.sh