Archive for April, 2012

Making Net::SCP work (CPAN, FTP_PASSIVE, sudo, visudo)

Wednesday, April 11th, 2012

This is a short note regarding the motions I had to go through to make the perl module Net::SCP work. This is a note to self.

Step 0 -  CPAN’s documentation is pretty straight-forward. http://search.cpan.org/~ivan/Net-SCP-0.08/SCP.pm
Step 1 - Installation


$cpan
install Net::SCP

Oops.. Needs sudo permissions to perform make install


$sudo cpan

What!! Can not fetch LWP/FTP. Why? It just did it. FTP_PASSIVE is set as an environment variable (see my previous blog). Now what’s wrong.

Turns out sudo filters out most environment variables (FTP_PASSIVE not picked up). The fix is to edit /etc/sudoers


env_keep = ..... FTP_PASSIVE .....

So, I tried : sudo /etc/sudoers Read-only - Er.. For Root? Oh that’s a security feature, so let’s try : sudo visudo Err visudo doesn’t exist. It’s not in $PATH. All right sudo /usr/sbin/visudo.

Problem solved. Now sudo cpan can make install in peace and I can get around pesky firewall’s with passive FTP as root.

Oh and a code dump of what I was testing.


#!/bin/perl
use strict;
use warnings;
use Net::SCP;

#used ssh-keygen -t rsa to generate key on local machine
#used ssh-copy-id -i ~/.ssh/id_rsa.pub [remote_username]@[remote_machine] to share public key from [local_machine] to [remote_machine]

#otherwise replace Net::SCP->new("[remote_machine_name]“,”PASSWORD”);

my $scp;
$scp = Net::SCP->new(”[remote_machine]”);
$scp->login(”[remote_username]”);
$scp->put(”[what to put]”,”[where to put]”) or die $scp->{errstr};

This was pretty straight-forward.

My BITSAA Journey… (so far)

Wednesday, April 11th, 2012

I joined the first batch at the spanking newly christened BITS Pilani Goa Campus. Just as the many bright-eyed students who enter the hallowed halls of BITS Pilani,  we the 2004 batch students (the first in a sister campus in India) perhaps had some additional apprehensions, worries. Among them there was a burning desire to be accepted as, feel like, be treated and get the same experience as and finally be accepted into the vast pantheon of BITS Alumni. BITS did that spectacularly - the same coursework, many of the same legendary Professors who moved to spanking new campus, sometimes setting the same exams, and encouraging similar extra-curricular activities. As students, we did other things - contributing to Sandpaper, enthusiastically adopting programs initiated by alumni like BITSEmbryo. Tens of alumni who spoke to us through BITSEmbryo welcomed their fellow BITSian’s in the campuses.  Then BITSAA CEO Ashish Garg (someone of our generation), visited the campus, was given a rousing welcome (about 500 students attended a pack Lecture Theatre). His rousing speech set aside any remaining aspersions permanently etching in our minds - BITSAA (like BITS Pilani) was one brand - we are brothers-in-arms. As the Goa campus evolved, we were already mimicking structures in Pilani with a Goa twist in some - org structure for campus events to Centre for Software Development. BITSAA Bangalore was doing wonderful things - hosting our then Director Prof. Goel for a series of talks with alumni. Then came the Practice School Program where some of us made the trek to Silicon Valley or the East Coast as Interns and came back to tell us wonderful stories about the life “out there” as a BITS Pilani graduate awaiting us. BITS Alumni like Sunil Nanda (Nvidia) came by to the Goa Campus in the very first year to not only hire but educate students in “Whats out there?” It might not be unfair to say that most of the companies who came in to hire from the Goa Campus in its very first year were either headed by or had BITSians in influential positions.

 

