### Example Module Installation JSON Source: https://github.com/azure/azure-quickstart-templates/blob/master/application-workloads/visualstudio/vm-vsts-agent/README.md Provides an example of the JSON array format for specifying modules and their versions to be installed in C:\Modules. This is used to override default module installations. ```json [ {"name": "AzureRM", "version": "5.6.0"}, {"name": "AzureAD", "version": "2.0.1.3"}, {"name": "Bitbucket.v2", "version": "1.1.2"}, {"name": "GetPassword", "version": "1.0.0.0"}, {"name": "posh-git", "version": "0.7.1"} ] ``` -------------------------------- ### Clone Azure Quickstart Templates Repository Source: https://github.com/azure/azure-quickstart-templates/blob/master/1-CONTRIBUTION-GUIDE/git-tutorial.md Use this command to download a copy of your forked repository to your local machine. Ensure Git is installed and accessible via your command line. ```bash git clone https://github.com/{YOUR_USERNAME}/azure-quickstart-templates ``` -------------------------------- ### Setup and Start S2DMon Service Source: https://github.com/azure/azure-quickstart-templates/blob/master/demos/s2d-oms-mgmt-solution/README.md Commands to set up the S2DMon service with OMS credentials and then start it. This is part of the update process. ```powershell C:\temp\s2dmon.ps1 -Setup -OMSWorkspaceCreds (Get-Credential) C:\temp\s2dmon.ps1 -Start ``` -------------------------------- ### Start Apache Tomcat Service Source: https://github.com/azure/azure-quickstart-templates/blob/master/application-workloads/shibboleth/shibboleth-cluster-windows/README.md This command navigates to the Tomcat bin directory and starts the Tomcat service using the startup.bat script. Ensure you are in the correct directory for your Tomcat installation. ```powershell cd C:\apache-tomcat-7.0.67\bin\ Start-Process .\startup.bat ``` -------------------------------- ### Setup S2DMon Service Source: https://github.com/azure/azure-quickstart-templates/blob/master/demos/s2d-oms-mgmt-solution/README.md Install the S2DMon service by running the s2dmon.ps1 script with the -Setup parameter. You will be prompted for OMS Workspace credentials (ID and Primary Key). The script encrypts the key and creates necessary configuration files. ```powershell C:\temp\s2dmon.ps1 -Setup -OMSWorkspaceCreds (Get-Credential) ``` -------------------------------- ### Clone the Azure Quickstart Templates Module Source: https://github.com/azure/azure-quickstart-templates/blob/master/quickstarts/microsoft.compute/vmss-automation-dsc/README.md Use this PowerShell command to clone the repository containing the VMSS Automation DSC quickstart template to your local machine. ```powershell git clone https://github.com/Azure/azure-quickstart-templates/blob/master/201-vmss-automation-dsc ``` -------------------------------- ### Spark Shell Output Example Source: https://github.com/azure/azure-quickstart-templates/blob/master/application-workloads/spark/hdinsight-apache-spark/README.md This is an example of the output you can expect when launching the Spark shell interactively. ```text 15/10/01 15:21:34 INFO util.Utils: Successfully started service 'HTTP class server' on port 47985. Welcome to version 1.4.1 Using Scala version 2.10.4 (OpenJDK 64-Bit Server VM, Java 1.7.0_79) Type in expressions to have them evaluated. Type :help for more information. 15/10/01 15:21:40 INFO spark.SparkContext: Running Spark version 1.4.1 ...Output Snipped... scala> ``` -------------------------------- ### Run SAP S/4HANA Installation Script Source: https://github.com/azure/azure-quickstart-templates/blob/master/application-workloads/sap/sap-2-tier-s4hana-fully-activated-appliance/README.md Execute the SAP S/4HANA installation script on a jump server. This script retrieves the SAP software from a specified Azure storage account. Use a managed identity or a SAS token for authentication. The installation can take 2-3 hours. ```bash sudo su - /sapmedia/s4install.sh 'https://.blob.core.windows.net//' ``` ```bash sudo su - /sapmedia/s4install.sh 'https://.blob.core.windows.net//' 'SAS Token' ``` -------------------------------- ### AKS Cluster Output Example Source: https://github.com/azure/azure-quickstart-templates/blob/master/quickstarts/microsoft.kubernetes/aks-vmss-systemassigned-identity/README.md This is an example of the output from the template deployment, showing the control plane FQDN for connecting to the Kubernetes API. ```bash Outputs: Name Type Value ================== ========================= ========== controlPlaneFQDN String #{Your DNS Prefix}#-a38a5fa0.hcp.#{AksResourceLocation}#.azmk8s.io ``` -------------------------------- ### VM Scale Set Deployment Example Source: https://github.com/azure/azure-quickstart-templates/blob/master/demos/vmss-datascience/README.md This example demonstrates how to deploy a VM scale set using Data Science VM images. It sets up network resources and NAT rules for VM access. ```json { "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "vmssName": { "type": "string", "defaultValue": "datasciencevmss", "metadata": { "description": "Name of the virtual machine scale set." } }, "vmssSkuCount": { "type": "int", "defaultValue": 2, "metadata": { "description": "Number of VM instances in the scale set." } }, "vmssSkuName": { "type": "string", "defaultValue": "Standard_DS1_v2", "metadata": { "description": "Sku name for the virtual machine scale set." } }, "adminUsername": { "type": "string", "defaultValue": "azureuser", "metadata": { "description": "User name for the administrator account." } }, "adminPassword": { "type": "securestring", "metadata": { "description": "Password for the administrator account." } }, "windowsImagePublisher": { "type": "string", "defaultValue": "Microsoft.Ads", "metadata": { "description": "Publisher of the Windows Data Science VM image." } }, "windowsImageOffer": { "type": "string", "defaultValue": "windows-data-science-vm", "metadata": { "description": "Offer of the Windows Data Science VM image." } }, "windowsImageSku": { "type": "string", "defaultValue": "windows2016", "metadata": { "description": "Sku of the Windows Data Science VM image." } }, "ubuntuImagePublisher": { "type": "string", "defaultValue": "Microsoft.Ads", "metadata": { "description": "Publisher of the Ubuntu Data Science VM image." } }, "ubuntuImageOffer": { "type": "string", "defaultValue": "linux-data-science-vm-ubuntu", "metadata": { "description": "Offer of the Ubuntu Data Science VM image." } }, "ubuntuImageSku": { "type": "string", "defaultValue": "16.04-lts", "metadata": { "description": "Sku of the Ubuntu Data Science VM image." } }, "loadBalancerName": { "type": "string", "defaultValue": "datasciencevmsslb", "metadata": { "description": "Name of the load balancer." } }, "publicIpName": { "type": "string", "defaultValue": "datasciencevmsslbip", "metadata": { "description": "Name of the public IP address." } }, "vnetName": { "type": "string", "defaultValue": "datasciencevmssvnet", "metadata": { "description": "Name of the virtual network." } }, "vnetAddressPrefix": { "type": "string", "defaultValue": "10.0.0.0/16", "metadata": { "description": "Address prefix for the virtual network." } }, "subnetName": { "type": "string", "defaultValue": "datasciencevmsssubnet", "metadata": { "description": "Name of the subnet." } }, "subnetPrefix": { "type": "string", "defaultValue": "10.0.0.0/24", "metadata": { "description": "Address prefix for the subnet." } } }, "variables": { "vmssId": "[resourceId('Microsoft.Compute/virtualMachineScaleSets', parameters('vmssName'))]", "loadBalancerId": "[resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName'))]", "publicIpId": "[resourceId('Microsoft.Network/publicIPAddresses', parameters('publicIpName'))]", "vnetId": "[resourceId('Microsoft.Network/virtualNetworks', parameters('vnetName'))]", "subnetId": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('vnetName'), parameters('subnetName'))]" }, "resources": [ { "type": "Microsoft.Network/virtualNetworks", "apiVersion": "2018-04-01", "name": "[parameters('vnetName')]", "location": "[resourceGroup().location]", "properties": { "addressSpace": { "addressPrefixes": [ "[parameters('vnetAddressPrefix')]" ] }, "subnets": [ { "name": "[parameters('subnetName')]", "properties": { "addressPrefix": "[parameters('subnetPrefix')]" } } ] } }, { "type": "Microsoft.Network/publicIPAddresses", "apiVersion": "2018-04-01", "name": "[parameters('publicIpName')]", "location": "[resourceGroup().location]", "properties": { "publicIPAllocationMethod": "Static", "dnsSettings": { "domainNameLabel": "[concat(parameters('vmssName'), '-dns')]" } } }, { "type": "Microsoft.Network/loadBalancers", "apiVersion": "2018-04-01", "name": "[parameters('loadBalancerName')]", "location": "[resourceGroup().location]", "dependsOn": [ "[variables('publicIpId')]" ], "properties": { "frontendIPConfigurations": [ { "name": "LoadBalancerFrontend", "properties": { "publicIPAddress": { "id": "[variables('publicIpId')]" } } } ], "backendAddressPools": [ { "name": "LoadBalancerBackendPool" } ], "loadBalancingRules": [ { "name": "SSH", "properties": { "frontendIPConfiguration": { "id": "[concat(variables('loadBalancerId'), '/frontendIPConfigurations/LoadBalancerFrontend')]" }, "backendAddressPool": { "id": "[concat(variables('loadBalancerId'), '/backendAddressPools/LoadBalancerBackendPool')]" }, "protocol": "Tcp", "frontendPort": 22, "backendPort": 22, "enableFloatingIP": false, "idleTimeoutInMinutes": 4 } }, { "name": "RDP", "properties": { "frontendIPConfiguration": { "id": "[concat(variables('loadBalancerId'), '/frontendIPConfigurations/LoadBalancerFrontend')]" }, "backendAddressPool": { "id": "[concat(variables('loadBalancerId'), '/backendAddressPools/LoadBalancerBackendPool')]" }, "protocol": "Tcp", "frontendPort": 3389, "backendPort": 3389, "enableFloatingIP": false, "idleTimeoutInMinutes": 4 } } ], "inboundNatRules": [ { "name": "SSHNatRule", "properties": { "frontendIPConfiguration": { "id": "[concat(variables('loadBalancerId'), '/frontendIPConfigurations/LoadBalancerFrontend')]" }, "protocol": "Tcp", "frontendPortRangeStart": 50000, "frontendPortRangeEnd": 50000, "backendPort": 22, "enableFloatingIP": false, "idleTimeoutInMinutes": 4 } }, { "name": "RDPNatRule", "properties": { "frontendIPConfiguration": { "id": "[concat(variables('loadBalancerId'), '/frontendIPConfigurations/LoadBalancerFrontend')]" }, "protocol": "Tcp", "frontendPortRangeStart": 50001, "frontendPortRangeEnd": 50001, "backendPort": 3389, "enableFloatingIP": false, "idleTimeoutInMinutes": 4 } } ] } }, { "type": "Microsoft.Compute/virtualMachineScaleSets", "apiVersion": "2019-07-01", "name": "[parameters('vmssName')]", "location": "[resourceGroup().location]", "dependsOn": [ "[variables('subnetId')]", "[variables('loadBalancerId')]" ], "properties": { "upgradePolicy": { "mode": "Automatic" }, "singlePlacementGroup": false, "overprovision": true, "virtualMachineProfile": { "osProfile": { "computerNamePrefix": "datasciencevmss", "adminUsername": "[parameters('adminUsername')]", "adminPassword": "[parameters('adminPassword')]" }, "storageProfile": { "imageReference": { "publisher": "[parameters('windowsImagePublisher')]", "offer": "[parameters('windowsImageOffer')]", "sku": "[parameters('windowsImageSku')]", "version": "latest" }, "osDisk": { "createOption": "FromImage", "managedDisk": { "storageAccountType": "Standard_LRS" } } }, "hardwareProfile": { "vmSize": "[parameters('vmssSkuName')]" }, "networkProfile": { "networkInterfaceConfigurations": [ { "name": "datasciencevmssnicconfig", "properties": { "primary": true, "ipConfigurations": [ { "name": "datasciencevmssipconfig", "properties": { "subnet": { "id": "[variables('subnetId')]" }, "loadBalancerBackendAddressPools": [ { "id": "[concat(variables('loadBalancerId'), '/backendAddressPools/LoadBalancerBackendPool')]" } ], "loadBalancerInboundNatPools": [ { "id": "[concat(variables('loadBalancerId'), '/inboundNatPools/SSHNatRule')]" }, { "id": "[concat(variables('loadBalancerId'), '/inboundNatPools/RDPNatRule')]" } ] } } ] } } ] } } }, "sku": { "name": "[parameters('vmssSkuName')]", "capacity": "[parameters('vmssSkuCount')]" } } ], "outputs": { "publicIpAddress": { "type": "string", "value": "[reference(variables('publicIpId')).ipAddress]" }, "dnsName": { "type": "string", "value": "[reference(variables('publicIpId')).dnsSettings.fqdn]" } } } ``` -------------------------------- ### Install a VS Code extension Source: https://github.com/azure/azure-quickstart-templates/blob/master/application-workloads/visualstudio/ubuntu-mate-desktop-vscode/README.md You can add new extensions to Visual Studio Code directly from the command line. This example installs the ESLint JavaScript extension. ```bash code --install-extension dbaeumer.vscode-eslint ``` -------------------------------- ### Run DNX Sample Application Source: https://github.com/azure/azure-quickstart-templates/blob/master/application-workloads/dnx/dnx-on-ubuntu/README.md After deploying the VM, SSH into the machine and navigate to the sample application directory to run it. This command executes the sample console application. ```bash cd sampleConsoleApp dnx run ``` -------------------------------- ### Get Deployment Correlation ID with Azure PowerShell Source: https://github.com/azure/azure-quickstart-templates/blob/master/1-CONTRIBUTION-GUIDE/README.md Retrieve the correlation ID of a deployment using Azure PowerShell. This is required for the testResult field in the contribution guide. ```powershell (Get-AzResourceGroupDeployment -ResourceGroupName -Name ).CorrelationId ``` -------------------------------- ### Install LAP components (Apache, PHP, Composer) Source: https://github.com/azure/azure-quickstart-templates/blob/master/application-workloads/lap/lap-neo4j-ubuntu/README.md This script installs Apache, PHP, and Composer on the LAP node. It also sets up test files for PHP and Neo4j connectivity. ```bash apt-get update apt-get install -y apache2 apt-get install -y php5 apt-get install -y libapache2-mod-php5 apt-get install -y php5-mysql cd /var/www/html curl -sS https://getcomposer.org/installer | php php composer.phar install chown -R www-data:www-data /var/www/html cat < info.php EOF cat < neo4jtest.php run('MATCH (n) RETURN n LIMIT 1'); echo "Connected Successfully"; } catch (Exception $e) { echo "Couldn't connect to Neo4j"; } ?> EOF php composer.phar install ``` -------------------------------- ### Check Docker, Docker Compose, and Tutor Versions Source: https://github.com/azure/azure-quickstart-templates/blob/master/application-workloads/opendx/openedx-tutor-lilac-ubuntu/README.md Execute these commands to ensure Docker, Docker Compose, and Tutor are installed and accessible. ```bash docker --version docker-compose --version tutor --version ``` -------------------------------- ### Get Deployment Correlation ID with Azure CLI Source: https://github.com/azure/azure-quickstart-templates/blob/master/1-CONTRIBUTION-GUIDE/README.md Retrieve the correlation ID of a deployment using Azure CLI. This is required for the testResult field in the contribution guide. ```bash az deployment group show \ --resource-group \ --name \ --query properties.correlationId -o tsv ``` -------------------------------- ### Verify deploy_tutor.sh Installation Source: https://github.com/azure/azure-quickstart-templates/blob/master/application-workloads/opendx/openedx-tutor-lilac-ubuntu/README.md Check for the presence of the deploy_tutor.sh script and then execute it to deploy Tutor. ```bash ls ``` ```bash ./deploy_tutor.sh ``` -------------------------------- ### REST API for Custom Resource Source: https://github.com/azure/azure-quickstart-templates/blob/master/quickstarts/microsoft.customproviders/custom-rp-with-function/README.md Example REST API call to GET a custom resource instance. This is used to verify the creation and retrieve the state of a custom resource. ```http GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomProviders/resourceProviders/{resourceProviderName}/customResources/{customResourceName}?api-version=2018-09-01-preview ``` -------------------------------- ### Deploy Sample using Azure CLI Source: https://github.com/azure/azure-quickstart-templates/blob/master/quickstarts/microsoft.datafactory/data-factory-hive-transformation/README.md Use this Azure CLI script to deploy the sample. Specify the artifact name, location, and an optional user flag. ```Bash azure-group-deploy.sh -a 101-data-factory-hive-transformation -l eastus -u ``` -------------------------------- ### Install AGIC Add-on with AKS Source: https://github.com/azure/azure-quickstart-templates/blob/master/demos/aks-nat-agic/README.md Deploy a new Application Gateway and AKS cluster with AGIC enabled as an add-on using Azure CLI. This is the simplest method for new setups. ```bash az aks update --name my-aks-cluster --resource-group my-aks-resource-group --enable-addons ingress-appgw --appgw-id /subscriptions/<>/resourceGroups/<>/providers/Microsoft.Network/applicationGateways/<> ``` -------------------------------- ### Start Nylas Sync Engine Authentication Source: https://github.com/azure/azure-quickstart-templates/blob/master/application-workloads/nylas/nylas-email-sync-engine/README.md After deployment, SSH into the VM and navigate to the sync-engine directory. Use the `inbox-auth` command to authenticate with your email provider. This command guides you through obtaining an authorization token. ```bash cd /usr/local/sync-engine/ bin/inbox-auth @.com ``` -------------------------------- ### Check VSTS Install Log Source: https://github.com/azure/azure-quickstart-templates/blob/master/application-workloads/visualstudio/vsts-fullbuild-ubuntu-vm/README.md SSH into the VM and use the 'cat' command to display the contents of 'vsts.install.log.txt' to diagnose VSTS build agent startup failures. This is useful when the agent does not appear in the build agent pool or has a red status bar. ```bash cat vsts.install.log.txt ``` -------------------------------- ### Deploy Sample using PowerShell Source: https://github.com/azure/azure-quickstart-templates/blob/master/quickstarts/microsoft.datafactory/data-factory-hive-transformation/README.md Use this PowerShell script to deploy the sample. Specify the resource group location and the artifact staging directory. ```PowerShell .\Deploy-AzureResourceGroup.ps1 -ResourceGroupLocation 'eastus' -ArtifactStagingDirectory 101-data-factory-hive-transformation ``` -------------------------------- ### Generate New GUID with PowerShell Source: https://github.com/azure/azure-quickstart-templates/blob/master/demos/oms-azure-resource-usage-solution/README.md Use this PowerShell cmdlet to generate a new GUID for the Ingest Scheduler Guid and Ingest Cleanup Guid parameters when deploying the ARM template. A new GUID is required for each deployment to avoid failures. ```powershell New-Guid ``` -------------------------------- ### Deploy Storage Account and Origin Configurations Source: https://github.com/azure/azure-quickstart-templates/blob/master/quickstarts/microsoft.cdn/front-door-standard-premium-storage-blobs-upload/README.md Run this command to deploy the storage account and origin group configurations. Ensure you use the same Front Door profile and endpoint names as before, and specify the desired location for the storage account. ```bash az deployment group create --resource-group dev --template-file .\storageAndorigin.bicep Please provide string value for 'location' (? for help): uksouth Please provide string value for 'storageAccountName' (? for help): contosouk01 Please provide string value for 'storageBlobContainerName' (? for help): uploadcontainer Please provide string value for 'frontDoorName' (? for help): contosoFrontDoor Please provide string value for 'endpointName' (? for help): contosoFrontDoorEndpoint Please provide string value for 'originGroupName' (? for help): contosoUK01 ``` -------------------------------- ### Install Python, Git, and Curl Source: https://github.com/azure/azure-quickstart-templates/blob/master/application-workloads/jupyter/jupyterhub-classroom/README.md Run these commands to install necessary prerequisites for JupyterHub installation on a Debian-based system. ```bash sudo apt install python3 python3-dev git curl ``` -------------------------------- ### Setup local VM object Source: https://github.com/azure/azure-quickstart-templates/blob/master/quickstarts/microsoft.compute/vm-from-user-image/README.md Configures the virtual machine object with operating system, network interface, and disk details. Ensure you have the necessary credentials and resource IDs. ```powershell $cred = Get-Credential $vm = New-AzureRmVMConfig -VMName $vmName -VMSize $vmSize $vm = Set-AzureRmVMOperatingSystem -VM $vm -Windows -ComputerName $computerName -Credential $cred -ProvisionVMAgent -EnableAutoUpdate $vm = Add-AzureRmVMNetworkInterface -VM $vm -Id $nic.Id $osDiskUri = "http://test.blob.core.windows.net/vmcontainer10798c80-131-1231-a94a-f9d2a712251f/osDisk.10798c80-2919-4100-a94a-f9d2a712251f.vhd" $imageUri = "http://test.blob.core.windows.net/system/Microsoft.Compute/Images/captured/image-osDisk.8b021d87-913c-4f94-a01a-944ad92d7388.vhd" $vm = Set-AzureRmVMOSDisk -VM $vm -Name $osDiskName -VhdUri $osDiskUri -CreateOption fromImage -SourceImageUri $imageUri -Windows $dataImageUri = "http://test.blob.core.windows.net/system/Microsoft.Compute/Images/captured/image-dataDisk-0.8b021d87-913c-4f94-a01a-944ad92d7388.vhd" $dataDiskUri = "http://test.blob.core.windows.net/vmcontainer10798c80-sa11-41sa-dsad-f9d2a712251f/dataDisk-0.10798c80-2919-4100-a94a-f9d2a712251f.vhd" $vm = Add-AzureRmVMDataDisk -VM $vm -Name "dd1" -VhdUri $dataDiskUri -SourceImageUri $dataImageUri -Lun 0 -CreateOption fromImage ``` -------------------------------- ### Install OMSIngestionAPI Module Source: https://github.com/azure/azure-quickstart-templates/blob/master/demos/s2d-oms-mgmt-solution/README.md Install the OMSIngestionAPI PowerShell module before installing the S2DMon service. This module is required for sending data to OMS. ```powershell Install-Module -Name OMSIngestionAPI ``` -------------------------------- ### Example azuredeploy.parameters.json Source: https://github.com/azure/azure-quickstart-templates/blob/master/1-CONTRIBUTION-GUIDE/README.md This is an example of an azuredeploy.parameters.json file, demonstrating how to define parameter values for an ARM template deployment. It includes common parameters like storage account names, admin usernames, and SSH keys. ```json { "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", "contentVersion": "1.0.0.0", "parameters": { "newStorageAccountName":{ "value": "GEN-UNIQUE" }, "adminUsername": { "value": "GEN-UNIQUE" }, "sshKeyData": { "value": "GEN-SSH-PUB-KEY" }, "dnsNameForPublicIP": { "value": "GEN-UNIQUE-13" } } } ``` -------------------------------- ### Example Nextflow Commands Source: https://github.com/azure/azure-quickstart-templates/blob/master/application-workloads/nextflow/nextflow-genomics-cluster-ubuntu/README.md These commands demonstrate how to run Nextflow pipelines with specific configurations for the cluster executor, including joining a cluster and enabling tracing/timeline. ```json { "exampleNextflowCommand": { "type": "string", "value": "nextflow run hello -process.executor ignite -cluster.join path:/datadisks/disk1/cifs/cluster -with-timeline runtimeline.html -with-trace -cluster.maxCpus 0" }, "exampleNextflowCommandWithDocker": { "type": "string", "value": "nextflow run nextflow-io/rnatoy -with-docker -process.executor ignite -cluster.join path:/datadisks/disk1/cifs/cluster -with-timeline runtimeline.html -with-trace -cluster.maxCpus 0" }, "jumpboxConnectionString": { "type": "string", "value": "ssh nextflow@jumpboxvmaddress.westus2.cloudapp.azure.com" } } ```