Wednesday, February 22, 2012

SVN stops working after uninstalling Postgresql on Mac

I returned to using svn for a particular project after a while and noticed that svn command failed. The failure was:


dyld: Library not loaded: /usr/lib/libpq.5.dylib
  Referenced from: /usr/bin/svn
  Reason: image not found
Trace/BPT trap: 5


I figured ubersvn was at fault, given that I had a ubersvn server running few months back and I had uninstalled it. I was completely off base. Poking around a while, I realized that it was not ubersvn but Postgresql un-installation that mucked around with the symlink. Creating a symlink to the current version of the library fixed the issue. 


sudo ln -s /usr/lib/libpq.5.3.dylib /usr/lib/libpq.5.dylib


Strange to see Postgresql mucking around with svn. Who would have thought? Thanks to this article for pointing me to the fix.
- Harpreet

Friday, December 09, 2011

Little Schemer in Clojure

Recently I decided to brush up my completely rusted knowledge of Scheme. I was in the process of reviewing it when I came across Clojure and figured why not try to run these in parallel. Two birds with one stone - a JVM language if I needed to fall back into the warmth of Java and Scheme syntax to get away the boredom of Java's verbosity.

With that in mind, I will go through the Little Schemer book and attempt to do the exercises in Clojure.
So here is chapter 1 from the Little Schemer:

Concept Scheme Clojure
Define a list '(1 2 3) '(1 2 3)
Set list to a variable (define x '(1 2 3)) (def x '(1 2 3))
Get first item from list (car x) (first x); or
(define car [x] (first x))
Get second to last items from list (cdr x) (rest x); or
(define cdr [x] (rest x))
Are two lists equal? (eq? x y);
where (define y '(2 3))
(= x y);
where(define y '(2 3))
Add an atom to a list? (cons 0 x);
will return (0 1 2 3))
(cons 0 x);
will return (0 1 2 3)
Is this an atom? (atom? x) - returns #f;
where
(defun atom? (x)
(lambda (x)
(and (not (pair? x)) (not (null? x))))))
(atom? x) - returns #false;
where
(defn atom? [x]
(not (coll? x)))

I am using MIT-Scheme & Clojure 1.3 versions.
Setting up Scheme is easy, run MIT-Scheme.app on Mac, it brings up Edwin - the scheme emacs interpreter. Running commands requires C-x C-e on the REPL.

Clojure is easier do a java -cp /PATH/TO/clojure-1.3.0/clojure-1.3.0.jar clojure.main

- Harpreet

Thursday, October 13, 2011

Jenkins User Conference Ringside Report

The last four weeks have been bit crazy for me. I was speaking at Liferay West Coast Symposium, speaking at JavaOne and kicking off the Jenkins User Conference (JUC).

Of these, I was really really looking forward to the JUC kick-off. Namely because I was kicking off the user conference. How often does one get to kick off the first conference of an incredibly exciting piece of technology? When I (and others at CloudBees) talked about this idea in March - we had no idea what the interest level would be. There was uncertainty in the environment. Since then Jenkins has kept marching on - its an animal ;-) (check Kohsuke's slides on Jenkins adoption).

The second reason for the excitement is that I have been associated with Jenkins for quite a while now. Back at Sun - I was the first product manager for Hudson and actually worked on offering it as a product. At that time, I was fairly concerned that in the acquisition to Oracle - this project might be killed so to see the tremendous the project thriving (inspite of Oracle ;-)) was gratifying.

The last reason for the excitement was to see Kohsuke's labor of love get to the next level. You often hear people talking about doing what you love - Kohsuke exemplifies this ideal, so it is great to see something he has been working on from 2004 doing so well.