To most of us, BITSAA was this massive monolith (behemoth?) - an army of “BITSians” organized in many chapters out there helping each other and helping the cause of BITS. BITSConnect had just happened (2003-2004). We had seen the “Old Boys” come together to wire up the BITS Campuses not too long ago. BITS alumni could make magic happen. Stalwarts like Jayan Ramankutty, Chandra Bhople and others flew down regularly to address students, encourage budding entrepreneurs, opening doors. I was fortunate to come to the Silicon Valley as a Practice School student. Among other things, I had the opportunity to see BITSAA Silicon Valley Chapter in full force. The ACYUT Robotics Team from BITS Pilani had just made an appeal to alumni for support in building India’s first humanoid. I saw first-hand Raju and Viggy and many others marshall fellow alumni - raising record sums in record time. Not only that, under their leadership alumni drove down to the event to cheer BITS Pilani at the Robogames. Such a wonderful gesture! Team ACYUT was invited to and given rousing receptions in several Silicon Valley companies, TiE hosted an event, so did BITSAA. I saw the level of attachment and commitment alumni had in promoting young BITSians. Wow! these guys are EXACTLY who I imagined they were.

 

Next, I had a unique back room view into BITSAA International’s rebirth - working directly with then CEO Ashish Garg. I helped in putting BITSAA International’s paperwork in order & realized how all the “different BITSAA’s” I adored were working hard but not talking to each other. I also attended the first couple of Board of Trustees meetings minuting discussions - understanding the thinking at the highest levels of BITSAA’s leadership (especially the challenges they faced). In hindsight, there were many problems - a global alumni directory did not exist, a consistent annual fundraiser had never happened, finances and paperwork were not consistently maintained. Lots of alumni were interested in contributing but there was no structure, no inclusive organization which managed everything. Only the most passionate among alumni could sustain projects. When their enthu died, so did BITSAA. That is what SP Kothari, Ashish Garg and the then Board of Trustees were fighting and ended up creating a  ”BITSAA Leaders Group” & the BITSAA Leadership Program. BITSAA was now going to operate as a Corporate entity with a Board of Trustees, an empowered Executive Team and a pseudo-corporate hierarchy. For an all-volunteer group, I think it was a bold move an experiment whose time had come.

 

In 2008, as a newly christened BITS graduate I came to Texas for Grad school. Was disappointed that there was no Chapter in the area. Efforts were underway to recreate one. I ended up joining BITSAA’s new Technology Team - its newly assigned mandate: “Create BITSAA’s first global alumni directory”. I had the opportunity to work with Sarath Kolla, then CTO. I learnt from him about his more than 5 year long commitment as the CTO. It was all finally coming to fruition - a comprehensive all-in-one managed website, alumni directory, fundraising portal, e-store, career center, news portal, newsletter, bulk-mailing system etc. etc. Sarath was an amazing mentor not only for technical matters but for “How to be a leader” and “Get stuff done”. In addition to spending time on numerous technology/backend matters, application development etc., I was also managing the agenda and minutes for Sunday calls for the next two years. This gave me a unique vantage point to see, learn from and be inspired by the many BITSians who joined these calls on a dutiful, diligent basis - reported on the progress of their programs, initiatives - investigated failures, celebrated success together. This was a different somewhat unique experience but extremely rewarding to be a part of. I was a regular. There were so many programs that took off between 2008-2010: LPBP, Campus Relations, CEL, Sandpaper, two fundraising drives driven globally, BITS2Marathon, many new scholarships, travel grants for students and faculty and more. For the first time, BITS alumni were creating endowments which would last for decades. Alumni were donating money to help fallen BITSians (Seema Sood, Life for Manish). It was exhilarating!

 

Alas, all good things come to an end. One fine weekend, I got a call from the “Boss” (Ashish) saying he was hanging his boots and he was on the lookout for a successor. I was sad, tried to make him change his mind but he was “done”. Quite dutifully, I rattled off my recommendations (there were about a hundred people in the team then, 20-25 very active). Very quickly I realized that the “Boss” was drafting me in as his replacement!

 

