Skip to Content

This blog follows my previous blog on why you should do continuous integration (CI). As CI is cool, nice, breath taking, helpful, you still have to find tools that support your CI activities. As I wrote in the above blog: CI is a set of tools.

Now, what kind of tools make sense? Which ones to use? Where and how to get started? Setting up a project that uses CI isn’t easy, and setting up the CI infrastructure should be very easy. Unfortunately, it is not always as easy as it should be, and in CI it starts already in selecting the right CI server. To experience the benefits or CI, nothing is better than learning by doing. To help you get started with CI I created a project on GitHub that helps you getting started.

The basic software stack is Jenkins, Sonar, SCM Manager, MySQL, Redmine, OpenDJ and Tomcat [1]. The project hosted at GitHub is a simple ant script. It is not really optimized nor received some source code cleanup; it grew over the years on my laptop (have mercy). Starting the script downloads the software packages, then installs and configures each one of it. In the end you have a CI infrastructure ready to use.

The main configuration file is located under conf/project.properties. There you can define users, passwords, install paths and ports. The overall download is around 550 MB. To run the script, you need to have ant installed. Right now, the only platform the script will work is Windows 7 x64 (that’s because my Laptop is Windows 7 64 bit).

Installation

Start the installation: call the script install.bat

This will run a set of ant tasks. You can see the status in the shell. First task is to download the software components needed.

/wp-content/uploads/2012/08/ci0_133513.jpg

Then each component is installed and configured.

/wp-content/uploads/2012/08/ci1_133057.jpg

In the end you have to see a BUILD SUCCESSFUL.

/wp-content/uploads/2012/08/ci2_133100.jpg

After the script executed successfully (make sure the download task completes without errors and that every file is downloaded correctly) you start the server by calling startup.bat. This starts MySQL, OpenDJ and Tomcat. When tomcat is ready at localhost:port it’s time to check the setup.

Start the server

Start the framework: startup.bat

/wp-content/uploads/2012/08/ci3_133523.jpg

This will start the DB and LDAP server and then Tomcat  in a new window:

/wp-content/uploads/2012/08/ci4_133102.jpg

You can follow the progress of the startup, initialization and configuration of the several web applications in the window. Here solr shows that it is using the correct work directory:

/wp-content/uploads/2012/08/ci5_133107.jpg

Here Jenkins found OpenDJ as the configured LDAP server:

/wp-content/uploads/2012/08/ci6_133106.jpg

Jenkins is installed correctly in Tomcat:

/wp-content/uploads/2012/08/ci7_133105.jpg

Redmine is configuring the MySQL database:

/wp-content/uploads/2012/08/ci8_133104.jpg

In the end, Tomcat is up and running.

/wp-content/uploads/2012/08/ci9_133103.jpg

The ports used by Tomcat are listed. Here, Tomcat is using port 9090 for HTTP.

Access the programs

Each program is installed in Tomcat and therefor can be accessed by entering the URL it is configured to run under.

Tomcat

Tomcat is accessible in the browser by calling the URL localhost:9090/

/wp-content/uploads/2012/08/ci10_133109.jpg

Jenkins

To call Jenkins: /jenkins and user / password: jenkins / jenkins.

/wp-content/uploads/2012/08/ci11_133108.jpg

Sonar

To test Sonar: /sonar with user sonar / sonar

/wp-content/uploads/2012/08/ci12_133110.jpg

SCM Manager

To test the source code management system: /scm with user scmadmin / scmadmin

/wp-content/uploads/2012/08/ci13_133111.jpg

Redmine

To test redmine: /redmine with admin / admin or redmine / redmine

/wp-content/uploads/2012/08/ci14_133112.jpg

Everything should work and you can start exploring CI. Create projects that use SVN (or git), check them in, let Jenkins trigger a build and sonar analyze the code. Redmine is used to track bugs and changes. After the installation the CI framework is accessible under localhost, but can also be used from different computers.

Next: an ant script that is built on the above code that creates a SAP Portal PAR project.

[1] The software selection is based on what I know and normally use. I you want to use another software for a use case or want to add your own tool to the mix, feel free to do so. Other software is also included, but mostly because the install script is just an excerpt of a larger tool set I use for also bootstrapping portal applications.

To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

  1. Swapnil Shelke

    Hi Tobias,

    Is it possible to integrate this with NWDI 7.3 SP08?

    I am trying to configure SonarQube3.4 with NWDI 7.3 but no success. If you provide more information on this, it is really appreciated.

    I have install the sonarqube, and integrated with Hudson but could not configure with NWDI. With Eclipse Kepler version I could run sonar but with NWDI it is not possible (as NWDI is based on old version of Eclipse).

    Regards,

    Swapnil S. Shelke

    (0) 
    1. Tobias Hofmann Post author

      I think you mean NWDS and not NWDI. NWDS for 7.3 is based on an old Eclipse version, newer versions of SonarQube for Eclipse therefore do not work with NWDS. Unfortunately it does not look like SAP is committed to have SAP Java devs using a “recent” Eclipse version.

      But the client side of SonarQube only needs access to the source code. This will work.

      (0) 
      1. Swapnil Shelke

        yes you are right, it is NWDS 7.3.
        I have configured SonarQube with local projects of JEE type and it run test successfully, but for WebDynPro component I could not configured it in NWDS, even manually I tried but it is not executing through SonarRunner due to package structure of WDP java (I think).

        Beside I have created sonar-project.properties for each package in my WDP java project locally, it is also showing same problem of Package structure.

        Second problem is with NWDI configuration: I mean to say if one resource run the test over one component it would be available to all team members and code should be editable through SonarQube in NWDS of corrosponding resource.

        Is it not possible to configure SonarQube  with NWDI landscape so it directly review DTR code?

        (0) 

Leave a Reply