In this blog post, am going to tell you about yet a new deployment method for loklak which is easy and quick with just one click. Deploying to Azure Websites from a Git repository just got a little easier with the Deploy to Azure Button. Simply place the button in README.md with a link to the loklak, and users who click on it will be directed to a streamlined deployment process. If we want to do something more advanced and customize this behavior, then add an ARM template called “azuredeploy.json” at the root of the repository which will cause users to be presented with different inputs and configure your services as specified.
I’m going to walk you through a workflow that I used to test them before checking them in to my repo, as well as describe some of the special behaviors that the “Deploy to Azure” site does
Adding a button
To add a deployment button, insert the following markdown to your README.md file:
How it works
When a user clicks on the button, a “referrer” header is sent to azuredeploy.net which contains the location of the Git repository of loklak_server to deploy from.
An Example Template
This is a blank template which shows, how the azure divides its inputs.
By following the above template, in the case of loklak server, the parameters used are name, image i.e., docker image, port , number of CPUs to be utilized and space i.e., memory required.
In the resources section we use container, the type of the container will be
And as output, we expect a public IP address to access the azure cloud instance created by us.
Everything under the root “parameters” property will be inputs into our template. Then these parameter values feed into the resources defined later in the template with the “[parameters(‘paramName’)]” syntax.
Try the “Deploy to Azure” Button here:
- Different azure templates available here: https://github.com/Azure/azure-quickstart-templates
- More about Deploy to Azure button: https://www.microsoft.com/developerblog/2017/01/17/the-deploy-to-azure-button/