I know a lot of partners and customers are using the Business Central ARM templates to create an Azure VM, which runs a specific version of Business Central (or NAV). This blog post describes what changed.
First of all, the ARM templates still supports docker images. This means that if you are provisioning Azure VMs using the ARM templates through a PowerShell script, that script should still run.
By default, the artifactUrl is specified to return the latest version and the docker image setting is blank. If you however specify a docker image in the template, it will ignore the artifactUrl setting (hence allowing your script to still run).
There are currently 6 short Urls for creating Azure VMs with Business Central or NAV. In all templates you can replace the artifactUrl to a different artifact, but by default, the shortUrls will give you the following:
As a special option, you can add the number 2 to all Urls to get an insider version (the dev branch). While writing this blog post, the 2 branches are identical and I recommend that you use the Urls above.
When you launch any of those short Urls, you will be asked to login to the your Azure Subscription (i.e. the subscription which pays the cost of your Azure VM). After this, you will see a template, which you need to fill out. see this blog post for more general information about this: https://freddysblog.com/2019/07/26/the-arm-templates-for-dynamics-365-business-central-and-microsoft-dynamics-nav/
The only new field is artifactUrl and it is defaulted as described under Get-BcArtifactUrl in this blog post: https://freddysblog.com/2020/06/27/ci-cd-and-artifacts/
Again – if you enter a docker image, the artifactUrl is ignored. You can either enter a full artifact Url (returned by Get-BcArtifactUrl) or you can enter the parameters for the function (like above) separated by a slash like:
This means that this value:
Yields the same Business Central version (but you probably already guessed that)
If you login to the Azure VM to see what is going on, you will discover that the ContainerHelper is using the mode, where is generates the image and saves it locally on the machine before running it:
All the ARM templates are open source and you are very welcome to clone and change them for your own needs. The github repository is here: https://github.com/microsoft/nav-arm-templates.
The short Urls are calling an Azure Function to embed parameters into the template. You can reuse that, or you can create a direct Url to deploy your template. You will need a URL to your template json file, like:
You need to data string encode this url and append it to https://portal.azure.com/#create/Microsoft.Template/uri/ – then you will have a direct URL, that launches your template:
You can also use the azure function, which also is used by the short urls:
This offers the advantage to specify parameters and build out a string, which can deploy exactly the Azure VM you need (example setting the VmName)
You get the picture…
Freddy KristiansenTechnical Evangelist