Magnetic fields and cosmic rays in galaxy clusters and large scale structures