The Industry 4.0 (I4.0) adoption comprises the change of traditional factories into smart using the ICTs. The goal is to monitor processes, objects, machinery, and workers in order to have real-time knowledge about what is going on in the factory and for achieving an efficient data collection, management, and decision-making that help improve the businesses in terms of product quality, productivity, and efficiency. Internet of Things (IoT) will have an important role in the I4.0 adoption because future smart factories are expected to rely on IoT infrastructures composed of constellations of hundreds or thousands of sensor devices spread all over the industrial facilities. However, some problems could arise in the massive IoT deployment in a medium-high factory: thousands of IoT devices to cope from different technologies and vendors could mean dozens of vendor tools and user interfaces to manage them. Moreover, the heterogeneity of IoT devices could entail different communication protocols, languages, and data formats, which can result in lack of interoperability. On the other hand, conventional IT networks and industrial machinery are expected to be managed together with the IoT infrastructure, maybe using a tool or a set of tools, for orchestrating the whole smart factory. This work meets these challenges presenting an open-source software architecture solution based on OpenDaylight (ODL), a Software Defined Network (SDN) controller, for orchestrating an industrial IoT scenario. This work is addressed by shedding light on critical aspects from the SDN controller architectural choices, to specific IoT interfaces and the difficulties for covering the wide range of communication protocols, popular in industrial contexts. Such a global view of the process gives light to practical difficulties appearing in introducing SDN in industrial contexts, providing an open-source architecture solution that guarantees devices and networks interoperability and scalability, breaking the vendor lock-in barriers and providing a vendor-agnostic solution for orchestrating all actor of an I4.0 smart factory.