Includes methods to reutrns set of Manager classes to manipulate things to do with storage, services, etc.
Esempio n. 1
0
 static void Main(string[] args)
 {
     var manager = new SubscriptionManager("");
     manager.GetSqlAzureManager()
            .AddNewServer("North Europe")
            .AddPublishSettings("")
            .AddNewFirewallRuleForWindowsAzureHostedService()
            .WithSqlAzureCredentials("username", "password")
            .AddNewDatabase("fmgetc")
            .AddNewDatabaseAdminUser("username", "password")
            .ExecuteScripts("scripts")
            .Go();
 }
Esempio n. 2
0
        public IServiceTransaction ExecuteDeploymentStep()
        {
            var subscriptionManager = new SubscriptionManager(SubscriptionId);
            var storageManager = subscriptionManager.GetStorageManager();

            var transaction = storageManager.CreateNew(StorageName)
                                            .AddPublishSettings(PublishSettings)
                                            .WithLocation(Location)
                                            .WithDescription("Create by Fluent Management")
                                            .Go();
            Orchestrator.AddDeploymentStep(transaction);
            return transaction;
        }
Esempio n. 3
0
        public IServiceTransaction ExecuteDeploymentStep()
        {
            var subscriptionManager = new SubscriptionManager(SubscriptionId);
            var dbManager = subscriptionManager.GetSqlAzureManager();

            var transaction = dbManager.AddNewServer(Location)
                                       .AddPublishSettings(PublishSettings)
                                       .AddNewFirewallRuleForWindowsAzureHostedService()
                                       .AddNewFirewallRuleWithMyIp("current location")
                                       .WithSqlAzureCredentials(Username, Password)
                                       .AddNewDatabase(DatabaseName)
                                       .ExecuteScripts(ScriptDirectory)
                                       .Go();
            Orchestrator.AddDeploymentStep(transaction);
            return transaction;
        }
Esempio n. 4
0
        static void Main(string[] args)
        {
            var hs = new SubscriptionManager(Constants.SUBSCRIPTION_AS_MVP);
            /*
            var command = new SubscriptionManager("82f8e1cd-ee8d-414e-b6a5-be7b18a1fa89")
                .GetVirtualMachinesManager()
                .AddCertificate()
                .CreateVirtualMachineDeployment()
                .AddInputEndpoint()
                .AddToExistingCloudServiceWithName()
                .Execute()

                .GetVirtualMachinesManager()
                .AddCertificate(new X509Certificate2(Constants.CERT_PATH, "some_strong_pass!"))
                .CreateVirtualMachineDeployment()
                .WithAdminPassword("other_strong_pass!")
                .WithDeploymentType(Elastacloud.AzureManagement.Fluent.Commands.VirtualMachines.VirtualMachineTemplates.SqlServer2012)
                .WithVmOfSize(Elastacloud.AzureManagement.Fluent.Types.VmSize.Small)
                .WithServiceName("vmlab")
                .WithStorageAccountForVhds("vmlab")
                .WithRoleName("DemoSQLServerTest")
                .WithMachineName("SqlSvr");

            var command = new SubscriptionManager("82f8e1cd-ee8d-414e-b6a5-be7b18a1fa89")
                .GetVirtualMachinesManager()
                .AddCertificate(new X509Certificate2(@"d:\cert.pfx", "E3orange"))
                .CreateVirtualMachineDeployment()
                .WithServiceName("two10ra")
                .WithAdminPassword("E3orange")
                .WithDeploymentType(Elastacloud.AzureManagement.Fluent.Commands.VirtualMachines.VirtualMachineTemplates.SqlServer2012)
                .WithMachineName("MACHINE1")
                .WithRoleName("newrole")
                .WithStorageAccountForVhds("portalvhds9b48swf6phzw")
                .WithVmOfSize(Elastacloud.AzureManagement.Fluent.Types.VmSize.Small);
            */

            //command.Execute();
            Console.Read();
               // Console.WriteLine(vm.ToString());
        }