The government of Myanmar has signed what it says is a nationwide ceasefire deal with eight armed ethnic groups.