3 ms·
This was a pretty interesting little (week long!) project: get BrowserBox to fit into an ARM deployment template. Here's a link to the resultant template file^
by keepamovin 3y ago
This was a pretty interesting little (week long!) project: get BrowserBox to fit into an ARM deployment template.
Here's a link to the resultant template file^1, and UI definition file^2.
1: https://github.com/BrowserBox/BrowserBox/blob/boss/spread-channels/azure/dosyago/browserbox/azuredeploy.json https://github.com/BrowserBox/BrowserBox/blob/boss/spread-ch...
2: https://github.com/BrowserBox/BrowserBox/blob/boss/spread-channels/azure/dosyago/browserbox/createUiDefinition.json https://github.com/BrowserBox/BrowserBox/blob/boss/spread-ch...
I found ARM templates a complex beast. Powerful, yet sometimes the documentation seemed patchy, unintuitive or spread out. It might have just been me! Everything was found in the docs eventually, but there seemed to be inconsistencies with how properties in schemas were documented. It took me a long time to wrangle this beast in to what I wanted it to do:
1. Create the VM, and network infra with firewall rules to host BrowserBox
2. Run the install script.
3. Notify the human of their login link, via email.
(I thought this a cool, simple way to get BrowserBox going self-hosted with a few steps.)
By far the longest thing to figure out was how to send the email. Insights API, custom metrics, metric alerts, was somewhat challenging. But finally it yielded.
The next issue was the WA Linux Agent would refuse to acknowledge the install script had completed (this actually proved to have silver lining as without this issue I would not have bothered to set up the very convenient login link email, which now lets you fire off your deployment and forget about it, only to be reminded when it's ready with an email ~~ normally 10 - 15 minutes). I think it was something to do with using pm2 (even daemonized), I couldn't figure it and just ended up backgrounding the pm2 process, and running whole segments of the install as a detached nohup background bash function with the VM extension script returning success after launching the background jobs. WA Linux Agent and the Portal were happy with this, leading the Successful Deployments!
Such a good feeling after a week of bushwhacking through the jungle and undergrowth of this new-to-me system, to finally achieve what I wanted! The Wizard UI with 3 clear steps, and minimal number of user inputs, using as many "native" UI elements as possible.
Provisioning the resources was fairly straightforward. And finessing the UI at the end of it all post functional prototype was a joy. Finally!
It's funny how you can have a respect for things you've totally wrangled with.