Fast forward 2010, BITSAA had at its helm a young (somewhat untested) yet energetic executive team. The founding fathers had stepped down and it was up to gen-next to do it right. The first thing on our to do list was charting a way forward for the first BITSAA Global Meet. It was a great idea. We had to pull it through or drop it entirely. Every alumnus we spoke to encouraged us, had his own ideas about it. I would like to singularly congratulate Abhisheak for doggedly pursuing the BGM dream at this very early stage. After a lot of meetings, conference calls with Chapters & BITS Leadership, we finally had everything sorted out. CS Goel, the dynamic leader of BITSAA’s oldest chapter - “BITSAA Delhi” had stepped up to the plate with his team. A marriage made in heaven - youth (the young BITSAA Intl volunteers) and experienced (the Delhi team have been doing this for the community for 30+ years). BITSAA could have its first BGM early 2011. Four years of planning was going to be put to the test. The biggest value BGM brought to the community was that it brought us together. Although it was a 3 day event, the 6+ month planning brought together chapter leaders, batch leaders, distinguished BITSians, ethued BITSians under one roof. We BITSians relish a challenge - and thats what we did. Chapters from Silicon Valley to Dubai to Australia - long lasting ones in Bangalore, Hyderabad, Chennai, Singapore put their heads together - conducted parallel events informing BITSians of the effort, encouraging everyone to join in the festivities. Long dormant chapters like Houston, Boston, Seattle, UK, Singapore, Arizona sprung to life. The BITS Leadership saw this as an excellent opportunity to solicit alumni support in the “Parivartan” they had been mulling for some time. Win-win-win for everyone. Overall, BGM2011 benefited from a concocted recipe for success on all fronts.

 

What’s BITSAA all about? Among other things, it’s an avenue for enthu’ed BITSians to put our minds together, bring our expertise, resources and talents together, contemplate, devise and deliver game-chaning projects for the alma-mater. That’s exactly what happened at BGM (as expected I may add!). Bringing the BITS campuses together with state-of-the-art video conferencing technology had long been identified as the need of the hour by the BITSEmbryo team led by Shashikant Khandelwal(theFIND) and Prof. Rahul Banerjee (BITS) (scroll up!). Potential impact and reach of such frameworks had already been demonstrated over several years through Project Embryo. The bottlenecks had been identified - end delivery of video conferencing needs to be improved. BITS had already made made strides in this regard under the leadership of the Chancellor KM Birla & Kris Ramachandran. Bandwidth had been purchased (a long standing bottleneck out of the way). Classrooms need to be equipped to handle state of the art video conferencing infrastructure. If potential recruiters were to come into the campuses to hire, they need to be guaranteed unparalleled quality of service from the video-conferencing solution. If the leadership of the campuses wanted to have a virtual meeting to sort out administrative matters they need to use “No excuses” technology that “simply works”. If a distinguished visitor at one campus is making a speech to 2000 students in an auditorium, how can it be reliably webcast to the other campuses? How can a quality of service be guaranteed. When there is a will, there is a way. A volunteer army coalesced under the leadership of Prem Jain, the flag-bearer and alumni leader for projects like these. BITSConnect2.0 was born from BGM1.0. A comprehensive study of available technologies and fit for the alma-mater was started - request for quotes sent to the leading providers, detailed discussions held with BITS leadership -Prof. Rahul Banerjee playing a stellar role. After the technology fit was approved, price negotiations began. The BITS Leadership appeared very enthusiastic - “We wanted this years ago! This can bring a sea-change in the BITS system”. Mission accomplished. Let the fundraising begin..

 

