Defence Minister Richard Marles and his Japanese counterpart, Koizumi Shinjirō, signed the deal aboard one of the warships docked in Melbourne.