[{"data":1,"prerenderedAt":340},["ShallowReactive",2],{"blog-\u002Fblog\u002F2024\u002F01\u002Fhow-to-deploy-node-red-with-flowfuse-to-balenacloud":3,"blog-all-for-related":339},{"id":4,"title":5,"authors":6,"body":8,"cta":313,"date":314,"description":315,"extension":316,"image":317,"lastUpdated":313,"meta":318,"navigation":328,"path":329,"seo":330,"sitemap":331,"stem":332,"subtitle":333,"tags":334,"tldr":313,"video":313,"__hash__":338},"blog\u002Fblog\u002F2024\u002F01\u002Fhow-to-deploy-node-red-with-flowfuse-to-balenacloud.md","Step-by-Step Guide to Deploying Node-RED with FlowFuse in balenaCloud",[7],"grey-dziuba",{"type":9,"value":10,"toc":294},"minimark",[11,28,33,44,49,57,61,92,96,104,108,111,133,137,165,169,172,193,197,200,225,229,242,262,266,269,287,291],[12,13,14,15,20,21,27],"p",{},"In a ",[16,17,19],"a",{"href":18},"\u002Fwebinars\u002F2024\u002Fbalena\u002F","recent webinar with balena",", we explored the dynamic capabilities of deploying FlowFuse to a fleet of devices using ",[16,22,26],{"href":23,"rel":24},"https:\u002F\u002Fwww.balena.io\u002Fcloud",[25],"nofollow","balenaCloud",". This blog post serves as a practical guide to replicate that process, specifically tailored for those aiming to streamline their deployment of FlowFuse in an efficient and user-friendly manner.",[29,30,32],"h2",{"id":31},"how-to-implement-flowfuse-with-balenacloud-on-a-fleet-of-devices","How to Implement FlowFuse with balenaCloud on a Fleet of devices",[12,34,35],{},[16,36,40],{"href":37,"rel":38,"title":39},"https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=cKFu1ljUlKE",[25],"Deploying Node-RED with FlowFuse in balenaCloud",[41,42],"img",{"alt":39,"src":43},"https:\u002F\u002Fi.ytimg.com\u002Fvi\u002FcKFu1ljUlKE\u002Fhqdefault.jpg",[45,46,48],"h3",{"id":47},"preparation-steps","Preparation Steps",[12,50,51,52,56],{},"Before diving into the deployment process, it's crucial to familiarize yourself with key resources. We recommend reviewing our previous ",[16,53,55],{"href":54},"\u002Fblog\u002F2023\u002F11\u002Fdevice-agent-balena\u002F","blog post"," on deploying the FlowFuse Device Agent via balena. This post contains a vital link to the GitHub repository, essential for deploying FlowFuse with balena, laying the groundwork for the steps ahead.",[45,58,60],{"id":59},"creating-a-new-fleet-in-balenacloud","Creating a New Fleet in balenaCloud",[62,63,64,79,82,85],"ol",{},[65,66,67,68,73,74,78],"li",{},"Navigate to the ",[16,69,72],{"href":70,"rel":71},"https:\u002F\u002Fgithub.com\u002FFlowFuse\u002Fbalena-device-agent",[25],"FlowFuse git"," repository. Click on the ",[75,76,77],"strong",{},"Deploy with balena"," button.",[65,80,81],{},"Name your fleet.",[65,83,84],{},"Select your default device.",[65,86,87,88,91],{},"Click ",[75,89,90],{},"Create and Deploy",".",[45,93,95],{"id":94},"adding-devices-to-the-fleet","Adding Devices to the Fleet",[12,97,98,99,91],{},"Once your fleet is created, the next step is to add devices. To add a device to your fleet, follow these ",[16,100,103],{"href":101,"rel":102},"https:\u002F\u002Fdocs.balena.io\u002Flearn\u002Fgetting-started\u002Fvar-som-mx6\u002Frust\u002F#add-a-device-and-download-os",[25],"instructions",[45,105,107],{"id":106},"setting-up-flowfuse","Setting Up FlowFuse",[12,109,110],{},"Setting up FlowFuse correctly is essential for seamless operation:",[62,112,113,120,130],{},[65,114,115,116,119],{},"Create a new instance within FlowFuse or use an existing one if you prefer. Follow these ",[16,117,103],{"href":118},"\u002Fdocs\u002Fuser\u002Fintroduction\u002F#creating-a-node-red-instance"," to create a new instance.",[65,121,122,123,126,127,91],{},"Create a ",[75,124,125],{},"Device Provisioning Token"," by following these ",[16,128,103],{"href":129},"\u002Fdocs\u002Fdevice-agent\u002Fregister\u002F#bulk-registration",[65,131,132],{},"Ensure you add the FlowFuse Node-RED application you want the devices to provision. If left at default, devices will need to be manually added to applications.",[45,134,136],{"id":135},"using-the-device-provisioning-token","Using the Device Provisioning Token",[62,138,139,146,162],{},[65,140,141,142,145],{},"First, convert the contents of the Device Provisioning Token to base64. Follow these ",[16,143,103],{"href":144},"\u002Fblog\u002F2023\u002F11\u002Fdevice-agent-balena\u002F#environment-variable"," to convert the file to base64.",[65,147,148,149,152,153,157,158,91],{},"Once converted, import this string into balena as a ",[75,150,151],{},"Fleet"," level variable, not a device level variable. Follow these ",[16,154,103],{"href":155,"rel":156},"https:\u002F\u002Fdocs.balena.io\u002Flearn\u002Fmanage\u002Fvariables\u002F#fleet-wide-variables",[25]," to import the Fleet level variable with the Name ",[159,160,161],"code",{},"FF_DEVICE_YML",[65,163,164],{},"This action will provision any new device added to the fleet with the yaml file configuration, automatically adding the device to a FlowFuse instance.",[45,166,168],{"id":167},"deploying-and-testing-the-flowfuse-instance","Deploying and Testing the FlowFuse Instance",[12,170,171],{},"Deploying the FlowFuse instance brings everything together:",[62,173,174,177,180,190],{},[65,175,176],{},"Navigate to your FlowFuse application created earlier.",[65,178,179],{},"Go to your devices and you should now see your newly provisioned devices from balena.",[65,181,182,183,186,187,91],{},"If this is your first time setting up your fleet, the device will not have a snapshot. You will need to deploy a snapshot. Follow these ",[16,184,103],{"href":185},"\u002Fdocs\u002Fuser\u002Fsnapshots\u002F#create-a-snapshot"," to do so. Ensure that you select ",[75,188,189],{},"Set Target Snapshot",[65,191,192],{},"Once complete, the FlowFuse instance will deploy to your device(s).",[29,194,196],{"id":195},"integrating-influxdb-optional","Integrating InfluxDB (Optional)",[12,198,199],{},"Integrating InfluxDB enables effective data storage and management:",[62,201,202,213,219],{},[65,203,204,205,210,211,91],{},"Similar to the previous steps, navigate to this ",[16,206,209],{"href":207,"rel":208},"https:\u002F\u002Fgithub.com\u002Fmpous\u002Fflowfuse-agent-influx-balena\u002Ftree\u002Fmain?tab=readme-ov-file",[25],"Github repository"," and click ",[75,212,77],{},[65,214,215,216,91],{},"This time, instead of creating a new fleet, select ",[75,217,218],{},"Use an existing fleet instead",[65,220,221,222,91],{},"Choose your fleet for deployment and select ",[75,223,224],{},"Deploy to fleet",[45,226,228],{"id":227},"data-generation-and-management","Data Generation and Management",[12,230,231,232,237,238,241],{},"For testing, we have created a flow to get you started. Follow this ",[16,233,236],{"href":234,"rel":235},"https:\u002F\u002Fflows.nodered.org\u002Fflow\u002F66f37bb739b6cdb0c7ad3a4e2edd68ef",[25],"link"," and import it. There are four sets of flows for you to begin with. The first is for data generation. The second is a manual data generation flow. The third is key as it initiates the creation of a database, in this case, ",[75,239,240],{},"mydb",". The last flow is a simple query that pulls data from InfluxDB.",[62,243,244,251,257],{},[65,245,246,247,250],{},"Import the flows into your FlowFuse instance of Node-RED and deploy. Follow these ",[16,248,103],{"href":249},"\u002Fblog\u002F2023\u002F03\u002F3-quick-node-red-tips-5\u002F#2.-import-helpful-example-flows-provided-with-custom-nodes"," for importing and exporting.",[65,252,253,254,91],{},"Return to Flowfuse, go to your instance, and create another ",[16,255,256],{"href":185},"snapshot",[65,258,259,260,91],{},"Ensure that you ",[75,261,189],{},[45,263,265],{"id":264},"finalizing-and-testing-the-setup","Finalizing and Testing the Setup",[12,267,268],{},"The final steps ensure that your setup is fully operational:",[62,270,271,274,280],{},[65,272,273],{},"Once deployed, navigate to the device.",[65,275,276,91],{},[16,277,279],{"href":278},"\u002Fdocs\u002Fdevice-agent\u002Fdeploy\u002F#editing-the-node-red-flows-on-a-remote-instance-that-is-assigned-to-an-application","Enable Developer Mode",[65,281,282,283,286],{},"Next, click the newly revealed button, ",[75,284,285],{},"Open Editor",", to access the deployed Flow.",[45,288,290],{"id":289},"conclusion","Conclusion",[12,292,293],{},"Implementing FlowFuse with balenaCloud significantly enhances your device management and data processing capabilities. This guide provides a foundational approach, but don't hesitate to delve deeper into each step to tailor the setup to your specific needs.",{"title":295,"searchDepth":296,"depth":296,"links":297},"",4,[298,308],{"id":31,"depth":299,"text":32,"children":300},2,[301,303,304,305,306,307],{"id":47,"depth":302,"text":48},3,{"id":59,"depth":302,"text":60},{"id":94,"depth":302,"text":95},{"id":106,"depth":302,"text":107},{"id":135,"depth":302,"text":136},{"id":167,"depth":302,"text":168},{"id":195,"depth":299,"text":196,"children":309},[310,311,312],{"id":227,"depth":302,"text":228},{"id":264,"depth":302,"text":265},{"id":289,"depth":302,"text":290},null,"2024-01-30","Deploy Node-RED with FlowFuse on balenaCloud effortlessly with our step-by-step guide. Simplify fleet management and enhance data processing capabilities.","md","blog\u002F2024\u002F01\u002Fimages\u002Fbalena-and-flowfuse.png",{"excerpt":319},{"type":9,"value":320},[321],[12,322,14,323,20,325,27],{},[16,324,19],{"href":18},[16,326,26],{"href":23,"rel":327},[25],true,"\u002Fblog\u002F2024\u002F01\u002Fhow-to-deploy-node-red-with-flowfuse-to-balenacloud",{"title":5,"description":315},{"loc":329},"blog\u002F2024\u002F01\u002Fhow-to-deploy-node-red-with-flowfuse-to-balenacloud","Fleet management made easier with FlowFuse and balena.",[335,336,337],"posts","flowfuse","how-to","IzkujlB1cSD8fsvl6dly3x1AHcZRFXK2DcdnKeIgbsg",[],1785528689367]