35
    SGT, Inc. Innovation Technology Center AGILE LAB MANUAL Installation and Configuration   

AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

Embed Size (px)

Citation preview

Page 1: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

 

 

   

SGT, Inc.Innovation Technology Center

AGILELABMANUALInstallation and Configuration   

Page 2: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

SGT Innovation Technology Center      SGT, Inc. Agile Lab Manual     

                                                                              

 

SGT Innovation Technology Center 

Agile Lab Manual 

Introduction 

 

SGT AGILE ENGINEERING LAB

Senior SGT technicians initially conceived what has become out Agile Engineering Lab organically, as a set of virtualized systems that could be used to test installation and integration of various combinations of tools used to support customers’ agile software development. It has since evolved into an actualization of the standard tool set and configuration that we recommend to clients adopting agile practices.

The standard configuration of our Agile Engineering Lab is depicted in Figure 1, below. It serves as a reference platform, comprised of specific tools and configurations that are known to work, effectively integrate and interoperate, and to have performed so in a wide range of real world agile development initiatives.

It is in the Agile Engineering Lab, where we perform our own development activities, develop and test innovative processes and tools, experiment with measurement and reporting processes, and continually improve our methodology, internal processes, and delivery skills. There are many options for each development tool category. While SGT remains a tool agnostic, it is important that our customers select tooling that functions well. Our lab allows us to test functionality and integration of new software tools, and to verify integration and interoperability of proposed customer environment configurations.

 

 

   

Page 3: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

SGT Innovation Technology Center      SGT, Inc. Agile Lab Manual     

                                                                              

 

SGT Innovation Technology Center 

Agile Lab Manual  

Create an Amazon Web Services (AWS) Amazon Machine Image (AMI) Instance 

Create/log in to your AWS account  

Navigate to the EC2 console 

Create AMI instance (installation directions use Windows Server AMI) 

Create Key Pair • Save .pem file to a secure place on local machine NOTE To create a new key pair in command environment: `openssl genrsa ‐out < name >.pem 2048` `openssl rsa ‐in < name >.pem ‐pubout ‐out < name >.pub` 

Create Security Group and add the following inbound ports:  RDP (3389)  HTTP (80)  SSH (22) 

Launch the new instance and connect / log in with password/private Key Pair file 

 

 

                     

   

  

  

Page 4: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

SGT Innovation Technology Center      SGT, Inc. Agile Lab Manual     

                                                                              

 

Turn off Internet Explorer Enhanced Security Configuration to allow downloading 

Open Server Manager on the taskbar 

Click the Configure this local server link 

Under Properties locate IE Enhanced Security Configuration, click on the word On 

Select Off for Administrators 

 

 

 

 

 

 

 

 

 

 

 

 

 

Download and install 7‐zip from http://www.7‐zip.org 

 

 

 

 

 

 

 

   

  

  

    

Page 5: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

SGT Innovation Technology Center      SGT, Inc. Agile Lab Manual     

                                                                              

 

Download and install JRE 

Go to:  

 http://www.oracle.com/technetwork/java/javase/downloads/java‐archive‐downloads‐javase7‐521261.html  

Download the Server JRE (Java SE Runtime Environment) 7u55 

Accept license agreement 

Download server‐jre‐7u55‐windows‐x64.tar.gz 

Extract the file anywhere on your hard drive (file will require extractions from .gz, then .tar)  • This location will be referred to as “the JRE path” 

• Ex. C:\jdk1.7.0_45 

 

 

 

 

 

 

 

   

  

  

  

Page 6: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

SGT Innovation Technology Center      SGT, Inc. Agile Lab Manual     

                                                                              

 

Download and install Maven and Ant 

Download Maven from http://maven.apache.org/download.cgi 

Click the link for apache‐maven.X.Y.Z‐bin.zip  

Extract apache‐maven.X.Y.Z anywhere on your hard drive • This location will be referred to as “the Maven path” 

Ex. C:\apache‐maven‐3.2.2 

Download Ant zip archive (apache‐ant‐X.Y.Z‐bin.zip) from http://ant.apache.org/bindownload.cgi 

