Archive

Archive for the ‘MOSS 2007’ Category

RIP Lee Marriage

August 14th, 2008 1 comment

[Via Ishai Sagi]

I was just informed via Ishai’s blog that Lee Marriage has passed away last weekend.Lee had a sharepoint blog at “The learning curve“. I didn’t personally know him , but he was into SharePoint , right? so that’s enough for me to take couple minutes of my time and write about him and wish his soul eternal rest. Goodbye Lee!

Categories: General, MOSS 2007 Tags:

Timebombed VM (Part 3):Distribution

August 11th, 2008 No comments

In part 2, we went through the process of creating a differencing drive based off a timebombed virtual image from Microsoft. Now, let’s look at what the value proposition of this process is. First, you have built a virtual machine that has a timer bomb in it. Second , instead of distributing the whole VM machine, you only distributed a much smaller differencing drive. You can tell others to download the MS base image, rename it to what you chose for the base image and place it in the same folder. Then ask them to create a new virtual machine and point to your differencing drive. That’s all! Let’s go through the step by step practice together:

1) Download my differencing drive from here. It is only 4.54 MB!

2) Unzip and place DhWSSDevDiff.vhd in a folder in your hard disk. For example “F:\Test\DhWSSDevDiff.vhd“. It is not important where you place it.

3) Download this MS image from the download center. I used this image, so you must use this one as well.

4) Unzip and place WSS.vhd in the same folder as DhWSSDevDiff.vhd.

5) Rename WSS.vhd to MsWSSBaseWithSP1.vhd. I used this name for my base image, so you must use the same name as well.

6) Create a virtual machine and point it to my differencing drive (DhWSSDevDiff.vhd).

7) Start your virtual machine. Once you login, your desktop looks like the below picture.

8 ) Great! Now ,you have learned how to ship your functionalities in a diff drive protected by Microsoft EULA and timer bomb in the base image– Thanks MS!

081208-0420-timebombedv111.png

Like any other workaround, this has its own demerits:

  1. You are locked down to the expiration dates MS places on their images. As I alluded to in part 1,  there is going to be at least one SharePoint images available to use in this process until Sep 2009.
  2. You have to use the correct base image, otherwise this doesn’t work. Using the same base image is a very important step!
  3. There is a point of no return when using differing drives. If for any reasons base image needs to be updated, you need to rebuild the differencing drive and redistribute it. You can’t expect those changes to be propagated to your differencing drives automatically. An image that is used as the base for differencing drives must be sealed (Make It Read only). Changes to the base image will cause unexpected behaviors in the derived vhds if they are not rebuilt.
  4. The point of no return is also true about the base image. If you need to retimebomb it, you need to to build and redistribute your differencing drive again.

I still have to verify when the counter starts. From when you built your diff drive or from when your customer attaches your diff drive to their base trial image? Either case , they have 30 days maximum to play with the virtual machine and they can’t use the machine when the current date > VM drop dead expiration date (Septemberish!).

If you are downloading my diff drive available here one month after the date of this blog post ( the same date I built the diff drive) and following the steps above and you see the time bomb gets activated , please leave me a comment here and let me know that the bomb was exploded properly.

In case you need to add a prelogin image to your timebombed VM providing your users with login and other useful information, just create a BMP image and store it somewhere. Then fire up regedit and put the full path in HKEY_USERS\.DEFAULT\Control Panel\Desktop\Wallpaper key:

regedit.png

And here is the end result:

devhorizonprelogin.png

Categories: MOSS 2007 Tags:

Timebombed VM (Part 2):Build

August 11th, 2008 No comments

In part 1, I gave you an introduction on what I want to accomplish in these blog post series. In case you haven’t read it yet, please have a look. Now, let’s get your hand dirty:

1) You need to download a trial image first. Let’s get started with this one.

2) Put it in a folder (say “D:\VPC\Trial”) and change the name to MsWSSBaseWithSP1.vhd.

3) Using VPC 2007 , create a virtual machine and point it to the vhd drive you’ve just downloaded. If you are using Virtual Server 2005 R2, read this paper on how to work with differencing drives.

4) Click on Settings, choose Hard Disk 1 and click on Virtual Disk Wizard.

5) Next, choose “Create a New virtual disk”.

6) In next dialog box, choose “A virtual hard disk” and click next.

7) Specify “D:\VPC\Trial” as your Virtual Hard Disk Location (same location as you placed MsWSSBaseWithSP1.vhd) and give it a name. I named mine DhWSSDevDiff.vhd.

8 ) Next you need to choose Differencing in Virtual Hard Disk Options.

9) Now select “D:\VPC\Trial\MsWSSBaseWithSP1.vhd” as the parent virtual hard disk for your new differencing drive. Then click Finish.

10) You should get a dialog box like below. Also note how small new diff drive is. That’s because, it has nothing on it yet.

11) Before you fire up the virtual machine, make sure you do two things:

  • You make the base image Read Only.
  • You get the Hard Disk 1 (previously pointing to the base image) to point to the diff drive instead.

12) Go ahead and fire up new virtual machine.By the time you get to the OS login page, your new diff drive has increased in size.

13) Login and here is your timebombed machine:

I placed my contact information on the desktop and changed the background so when you download the image, you know that this is my diff drive showing up in your virtual machine. You can download this diff drive from here. Okay, Let’s move on to part 3.

Categories: MOSS 2007 Tags:

Timebombed VM (Part 1):Introduction

