Iran attacked several military bases hosting US troops in Iraq as a response to the killing of Iranian general Qasem Soleimani.