82ab844135ca662e8626659e99940b384ffe7add
[honeycomb.git] / release-notes / src / main / asciidoc / install_guide / install_manual_build.adoc
1 = Manual build
2
3 link:release_notes.html[< Home]
4
5 == Prerequisites
6 Building Honeycomb project requires:
7
8 * Java 8
9 * Maven (version 3.2.5 and above should be fine)
10 * Properly set maven settings(displayed below) to access nexus.fd.io
11
12 == Obtain the honeycomb source code
13 TIP: Make sure you have https://wiki.fd.io/view/DEV/Setting_up_Gerrit[registered your ssh key with gerrit].
14
15 [subs="+attributes"]
16  git clone ssh://[username]@gerrit.fd.io:29418/honeycomb
17  cd honeycomb
18  git checkout {project-branch}
19
20 == Building the code
21 Make sure all the prerequisites are installed.
22
23 NOTE: To make sure fresh Honeycomb build is compatible with VPP, building VPP is also required to make sure the same JVpp version is used preventing out-of-sync exceptions. In case only Honeycomb needs to be built, skip Building VPP section.
24
25 === Building VPP
26 Clone VPP according to: https://gerrit.fd.io/r/#/admin/projects/vpp and checkout {project-branch} branch
27
28 Dive into VPP's build-root folder:
29
30  cd vpp/build-root/
31
32 Build VPP:
33
34  make distclean && ./bootstrap.sh && make V=0 PLATFORM=vpp TAG=vpp install-deb
35
36 Install VPP:
37
38  sudo dpkg -i *.deb
39
40 Start VPP:
41
42  sudo start vpp
43
44 Install JVpp into local maven repository to make Honeycomb pick up the same JVpp version
45
46 [subs="+attributes"]
47  cd build-vpp-native/vpp-api/java/
48  mvn install:install-file -Dfile=jvpp-registry-{project-vpp-version}.jar -DgroupId=io.fd.vpp     -DartifactId=jvpp-registry -Dversion={project-vpp-snapshot-version} -Dpackaging=jar
49  mvn install:install-file -Dfile=jvpp-core-{project-vpp-version}.jar -DgroupId=io.fd.vpp     -DartifactId=jvpp-core -Dversion={project-vpp-snapshot-version}-Dpackaging=jar
50  cd ../../plugins/snat-plugin/
51  mvn install:install-file -Dfile=jvpp-snat-{project-snat-version}.jar -DgroupId=io.fd.vpp     -DartifactId=jvpp-snat -Dversion={project-snat-snapshot-version} -Dpackaging=jar
52
53 Now current Vpp is up and running and prepared for integration with HC.
54
55 === Building Honeycomb
56 Now Honeycomb can be built and it will use latest JVpp produced during VPP build.
57
58 ==== Setup settings.xml
59 Put the following in your ~/.m2/settings.xml:
60
61 [source,xml]
62 ----
63 <?xml version="1.0" encoding="UTF-8"?>
64 <!-- vi: set et smarttab sw=2 tabstop=2: -->
65 <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
66   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
67   xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
68
69   <profiles>
70     <profile>
71       <id>fd.io-release</id>
72       <repositories>
73         <repository>
74           <id>fd.io-mirror</id>
75           <name>fd.io-mirror</name>
76           <url>https://nexus.fd.io/content/groups/public/</url>
77           <releases>
78             <enabled>true</enabled>
79             <updatePolicy>never</updatePolicy>
80           </releases>
81           <snapshots>
82             <enabled>false</enabled>
83           </snapshots>
84         </repository>
85       </repositories>
86       <pluginRepositories>
87         <pluginRepository>
88           <id>fd.io-mirror</id>
89           <name>fd.io-mirror</name>
90           <url>https://nexus.fd.io/content/repositories/public/</url>
91           <releases>
92             <enabled>true</enabled>
93             <updatePolicy>never</updatePolicy>
94           </releases>
95           <snapshots>
96             <enabled>false</enabled>
97           </snapshots>
98         </pluginRepository>
99       </pluginRepositories>
100     </profile>
101
102     <profile>
103       <id>fd.io-snapshots</id>
104       <repositories>
105         <repository>
106           <id>fd.io-snapshot</id>
107           <name>fd.io-snapshot</name>
108           <url>https://nexus.fd.io/content/repositories/fd.io.snapshot/</url>
109           <releases>
110             <enabled>false</enabled>
111           </releases>
112           <snapshots>
113             <enabled>true</enabled>
114           </snapshots>
115         </repository>
116       </repositories>
117       <pluginRepositories>
118         <pluginRepository>
119           <id>fd.io-snapshot</id>
120           <name>fd.io-snapshot</name>
121           <url>https://nexus.fd.io/content/repositories/fd.io.snapshot/</url>
122           <releases>
123             <enabled>false</enabled>
124           </releases>
125           <snapshots>
126             <enabled>true</enabled>
127           </snapshots>
128         </pluginRepository>
129       </pluginRepositories>
130     </profile>
131     <profile>
132       <id>opendaylight-snapshots</id>
133       <repositories>
134         <repository>
135           <id>opendaylight-snapshot</id>
136           <name>opendaylight-snapshot</name>
137           <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
138           <releases>
139             <enabled>false</enabled>
140           </releases>
141           <snapshots>
142             <enabled>true</enabled>
143           </snapshots>
144         </repository>
145       </repositories>
146       <pluginRepositories>
147         <pluginRepository>
148           <id>opendaylight-shapshot</id>
149           <name>opendaylight-snapshot</name>
150           <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
151           <releases>
152             <enabled>false</enabled>
153           </releases>
154           <snapshots>
155             <enabled>true</enabled>
156           </snapshots>
157         </pluginRepository>
158       </pluginRepositories>
159     </profile>
160   </profiles>
161
162   <activeProfiles>
163     <activeProfile>fd.io-release</activeProfile>
164     <activeProfile>fd.io-snapshots</activeProfile>
165     <activeProfile>opendaylight-snapshots</activeProfile>
166   </activeProfiles>
167 </settings>
168 ----
169
170 ==== Building Honeycomb
171 cd honeycomb/
172
173  mvn clean install
174
175 [NOTE]
176 =====
177 To perform quick build(no tests, no checks, no docs) run:
178
179  mvn clean install -DskipTests -Dcheckstyle.skip -Dmaven.javadoc.skip=true -Djacoco.skip
180 =====
181
182 Now Honeycomb can be run with:
183
184 [subs="+attributes"]
185  sudo sh vpp-integration/minimal-distribution/target/vpp-integration-distribution-{project-version}-hc/vpp-integration-distribution-{project-version}/honeycomb
186
187 === Building packages
188 After the code has been built, you can build an RPM or DEB package for honeycomb.
189
190 ==== RPM
191 Export build number variable:
192
193  export BUILD_NUMBER=33
194
195 Run package building script from:
196
197  packaging/rpm/rpmbuild.sh
198
199 ==== DEB
200 Export build number variable:
201
202  export BUILD_NUMBER=33
203
204 Run package building script from:
205
206  packaging/deb/debuild.sh