Allan joined Edinburgh Rugby's elite development roster in the summer of 2012, having represented Scotland at under-17, under-18 and under-20 level.
He won his first Scotland A cap in the draw with England Saxons at Scotstoun in January.
The 22-year-old, who is comfortable playing at loose-head or tight-head, made his senior debut for Edinburgh Rugby against Munster in the Heineken Cup last season and has gone on to make five appearances for the club.
He was part of the Harrogate RUFC side which won the Yorkshire Cup three times, while he came off the bench to play for Sale Sharks against Saracens in the LV Cup in 2011.
Allan was due to travel to New Zealand as part of the Macphail Scholarship in the summer of 2013, but a leg break meant he was unable to go.
Alex Allan said: "This is a great move for me. I've learnt a lot over the last couple of years in Edinburgh and I'd like to thank them for everything they've done.
"I'm ready to make the step up and I'm delighted to have signed a professional contract with the Warriors.
"I really enjoyed working with Shade (Munro) and Kenny (Murray) when I was part of the Scotland A squad earlier this year and I'm looking forward to working with them again, along with the other coaches at Scotstoun.
"This is a great opportunity for me to continue my development and I'm ready to work hard and make the most of it."
Glasgow Warriors head coach Gregor Townsend said: "In signing Alex, I believe we've secured a player with real quality, who is young and hungry to learn.
"Alex was a stand-out performer at age-group level and has developed over the last couple of years.
"I've been impressed with his performances this season and how well he has developed as a scrummager.
"He was rewarded with a Scotland A cap in January and made a big impact when he came off the bench in that match.
"Alex is exactly the type of player we want to bring to the club and will add competition to our front row next season."
Guinness PRO12
Suite 208, Alexandra House,
The Sweepstakes
Ballsbridge, Dublin 4, Ireland