Skip to content

initialize instance manually

devonfw-core edited this page Sep 29, 2021 · 2 revisions

Initialize Instance Template for Production Line

Technical User Setup

In order to configure the services, we need technical users for the following components:

  • Gitlab

  • Nexus3

  • SonarQube

The following sections describe how to configure the components to enable technical users and tokens.

Technical Gitlab User and settings

The creation of the GitLab Group and Project will require a private GitLab token which has to be created manually. The token can be obtained like this:

  1. Go to your Profile in Gitlab

500
  1. Next click on the pen icon

500
  1. On the left menu choose Access Tokens and put token name and check fields like below

600
  1. Click "Create personal access token", you should receive notification about created token and token string. Copy the token string.

600

The GitLab API user needs to have API access and the rights to create a new group. To set this permission follow the next steps:

  1. Enter the Admin control panel

  2. Select 'Users'

  3. Select the user(s) in question and click 'Edit'

  4. Scroll down to 'Access' and un-tick 'Can Create Group'

Technical Nexus3 user and settings

Nexus3 is used to store build artifacts such as the frontend and the backend. In the future it might also be used to store docker images of MTS.

Create the technical Nexus User

  1. The nexus3-api user should be created in section Administration

600
  1. New user should have added roles: Admins, nx-admins

600

Add it as credential in Jenkins

Credentials 'nexus-api' user should be added to Jenkins Jenkins → Credentials → System → Global credentials (unrestricted) → Add Credentials

800

Add the user to maven global settings in Jenkins:

  1. Jenkins → Settings → Managed Files → Edit Global Maven Settings XML

600
  1. Add the credential to the settings xml, use the ID "pl-nexus"

600

Jenkins Preparation

  • Install required plugins:
    HTTP Request Plugin
    Allure Jenkins Plugin

  • In Jenkins Global Tool Configuration configure Allure Commandline and Maven like

500

Sonarqube Server configuration in Jenkins

SonarQube must be configured in Jenkins, so that we can easily use the SonarQube server in our builds.

Go to Jenkins → Settings → Configuration → SonarQube Servers

Add the following data

600

Technical SonarQube user and settings

User Token for SonarQube

  • Go to SonarQube.

  • Go to your account.

600
  • Go to Security tab.

  • Generate the token.

Install SonarQube plugins from Marketplace

In order to analyze devonfw projects in SonarQube properly, you need to install manually some plugins. To do that you only need to open your SonarQube website and go to Administration → Marketplace. Then, you need to install the following plugins:

  • Checkstyle

  • Cobertura

SonarQube Webhook to inform Jenkins

A part of the Build Job will ask SonarQube if the quality gate has been passed. For this step a so called "webhook" has to be configured in SonarQube. To do so,

  1. Go to SonarQube

  2. Select 'Administration'

  3. Select 'Configuration', 'General Settings' and select 'Webhooks' in the left menu

  4. Add the following webhook

SonarqubeWebhook
  1. Press 'Save'