summaryrefslogtreecommitdiffstats
path: root/release-notes/src/main/asciidoc/install_guide/install_manual_build.adoc
blob: 012a8f6e9a250961ac371344945b28fe1099647f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
= 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]
----
<?xml version="1.0" encoding="UTF-8"?>
<!-- vi: set et smarttab sw=2 tabstop=2: -->
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

  <profiles>
    <profile>
      <id>fd.io-release</id>
      <repositories>
        <repository>
          <id>fd.io-mirror</id>
          <name>fd.io-mirror</name>
          <url>https://nexus.fd.io/content/groups/public/</url>
          <releases>
            <enabled>true</enabled>
            <updatePolicy>never</updatePolicy>
          </releases>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <id>fd.io-mirror</id>
          <name>fd.io-mirror</name>
          <url>https://nexus.fd.io/content/repositories/public/</url>
          <releases>
            <enabled>true</enabled>
            <updatePolicy>never</updatePolicy>
          </releases>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
        </pluginRepository>
      </pluginRepositories>
    </profile>

    <profile>
      <id>fd.io-snapshots</id>
      <repositories>
        <repository>
          <id>fd.io-snapshot</id>
          <name>fd.io-snapshot</name>
          <url>https://nexus.fd.io/content/repositories/fd.io.snapshot/</url>
          <releases>
            <enabled>false</enabled>
          </releases>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <id>fd.io-snapshot</id>
          <name>fd.io-snapshot</name>
          <url>https://nexus.fd.io/content/repositories/fd.io.snapshot/</url>
          <releases>
            <enabled>false</enabled>
          </releases>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
        </pluginRepository>
      </pluginRepositories>
    </profile>
    <profile>
      <id>opendaylight-snapshots</id>
      <repositories>
        <repository>
          <id>opendaylight-snapshot</id>
          <name>opendaylight-snapshot</name>
          <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
          <releases>
            <enabled>false</enabled>
          </releases>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <id>opendaylight-shapshot</id>
          <name>opendaylight-snapshot</name>
          <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
          <releases>
            <enabled>false</enabled>
          </releases>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
        </pluginRepository>
      </pluginRepositories>
    </profile>
  </profiles>

  <activeProfiles>
    <activeProfile>fd.io-release</activeProfile>
    <activeProfile>fd.io-snapshots</activeProfile>
    <activeProfile>opendaylight-snapshots</activeProfile>
  </activeProfiles>
</settings>
----


==== 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