Ukraine and Russia have agreed to a ceasefire in the Black Sea.