The independence vote is part of a 2005 peace deal between the north and the south that ended 21 years of civil war .