Thursday, December 3, 2009

Fast Copy tool

A colleague suggested using this tool called teracopy

http://www.codesector.com/download.php

Amazing tool.. accelerates copying both over the network and within the system as well . Works on windows primarily.

Try it!!! and let me know if you know anything better.

Wednesday, December 2, 2009

How to use labminder( Vmware labmanager SOAP) libraries with ant

In order to use any thirdparty library with your ant installation, you need to specify the namespace and the antlib options

In my case I was trying to use labminder ( available at
http://sourceforge.net/projects/labminder/files/AntTasks/1.0.0-VMware3.0.1/labminder-1.0.0-VMware3.0.1.zip/download)

Downloaded labminder-1.0.0-VMware3.0.1.zip and extracted the contents into a directory
The directory contained two main folders
doc and lib , a README.html and a demo.xml file
Doc: contains the instructions on how to use the library

You will need to copy the contents on the lib directory into %ANT_HOME%/lib/labminder

This makes it available to ant for use

How to use:

In your build.xml file , you will have to make the below namespace and antlib declaration

<project name="your-project"
xmlns:LabMinder="antlib:org.labminder.ant.tasks" default="main">

Calling the traget:

<target name="listworkspaces"
description="list configurations for configration type Workspace.">

<LabMinder:ListConfigurations username="${labmgr.user}"
password="${labmgr.password}" host="${labmgr.host}"
configurationtype="Workspace" organization="${labmgr.organization}" />
</target>


FROM THE ANT MANUAL:

Ant supports a plugin mechanism for using third party tasks. For using them you have to do two steps:

1. place their implementation somewhere where Ant can find them
2. declare them.

Don't add anything to the CLASSPATH environment variable - this is often the reason for very obscure errors. Use Ant's own mechanisms for adding libraries:

* via command line argument -lib
* adding to ${user.home}/.ant/lib
* adding to ${ant.home}/lib

For the declaration there are several ways:

* declare a single task per using instruction using

* declare a bundle of tasks using a properties-file holding these taskname-ImplementationClass-pairs and

* declare a bundle of tasks using a xml-file holding these taskname-ImplementationClass-pairs and

* declare a bundle of tasks using a xml-file named antlib.xml, XML-namespace and antlib: protocoll handler

Thursday, November 26, 2009

sending e-mails using an smtp server which only accepts from address which has "company.com"

The problem I was facing with sending mails using my smtp server was , that it did not accept mails which did not have an @"company.com" in its mailing address. Had to work a way around it in the submit.cf file.

Although am sure there are much more easier ways to do this, this is the best I could come up with :-)

cd /etc/mail/

there should be a submit.mc file . Please note that it is not suggested to edit the submit.cf/ sendmail.cf files directly , and instead use the .mc files for editing. The below settings had to be appaended into submit.mc file

MASQUERADE_AS(company-name.com')dnl
FEATURE(masquerade_envelope)dnl
MASQUERADE_DOMAIN(`localhost')dnl
MASQUERADE_DOMAIN(`localhost.localdomain')dnl
dnl
FEATURE(`msp', smtp-mail-server')dnl






After adding the changes. You will need to execute the command m4 submit.mc >submit.cf.


Please note that in order to use a machine as a client, you need not have the sendmail daemon running.

Adding a New alias to Majordomo mailing lists

Recently, had to create a new mailing list in Majordomo. We had a directory where all the mail lists were kept. let us suppose the dir is /usr/local/majorodomo/lists

a. Create a file with the name being the mailing list id eg: build-notifications

write the names of the members into the "build-notifications" file as below
person1@company.com
person2@company.com
person3@company.com
.... and so on

b. create an empty build-notifications.info in the same directory.
c. search for the majordomo.aliases file in the parent directory and edit the file to add the below entries

#build-notifications mailing list. Managed by xyz@company-name.com.
build-notifications: "|/usr/local/majordomo/wrapper resend -l build-notifications build-notifications-outgoing"
build-notifications-outgoing: :include:/usr/local/majordomo/lists/build-notifications
build-notifications-request: "|/usr/local/majordomo/wrapper majordomo -l build-notifications"
owner-build-notifications: xyz@company-name.com
build-notifications-owner: owner-build-notifications
build-notifications-approval: owner-build-notifications

d. after this I had to run the newaliases command

Thursday, October 15, 2009

connection between two systems without using ssh

While there are a myriad ways in which you can connect two systems, my colleague happened to bring up this question

As a build and release person, what options other than ssh do you have to run your scripts remotely on another system.

Hmm " Yeh to hamne kabhi socha hi nahi" , was the first reaction from all of us. My colleague then did a li'l bit of googling and came up with this thing called "netcat"(nc).

We worked on finding out how it worked. To a certain extent I could figure out how this works

We were working on Unix systems, so nc is generally installed by default
- log in as root on a machine that you want to execute the command in
- run "nc -l -p 32276" . you can add -v for verbose output. see man for more details. This will start an nc process that listens (l) to port (p) 32276
- on the machine from where you want to execute the command run
" nc "ip-address of server" 32276
- this opens a connection pipe over tcp/ip between the two systems and you can communicate between the two systems as you would do with a chat client. do a control-c at any one end and the connection breaks down

Now, if you want to execute a command at the remote end

- log in as root on a machine that you want to execute the command in
- run "nc -l -p 32276" | while read elem; do; $elem;done
- on the machine from where you want to execute the command run
" nc "ip-address of server" 32276
- this opens a connection pipe over tcp/ip between the two systems and you can typ[e in the command that has to be executed at the other end eg: ls, pwd etc... just replace the command with the path to your build script and there you have the build executed remotely.

Disclaimer: I have executed the commands and that seem to work well. Have not tried running build scripts

Wednesday, June 24, 2009

Cool tool to manage remote connections



guys if you are looking for a free tool to manage your connections, remote desktop connections look no further mremote is here.

As you can see I could select the protocol I want and enter user name ..

http://www.mremote.org/wiki/

This tool does not introduce a new protocol or a new way of connecting using the same protocol , but instead relies on putty, terminal services, the gecko framework for rendering web pages, etc which we are already using to connect to remote machines.

All I have to do is create a new connection , select the protocol, enter the user-name and password ... there you go.. u are ready to connect.

All I have to do is right click on the connection and connect.

I have attached a snapshot