update link to upper-constraints.txt
[integration.git] / docs / onap-integration-ci.rst
1 .. _integration-ci:
2
3 :orphan:
4
5 Integration Continuous Integration Guide
6 ----------------------------------------
7
8 .. important::
9    Continuous Integration is key due to the complexity of the ONAP projects.
10    Several chains have been created:
11
12   - Daily stable chain
13   - Daily master chain
14   - Gating: On demand deployment of a full ONAP solution to validate patchsets
15
16 They are run on different environments (Orange labs, DT labs, Azure Cloud).
17
18 The following document will detail these chains and how you could set up such
19 chains and/or provide test results to the community.
20
21 Integration CI Ecosystem
22 ------------------------
23
24 Overview
25 ~~~~~~~~
26
27 The global ecosystem can de described as follows:
28
29 .. figure:: files/CI/ONAP_CI_10.png
30    :align: center
31
32 Several chains are run in ONAP.
33 The CI chains are triggered from different CI systems (Jenkins or gitlab-ci) (1)
34 on different target environments hosted on community labs (Windriver,
35 Orange, DT, E///) or Azure clouds. Jobs (installation, tests) are executed on
36 these labs (2). At the end, the results are pushed through the OPNFV test API (3)
37 to a test database (4) hosted by Linux Foundation on
38 http://testresults.opnfv.org.
39 Results can be reported in different web pages hosted on LF or on gitlab.com (5).
40
41
42 Daily Chains
43 ~~~~~~~~~~~~
44
45 CI daily chains (Master and last Stable) are run on Orange, DT using gitlab-ci
46 jobs and Ericsson using jenkins jobs.
47
48 Gating
49 ~~~~~~
50
51 OOM gating has been introduced for El Alto. It consists of a deployment followed
52 by a set of tests on patchsets submitted to OOM repository.
53
54 The CI part is managed on gitlab.com and the deployment is executed on ONAP
55 Orange lab and Azure clouds.
56 The goal is to provide a feedback - and ultimately to vote - on code change
57 prior to merge to consolidate the OOM Master branch.
58
59 The developer can evaluate the consequences of his/her patchset on a fresh
60 installation.
61
62 The gating is triggered in 2 scenarios:
63
64  - new patchset in OOM
65  - comment with the magic word **oom_redeploy** is posted in the Gerrit's comment
66    section
67
68 The procedure to submit new feature in CI is done in 3 steps as described in the
69 figure below:
70
71 .. figure:: files/CI/ONAP_CI_0.png
72    :align: center
73
74
75 Visualization of the CI pipelines
76 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
77
78 As the CI chains are triggered from different systems, several web interfaces
79 can be used to visualize them.
80
81 A web site has been created to centralize the links on http://testresults.opnfv.org/onap-integration/index.html
82
83 For Gating and gitlab.com based CI chains, the pipelines consist in pipelines of
84 pipelines managed through the chaining of .gitlab-ci.yml file thanks to an Open
85 Source deployment called chained-ci (https://gitlab.com/Orange-OpenSource/lfn/ci_cd/chained-ci).
86 A visualization tool is available to list all your chains as described in the
87 figure below:
88
89 .. figure:: files/CI/ONAP_CI_1.png
90    :align: center
91    :width: 10in
92
93 If you click on any element of the chain, you will open a new window:
94
95 .. figure:: files/CI/ONAP_CI_2.png
96    :align: center
97
98 In order to provide the logs to the developer an additional web page has been
99 created to summarize the tests and grant access to their associated logs:
100
101 .. figure:: files/CI/ONAP_CI_8.png
102    :align: center
103    :width: 6.5in
104
105 Additionnaly, for the daily chain, another page displays the results as time
106 series, allowing to see the evolution of the tests over time.
107
108 .. figure:: files/CI/ONAP_CI_9.png
109    :align: center
110    :width: 6.5in
111
112
113 Setup Your Own CI Chains
114 ------------------------
115
116 If you want to setup a gitlab.com based CI chain, and want to use chained-ci,
117 you can follow the tutorial on  https://gitlab.com/Orange-OpenSource/lfn/ci_cd/chained-ci-handson
118
119 You should be able to chain your automation projects:
120
121 * Create resources
122 * Deployment of Kubernetes
123 * Test of your Kubernetes (using OPNFV functest-k8s tests)
124 * Deployment of your ONAP (you can use your own automatic installation
125   procedure or https://gitlab.com/Orange-OpenSource/lfn/onap/onap_oom_automatic_installation/)
126 * Test ONAP thanks to the differnet ONAP xtesting dockers covering infrastructure
127   healthcheck, components healthcheck tests, end to end tests, security tests.
128
129 If you want to report your results to the community, do not hesitate to contact
130 the integration team. The Test database is public but the pods must be declared
131 to be allowed to report results from third party labs.