BITSAA has been an integral part of my life for the past 5 years – I began as a volunteer in Project Embryo, worked in various roles within Technology Team, Operations/HR in an emerging BITSAA Organization. Over the past two years, I have had a chance to actively work with legends (like SP, Raju, Prem, Kris, Viggy, CS, Brij, Ashish, Anupendra, Sudeep, Sarath) who I think have become as close as family to me. It has been a lot of hard work and hours put in - lots of joy and yes occasional frustrations - my payback to BITS Pilani which has been the foundation for my life’s journey. Through my BITSAA experience, I have learnt professionally and personally. I would like to thank everyone who have come on this journey with me and given me the opportunity and honor to serve BITSAA. I have met some incredible BITSians along the way (like Arun Aravind, Abhisheak, Rohit, Vivek Iyer, Shashikant, SatP, VJ) who have had me redefine what “BITS Passion” really means - some of them have been going on upwards of a decade. I have had an extra intense last two years as BITSAA’s CEO. With a lot of BITSAA firsts and some missed opportunities - perhaps a once-in-a-lifetime experience at my age! I would like to thank all Board Members and SP, Raju, Ashish in particular for reposing faith in me and bequeathing their legacy - BITSAA Leaders. I hope I have done you all proud.

 

BITSAA, I feel today is at the at cusps of its next evolution under the dynamic leadership of its beloved new Chairman Raju Reddy and the now Global Board of Trustees. Flagship projects which they have nurtured beginning BGM2011 prep like BITSConnect2.0, BITS Spark and the umbrella “Bridges to the Future Campaign” need to be taken into high-gear, fulfilled and celebrated with full gusto. A new BGM 2014 Org Team needs to be put together. A more capable and energetic team who can do more justice to them has taken over - the dynamic Rohit Koul (’02) as the new CEO, the equally vociferous and committed Vijay Sharma (’06) as the new COO. “Maximizing the potential of BITSians and BITS Pilani” has begun with new visions, new beginnings, fresh minds and a renewed sense of purpose and direction.

 

BITSAA, in the next couple of years, in my opinion will need to focus on “alumni enrichment” - efforts for career improvement (online portal or in-person career fairs), promoting young entrepreneurs (BITS SPARKS) will make the network more relevant to the alumni. The more we get together for fellowship, the more we will devise projects benefitting our alma-mater. This is what most of the successful long-lasting chapters have been doing - Indore, Jaipur, Delhi, Australia, SVC. Getting together only when it is time to give is not a sustainable approach. BITSAA International in recent years, has focussed much on the mechanics - running things (scholarships, awards, programs etc). With the newly established  Office of Alumni Affairs at BITS taking full shape, BITSAA should transfer those obligations to BITS. That will free up our volunteer hours to promote existing programs - virtually or through chapter events. We can then figure out more says to enhance our bond as alumni, think of and execute programs benefitting alumni (job fairs, entrepreneurship, career growth, professional improvement etc). We can also find ways to collaborate and deliver on projects involving alumni worldwide. Chapter events which are held could be promoted to wider audiences - in person or virtually. We will be able to find ways to bring BITSians who are “out of the network” back into the fold. Alumni through BITSAA could potentially support BITS in other ways it has identified for us (outside of fundraising) - “identifying and hiring quality faculty”, “hiring graduate BITSians from the undergraduate and post-graduate programs”. “establishing new Practice School stations”, “setting up centers for excellence, Chair Professorships,” “leveraging their positions of influence in bringing to BITS” already available industry and government funding for research and teaching. The opportunities are endless. BITS resolve is strong. BITSians are the most passionate when it comes to BITS. The recipe, I feel is just about right. We just need to get going.

 

Go BITS.

LWP failed with code[400]

Wednesday, April 11th, 2012

When installing Perl modules with cpan, it is possible to get a error due to the firewall.


Fetching with LWP:
ftp://cpan.cs.utah.edu/CPAN/authors/01mailrc.txt.gz
LWP failed with code[400] message[FTP return code 150]
Fetching with Net::FTP:
ftp://cpan.cs.utah.edu/CPAN/authors/01mailrc.txt.gz

after doing:

perl -MCPAN -e shell
install

It typically hangs for a while while trying to fetch for a while over LWP or FTP
The simple fix is: export FTP_PASSIVE=1 before calling sudo perl -MCPAN -e shell or sudo cpan as the case may be.

The same thing ca be done within cpan with o conf ftp_passive