August 11th, 2008 No comments

Thought about placing a timer bomb in a virtual machine?  If yes, you probably know it is not an easy thing to do. Yeah! Microsoft places all these timer bombs in their trial images and make them expire after 30 days or when passing beyond a certain date, but there is no documentation anywhere so you can follow to get yours going. Apparently, there is a specific group in MS, responsible for designing, activating and placing all these bombies on various VMs.

Paul Andrew and Andrew Connell showed me how to work around this by using differencing drives , exclusive features of Virtual Server and VPC. I too decided to share the experience with you. Almost a year ago, in this paper I showed you how you can use differencing drives to chain various machines together and come up with your own SharePoint dev environment, but I absolutely had no idea that I can use the same technique to come up with timebombed VMs.

Since SharePoint was RTMed, there has been always a trial (30 days) image being available for people to download and play with. These images come in full blown with all required bits installed to test drive SharePoint. They either expire after 30 days (unless you activate it using a non-VL MSDN key) or after a certain date is reached and bascially timebomb gets activated (mostly around September each year) . For example the RTM Image  which was released in late July 2007 would expire on Sep 2008. Later, Paul Andrew put this one (SP1 SlipStream Image) up there in June 2008 that would expire on Sep 2008.

There will be more FREE images coming down the pipe that pushes the expiration date out to Sep 2009.That being said,there is always an image from MS that has been timebombed. BTW, Keep an eye on this blog post for updates as they become available.

So why is this important?

If it is not an easy task to place your own timer bomb and If Microsoft has already timebombed all its trial images released to public (with all the software and tools you get for trial in those images), why can’t we just reuse this mechanism (It’s all about reusability babe! 😉 ) and build our own machines on the top of theirs while relying on their time bomb capability? How? Okay, you need to read Part 2 then.

Update(18/October/2008): A new MOSS 2007 Virtual machine has just been pushed out to the MS download site. Check out my post here.

Categories: MOSS 2007 Tags:

Atomic use cases,Features, WSP Solutions and VS solutions

August 7th, 2008 2 comments

I understand that each project has its own requirements and those requirements would dictate the layout of your VS solution(s) and the way you package your work into WSP solutions.

As I discussed this with other MVP and non-MVP devs, we finally came to a conclusion that there is no “best way” that fits all scenarios -for example, my buddy Dan Attis (MVP) uses an interesting methodology to package his work into very atomic units (each wrapped into a  feature) and grouped into a Visual Studio project  based on their relevancy and mapped to a WSP solution (SharePoint Solution). One or more projects are located in one VS solution (4 to date). His logic is:

Support , extensibility and maintainability is #1 concern due to the nature of our project ;therefore we need to make sure that future updates would run in the most abstracted way possible. Additionally, we would like all of our developers to be able to work in parallel.We have come up with 25 WSP solutions in total.

We pretty much can’t follow the above approach as we are a small group of developers (Maximum 3 people on a project – one is our designer), always under the delivery pressure, we build, deliver and move on to the next project. Although , this doesn’t mean that we do a poor job on what we do, for us, agile development usually outweighs the extra time required to plan and deal with the complexity of such granularity. In addition, the total number of support cases we have got in 2008 has been ZERO so far, whereas we have got our hands on four medium to large scale projects since Q1. We simply can’t afford anything that causes extra complexity and slows down our dev cycle, my QA (Yeah, I like finding issues 😉 ) and final deployment to the customer’s site.

Below is the way I normally layout my projects in one VS solution. Each project is wrapped into its own WSP solution and deployed in orders. Groping related bits together and abstracting them from each other in a reasonable manner, gives us the possibility for 2 devs to be working on the same project without affecting each other’s work. Sometimes and  based on the situation , I may merge two or more projects into one package , but generally speaking , my deployments are around 5 to 6  WSP packages max.

      Core (Class library – Deployed to GAC)

1.      This project is meant to host the code thatis meant to be used as the base for all other projects in the solution (Think about it as classic Common lib)

OR

2.      Can’t be placed in other projects (for example my membership provider bit)

      Controls (Class library – Deployed to bin folder)

1.      All Web parts and user controls

2.      If I need more granularity in terms of security, I abstract the control in its own assembly and apply more restricted CAS on it

       Infrastructure (Class library – Deployed to GAC)

1.      Custom Field Definitions

2.      Standalone Site columns  (Standalone site column is the one which is used in an standalone content type)

3.      Standalone Content types (Standalone Content type is the one which has no workflow attached to it)

4.      List Definitions

5.      Non-publishing Site Definitions

6.      Custom processes attached to the non-publishing Site Definitions (For example :Provisioning handler)

       Publishing (Class library – Deployed to GAC)

1.      Field controls used in publishing context

2.      Publishing site columns

3.      Publishing content types

4.      Workflows used in publishing context

5.      Web parts used in publishing context ( for example those derived from Content Query Web Part)

6.      Master pages and page layouts

7.      Custom xslts used in publishing context

8.      Delegate controls used in publishing context

9.      Publishing Site Definitions

10.  Custom processes attached to the publishing Site Definitions

       Workflows (Class library – Deployed to GAC)

1.      Site columns

2.      Content types

3.      Workflows used in non-publishing context

4.      InfoPath forms used in workflows as Initiation, Association and task forms

5.      Feature receivers to add content types to the appropriate lists or doc libs proviosned by Infrastructure solution

Categories: MOSS 2007 Tags: