Electronic and magnetic structures of CeTe2