  Smart farming is a recent innovation in the agriculture sector that can
improve the agricultural yield by using smarter, automated, and data driven
farm processes that interact with IoT devices deployed on farms. A cloud-fog
infrastructure provides an effective platform to execute IoT applications.
While fog computing satisfies the real-time processing need of delay-sensitive
IoT services by bringing virtualized services closer to the IoT devices, cloud
computing allows execution of applications with higher computational
requirements. The deployment of IoT applications is a critical challenge as
cloud and fog nodes vary in terms of their resource availability and use
different cost models. Moreover, diversity in resource, quality of service
(QoS) and security requirements of IoT applications make the problem even more
complex. In this paper, we model IoT application placement as an optimization
problem that aims at minimizing the cost while satisfying the QoS and security
constraints. The problem is formulated using Integer Linear Programming (ILP).
The ILP model is evaluated for a small-scale scenario. The evaluation shows the
impact of QoS and security requirement on the cost. We also study the impact of
relaxing security constraint on the placement decision.