Ok now to the ringside report...

  1.  June: 
    1. Hey you know the crazy idea of doing a conference for Jenkins? How about we actually do it? Getting the community to congregate and meet would be really really cool.
  2. July
    1. Lets do it (from CloudBees perspective aka we will have someone from our team spending time and resources setting this up if the community is interested)...
    2. Reach out to the community to see if they are interested. 
      1. Ok - the community is interested. (Good - we @CloudBees are not smoking something ;-))
    3. Lets do it (from everyone's perspective)
      1. When do we do this? How about JavaOne? Jenkins users will be there? Sounds good!
      2. Really are we doing this? You know this leaves about 10 weeks to organize this?
    4. Form a basic organization committee with CloudBees members and the community. (formed!!)
  3. August:
    1. Make the idea public. (Couple of community members join the committee). How many do we anticipate? say about 150 people, 1 track and about 10 submissions and perhaps 1-2 sponsors.
      1. Holy cow! there is tremendous interest.
    2. Open for call for papers... (opened!)
    3. We need sponsors to keep this free. (AI - find sponsors)
    4. Where are we holding this? (AI find location)
    5. Okay seems like we need to have two tracks. Harpreet - please proposed an agenda!
    6. Ok. Agenda proposed
    7. Abstracts submitted for CloudBees talks.
    8. I propose two contests (Bring me bugs and bug bounty) for even greater community participation. (Heidi has the unhappy task of making sure these can be done...) 
    9. We should do a newsletter for Jenkins and a survey too. (Lisa gets to it)
    10. Alyssa handles all the logistics - finding a place and booking it and food....
  4. September: Everything from here on is hazy now
    1. We have 7 sponsors (yay!)
    2. We have 400+ registrants (yay!)
    3. We have 30 submissions (yay!)
      1. Review the submissions. Too many good ones. (feel terrible rejecting some :-()
    4. I need to do opening keynote introduction (moi?)
    5. Build slides...
    6. Heidi, Lisa, Alyssa & Andre in complete overdrive mode. (Side note:I should ask them to blog for this month)
  5. October
    1. Conference is packed! 250 people show up. Lines start at 8am on sunday. 
      1. Commonly asked question: Can we have one in Europe as well?
      2. Congratulations all around!!
      3. Emotional moment for Kohsuke - after all that he has been through this year.
    2. Opening to the keynote done (whew...) some people actually liked what I presented...
    3. Hit all sessions...Network...
    4. Get the videos from the videographers. (in process)
    5. Post slides (in process)
    6. Do a retrospective or a ringside (marking this as done ;-))
      1. Other retrospectives: Sacha, Kohsuke
  6. Round of thanks to
    1. Kohsuke (for Jenkins :-))
    2. CloudBees Marketing: Alyssa, Lisa, Heidi, Harpreet and Andre
    3. Sacha for supporting the crazy idea
    4. Community Members: Andrew Bayer, Michael Hutterman, Tyler for helping with the organization
    5. Community: For making this so successful
Meanwhile my slides are here.

Friday, September 16, 2011

3 Quick Steps to run Jenkins on uberSVN


WANdisco recently launched a beta of their uberSVN application. As part of this application, they have launched an uberApp store. The first application available through uberApp is your friendly neighborhood butler - Jenkins.

On Sept 14th, I was a panelist on a training webinar hosted by WANdisco. In the webinar, we showed users how to install and use Jenkins through uberSVN.

uberSVN brings in social experience to the SVN repository. It aims to bring additional development related tools into this experience, centered around the repository. uberSVN is extremely easy to install. Suffice it to say that I had a fully running SVN server with Apache front-end running in about 5 minutes (sweet).

Setting up Jenkins is super easy to do as well. For the visually inclined – look at the picture and skip the rest of the blog. These are really the 3 main steps that you need to do:


  1. Download Jenkins: You go to uberApps within the uberSVN, choose Jenkins, enter your email information and password and hit install. uberSVN downloads Jenkins and starts it. (1 and 2 in the image) 
  2. Associate Jenkins to a repository: Creating a repository is as easy as pressing an add button. Once you setup the repository a Jenkins instance is associated with it. The Jenkins SVN plugin is pre-installed. (3 in the image)
  3. Create and run the job: Go to the Jenkins tab and create a new job. The SVN configuration is already done for the particular job. Go back to the repository tab and kick-start the job from there.  Of course before you start the job – you will need to go to the Jenkins job configuration screen to tell it how to build your particular job. (4 and 5 in the image)


For folks using SVN, uberSVN provides a very easy and consumable view of the repository and is worth checking out.


- Harpreet

Friday, August 19, 2011

Liferay, Redhat join as sponsors for Jenkins User Conference

Greetings Jenkins Users!
Things are coming together nicely for the Jenkins User Conference (JUC) that will be
held on October 2, which is the day before the start of the JavaOne conference in San
Francisco. I am excited about the value of this conference for the Jenkins
Community. It will bring together Jenkins users from all over the world and will be a
great forum for all of us to share best practices, tips 'n tricks, and other expertise -
all with Jenkins as the common denominator.
As the conference takes shape, I am extremely excited about two additional
sponsors who have stepped up to join CloudBees in sponsoring JUC. They are:
Liferay and Red Hat.

Liferay is one of the most popular open source Java based portals in the market.
They have a huge developer community and user community. Liferay makes
extensive use of Jenkins as their development platform. Expect to see a session from
them describing their use-case and the lessons they have learned in setting up their
Jenkins environment.
You can read about Liferay's Jenkins environment on one of Brian Chan's blogs.
Liferay runs about 800 backend and 200 Selenium tests on every commit (you need
an account on their system to view it). For Liferay users, here is another blog that
lists how to run Liferay jobs on Jenkins.
As an aside, not many know that Paul Hinz, CMO of Liferay, was at Sun Microsystems
and was a pivotal decision maker in funding Kohsuke's hobby project called Hudson.
Paul was also pivotal in releasing Hudson as a product within the now defunct
GlassFish Portfolio, which I worked on. Considering the legacy Paul has with Hudson
- and by default, Jenkins - we should all feel honored to have Paul and Liferay
support JUC!
The third sponsor that has stepped forward is Red Hat. What can I say about Red
Hat - is there anyone who doesn't know them? Red Hat has been running
Jenkins/Hudson for years and has made their Jenkins QA page publicly visible. A
funny personal note is that when I worked at Sun and was managing marketing for
the Glassfish Portfolio, I used to show this page to potential Hudson clients and
mention that Redhat JBoss uses GlassFish Portfolio :). Sometimes it's a small world
- especially in the development space - competitors become friends and friends
become competitors! Along with CloudBees and Liferay, it feels really great to see
Red Hat endorse JUC, as well.
However, what is most exciting for me is that these two companies are leaders in
their respective markets and are also hard-core users of Jenkins. To have the
established user community endorse JUC - and actively participate in it - is
significant.
Watch the JUC page. Over the next few weeks as we fill in session content and round
out the agenda, there will be lots of new information posted. More sponsors are in
the works and we have some other exciting plans for you!
So if you haven't already, be sure to register for JUC. Thanks to sponsors such as
CloudBees, Liferay, and Red Hat, it is FREE!
See you at JUC!
Harpreet