Extract apache‐ant‐X.Y.Z anywhere on your hard drive • This location will be referred to as “the Ant path”  Ex. C:\apache‐ant‐1.9.4 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

   

  

  

Page 7: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

SGT Innovation Technology Center      SGT, Inc. Agile Lab Manual     

                                                                              

 

Set the environment variables  

• Right‐click the Computer icon on your desktop (or in Windows Explorer window) • Select Properties • Click the Advanced tab • Click the Environment Variables button • Under System Variables, click New... • Enter the variable name as `JAVA_HOME` • Enter the variable value as the JRE path • Enter the variable name as `ANT_HOME` • Enter the variable value as the Ant path • Under System Variables, find the variable named Path and click Edit... • In the Value field, at the end of the string add a semicolon (;) followed by the path to the bin directory 

of the JRE path to the variable value. • Ex. ;C:\jdk1.7.0_45\bin 

• Add another semicolon (;) followed by the path to the bin directory of the Maven path to the variable value.  • Ex. ;C:\apache‐maven‐3.1.1\bin 

• Add another semicolon (;) followed by the path to the bin directory of the Ant path to the variable value • Ex. ; C:\apache‐ant‐1.9.4\bin 

• Click Ok 

   

  

  

Page 8: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

SGT Innovation Technology Center      SGT, Inc. Agile Lab Manual     

                                                                              

 

 

Download and install MySQL from http://dev.mysql.com/downloads/installer/5.6.html 

Download and run the web installer 

When you get to Setup Type, choose Custom • Unselect MySQL Server 5.6.x  and Documentation • Choose MySQL 5.5 Community Edition from the Product Catalog • Select MySQL Server 5.5.38 • Under Applications, select nothing • Under MySQL Connectors, only select Connect/J 

    

  

Page 9: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

SGT Innovation Technology Center      SGT, Inc. Agile Lab Manual     

                                                                              

 

When you get to Configuration: • Click Next • Under Server Configuration Type, choose Server Machine

 • Click Next • Set a Root Password • Create the following MySQL User Accounts: 

▪ JIRA:  Username: `jira`  Host: localhost  Role: DB Administrator  Password: `< your password >` 

▪ Stash:  Username: `stash`  Host: localhost  Role: DB Administrator  Password: `< your password >` 

▪ Jenkins/JPF Bot:  Username: `bot`  Host: localhost  Role: DB Administrator  Password: `< your password >` 

• Click Next until finished 

 

   

  

  

  

  

Page 10: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

SGT Innovation Technology Center      SGT, Inc. Agile Lab Manual     

                                                                              

 

Open the MySQL 5.5 Command Line Client 

Enter the Root Password you specified during configuration above  Enter the following commands: 

• CREATE SCHEMA `jira` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin ; • CREATE SCHEMA `stash` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin ; • exit 

 

   

Page 11: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

SGT Innovation Technology Center      SGT, Inc. Agile Lab Manual     

                                                                              

10 

 

Download and install Git from http://git‐scm.com/download or http://msysgit.github.io/ 

Download Git‐X.Y.Z‐previewYYYYMMDD.exe  

Select Components: • Uncheck Windows Explorer Integration 

Adjusting your PATH environment: • Use Git and optional Unix tools from the Windows Command Prompt 

Configuring the line ending conversions: • Checkout Windows‐style, commit Unix‐style line endings 

 

 

 

 

 

 

 

 

 

 

 

   

  

  

  

  

  

  

Page 12: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

SGT Innovation Technology Center      SGT, Inc. Agile Lab Manual     

                                                                              

11 

 

Download and install Apache Web Server from http://download.nextag.com/apache//httpd/binaries/win32/ 

Install the latest version with openssl (Ex. httpd‐2.2.25‐win32‐x86‐openssl‐0.9.8y.msi) 

  Enter the domain name you will be using for your website 

• This does not set it for you; you need to either purchase the domain or add a subdomain to your existing domain 

• This URL will be referred to as the domain 

Set the Server Name and Administrator's Email Address as you see fit 

Install as a Service on Port 80 • Make a note of Apache HTTP Server installation directory 

