Build and publish 0.8 VM image to google storage
[nfvbench.git] / docs / development / building / build.rst
1
2 .. This work is licensed under a Creative Commons Attribution 4.0 International
3 .. License.
4 .. http://creativecommons.org/licenses/by/4.0
5 .. (c) Cisco Systems, Inc
6
7 Building containers and VM images
8 =================================
9
10 NFVbench is delivered as Docker container which is built using the Dockerfile under the docker directory.
11 This container includes the following parts:
12
13 - TRex traffic generator
14 - NFVbench orchestration
15 - NFVbench test VM (qcow2)
16
17 Versioning
18 ----------
19 These 3 parts are versioned independently and the Dockerfile will determine the combination of versions that
20 are packaged in the container for the version associated to the Dockerfile.
21
22 The NFVbench version is controlled by the git tag that conforms to the semver version (e.g. "3.3.0").
23 This tag controls the version of the Dockerfile used for building the container.
24
25 The TRex version is controlled by the TREX_VER variable in Dockerfile (e.g. ENV TREX_VER "v2.56").
26 TRex is installed in container from https://trex-tgn.cisco.com/trex/release/
27
28 The Test VM version is controlled by the VM_IMAGE_VER variable in Dockerfile (e.g. ENV VM_IMAGE_VER "0.8").
29 The VM is extracted from google storage (http://artifacts.opnfv.org)
30
31 Updating the VM image
32 ---------------------
33
34 When the VM image is changed, its version must be increased in order to distinguish from previous image versions.
35 The version strings to change are located in 2 files:
36
37 - docker/Dockerfile
38 - nfvbench/nfvbenchvm/dib/build-image.sh
39
40 Building and uploading the VM image
41 -----------------------------------
42 The VM image is built and uploaded to Google storage from the CI/CD whenever the
43 commit text of a gerrit review contains the word "buildvm".
44
45 For details on how this is done, refer to ./jjb/nfvbench/nfvbench.yaml in the opnfv releng repository.
46
47 Building a new NFVbench container image
48 ---------------------------------------
49 A new container image can be built and published to Dockerhub by CI/CD by applying a new semver tag to the
50 nfvbench repository.
51
52
53 Workflow summary
54 ----------------
55
56 NFVbench code has changed:
57
58 - commit with gerrit
59 - apply a new semver tag to trigger the container image build/publication
60
61 VM code has changed:
62
63 - update VM version in the 2 locations
64 - commit VM changes with gerrit and add "buildvm" in your commit message to trigger VM build and publish to google storage
65 - apply a new semver tag to trigger the container image build/publication
66
67 To increase the TRex version:
68
69 - change the Trex version in Dockerfile
70 - commit with gerrit
71 - apply a new semver tag to trigger the container image build/publication