Skip to content

LiDOP Workshop Tutorial

dnleimbacher edited this page Jul 30, 2019 · 33 revisions

Step 1 Start LiDOP

On a windows machine, use cmd or powershell and not git bash for executing vagrant up

  1. Clone the Git Repository
  2. Go to the Lidop Directory
  3. Start Lidop Virtual Machine
git clone https://github.com/LivingDevOps/LiDOP.git
cd lidop
vagrant up

Step 2 Create Service

Use Jenkins

  1. Go to Environment
  2. Use Create_Service and build with Parameters for each Service
    a. Selenium
    b. SonarQube
    Create_Service

Step 3 Load Plugins

  1. Go to LiDOP
  2. Load Plugin
  3. Build with Parameters
    a. Select Repo
    b. Set Clone Repo (Tick CopyRepository)
    c. Build the pipeline
    Load Plugin
    https://github.com/LivingDevOps/LiDOP.helloworld_nodejs.git

Step 4 Build App

  1. Move back to the Jenkins main overview
  2. Select your {PROJECTNAME} folder
  3. Select [Build_Application] pipeline
  4. Build Now
    Build Now

Step 5 Check Demo Page

  1. Check build history to find the link [goto APP]
  2. Right-click on APP and open in new TAB
  3. See the demo page displayed

    Link to Demo Page:
    [http://10.20.30.40:9100/]

Step 6 Change Demo Page

Use GitBucket

  1. Sign in
  2. DemoProject/app/src/app.js
  3. Change message in Line 17
    App.js
  4. Checkin

    Link to Gitbucket:
    http://10.20.30.40/gitbucket

Step 7 Check Test GitBucket

Use GitBucket

  1. DemoProject/app/test/integration/test.js
  2. Change Text in Line 58
    Change Name
  3. Checkin change
  4. GoTo Jenkins and check Pipeline
  5. Goto LiDOP Main Page
    a. Click Selenium Icon, encounter Selenium Node

    Link to Gitbucket:
    http://10.20.30.40/gitbucket

    Link to Lidop MainPage:
    http://10.20.30.40/

Step 8 [Quality Assurance] SonarQube

Use Sonarqube, Gitbucket and Jenkins

  1. Show SonarQube
  2. Go to Gitbucket
    2.1 change App/src/app.js
    2.2 Duplicate line “5”
    App.js
    2.3 Commit change
    2.4 Check Pipeline
  3. Check SonarQube
    3.1 Go to the failed Project
    3.1.1 Click on Coverage on new Code
    3.1.2 Choose the App.js File
    3.1.3 Select the line with the error
    3.1.1.1 Open
    3.1.1.2 Resolve as won’t fix
    App.js
    3.1.1.3 Add Comment
    3.2 Rebuild pipeline
    3.2.1 Result green

Step 9 [Change Stages] Deployment

Gitbucket and Jenkins

  1. Goto Bitbucket build/App.Jenkinsfile
  2. Change Line 63 to stage(“Deploy App for Testing”){
  3. Copy Line 63 – 77
  4. Add it after Line 98, we are creating a new Stage
    a. Rename Stage Deploy App for Pro
    b. Change Port to 9110
    c. Commit Change
  5. Check App
    a. /port/9110

    Link to Demo Page:
    http://10.20.30.40:9110/