Setup Type: Install with Typical Settings   

  

  

Page 13: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

SGT Innovation Technology Center      SGT, Inc. Agile Lab Manual     

                                                                              

12 

 

Go to the Control Panel • Click on System and Security • Under Windows Firewall, click Allow an app through Windows Firewall 

 

 

 

 

 

• Click Allow Another App... at the bottom • Click Browse... and navigate to your Apache HTTP Server installation directory • In the bin directory, select httpd.exe and click Open 

 

 

 

 

 

 

 

 

 

• Click Add • Check the boxes for Private and Public next to Apache HTTP Server • Click Ok  

  

  

  

Page 14: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

SGT Innovation Technology Center      SGT, Inc. Agile Lab Manual     

                                                                              

13 

 

Configuring Apache Web Server: 

Navigate to the Apache HTTP Server installation directory 

In the conf directory locate and modify httpd.conf:  • Remove the leading hash mark (#) from the following lines: 

▪ #LoadModule proxy_module modules/mod_proxy.so 

▪ #LoadModule proxy_ajp_module modules/mod_proxy_ajp.so • At the end of the file, add the following: 

<VirtualHost *:80>   <Proxy *>     Order deny,allow     Allow from all   </Proxy>    ProxyRequests  Off   ProxyPreserveHost  On   ProxyPass    /jira  ajp://localhost:8009/jira   ProxyPassReverse  /jira  ajp://localhost:8009/jira ProxyPass    /stash  ajp://localhost:8007/stash ProxyPassReverse  /stash  ajp://localhost:8007/stash ProxyPass    /jenkins ajp://localhost:8008/jenkins ProxyPassReverse  /jenkins ajp://localhost:8008/jenkins 

</VirtualHost>  

   

Page 15: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

SGT Innovation Technology Center      SGT, Inc. Agile Lab Manual     

                                                                              

14 

 

Download and install JIRA from https://www.atlassian.com/software/jira/download 

Click All JIRA Download Options for a drop down 

Select the appropriate installer and run it 

Choose a Custom Install 

When configuring TCP ports, set custom values • HTTP Port Number: 9080 • Control Port Number: 8005 

Ensure that JIRA is installed as a Service 

 

  

  

Page 16: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

SGT Innovation Technology Center      SGT, Inc. Agile Lab Manual     

                                                                              

15 

 

   

 

When JIRA is finished installing, JIRA will immediately offer to start in browser 

Decline or close browser before proceeding 

Find the MySQL Connector/J file in its installation directory (Ex. C:\Program Files (x86)\MySQL\Connectory J 5.1.27\mysql‐connector‐java‐5.1.27‐bin.jar) and copy it to the lib directory within the JIRA installation directory (Ex. C:\Program Files\Atlassian\JIRA\lib)  

 

 

 

 

 

 

 

 

 

 

 

 

 

Restart JIRA by restarting the Atlassian JIRA service: open the Windows Task Manager and select the Services tab, right click to restart Atlassian JIRA 

 

   

  

  

Page 17: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

SGT Innovation Technology Center      SGT, Inc. Agile Lab Manual     

                                                                              

16 

 

 

Go to localhost:9080/ in your browser to begin configuring JIRA: • Choose to connect with My Own Database • Database Type: MySQL • Hostname: the domain name 

▪ You can use localhost if MySQL is on the same server • Port: 3306 • Database: jira • Username: your jira database username • Password: your jira database password • Click Next (this can take a while) 

 

• Application Title: Whatever you want 

  

Page 18: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

SGT Innovation Technology Center      SGT, Inc. Agile Lab Manual     

                                                                              

17 

 

• Mode: Depends on what your needs are • Base URL: http://<domain name>/jira • Enter/Generate a license key • Enter details for the administrator account • Configure an outgoing mail server if desired 

Click on the gear in the top right corner and select User Management 

 

 

 

 

 

 

Click Create User • Username: bot • Password: password • Full Name: Stash Link Bot • Email: ? 

 

 

 

 

 

 

 

   

  

  

  

Page 19: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

SGT Innovation Technology Center      SGT, Inc. Agile Lab Manual     

                                                                              

18 

 

 

On the Bot's user page, click Actions and choose Edit Groups 

Add the Bot to the jira‐administrators group 

 

 

 

 

 

In the conf directory of the JIRA path, modify server.xml  • Remove the `<!‐‐` and `‐‐>` around <Connector port=”8009” … > • Change <Context … path=”” … /> to <Context … path=”/jira” … /> 

Restart the Atlassian JIRA service again 

   

  

  

  

  

  

Page 20: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

SGT Innovation Technology Center      SGT, Inc. Agile Lab Manual     

                                                                              

19 

 

Download and install Stash from http://www.atlassian.com/software/stash/download#2 

Click the download link for the ZIP archive 

Extract the archive to the hard drive • This location will be referred to as “the Stash path” 

 

 

 

 

 

 

 

 

If you are using 64‐bit Windows, execute the following commands in the Command Prompt terminal while in the bin directory of the Stash path (In terminal: cd < Stash path bin directory >) • mv tomcat7.exe tomcat7.exe.x86 • mv tcnative‐1.dll tcnative‐1.dll.x86 • mv tomcat7.exe.x64 tomcat7.exe • mv tcnative‐1.dll.x64 tcnative‐1.dll 

 

 

 

 

 

 

 

 

 

 

  

Page 21: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

SGT Innovation Technology Center      SGT, Inc. Agile Lab Manual     

                                                                              

20 

 

In the conf directory of the Stash path modify server.xml • Add <Connector port=”8007” protocol=”AJP/1.3” /> below <Connector port=”7990” 

protocol=”HTTP/1.1” … /> • Change <Context … path=”” … /> to <Context … path=”/stash” … /> 

 

 

 

 

 

 

 

 

 

Set the environment variable: • Right‐click the Computer icon and select Properties • Click the Advanced tab • Click the Environment Variables button • Under System Variables, click New... • Enter the variable name as STASH_HOME • Enter the variable value as the Stash path 

▪ If your Stash path has a space, use a shortened path name in place of it Execute `for /d %I in (.) do @echo %~sI` in your Stash path on the command line to find the shortened path 

   

     

  

Page 22: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

SGT Innovation Technology Center      SGT, Inc. Agile Lab Manual     

                                                                              

21 

 

 

Copy the MySQL Connector/J from its installation directory (Ex. C:\Program Files (x86)\MySQL\Connectory J 5.1.27\mysql‐connector‐java‐5.1.27‐bin.jar) to the lib directory within your Stash installation directory (Ex. C:\Program Files\Atlassian\Stash\lib). 

 

Execute the following commands in terminal (as an Administrator) in the bin directory of the Stash path  (If you encounter difficulty, look at the JAVA_HOME  path directory Computer Properties Advanced System Settings Advanced tab Environment Settings, and reset the path if necessary) • service.bat install  

(Windows PowerShell users may need to add `./` to the command: C:\atlassian‐stash‐3.1.1\bin> .\service.bat install) 

• tomcat7 //US//STASH –Startup  (A new version of Tomcat bundled with Stash requires the syntax `tomcat7 //US//STASH ‐‐Startup auto` The commands run as they are listed when run in Command Prompt. PowerShell doesn't look in the current directory for a command/script like Command Prompt does.) 

 

   

  

    

  

Page 23: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

SGT Innovation Technology Center      SGT, Inc. Agile Lab Manual     

                                                                              

22 

 

 

Go to http://localhost/stash in your browser to begin configuring Stash (the system may need to be restarted before this page can be accessed): • Choose an external database • Database Type: MySQL • Hostname: the domain name • Port: 3306 • Database: stash • Username: your stash database username (from MySQL configuration) • Password: your stash database password • Click Next (this can take a while) 

 

 

 

 

 

 

 

 

• Application Title: Whatever you want • Base URL: < domain >/stash • Enter/Generate a license key (If needed, select: I need and evaluation license) 

 

   

  

  

  

Page 24: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

SGT Innovation Technology Center      SGT, Inc. Agile Lab Manual     

                                                                              

23 

 

 

• Enter details for an Administrator account • Click Integrate with JIRA 

 

 

 

 

 

 

 

 

• Fill in the JIRA base URL (Ex. < domain >/jira) • JIRA administrator username and JIRA password are the credentials for JIRA administrator account • You should be able to keep the Stash base URL the same • Check the box next to Use JIRA as my user database • Click Connect 

 

 

 

 

 

 

 

 

 

 

 

• Login with your administrator account then click the gear icon in the top right corner 

  

  

  

  

Page 25: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

SGT Innovation Technology Center      SGT, Inc. Agile Lab Manual     

                                                                              

24 

 

 

 

 

• Click Find new add‐ons and install “Stash Webhook to Jenkins” 

 

 

 

 

 

 

  

 

 

To enable SSH: • Execute the following command in the terminal to enable access from the default SSH port: 

netsh interface portproxy add v4tov4 listenport=22 connectport=7999 connectaddress=localhost 

 

   

  

  

  

  

Page 26: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

SGT Innovation Technology Center      SGT, Inc. Agile Lab Manual     

                                                                              

25 

 

Download and install Jenkins from http://jenkins‐ci.org/ (If Internet Explorer fails during any of these operations, please use another browser, such as Firefox or Chrome)  

Modify the <arguments> tag of jenkins.xml in your Jenkins installation directory • After “‐‐httpPort=8080”, 

▪ Add “‐‐ajp13Port=8008” 

▪ Add “‐‐prefix=/jenkins” • Go to http://localhost:8080/safeRestart  and click Yes (possible error page, ignore) • After restart, go to http://localhost/jenkins • It may take a minute before Jenkins finishes starting up 

 

 

 

 

 

 

 

 

 

 

 

 

Click on Manage Jenkins on the left 

At the top, click the Setup Security button (This will not work with IE –  use another browser, or visit http://<IP address>/Jenkins if accessing from local computer) 

 

 

 

 

 

• Check Enable security 

  

  

Page 27: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

SGT Innovation Technology Center      SGT, Inc. Agile Lab Manual     

                                                                              

26 

 

• Under Security Realm, check “Jenkin's own user database” and ensure “Allow users to sign up” is checked 

• Under Authorization, check “Logged‐in users can do anything” • Click the Save button • You will now have to create an account 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Go back to Manage Jenkins and click Manage Plugins • Click on the Available tab 

  

Page 28: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

SGT Innovation Technology Center      SGT, Inc. Agile Lab Manual     

                                                                              

27 

 

• Use Filter in upper right corner of screen to search Git • Check the box next to the “Git Plugin” • If using Gradle for your build system,  click the box next to the “Gradle Plugin” • Click the Install without restart button • On  the installation page, check the box: Restart Jenkins after the installation is complete... 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Go back to Manage Jenkins and click Configure System (Will not work in IE – use other browser or access from local machine) • Under JDK, click Add JDK 

▪ Give the JDK a name 

  

Page 29: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

SGT Innovation Technology Center      SGT, Inc. Agile Lab Manual     

                                                                              

28 

 

▪ Uncheck Install automatically 

▪ Enter the JDK path for JAVA_HOME 

 

 

 

• Under Maven, click Add Maven 

▪ Give the installation a name 

▪ Uncheck Install automatically 

▪ Enter the Maven path for MAVEN_HOME 

 

 

 

 

• Under Gradle (if you installed the Gradle Plugin), click Add Gradle 

▪ Give the installation a name 

▪ Choose the latest release version. (Currently 1.10) • Under Jenkins Location 

▪ Set Jenkins URL to http://<your server's domain>/jenkins 

▪ Set a System Admin e‐mail address if you desire • Click Save at the bottom 

 

 

 

 

 

Go to http://localhost:8080/safeRestart 

After restart, go to http://localhost/jenkins 

Download and install plugins jenkins2jira and jpf‐jira 

Install Mercurial (TortoiseHg) from http://mercurial.selenic.com/ 

Page 30: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

SGT Innovation Technology Center      SGT, Inc. Agile Lab Manual     

                                                                              

29 

 

On Custom Setup page:  

Under TortoiseHg mark each feature individually as “Entire feature will be unavailable” (Do not select this option directly from the TotoiseHg icon, even though the end result looks the same on screen – each feature must be individually marked in turn) 

 

 

 

 

 

 

 

 

 

   

Page 31: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

SGT Innovation Technology Center      SGT, Inc. Agile Lab Manual     

                                                                              

30 

 

Open Command Prompt and execute the following commands: • `cd C:/` • `mkdir plugins` • `cd plugins` • `git clone https://[email protected]/sgtinc/jira‐issue‐reporter.git` • `cd jira‐issue‐reporter` • `mvn install` • `cd ..` • `git clone https://[email protected]/sgtinc/jenkins2jira.git` • `cd jenkins2jira` • `mvn compile hpi:hpi` • `cd ..` • `hg clone http://babelfish.arc.nasa.gov/hg/jpf/jpf‐core` • `cd jpf‐core` • `hg update –r1155` • `ant` • `cd ..` 

 

 

 

 

 

 

 

 

Create a .jpf directory in your User Home directory: • Open Command Prompt and execute the following command: 

`mkdir .jpf` 

 

 

 

 

 

In that .jpf directory create a site.properties file with the following contents: 

Page 32: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

SGT Innovation Technology Center      SGT, Inc. Agile Lab Manual     

                                                                              

31 

 

jpf‐home = C:/plugins jpf‐core = C:/plugins/jpf‐core jpf‐jira = ${jpf.home}/jpf‐jira extensions+=,${jpf‐jira} jira.address=http://<domain name | localhost>/jira  jira.username=<JIRA bot username> jira.password=<JIRA bot password> jira.stash_db.address=jdbc:mysql://<domain name | localhost>:3306/stash  jira.stash_db.username=<Stash DB bot username> jira.stash_db.password=<Stash DB bot password> 

 

 

 

 

 

 

 

 

 

In Command Prompt terminal execute following commands within C:/plugins • `git clone https://[email protected]/sgtinc/jpf‐jira.git` • `cd jpf‐jira` • `ant` • `cd ..` 

 

   

Page 33: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

SGT Innovation Technology Center      SGT, Inc. Agile Lab Manual     

                                                                              

32 

 

Configure Jenkins for plugins jenkins2jira and jpf‐jira 

Access Jenkins in a browser: http://localhost/jenkins/ 

Go to Manage Jenkins and Configure System 

Under Global Properties, add an Environment Variable • Name: JPF_CMD • Value: <path to jpf‐core>/bin/jpf +report.publisher+=,jira 

▪ Ex. C:\plugins\jpf‐core/bin/jpf +report.publisher+=,jira 

 

 

 

 

 

 

 

 

 

 

 

 

 

   

Page 34: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

SGT Innovation Technology Center      SGT, Inc. Agile Lab Manual     

                                                                              

33 

 

Install jenkins2jira 

Go to Manage Jenkins, select Manage Plugins 

Select the Advanced tab 

Under Upload Plugin, click Browse… 

Navigate to C:\plugins\jenkins2jira\target 

select jenkins2jira.hpi 

Click Upload 

 Choose to Restart Jenkins when installation is complete 

 

 

 

 

 

 

   

Page 35: AGILE LAB MANUAL - SGT Innovation Centerinnovation.sgt-inc.com/wp-content/uploads/2014/10/Agile-Lab-Manual.… · SGT Innovation Technology Center SGT, Inc. Agile Lab Manual 1

SGT Innovation Technology Center      SGT, Inc. Agile Lab Manual     

                                                                              

34 

 

Configure the plugin jenkins2jira 

Go to Manage Jenkins, select Configure System 

Scroll to the bottom to JIRA Issue Reporter 

JIRA Server Address: http://<domain name | localhost>/jira 

JIRA Username: bot (username for your JIRA bot account) 

JIRA Password: password (password for your JIRA bot account) 

Stash DB Address: jdbc address to your db • Ex. jdbc:mysql://<domain name | localhost>:3306/stash 

Stash DB Username: bot (username for your MySQL bot account) 

Stash DB Password: password (password for your MySQL bot account) 

Save