This is the template and scripts for producing the OSS Azure Marketplace Offer for Grafana.
For an introduction to create Azure Marketplace offers, you should read this article.
Read the main Azure Resource Manager (AKA ARM) template reference in order to understand how to write mainTemplate.json (an ARM template). To understand how to declare resources in your template, see the resource reference.
High level steps:
GRAFANA_VERSION
command line option to the latest version of Grafana in the scripts/install-grafana.sh
file.githubUsername
and dateUpdated
fields in the metadata.json
field.In order to validate mainTemplate.json, you can use the
Azure CLI
command az
as follows:
Validate the template
Create a resource group.
az login
az group create --name mktplacetest --location "westcentralus"
# We must set the _artifactsLocation parameter since for some reason the
# default won't work when validating
az deployment group validate -g mktplacetest -f mainTemplate.json \
-p _artifactsLocation=https://github.com/grafana/azure-template/tree/master/
It will ask for parameters. See the parameter section below for the values that should be filled in.
Push your branch to GitHub.
Test the install script Deploy the template to Azure with the command below.
yourbranch
to the name of the branch that you pushed to GitHub in the previous step._artifactsLocation
parameter has to have a trailing slash.mktplacetest
) that you used for the group create command.az deployment group create -g mktplacetest -f mainTemplate.json -p _artifactsLocation=https://raw.githubusercontent.com/grafana/azure-template/yourbranch/ -p sshPassword=a_Passw0rd
A list of parameters needs to be filled in:
sshUsername
is the username for ssh-ing into the VM that is created. E.g. ssh [email protected]
.grafanaAdminPassword
is the initial admin password for Grafana at http://mktplacetest.westcentralus.cloudapp.azure.com:3000
.For the rest of the parameters, enter the same name as the resource group that you created previously with the az group create
command e.g. mktplacetest
.
publicIPAddressName
- the deployment will create a public IP address.domainNamePrefix
- used for the first part of the url when the deployment creates a DNS name.storageAccountName
- the deployment will create a storage account.virtualNetworkName
- the deployment will create a virtual network.Log into the Grafana instance: http://mktplacetest.westcentralus.cloudapp.azure.com:3000 with user admin
and the grafanaAdminPassword
from the previous step.
Cleanup
az group delete --name mktplacetest
If the last step of the deployment fails, you can ssh into the VM to troubleshoot with the username and password that you specified above. There are some log files that you can check. Details here.
The VM extension for the script can be found in the portal under extensions (here for the staging VM)
The az deployment group create
command has two parameters, --debug
and --verbose
that return more detailed information about the deployment.
./build.sh
./build/grafana-azure.zip
.Save draft
.Review and publish
.Publish
.Go live
.