How to set up 3 dedicate master + 4 data nodes also master elegible

This didn't change in version 8, it is the same recommendation for the past versions.

Not sure from where you got the configuration to mix up dedicated and non-dedicated master nodes, but I would not recommend it if you can have dedicated master nodes.