Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

Commit

Permalink
Release 1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
anuchandy committed Feb 13, 2018
1 parent 7759e1a commit 4042b5c
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 5 deletions.
Binary file not shown.
11 changes: 11 additions & 0 deletions Asset/cosmosdb-keyvault-msi/web.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" />
</handlers>
<httpPlatform processPath="%JAVA_HOME%\bin\java.exe"
arguments="-Djava.net.preferIPv4Stack=true -Dserver.port=%HTTP_PLATFORM_PORT% -jar &quot;%HOME%\site\wwwroot\ROOT.jar&quot;">
</httpPlatform>
</system.webServer>
</configuration>
Binary file added Asset/documentdb-dotnet-todo-app.zip
Binary file not shown.
16 changes: 16 additions & 0 deletions Asset/install_dotnet_git.sh
Original file line number Diff line number Diff line change
@@ -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
34 changes: 31 additions & 3 deletions Common/Utilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -2311,6 +2338,7 @@ public static string CheckAddress(string url, IDictionary<string, string> header
{
using (var client = new HttpClient())
{
client.Timeout = TimeSpan.FromSeconds(300);
if (headers != null)
{
foreach (var header in headers)
Expand Down Expand Up @@ -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))
Expand Down
7 changes: 5 additions & 2 deletions ManageVirtualMachineWithUnmanagedDisks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

<ItemGroup>
<PackageReference Include="Microsoft.Rest.ClientRuntime" Version="2.3.10" />
<PackageReference Include="Microsoft.Azure.Management.Fluent" Version="1.4.1" />
<PackageReference Include="Microsoft.Azure.Management.Fluent" Version="1.6.0" />
<PackageReference Include="Microsoft.Azure.KeyVault" Version="2.3.2" />
<PackageReference Include="CoreFTP" Version="1.2.0" />
<PackageReference Include="Microsoft.Azure.ServiceBus" Version="0.0.2-preview" />
<PackageReference Include="SSH.NET" Version="2016.0.0" />
Expand Down Expand Up @@ -58,7 +59,9 @@
<Reference Include="System.Reflection" />
<PackageReference Include="Microsoft.Azure.DocumentDB" Version="1.14.1" />
</ItemGroup>

<ItemGroup>
<Compile Remove="Asset\documentdb-dotnet-todo-app" />
</ItemGroup>
<ItemGroup>
<None Update="Asset\ArmTemplate.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down

0 comments on commit 4042b5c

Please sign in to comment.