The effective implementation of Industry 4.0 requires the reformula-tion of industrial processes in order to achieve the vertical and horizontal digi-talization of the value chain. For this purpose, it is necessary to provide tools that enable their successful implementation. This paper therefore proposes a da-ta-centric, distributed, dynamically scalable reference architecture that inte-grates cutting-edge technologies being aware of the existence of legacy tech-nology typically present in these environments. In order to make its implemen-tation easier, we have designed a metamodel that collects the description of all the elements involved in a digital platform (data, resources, applications and monitoring metrics) as well as the necessary information to configure, deploy and execute applications on it. Likewise, we provide a tool compliant to the metamodel that automates the generation of configuration, deployment and launch files and their corresponding transference and execution in the nodes of the platform. We show the flexibility, extensibility and validity of our software artefacts through their application in two case studies, one addressed to prepro-cess and store pollution data and the other one, more complex, which simulates the management of an electric power distribution of a smart city.