doc/researchAnsible: added part for job seeding

Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
This commit is contained in:
Marc Mattmüller 2023-07-07 16:21:20 +02:00
parent 9725d7a7ac
commit c0aa819f5f
1 changed files with 59 additions and 1 deletions

View File

@ -1133,6 +1133,64 @@ Find below the output of AWX for the playbooks:
Finished: FAILURE
Job to Setup The Seed Job Git URL
*********************************
.. caution::
Before starting the Jenkins for the first time, perform the job described in this section first.
Any Jenkins instance is set up for a specific project, product or department. To be as generic as possible, a seed job
using the job DSL plugin must be used. This seed job seeds then the necessary jobs for the project, product or
department. As there is a specific Git repository for such a project, product or department the following structure is
mandatory:
.. code-block:: bash
.
├── ...
├── jobs
│ ├── Jenkinsfile_Seed
│ └── ...
├── ...
...
The directory jobs needs to containe a file called *Jenkinsfile_Seed* which acts as the jobs to be seeded.
The current generic Jenkins instance structure contains a Job where this *Jenkinsfile_Seed* is the base for the job
seeding. As we want to have a generic approach an ansible playbook adapts the git URL so that the correct seed file of
your project, product or department is taken.
.. note::
The JCasC configuration parameter for script security needs to be set to false otherwise you need to approve the
seed script at the first execution manually.
The ansible playbook is named *setup-nwl-jenkins-seedjob-git-url.yml*. The following steps show you about how to create
the AWX job:
#. Select the menu *Resources* >> *Templates* and click *Add*:
* Enter a name, e.g. *Setup Jenkins Seed Job Git URL*
* Enter a description, e.g. *Setup of the git URL of the jenkins seed job*
* Select ``Run`` as Job Type
* Select ``Production`` as Inventory
* Select ``NWL CI`` as Project
* Select ``playbooks/getting_started/setup-nwl-jenkins-seedjob-git-url.yml`` as Playbook
* Select the following:
- Switch the drop-down of *Selected Category* to Machine and then check ``Machine Access``
* Enter the variable in Variables and check *Prompt on launch* as follows:
- .. code-block::
seed_url: "ssh://git@bitbucket.gad.local:7999/nm-nsp/nwl-ci.git"
- Change the variable seed_url at launch time to with the git URL of your project containing the seed job
- Press Save
#. Launch the job *Setup Jenkins Seed Job Git URL*
Now everything is set up to start the Jenkins instance initially.
Combining Playbooks
###################
@ -1158,7 +1216,7 @@ instance. All theses steps are currently reflected in multiple playbooks. To enh
could create a common playbook by including the single playbooks as described in the section `Combining Playbooks`_.
Keep in mind that this is currently a proof of concept and not yet a fully productive instance. For the proof of concept
you see the job templates in this image:
you see the job templates in this image (without the template descibed in `Job to Setup The Seed Job Git URL`_:
|awxJobTemplates|