Add int/dist documentation
[integration/distribution.git] / docs / add-project-distribution.rst
1 .. _add-proj-dist:
2
3 Add Projects to distribution
4 ============================
5
6 Managed Projects
7 ----------------
8
9 Managed projects must be in the distribution. Follow the next steps below
10 to add your karaf features to distribution:
11
12 #. Download int/dist repository:
13
14 .. code-block:: bash
15
16     git clone ssh://<user>@git.opendaylight.org:29418/integration/distribution
17
18 #. Make sure the projects you depend are already in the pom file:
19
20 .. code-block:: bash
21
22     features/repos/index/pom.xml
23
24 #. Check your project version is correct in the file:
25
26 .. code-block:: bash
27
28     artifacts/upstream/properties/pom.xml
29
30 #. Declare your feature repositories and user-facing features dependencies:
31
32 If your project artifacts pom.xml contains your karaf feature repos and features,
33 just add your project artifacts dependency in:
34
35 .. code-block:: bash
36
37     artifacts/upstream/artifacts/pom.xml
38
39 Otherwise add your project feature repositories and your user-facing features to:
40
41 .. code-block:: bash
42
43     artifacts/upstream/feature-repos/pom.xml
44     artifacts/upstream/single-features/pom.xml
45
46 .. note:: Always add your maven dependencies in alphabethical order.
47           This also applies to the next steps.
48
49 #. Add your feature repositories in:
50
51 .. code-block:: bash
52
53     features/repos/index/pom.xml
54
55 #. Add your user facing features in either:
56
57 .. code-block:: bash
58
59     features/singles/odl-integration-compatible-with-all/pom.xml
60
61 if your feature is compatible.
62
63 .. code-block:: bash
64
65     features/singles/odl-integration-all/pom.xml
66
67 if your feature is not compatible.
68
69 .. note:: You do not need to add a feature if it is already contained
70           in another feature you have already included.
71
72 Remember compatible features are those that can co-exist with other features in ODL because:
73
74 * They do not interfere with any other feature
75 * They are not network intrusive (e.g. configure network devices or push flows out-of-the-box)
76
77 #. Push changes to int/dist and wait for patch verification and review.
78
79 Once the patch is merged your project will be part of the OpenDaylight distribution
80 and join the distribution-check verification.
81
82
83 Self-Managed Projects
84 ---------------------
85
86 Self-Managed projects must only be in the distribution if they want to be packaged in distrbution
87 and released at the same time as the Managed projects do.
88
89 Follow the next steps to add your karaf features to the OpenDaylight distribution:
90
91 #. Download int/dist repository:
92
93 .. code-block:: bash
94
95     git clone ssh://<user>@git.opendaylight.org:29418/integration/distribution
96
97 #. Add your feature reporsitory in:
98
99 .. code-block:: bash
100
101     opendaylight/pom.xml
102
103 .. note:: Always add your maven dependencies in alphabethical order.
104           This also applies to the next steps.
105
106 #. Download releng/builder repository:
107
108 .. code-block:: bash
109
110     git clone ssh://<user>@git.opendaylight.org:29418/releng/builder
111
112 #. Add your feature repo and user-facing features in:
113
114 .. code-block:: bash
115
116     jjb/releng-defaults.yaml
117
118 See this example for the file section:
119
120 .. code-block:: bash
121
122     # Self-Managed projects features
123     sm-repos: >
124         mvn:org.opendaylight.sxp/features-sxp/1.7.0-SNAPSHOT/xml/features
125
126     sm-features: >
127         odl-sxp-controller
128
129 #. Push changes to int/dist and releng/builder and wait for patch verification and review.
130
131 Once the patches are merged your project will be part of the OpenDaylight distribution
132 and join the distibution-sanity verification.
133
134 .. note:: In order to install a Self-Managed feature, you have to first install the feature repository
135           in karaf, the example below shows how to install a repository from the karaf console.
136
137 .. code-block:: bash
138
139    opendayligt>feature:repo-add mvn:org.opendaylight.sxp/features-sxp/1.7.0-SNAPSHOT/xml/features
140
141 .. note:: You can alternatively add the repository in the karaf boot file etc/org.apache.karaf.features.cfg