Skip to content

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 e3a8ab1 commit 51a306a
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 6 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 ManageVirtualMachineScaleSetAsync.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
2 changes: 1 addition & 1 deletion Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public async static Task RunSampleAsync(IAzure azure)
var userName = "tirekicker";
var sshKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCfSPC2K7LZcFKEO+/t3dzmQYtrJFZNxOsbVgOVKietqHyvmYGHEC0J2wPdAqQ/63g/hhAEFRoyehM+rbeDri4txB3YFfnOK58jqdkyXzupWqXzOrlKY4Wz9SKjjN765+dqUITjKRIaAip1Ri137szRg71WnrmdP3SphTRlCx1Bk2nXqWPsclbRDCiZeF8QOTi4JqbmJyK5+0UqhqYRduun8ylAwKKQJ1NJt85sYIHn9f1Rfr6Tq2zS0wZ7DHbZL+zB5rSlAr8QyUdg/GQD+cmSs6LvPJKL78d6hMGk84ARtFo4A79ovwX/Fj01znDQkU6nJildfkaolH2rWFG/qttD azjava@javalib.Com";

var apacheInstallScript = "https://raw.githubusercontent.com/Azure/azure-sdk-for-java/master/azure-samples/src/main/resources/install_apache.sh";
var apacheInstallScript = "https://raw.githubusercontent.com/Azure/azure-libraries-for-net/master/Samples/Asset/install_apache.sh";
var installCommand = "bash install_apache.sh";
var fileUris = new List<string>();
fileUris.Add(apacheInstallScript);
Expand Down

0 comments on commit 51a306a

Please sign in to comment.