Friday, August 05, 2011

Jenkins User Conference

CloudBees Motivation:

At CloudBees, Jenkins is everywhere - from people to our products. For example, Kohsuke is in the virtual office next to me, I talk with Ryan (Jenkins as a Service guy), Stephen (weather icons guy) and Paul (Jenkins on private clouds guy) daily; we have built Nectar (our supported version of Jenkins) and DEV@cloud which takes Jenkins into the cloud. We actively contribute source code and encourage Kohsuke to continue in his endeavor of making Jenkins even better.

Internally, we have talked about doing something more than supporting Kohsuke and contributing code - contributing directly to the Jenkins community. Over the past few months, this taken the shape of trying to do a"Jenkins User Conference" - giving the community an opportunity to congregate, present the latest thinking and share some beers.

Details:

We approached the governance board early this week with a proposal to do the conference. The governance board has given us their approval. We would like active engagement from the community. CloudBees will be sponsoring a part of the conference (and we will actively look for others) - any surpluses from the conference will be given back to the community for future events (or infrastructure!). CloudBees has dedicated a few folks to help make the logistics of the conference happen.

Where & When: San Francisco, Oct 2nd 2011.

The idea is to do this on the Sunday before JavaOne (October 2nd).

Why JavaOne? Given that a number of Java developers and Jenkins users will be flying into San Francisco - it just seemed natural to do it at this time.

What's Next?

  • Given the extremely tight deadlines (8 weeks) to set this up. We have setup an Organization Committee made up of couple of members from the Jenkins governance board and from CloudBees. Alias is juc-oc-ext @ cloudbees . com.
  • We invite other community members who want to actively contribute to join the Organization Committee.
  • One of the first things that we want the OC to do quickly is determine the agenda and format. (My follow up blog will indicate a proposed agenda)
  • We will be opening for sponsors soon - we are currently working on sponsorship details. Please let me know if you or your organization would be interested in helping to sponsor this event. We would like the event to be free to attendees.
  • We are immediately opening for a Call for Papers. Talks will likely be 30 minutes in length. We are considering doing a lightening talk session for plugin developers with talks that are 10 minutes in length as well. Email alias for submission: juc-cfp @ cloudbees.com
  • Naming the conference? Suggestions are welcomed! I propose JUC (pronounced juice) :-)
Last words:

I was the Product Manager for Hudson at Sun Microsystems and pushed to offer Hudson as a product while at Sun. I now handle DEV@cloud and Nectar. I have always felt that I needed to directly contribute to the community and I am very excited to see this taking shape. The Jenkins product and the community ROCK (Kohsuke you do too ;-)).

Please shoot me an email - if you want to contribute or have questions and concerns.

- Harpreet

Thursday, July 14, 2011

CloudBees Webinar: Authentication and Authorization in Jenkins on July 27th

One of the most-often asked questions we get about Jenkins is "How do I put the right authorization mechanisms in place for securing Jenkins?"

There is usually an implied question in there, which is, "Which authentication plugin should I be looking at and how do I set it up?"
Our next webinar focuses on the Authentication and Authorization plugins available to Jenkins users. Jenkins veteran developer Stephen Connolly will...

  • Look into the top authentication plugins like "Active Directory", "Crowd", and "Unix password".

  • Dive into authorization plugins like the "Role Strategy" plugin and others.

  • Showcase Nectar's Role-based Access Control plugin (Nectar is CloudBees' pro version of Jenkins).
    This plugin has been the most often requested feature for CloudBees as it provides users a higher level of sophistication that is not available in the open source plugins.

He will wrap up with some use-cases, walk-throughs and Q&A.
This webinar is a followup to Kohsuke's "Securing Jenkins" webinar that we did in March. You can view that webinar here.

Who is Stephen?
Stephen is an awesome guy who happens to be one of the top committers to the Jenkins project and is on the Maven PMC. Here is a link to his bio on CloudBees. I could point you to his LinkedIn bio but then I run the risk that you may try to hire him ;-).

Sign up Information:
When: July 27th, 9 am PT / noon ET

Where

If you are busy, sign up nevertheless as we will send a video of the recording and slides.
- Harpreet