Skip to content

Commit db91d7e

Browse files
committed
added new functionality for demos and tested the SSL/RD example
1 parent d4f043c commit db91d7e

11 files changed

+30
-121
lines changed

Elastacloud.FluentExamples/App.config

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<appSettings>
4-
<add key="dbname" value="stacked"/>
5-
<add key="username" value="azurecoder"/>
6-
<add key="password" value="Password101!"/>
7-
<add key="sqldbusername" value="azurecoder_db"/>
8-
<add key="defaultstorage" value="stackedstorage"/>
9-
<add key="mobileservicename" value="stackedmobile"/>
10-
<add key="deploymentname" value="stacked deployment"/>
11-
<add key="publishsettings" value="C:\Users\Richard\Desktop\Engagements\AllAccounts.publishsettings"/>
12-
<add key="rdpfile" value="C:\Users\Richard\Desktop\Engagements\stackedliverpool.rdp"/>
13-
<add key="vmroleservice" value="stackedliverpool"/>
14-
<add key="cloudservice" value="stackedliverpoolpaas"/>
15-
<add key="rolename" value="ExampleWebRole"/>
16-
<add key="deploymentpath" value="C:\Users\Richard\Documents\Fluent Examples\Elastacloud.FluentExamples\TestCloudInstall\bin\Release\app.publish"/>
4+
<add key="dbname" value="stacked" />
5+
<add key="username" value="azurecoder" />
6+
<add key="password" value="Password101!" />
7+
<add key="sqldbusername" value="azurecoder_db" />
8+
<add key="defaultstorage" value="stackedstorage" />
9+
<add key="mobileservicename" value="stackedmobile" />
10+
<add key="deploymentname" value="stacked deployment" />
11+
<add key="publishsettings" value="C:\Users\Richard\Desktop\Engagements\AllAccounts.publishsettings" />
12+
<add key="rdpfile" value="C:\Users\Richard\Desktop\Engagements\stackedliverpool.rdp" />
13+
<add key="vmroleservice" value="stackedliverpool" />
14+
<add key="cloudservice" value="stackedliverpoolpaas" />
15+
<add key="rolename" value="ExampleWebRole" />
16+
<add key="deploymentpath" value="C:\Users\Richard\Documents\Fluent Examples\Elastacloud.FluentExamples\TestCloudInstall\bin\Release\app.publish" />
17+
<add key="builddirectory" value="C:\Users\Richard\Documents\Fluent Examples\Elastacloud.FluentExamples\TestCloudInstall" />
1718
</appSettings>
1819
<startup>
1920
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />

Elastacloud.FluentExamples/BuildVirtualMachine.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public BuildVirtualMachine(string subscriptionId, X509Certificate2 certificate)
5858
void IBuilder.SpinUp()
5959
{
6060
var storageClient = new StorageClient(_subscriptionId, _certificate);
61-
storageClient.CreateNewStorageAccount(Settings.DefaultStorage);
61+
storageClient.CreateStorageAccountIfNotExists(Settings.DefaultStorage);
6262
var client = new WindowsVirtualMachineClient(_subscriptionId, _certificate);
6363
var newClient = client.CreateNewVirtualMachineFromTemplateGallery(_properties);
6464
Console.WriteLine("Virtual machine now created - with diskname {0}",

Elastacloud.FluentExamples/Elastacloud.FluentExamples.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,19 @@
4040
</Reference>
4141
<Reference Include="Elastacloud.AzureManagement.Fluent, Version=0.4.4.0, Culture=neutral, processorArchitecture=MSIL">
4242
<SpecificVersion>False</SpecificVersion>
43-
<HintPath>..\..\..\Fluent Management\Elastacloud.AzureManagement.Fluent\bin\Debug\Elastacloud.AzureManagement.Fluent.dll</HintPath>
43+
<HintPath>..\packages\Elastacloud.AzureManagement.Fluent.0.4.4.9\lib\Elastacloud.AzureManagement.Fluent.dll</HintPath>
4444
</Reference>
4545
<Reference Include="Microsoft.SqlServer.ConnectionInfo, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
4646
<Private>True</Private>
47-
<HintPath>..\packages\Elastacloud.AzureManagement.Fluent.0.4.4.8\lib\Microsoft.SqlServer.ConnectionInfo.dll</HintPath>
47+
<HintPath>..\packages\Elastacloud.AzureManagement.Fluent.0.4.4.9\lib\Microsoft.SqlServer.ConnectionInfo.dll</HintPath>
4848
</Reference>
4949
<Reference Include="Microsoft.SqlServer.Management.Sdk.Sfc, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
5050
<Private>True</Private>
51-
<HintPath>..\packages\Elastacloud.AzureManagement.Fluent.0.4.4.8\lib\Microsoft.SqlServer.Management.Sdk.Sfc.dll</HintPath>
51+
<HintPath>..\packages\Elastacloud.AzureManagement.Fluent.0.4.4.9\lib\Microsoft.SqlServer.Management.Sdk.Sfc.dll</HintPath>
5252
</Reference>
5353
<Reference Include="Microsoft.SqlServer.Smo, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
5454
<Private>True</Private>
55-
<HintPath>..\packages\Elastacloud.AzureManagement.Fluent.0.4.4.8\lib\Microsoft.SqlServer.Smo.dll</HintPath>
55+
<HintPath>..\packages\Elastacloud.AzureManagement.Fluent.0.4.4.9\lib\Microsoft.SqlServer.Smo.dll</HintPath>
5656
</Reference>
5757
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
5858
<SpecificVersion>False</SpecificVersion>

Elastacloud.FluentExamples/LinqToStorage.cs

Lines changed: 0 additions & 85 deletions
This file was deleted.

Elastacloud.FluentExamples/Program.cs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,13 @@ class Program
1414
static readonly Dictionary<string, IBuilder> Builders = new Dictionary<string, IBuilder>();
1515
static readonly Dictionary<string, IWorkflow> Workflows = new Dictionary<string, IWorkflow>();
1616
// args 0 - the subscription id
17-
// args 1 - the path to the publishsettings file
18-
// args 2 - the path to the rdp output file
1917
static void Main(string[] args)
2018
{
2119
if (args.Length < 1)
2220
throw new ApplicationException("need a single argument to proceed");
2321

2422
// manipulate and transform config files
25-
IWorkflow getConfig = new WorkflowLoadConfig(Path.Combine(Settings.DeploymentPath, "TestCloudInstall.cscfg"));
23+
IWorkflow getConfig = new WorkflowLoadConfig(Path.Combine(Settings.DeploymentPath, "ServiceConfiguration.Cloud.cscfg"));
2624
Workflows.Add(getConfig.ToString(), getConfig);
2725
ProcessWorkflow(getConfig.ToString());
2826

@@ -41,32 +39,32 @@ static void Main(string[] args)
4139
// test paas orchestration
4240
IWorkflow fluentDeployment = new WorkflowFluentDeployment(Settings.SubscriptionId, Settings.ManagementCertificate);
4341
Workflows.Add(fluentDeployment.ToString(), fluentDeployment);
44-
ProcessWorkflow(fluentDeployment.ToString());
42+
//ProcessWorkflow(fluentDeployment.ToString());
4543

4644
// create a virtual machine
4745
IBuilder virtualMachine = new BuildVirtualMachine(args[0], Settings.ManagementCertificate);
4846
Builders.Add(virtualMachine.ToString(), virtualMachine);
49-
ProcessBuilder(virtualMachine.ToString());
47+
//ProcessBuilder(virtualMachine.ToString());
5048

5149
// test linq to azure with storage
5250
IWorkflow linqToStorage = new WorkflowLinqToStorage(Settings.SubscriptionId, Settings.ManagementCertificate);
5351
Workflows.Add(linqToStorage.ToString(), linqToStorage);
54-
ProcessWorkflow(linqToStorage.ToString());
52+
//ProcessWorkflow(linqToStorage.ToString());
5553

5654
// test create a mobile services deployment
5755
IBuilder mobileService = new BuildMobileService(Settings.SubscriptionId, Settings.ManagementCertificate);
5856
Builders.Add(mobileService.ToString(), mobileService);
59-
ProcessBuilder(mobileService.ToString());
57+
//ProcessBuilder(mobileService.ToString());
6058

6159
// test role system watcher
6260
var watcher = new WorkflowRoleSystemWatcher(Settings.SubscriptionId, Settings.ManagementCertificate);
6361
Workflows.Add(watcher.ToString(), watcher);
64-
ProcessWorkflow(watcher.ToString());
62+
//ProcessWorkflow(watcher.ToString());
6563

6664
// test paas build
6765
var workflowSSL = new WorkflowFluentDeploymentWithSSL(Settings.SubscriptionId, Settings.ManagementCertificate);
6866
Workflows.Add(workflowSSL.ToString(), workflowSSL);
69-
ProcessWorkflow(workflowSSL.ToString());
67+
//ProcessWorkflow(workflowSSL.ToString());
7068

7169
Console.WriteLine("Press [ENTER] to exit");
7270
Console.Read();

Elastacloud.FluentExamples/Settings.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ public static class Settings
1919
public static string DeplopymentName { get { return ConfigurationManager.AppSettings["deploymentname"]; } }
2020
public static string PublishSettingsFilePath { get { return ConfigurationManager.AppSettings["publishsettings"]; } }
2121
public static string RemoteDesktopFilePath { get { return ConfigurationManager.AppSettings["rdpfile"]; } }
22-
public static string VmRoleAndServiceName { get { return ConfigurationManager.AppSettings["vmservicerole"]; } }
22+
public static string VmRoleAndServiceName { get { return ConfigurationManager.AppSettings["vmroleservice"]; } }
2323
public static string CloudServiceName { get { return ConfigurationManager.AppSettings["cloudservice"]; } }
2424
public static string RoleName { get { return ConfigurationManager.AppSettings["rolename"]; } }
2525
public static string DeploymentPath { get { return ConfigurationManager.AppSettings["deploymentpath"]; } }
26+
public static string BuildDirectory { get { return ConfigurationManager.AppSettings["builddirectory"]; } }
2627
public static string SubscriptionId { get; set; }
2728
public static X509Certificate2 ManagementCertificate { get; set; }
2829
}

Elastacloud.FluentExamples/WorkflowFluentDeploymentWithSSL.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public void PreActionSteps()
3535
_context = manager.GetDeploymentManager()
3636
.AddCertificate(_managementCertificate)
3737
.ForNewDeployment(Settings.DeplopymentName)
38-
.SetBuildDirectoryRoot("builddirectory")
38+
.SetBuildDirectoryRoot(Settings.BuildDirectory)
3939
.EnableRemoteDesktopAndSslForRole(Settings.RoleName)
4040
.WithUsernameAndPassword(Settings.Username, Settings.Password)
4141
.GenerateAndAddServiceCertificate(Settings.CloudServiceName + ".cloudapp.net")

Elastacloud.FluentExamples/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="BouncyCastle" version="1.7.0" targetFramework="net45" />
4-
<package id="Elastacloud.AzureManagement.Fluent" version="0.4.4.8" targetFramework="net45" />
4+
<package id="Elastacloud.AzureManagement.Fluent" version="0.4.4.9" targetFramework="net45" />
55
<package id="Newtonsoft.Json" version="4.5.11" targetFramework="net45" />
66
<package id="NLog" version="2.0.0.2000" targetFramework="net45" />
77
<package id="NLog.Config" version="2.0.0.2000" targetFramework="net45" />

TestCloudInstall/ServiceConfiguration.Cloud.cscfg

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,5 @@
22
<ServiceConfiguration serviceName="TestCloudInstall" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="3" osVersion="*" schemaVersion="2012-10.1.8">
33
<Role name="ExampleWebRole">
44
<Instances count="1" />
5-
<ConfigurationSettings>
6-
</ConfigurationSettings>
75
</Role>
86
</ServiceConfiguration>

TestCloudInstall/ServiceConfiguration.Local.cscfg

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,5 @@
22
<ServiceConfiguration serviceName="TestCloudInstall" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="3" osVersion="*" schemaVersion="2012-10.1.8">
33
<Role name="ExampleWebRole">
44
<Instances count="1" />
5-
<ConfigurationSettings>
6-
</ConfigurationSettings>
75
</Role>
86
</ServiceConfiguration>

TestCloudInstall/ServiceDefinition.csdef

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,5 @@
1111
<Endpoints>
1212
<InputEndpoint name="Endpoint1" protocol="http" port="80" />
1313
</Endpoints>
14-
<Imports>
15-
</Imports>
1614
</WebRole>
1715
</ServiceDefinition>

0 commit comments

Comments
 (0)