.. _virtual_sensor_deployment: Virtual Sensors Deployment ============================ The only thing you need to worry during deployment, is selecting which Virtual Sensor to deploy. It is up to Huxon to analyse your request, and deploy it on your physical infrastructure. To accomplish this task, Huxon takes under consideration multiple metrics such as performance requirements and current status of the infrastructure to generate an optimal distribution of the workload, considering all Virtual Sensors you have selected. .. image:: ../img/deploy_00.png :width: 600px :alt: virtual sensor deployment To create a new deployment select **NEW DEPLOYMENT**. From the menu select all Virtual Sensors you want to deploy, and click on **DEPLOY**. .. image:: ../img/deploy_01.png :width: 600px :alt: virtual sensor deployment 2 This is all the effort required to you to create a new deployment. .. note:: To generate a new deployment you can just create a new deployment with zero Virtual Sensors. In this way Huxon will set all the nodes to a base configuration. The deployment process goes through multiple steps, starting from *compiling*. .. image:: ../img/deploy_03_status.png :width: 600px :alt: virtual sensor compiling and status After applying the Workload Distribution logic, Huxon moves to generate, for each portion of the algorithm, a representation that can be deployed on the target node. Hence, during the *compiling* step, for each code portion that will be delivered to a sensor board, Huxon automatically compiles a specific firmware; while for each code portion that will be delivered to a local or cloud node, it generated a container that can be executed on the specific node. After each code portion is *compiled* Huxon moves to the real *deployment* and performrs Over The Air (OTA) firmware updates for the sensor boards, and updates for the local and cloud nodes, and wait for all these updates to complete. During these steps, you have always the possibility to check the status of the deployment by clicking **RUN CONNECTIVITY CHECK** and using the drop-down menu of the deployment to check the status of each node. .. image:: ../img/deploy_05_ready.png :width: 600px :alt: virtual sensor deployment ready Once all the steps have been completed and each node updated, the deployment status becomes ready, and meaningful data is published to your cloud resource specified during project setup. .. image:: ../img/deploy_06_central.png :width: 600px :alt: virtual sensor deployment publish to central Deployment Hooks ----------------- Huxon offers the possibility to execute deployments dynamically, based on specific conditions that can happens. The entrypoint for the creation of a dynamic deployment is a *Deployment Hook*. .. image:: ../img/deploy_08_hook.png :width: 600px :alt: virtual sensor deployment hook The creation of a deployment hook works as the creation of a deployment, and generates in output a link to Huxon that when accessed triggers the specified deployment. .. image:: ../img/deploy_09_hook.png :width: 600px :alt: virtual sensor deployment hook An example usage of the deployment hook are the *rules* inside Azure Central. With *rules* you can triggers operations based on the outputs published by the Virtual Sensor, so that the deployment hook is triggered. .. image:: ../img/deploy_10_auto.png :width: 600px :alt: virtual sensor deployment hook Once a deployment hook is triggered, you can see in Huxon a new deployment flagged as *automatic*