In Canada, if your grow op get's busted you simply plead guilty and usually just pay a fine of around $5,000-10,000. This is for a huge operation yielding pounds for resale. This is also if there aren't any guns found inside, or gangster type shit. If you are renting a house, and running a grow op the landlord may sue you however if there's damage from mold/ect. The provincial hydro company may sue you as well to collect stolen energy to run the grow. If you just have a small operation for mainly personal use nothing will happen besides them being confiscated. You can easily get an exemption to grow medical weed for a variety of conditions. A typical med marijuana license allows you to grow 35 plants, store up to 1575 grams, and possess up to 210 grams on your person.
Pleading guilty and cooperation is key, because since you save the court time and huge amounts of money by avoiding a trial the judge will definitely not send you to jail unless you've been caught numerous times before. Even still it's very unlikely any grow op owner will go to jail, as these things are usually set up by an associate buying the home, then other associates running the grow op. When the cops bust the place there's just the caretaker there who claims to know nothing and usually ends up with probation, but none of this is recommended unless you're in organized crime so just simply get a lawyer and plead no contest.
That said you will never be able to travel to the USA again, as the border guards will turn you away for any previous weed related conviction.