diff --git a/Asset/cosmosdb-keyvault-msi/todo-app-java-on-azure-1.0-SNAPSHOT.jar b/Asset/cosmosdb-keyvault-msi/todo-app-java-on-azure-1.0-SNAPSHOT.jar
new file mode 100644
index 0000000..b3138ae
Binary files /dev/null and b/Asset/cosmosdb-keyvault-msi/todo-app-java-on-azure-1.0-SNAPSHOT.jar differ
diff --git a/Asset/cosmosdb-keyvault-msi/web.config b/Asset/cosmosdb-keyvault-msi/web.config
new file mode 100644
index 0000000..30c174a
--- /dev/null
+++ b/Asset/cosmosdb-keyvault-msi/web.config
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Asset/documentdb-dotnet-todo-app.zip b/Asset/documentdb-dotnet-todo-app.zip
new file mode 100644
index 0000000..da13710
Binary files /dev/null and b/Asset/documentdb-dotnet-todo-app.zip differ
diff --git a/Asset/install_dotnet_git.sh b/Asset/install_dotnet_git.sh
new file mode 100644
index 0000000..ffc19b8
--- /dev/null
+++ b/Asset/install_dotnet_git.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+# install DotNet
+curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
+sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
+
+sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial main" > /etc/apt/sources.list.d/dotnetdev.list'
+sudo apt-get update
+sudo apt-get install -y dotnet-sdk-2.1.3
+
+# install Git
+sudo apt-get update
+sudo apt-get install -y git
+
+# Refresh environment
+source /etc/environment
\ No newline at end of file
diff --git a/Common/Utilities.cs b/Common/Utilities.cs
index aa86364..a2382d1 100644
--- a/Common/Utilities.cs
+++ b/Common/Utilities.cs
@@ -44,6 +44,7 @@
using Microsoft.Azure.Management.Network.Fluent.Models;
using Microsoft.Azure.Management.ContainerInstance.Fluent;
using Microsoft.Azure.Management.Locks.Fluent;
+using Microsoft.Azure.Management.Msi.Fluent;
namespace Microsoft.Azure.Management.Samples.Common
{
@@ -89,6 +90,32 @@ public static string ReadLine()
return PauseMethod.Invoke();
}
+ // Print resource group info.
+ public static void PrintResourceGroup(IResourceGroup resource)
+ {
+ StringBuilder info = new StringBuilder();
+ info.Append("Resource Group: ").Append(resource.Id)
+ .Append("\n\tName: ").Append(resource.Name)
+ .Append("\n\tRegion: ").Append(resource.Region)
+ .Append("\n\tTags: ").Append(resource.Tags.ToString());
+ Log(info.ToString());
+ }
+
+ // Print UserAssigned MSI info.
+ public static void PrintIdentity(IIdentity resource)
+ {
+ StringBuilder info = new StringBuilder();
+ info.Append("Identity: ").Append(resource.Id)
+ .Append("\n\tName: ").Append(resource.Name)
+ .Append("\n\tRegion: ").Append(resource.Region)
+ .Append("\n\tTags: ").Append(resource.Tags.ToString())
+ .Append("\n\tService Principal Id: ").Append(resource.PrincipalId)
+ .Append("\n\tClient Id: ").Append(resource.ClientId)
+ .Append("\n\tTenant Id: ").Append(resource.TenantId)
+ .Append("\n\tClient Secret Url: ").Append(resource.ClientSecretUrl);
+ Log(info.ToString());
+ }
+
// Print app gateway info
public static void PrintAppGateway(IApplicationGateway resource)
{
@@ -647,8 +674,8 @@ public static void PrintVirtualMachine(IVirtualMachine virtualMachine)
var msi = new StringBuilder().Append("\n\tMSI: ");
msi.Append("\n\t\tMSI enabled:").Append(virtualMachine.IsManagedServiceIdentityEnabled);
- msi.Append("\n\t\tMSI Active Directory Service Principal Id:").Append(virtualMachine.ManagedServiceIdentityPrincipalId);
- msi.Append("\n\t\tMSI Active Directory Tenant Id:").Append(virtualMachine.ManagedServiceIdentityTenantId);
+ msi.Append("\n\t\tMSI Active Directory Service Principal Id:").Append(virtualMachine.SystemAssignedManagedServiceIdentityPrincipalId);
+ msi.Append("\n\t\tMSI Active Directory Tenant Id:").Append(virtualMachine.SystemAssignedManagedServiceIdentityTenantId);
Utilities.Log(new StringBuilder().Append("Virtual Machine: ").Append(virtualMachine.Id)
.Append("Name: ").Append(virtualMachine.Name)
@@ -2311,6 +2338,7 @@ public static string CheckAddress(string url, IDictionary header
{
using (var client = new HttpClient())
{
+ client.Timeout = TimeSpan.FromSeconds(300);
if (headers != null)
{
foreach (var header in headers)
@@ -2385,7 +2413,7 @@ public static string GetArmTemplate(string templateFileName)
{
parsedTemplate.SelectToken("parameters.hostingPlanName")["defaultValue"] = hostingPlanName;
parsedTemplate.SelectToken("parameters.webSiteName")["defaultValue"] = webAppName;
- parsedTemplate.SelectToken("parameters.skuName")["defaultValue"] = "F1";
+ parsedTemplate.SelectToken("parameters.skuName")["defaultValue"] = "B1";
parsedTemplate.SelectToken("parameters.skuCapacity")["defaultValue"] = 1;
}
else if (String.Equals("ArmTemplateVM.json", templateFileName, StringComparison.OrdinalIgnoreCase))
diff --git a/ManageVirtualMachineWithUnmanagedDisks.csproj b/ManageVirtualMachineWithUnmanagedDisks.csproj
index bfa926d..b51a4a7 100644
--- a/ManageVirtualMachineWithUnmanagedDisks.csproj
+++ b/ManageVirtualMachineWithUnmanagedDisks.csproj
@@ -19,7 +19,8 @@
-
+
+
@@ -58,7 +59,9 @@
-
+
+
+
PreserveNewest