az login
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Execute this directly in Azure Cloud Shell (https://shell.azure.com) by pasting (SHIFT+INS on Windows, CTRL+V on Mac or Linux) | |
# the following line (beginning with curl...) at the command prompt and then replacing the args: | |
# This scripts Onboards Azure Monitor for containers to Kubernetes cluster hosted outside and connected to Azure via Azure Arc cluster | |
# | |
# 1. Creates the Default Azure log analytics workspace if doesn't exist one in specified subscription | |
# 2. Adds the ContainerInsights solution to the Azure log analytics workspace | |
# 3. Adds the workspaceResourceId tag or enable addon (if the cluster is AKS) on the provided Managed cluster resource id | |
# 4. Installs Azure Monitor for containers HELM chart to the K8s cluster in provided via --kube-context |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
az ad sp list --query "[?publisherName=='$(az ad signed-in-user show --query displayName -o tsv)'].{ApplicationId:appId,ObjectId:objectId,DisplayName:displayName}" -o table --all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
# Update + Common tools | |
echo "-> run apt-get update & upgrade" | |
sudo apt-get update && sudo apt-get upgrade -y | |
sudo apt-get install -y build-essential git pkg-config jq curl wget unzip | |
# Install Azure CLI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: custom-metrics | |
--- | |
kind: ServiceAccount | |
apiVersion: v1 | |
metadata: | |
name: custom-metrics-azure-apiserver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM microsoft/dotnet:1.1.0-sdk-projectjson | |
MAINTAINER Julien Corioland, Microsoft (@jcorioland) | |
WORKDIR /app | |
ENTRYPOINT ["dotnet", "run"] | |
EXPOSE 5000 | |
ENV ASPNETCORE_URLS http://0.0.0.0:5000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Generates a shared access signature for Microsoft Azure storage | |
* cf. https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/constructing-an-account-sas | |
* | |
* @param (accountName) The name of the Microsoft Azure storage account | |
* @param (storageKey) The access key of the Microsoft Azure storage account | |
* @param (signedPermissions) Required. Specifies the signed permissions for the account SAS | |
* @param (signedService) Required. Specifies the signed services accessible with the account SAS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export TENANT_ID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX | |
export SP_APP_ID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX | |
export SP_PASSWORD=XXXXXXXXXXXX | |
export RG_NAME=XXXXXXXX | |
export ACS_NAME=XXXXXXXX | |
export AZURE_REGION=westeurope | |
export LINUX_ADMIN=acsadmin | |
export SSH_PUBLIC_KEY_FILE=XXXXXXXX | |
export SSH_PRIVATE_KEY_FILE=XXXXXXXX | |
export MASTER_COUNT=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class HomeController : Controller | |
{ | |
public IActionResult Index() | |
{ | |
return View(); | |
} | |
public IActionResult About() | |
{ | |
ViewBag.Message = "Your application description page."; |