IMPORTANT!! turn the parts as shown in the picture from Cura (yellow parts) before printing! That way you don't need any supports.
Added a bigger version of the back end to accommodate electronics. This version also has a modified front end in the two lengths, where the inner diameter is increased to 22,5mm to accommodate for this lens: https://www.ebay.com/itm/251962202709
Please note that I have not tested this update myself as I'm out traveling so please let me know if there is any problem with the design.
Chad_R made an addon to secure the LED in the cabinet:
I wanted spotlights for my 3D printer cabinet so I decided to draw stage-like spotlights in miniature. I use LED's from Hobbyking and run them on roughly 130mA without overheating.
Note! this LED is no longer available from Hobbyking. I don't have any recommendations because I don't want to post links to something that I haven't bought and tested. Please look at the various makes of this spot and check if you can find a link or suggestion. Otherwise you should be able to find many good alternatives on ebay and other sources.
It is designed to be printed with the parts oriented as in the picture. I used Cura for slicing, and 0,2mm layer height turned out better than 0,1mm on my Prusa mk2 at 60mm printing speed, black PLA.
Note that the front and rear piece are purposely not press-fit as printers have different precision and it's easer to add a bit of for example melt glue to make them fit tight.
The cables are fed through the hole in the back, you need to use a knife to remove some material from the edges where the LED rests in order to keep the LED level.
I used heat glue for my LED's as I knew I wasn't going to push them very hard.
The holder uses M3 screws and because the holes go through the walls it can handle screws up to at least 18mm.
The front comes in two lengths depending on if you want a very narrow beam or a wide beam. I uses one of each in my printer cabinet, the short one illuminates the whole build plate from above, while the long narrow one focuses on the middle.
The plate in the front is primarily for looks but it can be used to hold colored plastic or you can design your own plate to shape the beam, for example if you want a square beam.
You can enhance the light output by for example using a focusing lens in front of the LED, and I presume coating the inside of the front piece with some highly reflective surface would increase the light output, but it would also widen the beam. Have fun!
Update 02-02-2017 - Added a mount that can be pushed down in flowerpots or in the ground.