How we reduced build time from 8 hours to 1 hour ? – Complete Guide

hudson-master-slave-setup

Situation

  1. For one of our clients, Build is taking 8 hours and nightly build is failing frequently.
  2. Test case execution is consuming more time than the compilation.
  3. Low confidence levels for developers on nightly builds and subsequently during integration cycle.

Approach

  1. We reviewed the whole set of build scripts being used and test case suite to check how we can refatcor them.
  2. Verified the build infrastructure i.e., build server capacity from hardware point of view.
  3. Feasibility study done to check how a CI environment help in giving faster feedback on the quality.


Solution

  1. Refactoring done for build scripts to make modules compilation parallel (wherever possible).
  2. Some test cases are selected (which don’t require external services like database) to run as part of the build.
  3. CI environment (using open source cruise control) is established to run builds per commit and execute only above set of test cases as part of the build.
  4. Set up low-cost remote agent machine which will run remaining test suite once per day.

Results

  1. Build took only 1 hour and gave faster feedback to dev team.
  2. CI environment provided good confidence to dev team.
  3. Team is able to implement more best practices.
  4. Effective use of existing build  infrastructure (hardware) ensured no further cost is required.
  5. This helped the client in ensuring smooth release management.

 

Tagged : / / / / / / / / / / / / / /

SSARC Utility & SSRESTOR Utility – Archive, Restore VSS Project – Guide

ssarc-utility-ssrestor-utility

Question: 

How to Archive VSS Project in Visual Source Safe (VSS)?

How to Restore VSS Project in  Visual Source Safe (VSS)?

What is SSARC Utility?

What is SSRESTOR Utility?

SSARC Utility

Allows you to archive files, projects, or old versions from a Visual SourceSafe database. Each time you run SSARC (Ssarc.exe), the utility asks only once before it deletes the files/projects. Visual SourceSafe also implements archive operations through its Archive wizard, available in Visual SourceSafe Administrator.

The utility SSRESTOR is used for restoration of archived files. Use of SSARC and SSRESTOR together allows wide-area Visual SourceSafe installations to move files and projects among databases.

Limitation: SSARC cannot create an archive file that is greater than 2 GB. If you try to archive a project larger than this, you will receive an Out of Memory and/or a CRC mismatch error message. To work around this limitation, you will need to archive each subproject.

 

Syntax

ssarc [-C][-D][-I-][-O][-S][-V][-X][-Y] <archive file to create> <files/projects to archive>

If you are not familiar with the syntax conventions used, < and > are used to delimit arguments. The < and > characters are not typed in. The | means a choice of options. Items enclosed in square brackets, [] are optional, and items not enclosed in square brackets are mandatory.

 

Utility Options

The following table describes options available with SSARC.

-C

Specifies a comment (standard Visual SourceSafe parameter). The comment is inserted into the Visual SourceSafe history if the items are deleted from the database as part of the archived record. The comment is also inserted into the archive file itself, if there is one.

-C-

Specifies no comment.

-D

Deletes the archived items from the database.

Specifiying the -d option will delete from your project the items that you are archiving. This will delete your project from Sourcesafe if you use it! Of course, you can restore from your backup file, but for normal use, and for smaller projects I don’t recommend this. This function obviously has its uses, but be sure you want to do this.

-D-

Controls whether Visual SourceSafe actually deletes anything from the database. If this option is not used, the default is to ask.

If the -d- option is used, then SSARC will not delete the projects the items you are archiving. The default is to prompt the user interactively, so if you want to run this from a script, you will need to choose one of the options, or use the -i- flag

-I-

Specifies no prompt for input (standard Visual SourceSafe parameter).

-O

Paginates or redirects output (standard Visual SourceSafe parameter).

-S<srcsafe.ini path>, <data path>

Specifies a path to Srcsafe.ini and the Data directory. The full syntax looks like -Sc: \VSS, OldDB. The item before the comma is the full path to Srcsafe.ini, and the item after the comma is the string in parentheses in a Data_Path setting. If there is no comma, a Srcsafe.ini path is indicated, but no data string. If the first character after the –S is a comma, a data string is specified, but no Srcsafe.ini path.

 

-V[D|L]<version>

Specifies a version number to archive (standard Visual SourceSafe parameter). Enter the version number in standard Visual SourceSafe format (number, date, or label). If this option is not used, SSARC operates on entire files or projects, instead of all versions up to and including a certain version.

Note that SSARC is generally inclusive. That is, if you type –V9, you create an archive file that contains version 9.0 and everything before it. The delete pass is also inclusive, that is, version 9.0 is actually deleted unless it is in the label format. In the latter case, the label is stored in the archive file but is not deleted. If –V is specified, you never delete the current version, even if you specify -D9/9/99. If you are using a version the label format, and the label has a space in it, you must place the entire option in quotation marks, for example, “-VThisOne”.

-X

Archives only deleted items in the specified files and projects. Deleted items are still stored in the Visual SourceSafe database unless the Destroy Permanently option is selected when performing a Delete command.

-X-

Archives all items in the specified files and projects.

-Y<user>,<pwd>

Specifies the user name and password (standard Visual SourceSafe parameter). An example is -YAdmin,Bunny.

archive file to create

Specifies the name of the archive file to create during the archive operation.

files/projects to archive

Specifies files and projects to back up.

Examples

SSARC -d- -yadmin,password archive.ssa $/
Backup the entire default Sourcesafe database to archive.ssa, leaving the database exactly as it is.
SSARC -d- "-vlProduction Release" -yadmin,password -olog.txt archive.ssa $/Test
Backup everything since the version labelled ‘Production Release’ and create a log file with the results of the archiving process.
SSARC -d -x -yadmin,password archive.ssa "$/Project Global Domination" $/OtherProject
Archive, and delete the deleted files from two projects.
SSARC -i -yadmin,password -olog.txt "-cArchive Everything" archive.ssa $/
Archive the entire Sourcesafe database, while creating a log file, adding a comment, and running non-interactively, suitable for a scheduled task.

SSRESTOR Utility

Restores information from a previously created archive. If the restore operation attempts to create a duplicate file or project name, the operation fails. Visual SourcSafe also implements restore operations through its Restore wizard, available in Visual SourceSafe Administrator.

Limitation: SSRESTOR cannot restore a project that is larger than 2 GB. A project larger than this cannot be archived.

 

Syntax:

ssrestor [-C][-I-][-L][-O][-P<project>][-S][-T][-X][-Y]

<archive file to restore> [files/projects]

 

Utility Options

The following table describes options available with this command.

-C

Specifies a comment (standard Visual SourceSafe parameter). The comment is applied to the history entry for restored item(s).

-C-

Specifies no comment.

-I-

Specifies no input (standard Visual SourceSafe parameter).

-L

Specifies a list only, without any restoration.

-LA

Specifies a list of all files and subprojects listed under a project, for example, project $/A.

-O

Redirects output (standard Visual SourceSafe parameter).

-P<project>

Specifies a project to which to restore content. For instance, if you archive $/A/BAR.C and then restore it, it will be restored as $/A/BAR.C.

-S<srcsafe.ini path><data path>

Specifies a path to Srcsafe.ini and the Data directory.

-T

Tests the archive file for corruption, but does not actually restore from the archive.

-X, -X-

Identifies an item that you want to restore, for example, $/a/b. This option distinguishes between deleted projects and undeleted projects that have the same names. For example, if you have deleted $a/b and specify the -X option, SSRESTOR restores the deleted $/a/b. If you specify -X-, SSRESTOR restores an undeleted $/a/b. Even though they have the same name, note that these are two different projects that the utility treats differently.

-Y<user>,<pwd>

Specifies user name and password (standard Visual SourceSafe parameter). An example is -YAdmin,Moggy.

archive file to restore

Specifies the name of the archive file from which to restore the database.

files/projects

Specifies files and projects to restore.

Examples

SSRESTOR -la -yadmin,password archive.ssa $/
Display a list of all of the files archived in archive.ssa.
SSRESTOR "-p$/Test 2" -sD:\newfolder\ -yadmin,password backup.ssa $/Test
Restores project $/Test to the database to a new location, $/Test 2, from the archive file backup.ssa, in a different Sourcesafe database.

