Here is some "all in one" Instructable on how to replace the hard drive in late 2012 iMac (with thin edges, version number 2544) with SSD and get it up and running.
Step 1. Gather parts.
Step 2. Software.
Step 3. Disassembly.
Step 4. Assembly.
Step 5. Software, part 2.
Step 6. Finish.
Step 1: Gather Parts.
For this step you need to gather some parts.
A SSD. I purchased 500 GB Samsung SSD 850 Evo because it was decent capacity at comparatively low price in my area. I did not want to put smaller capacity SSD into the iMac and higher capacity SSDs were much more expensive. Although this brand/type works fine for me I'm sure there are others that are comparable in most ways, check local availability and prices. Apparently some hard drives will cause the fan inside to go to highest speed. There is a program available to fix that but you should be safe with all the latest drives.
For tools you need a Torx (T10) screwdriver. I couldn't find mine so I used 2.4 mm (1/10 inch) slot screwdriver from a set I had lying around. It worked fine.
You should use very thin foam tape to tape the screen back on. I used matt "scotch" tape for temporary fix and then ShoeGoo for semi permanent closing.
I used 5-10 business cards to break the foam tape so I could remove the monitor and get to the internals.
Finally you need at least 16 Gig USB3 thumb drive to boot up from. 16 Gig is the absolute minimum you can get away with for boot up drive, I guess you could use USB2 drive but then it will probably take an hour to boot up.
Step 2: Software.
You'll need to download latest Apple operating system and install it on a USB thumb drive.
Normally you cannot download the latest Apple operating system as a installation package. But if you go to the App Store, select purchases while holding down the alt key there should be a download button next to the OS X.
While you are downloading the OS X (almost 6 Gigs so it takes few minutes :)) take the USB thumb drive and format it with 1 partition using Mac OS extended (Journal) file system.
Then install the OS X onto the thumb drive. This will take few more minutes and your iMac will reboot. Do not skip the networking setup step, you'll need networking for installation of new OS X. Importing settings is optional. I started with fresh setup.
Reboot your iMac and hold down Command + R button as soon as it starts, don't let go until the Apple logo appears. Make sure it boots into the OS X Utilities screen. Then turn it off and start disassembly.
Step 3: Disassembly.
Start by unplugging the iMac and don't touch the printed circuit boards when working on it. It is no fun to get electric shock while working on the computer and it can not only kill you but also damage some components. You should also follow ESD guidelines to prevent Electro Static Discharge damage, I have seen expensive parts stop working as a result of being handled.
To open the iMac and get to the hard drive you need to cut through the foam tape on the edges where the monitor is taped to the aluminium. Stiff plastic is best but credit cards are too thick, you risk breaking the glass that the monitor is bonded to. I used paper business cards, stiff enough to cut the foam tape, soft enough to not cause damage. I started at the top on one side, pushed a corner between the aluminium and glass and slid it down. You only need to get the corner of the business card about 5 mm (1/5 inch) in from the edge to break the foam tape. After getting both sides loose I started at the top and cut away from the camera "eye" to each corner. Do not cut towards the camera, you might hit the camera and damage it. I destroyed 5-10 business cards that tore or folded on the corners. Do not use too much force, you might break the glass.
After you have cut the foam tape on top and both sides, gently separate the glass from the chassis, it will still be glued with a foam tape at the bottom but that will break when you tilt the top of the monitor out. Disconnect the 2 cables from the monitor to the motherboard and remove the monitor. The top connector needs careful wiggling to get it loose then lift the wire-clip holding bottom connector in place. Carefully peel all the foam tape from monitor and chassis and put the monitor in a safe place so it does not get damaged while you are replacing the hard drive.
I started with cleaning. My two and half year old iMac was full of dust, the fan was so caked with dust that I could barely see the fan blades. I don't understand why Apple designers make it this hard to get to the fan to clean it.
Remove the 4 screws holding the hard drive brackets in place, the screws are different lengths so please note which goes where, then unplug the hard drive and remove. Carefully remove the glued rubber from the hard drive and put it around the SSD.
Step 4: Assembly.
Plug in the SSD and install it in the place of the old hard drive. Then screw in the brackets using your trusty Torx screwdriver.
Plug the monitor back in and temporarily tape it in place. You can install it permanently when you have the iMac up and running.
Plug the power cable in.
Please keep everything clean during assembly, dust in a connector can cause intermittent failures.
Step 5: Software, Part 2.
Plug your USB thumb drive in, start your iMac and hold down Command + R to boot into OS X Utilities.
Select Disk Utility and format the new SSD with 1 partition using Mac OS extended (Journal) file system.
Then select reinstall OS X. The computer will download the latest OS X and install it onto the SSD.
When install is complete remove the USB thumb drive and boot your iMac from the SSD. Mine booted so fast for the first time I started to giggle. :)
Now you can log in to the App Store and install any software you have purchased there.
I keep my documents on external drive. You might wish to import your old documents and settings. If you have external hard drive dock you can use it to connect your old hard drive and import them using the Time Capsule program that is built into OS X. I chose to start with fresh install to keep the iMac faster. The odds of having malware on your old system are high and if you import your old settings you might also import the malware.
Step 6: Finish.
Once you get your iMac fully working seal the monitor to the chassis. You can buy special foam tape or use general purpose one, but it is very hard to get general purpose foam tape that is thin enough. Apparently Apple uses foam tape that is roughly 0.5 mm (1/48 inch) thick. I put small dabs of ShoeGoo glue near each corner and kept the monitor taped in place for few days. That gave me secure mounting and will be easily removable when I clean the fan again.
Couple of days after I put the SSD in my iMac it started to reboot when coming out of power save mode. I adjusted the power settings in settings and since then it has only rebooted once.