Cyber-Physical systems solve complex problems through their tight integration between the physical and computational components. Therefore, the reliability of a complex system is the most critical requirement for the cyber-physical system because an unreliable system often leads to service disruption, property damage, financial loses and sometimes lead to fatality. In order to develop more reliable CPS, this paper proposes a generic framework for reliability modeling and analysis for our ongoing work on cyberphysical systems. The proposed architecture is comprising of physical elements such as sensors and actuators, communication network, computation and control units, and a reliability model. The reliability model covers almost all possible reliabilities required to a general cyber-physical system. Furthermore, we demonstrate the proposed framework with an illustrative example by using different reliability values from "offshore and onshore reliability data" library.