Miscellaneous tips

  • Putting the path to the <VSS PATH>\win32 folder in your PATH environment variable makes shell commands a lot easier
  • If you get a message “Only ADMIN can run this utility”, it means that you are either not specifying the admin account, or the password is incorrect. Use "-yadmin,password" if the admin password is “password”, or "-yadmin," if the admin password is not set (not recommended!).
  • If you are using an option that has a space in the argument, enclose the whole thing with quote marks, i.e. “-p$/Project A”
  • A daily archive is easy to do with a Windows shell script, maybe something like this. Then use Scheduled Tasks to have this run every day.
    function q (str)
    	' to make the command a bit more readable, I hope
    	q = """" & str & """"
    end function

    PROJECT = “$/”
    USERID = “admin”
    PASSWORD = “admin”

    ‘ location of SSARC program
    SSARCPATH = “C:\program files\microsoft visual studio\common\vss\win32\ssarc.exe”
    ‘ folder of srcsafe.ini
    SRCSAFEINIPATH = “”
    ‘ prepended to filename in case you’re doing more than one.
    LABEL = “ARCHIVE”
    ‘ destination of archive files
    BACKUPFOLDER = “C:\BACKUPS\”

    ‘ generate a name based on the time.
    today = now()
    backupfilename = LABEL & “-” & formatdatetime(now,2) & “.ssa”

    cmd = q(SSARCPATH) & ” ” & _
    q(“-s” & SRCSAFEINIPATH & “,”) & ” -i- ” & ” -d- ” & _
    q(“-y” & USERID & “,” & PASSWORD) & ” ” & _
    q(BACKUPFOLDER & backupfilename) & ” ” & q(PROJECT)

    Set WshShell = WScript.CreateObject(“WScript.Shell”)
    wscript.echo cmd
    WshShell.run cmd
    set wsshell = nothing

Tagged : / / / / / / / / / / / / / / / / / / / /

How to run Remote Desktop Console by using command line?

How to run Remote Desktop Console using command line
If you may want to run Desktop Console from a batch file, for example RDC over VPN, you can use mstsc /v:servername /console command.

Mstsc

Creates connections to terminal servers or other remote computers, edits an existing Remote Desktop Connection (.rdp) configuration file, and migrates legacy connection files that were created with Client Connection Manager to new .rdp connection files.

Syntax

mstsc.exe {ConnectionFile | /v:ServerName[:Port]} [/console] [/f] [/w:Width /h:Height]
mstsc.exe /edit”ConnectionFile”
mstsc.exe /migrate
Parameters

ConnectionFile

Specifies the name of an .rdp file for the connection.
/v:ServerName[:Port]
Specifies the remote computer and, optionally, the port number to which you want to connect.

/console
Connects to the console session of the specified Windows Server 2003 family operating system.

/f
Starts Remote Desktop connection in full-screen mode.

/w:Width /h:Height
Specifies the dimensions of the Remote Desktop screen.

/edit”ConnectionFile”
Opens the specified .rdp file for editing.

/migrate
Migrates legacy connection files that were created with Client Connection Manager to new .rdp connection files.

Remarks
* You must be an administrator on the server to which you are connecting to create a remote console connection.
* default.rdp is stored for each user as a hidden file in My Documents. User created .rdp files are stored by default in My Documents but can be moved anywhere.
Examples

To connect to the console session of a server, type:
mstsc /console

To open a file called filename.rdp for editing, type:
mstsc /edit filename.rdp

Tagged : / / / / / / / / / / / / / / / / / / / /

5 Keys to Automating Configuration Management for Application Infrastructure

automating-configuration-management-for-application-infrastructure

5 Keys to Automating Configuration Management for Application Infrastructure

One of the trends being discussed in business, among vendors and in the analyst community is the importance of automating the functions performed by IT. Growing demands by the business, tight budgets and compliance pressures together accentuate the need for IT to be more agile, efficient and responsive to business stakeholders.

Naturally, vendors rush into this environment, each touting the unique benefits of its solution set and the urgency to move forward immediately.  A key area targeted for IT automation is the area of ‘configuration management.’  As it relates to automating day to day IT functions, configuration management can mean many different things: patch management, server and network management or others.

One of the newer targets for configuration management techniques is the application layer itself.  Think about that great stack of software that comprises a contemporary J2EE application—application server, web server, database, middleware and so on—typically from different vendors.  But they all adhere to industry standards, right?  So they all must plug and play together nicely, right? Not really.

In fact to make the entire stack work effectively, there are many individual configuration files, each one with a long list of their own parameters, which need to be edited, tuned and controlled.  And because the set of software is so complex, each element is managed by its own specialist in isolation without much knowledge of the other pieces of the puzzle.

The combination of many software assets, configured manually without much knowledge of dependencies leads to predictable results.  Someone makes a change in one area while stability and performance problems show up elsewhere.  Once the problem crops up, a team of IT specialists will take hours, maybe days to track down the problem and provide the solution.  Analyst firms like Enterprise Management Associates and Forrester Research agree problems in the configuration of the application infrastructure are now one of the leading causes of downtime.

Some vendors and businesses are now focused on a comprehensive approach to tackling this problem. The five building blocks required are easy enough to understand:

  1. Discovery and mapping—What application element and software assets do I have in my environment? How are they configured, item by item?
  1. Change monitoring—Inform management not only about the applications that have changed, but tell them how they have changed.

 

  1. Release Management—Sometimes called ‘provisioning,’ this relates to the ability to model configuration changes to the application infrastructure and then deploy those changes consistently across all phases of the application life-cycle.
  1. Auditing and Reporting—Show the business that IT supports corporate governance initiatives, not only at the server and network level, but also at the critically important application layer.

 

  1. Integration with the IT environment—Insure that the tools for configuration management of the application infrastructure work seamlessly with your problem management system or your configuration management database.

1.‘Discovery’ is usually where these solutions should start—as long as they do not end there!  In order to provide the IT team with a solution to managing the thousands of configuration settings in a J2EE application stack, you need to have a repository of the environment itself, a working model that reflects your application infrastructure.  With this repository of data in place, IT can then begin to comprehend how the various elements on the application layer are actually

2.‘Change Monitoring’ represents a critical component of a configuration management solution for application infrastructure.  With so many servers, instances and individual parameters, the number of configuration items quickly runs to the thousands per application.

Change monitoring must identify not only that a component changed, it must also identify exactly where the change was made and on which server(s).  Right now, IT specialists comb through text files trying to figure this out when there’s an application outage or when the application can’t make the transition out of the lab and into production. At mValent we call this “Hack and Hope”– they hack into text files, make a change and hope that it resolves the problem.  Automation tools instead can be used not only to find the change, but to find only relevant changes, ignoring unimportant differences.

Another key component of change monitoring to be addressed would be the notion of versioning and roll-back.  This is a well understood capability that exists in source code control systems and was applied by Documentum among others to the content management problem.  Now, we should focus on providing versioning and roll-back to the thousands of configuration settings which comprise a J2EE application stack.  Rather than have IT scramble to figure out what has changed when there’s an outage, let’s just re-instate a known working version of all of the configuration settings.  Then, IT can take the analysis and resolution off-line without the pressure to restore service immediately.

3. ‘Release Management’ is an important forward-looking area of a configuration management solution for application infrastructure. Right now, IT teams use a mixture of scripts and manual methods to deploy changes to application infrastructure settings. New solutions look to apply true automation to this process, insuring that configuration changes are modeled, evaluated and approved prior to deployment. Release management also validates that the process applies changes correctly. This also offers automatic deployment of changes to configuration settings and provides ‘out of the box’ templates for deploying new versions of an application server or a complete J2EE application stack.

These tasks currently take days to achieve and are error-prone.  Applying automation reduces cost and time while advancing quality.

4. ‘Audit and Reporting’ in a configuration management solution for application infrastructure refers to a capability report on the application infrastructure at a detailed level.  This would include reporting on change activity—which applications are driving the most change and causing IT execs the most headaches with SLAs.  Currently, this information exists at the server and network level, but less commonly for the applications themselves where change and upheaval is more likely.

Audit and Reporting also measures how your application infrastructure complies with recommendations, standards or your best practices for how the infrastructure should be configured.  Which assets are in compliance? Which are out of compliance?

Solutions should also measure change activity. Who made the change, Why, When, and so on.  And, it would be appropriate to measure whether changes were made according to your change process or were made outside that process.

5. ‘Integration with your IT environment’ in a configuration management solution for application infrastructure refers to the ability of the solution to fit with the other elements in the IT ecosystem, like your problem and incident management system, your Configuration Management Data Base (CMDB), a source code management system or your corporate LDAP directory.

Ideally the solution will integrate directly with these items and create a ‘closed loop’ environment for managing change to the application infrastructure.  As an example, when a ticket is opened requesting a change to the configuration setting for the web server, the solution should automate the actual change process, include the ticket number in the reason for change and report back to the incident system so that the ticket can be closed.

This eliminates yet another manual process and opportunity for error in IT management.

Benefits & Summary.  The major benefits of a configuration management solution for application infrastructure relate to reducing complexity and promoting compliance for IT.  By transforming today’s manual, error-prone tasks into a sequence of automated processes, your IT team will see benefits in:

·  Improving the productivity of your IT Infrastructure Team, by upwards of 50% and enabling them to spend more time on new initiatives rather than fire-fighting

·  Accelerating time-to-value for applications by 25%

·  Improving the quality and uptime of your applications by reducing the key elements that cause most of today’s outages

·  Providing comprehensive best practices and compliance reports to management and stakeholders.

With today’s IT struggling to meet increasing demands without headcount increases, a configuration management solution for application infrastructure offers important sources of value. configured.  More important, IT can begin to understand the dependencies between, say, how the data base is configured and its impact on the application server.  Thus, application configuration problems can be averted before they arise.

 Source: http://www.cmcrossroads.com

Tagged : / / / / / / / / / / / /

SVN Installation | Subversion Installation guide | Subversion Setup

Install CollabNet SVN Command Line Client in Red Hat

Link: http://www.collab.net/downloads/subversion/redhat.html

1. Platform and configuration

Product: CollabNet Subversion client

Platforms: Red Hat Enterprise Linux releases 4 and 5 (all versions, 32 bit)

Prerequisite: You must be a superuser (root) to install and uninstall

CollabNet Subversion.

2. Import CollabNet GPG key

CollabNet Subversion RPMs are signed using our GPG key. As a one-time task,

import the CollabNet GPG key using the command:

    sudo rpm –import /path/to/RPM-GPG-KEY-csvn.asc

The CollabNet GPG key is available for download at:

http://www.collab.net/nonav/downloads/subversion/gpg-key/RPM-GPG-KEY-csvn.asc

3. First installation

The command to install the CollabNet Subversion RPM, if a previous version

has not already been installed, is:

    sudo rpm -ivh /path/to/client.rpm

4. Updating an existing installation

If you have a previous version of the CollabNet Subversion client RPM installed,

update to the new version by running this command:

    sudo rpm -Uvh /path/to/client.rpm

If you also have a previous version of the CollabNet Subversion server RPM

installed, add the –force option to the command:

    sudo rpm -Uvh –force /path/to/client.rpm

5. Post-installation instructions

A. CollabNet Subversion installs into /opt/CollabNet_Subversion, which is

   probably not on the executable search path for your system. Add the directory

   /opt/CollabNet_Subversion/bin to your $PATH environment variable. In order to

   make this change affect all users of your system and persists across reboots,

   add the following line to /etc/profile:

    PATH=/opt/CollabNet_Subversion/bin:$PATH

B. CollabNet Subversion provides man pages and localizations for several

   languages. To take advantage of these features, update your MANPATH and/or

   LOCPATH environment variables to include the CollabNet Subversion directories.

   For example:

    export MANPATH=/opt/CollabNet_Subversion/share/man:$MANPATH

    export LOCPATH=/opt/CollabNet_Subversion/share/locale:$LOCPATH

6. Support for CollabNet Subversion

Find out about CollabNet Technical Support at

http://www.collab.net/services/subversion/

Information about CollabNet Training, Consulting, and Migration

services is at http://www.collab.net/services/subversion/training.html

Join openCollabNet for community support: http://open.collab.net

Setup SVN proxy setup

After Successful installation of SVN

Step 1: Go to /root  ex. $ cd /root

Step 2: List the all the hidden files.

Ex. $ ls –a

You will be getting .subversion folder underneath.

Step 3: go to ./subversion

Ex: $ cd .subversion

Step 4: List all the files under .subversion folder

$ ls

Step 5: Open severs file with vi editor

$ vi services

Step 6: Scroll down to [global] section and make the changes by uncommenting follwing lines and putting proxy information.

http-proxy-exceptions =

http-proxy-host =

http-proxy-port =

http-proxy-username =

http-proxy-password =

Step 7: Save and exit the vi editor

Tagged : / / / / / / / / / / / / / / / / / /

Steps to Import Module Process by using WinCVS

wincvs

Import Normally refers to the process of creating a new module in the repository by sending an entire directory structure. Module A directory hierarchy. A software project normally exists as a single module in the repository.

Step 1: Navigate to Remote/Import Module

Step 2: Define Import Filter Operation…

Step 3: Set following basic Import Setting.           

  • Repository Path           
  • Vendor Tag           
  • Release Tag    C
  • VSROOT

Step 4: And press OK. The desired source code will get add in CVS server… 

 

 

 

Tagged : / / / / / / / / / / / / / / /