Merge "Revert "Disable block migration explicitly""
[fuel.git] / ci / README.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. SPDX-License-Identifier: CC-BY-4.0
3 .. (c) 2017 Ericsson AB, Mirantis Inc., Enea Software AB and others.
4
5 Abstract
6 ========
7
8 The ``ci`` directory holds all OPNFV Fuel programatic abstractions for
9 the OPNFV community release and continuous integration pipeline.
10 There are now two OPNFV Fuel autonomous scripts for this, complying to the
11 OPNFV CI pipeline guideline:
12
13 - ``build.sh``
14 - ``deploy.sh``
15
16 Usage
17 =====
18
19 For usage information of the CI/CD deploy script, please run:
20
21 .. code-block:: console
22
23     jenkins@jumpserver:~/fuel/ci$ ./deploy.sh -h
24
25 Details on the CI/CD Deployment Framework
26 =========================================
27
28 Overview and Purpose
29 --------------------
30
31 The CI/CD deployment script relies on a configuration structure, providing:
32
33 - per POD specific configuration (defaults to using Pharos OPNFV project
34   ``PDF``/``IDF`` files for all OPNFV CI PODs).
35   Pharos OPNFV git repository is included as a git submodule at
36   ``mcp/scripts/pharos``.
37   Optionally, a custom configuration structure can be used via the ``-b``
38   deploy argument.
39   The POD specific parameters follow the ``PDF``/``IDF`` formats defined by
40   the Pharos OPNFV project.
41 - deployment scenario configuration, part of fuel repo: ``mcp/config/scenario``.
42   Provides a high level, POD/HW environment independent scenario configuration
43   for a specific deployment. It defines what features shall be deployed - as
44   well as needed overrides of the base installer, POD/HW environment
45   configurations. Objects allowed to override are governed by the OPNFV Fuel
46   project.
47 - base installer configuration, part of fuel repo: ``mcp/config/states``,
48   ``mcp/reclass``.
49   The base installer configuration resembles the least common denominator of all
50   HW/POD environment and deployment scenarios. These configurations are
51   normally carried by the the installer projects in this case (OPNFV Fuel).
52
53 Executing a Deployment
54 ----------------------
55
56 ``deploy.sh`` must be executed locally on the target lab/pod/jumpserver.
57 A configuration structure must be provided - see the section below.
58 It is straight forward to execute a deployment task - as an example:
59
60 .. code-block:: console
61
62     jenkins@jumpserver:~/fuel/ci$ ./deploy.sh -b file:///home/jenkins/config \
63                                               -l lf \
64                                               -p pod2 \
65                                               -s os-nosdn-nofeature-ha
66
67 ``-b`` argument should be expressed in URI style (eg: ``file://...`` or
68 ``http://...``). The resources can thus be local or remote.
69
70 If ``-b`` is not used, the Pharos OPNFV project git submodule local path URI
71 is used for the default configuration structure.
72
73 Configuration Repository Structure
74 ----------------------------------
75
76 The CI deployment engine relies on a configuration directory/file structure
77 pointed to by the ``-b`` option described above.
78 Normally this points to the ``mcp/scripts/pharos`` git repo submodule, but you
79 may point to any local or remote strcture fullfilling the diectory/file
80 structure below.
81 This configuration structure supports optional encryption of certain security
82 sensitive data, mechanism described in the Pharos documentation.
83
84 Following configuration directory and file structure should adheare to:
85
86 .. code-block:: console
87
88     TOP
89     !
90     +---- labs
91            !
92            +---- lab-name-1
93            !        !
94            !        +---- pod1.yaml
95            !        !
96            !        +---- idf-pod1.yaml
97            !        !
98            !        +---- pod2.yaml
99            !        !
100            !        +---- idf-pod2.yaml
101            !
102            +---- lab-name-2
103            !        !