Exemplo n.º 1
0
        /// <summary>
        /// Transforms .NET configuration files (web and app config), in exactly the same way as msbuild and Visual Studio does.
        /// </summary>
        /// <param name="local"></param>
        /// <param name="configDirPath">Path to directory where the config you want to transform is located</param>
        /// <param name="configName">Name of the config file you want to transform</param>
        /// <param name="transformName">Name of the transform file you want to use for transformation</param>
        /// <returns>
        /// </returns>
        public static IOfferLocalOperations TransformConfigFile(this IOfferLocalOperations local, string configDirPath, string configName, string transformName)
        {
            var operation = new TransformConfigOperation(configDirPath, configName, transformName);

            OperationExecutor.Execute((LocalBuilder)local, operation);
            return(local);
        }
        /// <summary>
        /// Transforms .NET configuration files (web and app config), in exactly the same way as msbuild and Visual Studio does.
        /// </summary>
        /// <param name="configDirPath"></param>
        /// <param name="configName"></param>
        /// <param name="transformName"></param>
        /// <returns></returns>
        public static IOfferLocalOperations TransformConfigFile(this IOfferLocalOperations local, string configDirPath, string configName, string transformName)
        {
            var operation = new TransformConfigOperation(configDirPath, configName, transformName);

            Configure.Operation(local, operation);
            return(local);
        }
 public AwsOperationsBuilder(IOfferLocalOperations localOps, ConDepSettings settings, CancellationToken token) : base(settings, token)
 {
     LocalOperations = localOps;
     Ec2             = new AwsEc2OperationsBuilder(this, settings, token);
     Elb             = new AwsElbOperationsBuilder(this, settings, token);
     S3 = new AwsS3OperationsBuilder(this, settings, token);
 }
        /// <summary>
        /// Executes a simple HTTP GET to the specified url expecting a 200 (OK) in return. Will throw an exception if not 200.
        /// </summary>
        /// <param name="url"></param>
        /// <returns></returns>
        public static IOfferLocalOperations HttpGet(this IOfferLocalOperations local, string url)
        {
            var operation = new HttpGetOperation(url);

            Configure.Operation(local, operation);
            return(local);
        }
Exemplo n.º 5
0
        /// <summary>
        /// Executes a simple HTTP GET to the specified url expecting a 200 (OK) in return. Will throw an exception if not 200.
        /// </summary>
        /// <param name="local"></param>
        /// <param name="url">The URL you want to HTTP GET</param>
        /// <returns></returns>
        public static IOfferLocalOperations HttpGet(this IOfferLocalOperations local, string url)
        {
            var operation = new HttpGetOperation(url);

            OperationExecutor.Execute((LocalBuilder)local, operation);
            return(local);
        }
Exemplo n.º 6
0
        /// <summary>
        /// Pre-compile Web Applications to optimize startup time for the application. Even though this operation exist in ConDep, we recommend you to pre-compile web applications as part of your build process, and not the deployment process, using aspnet_compiler.exe.
        /// </summary>
        /// <param name="local"></param>
        /// <param name="webApplicationName">Name of the web application you want to pre-compile</param>
        /// <param name="webApplicationPhysicalPath">Location path to web application</param>
        /// <param name="preCompileOutputpath">Path to where you want the pre-compiled application to be copied</param>
        /// <returns></returns>
        public static IOfferLocalOperations PreCompile(this IOfferLocalOperations local, string webApplicationName, string webApplicationPhysicalPath, string preCompileOutputpath)
        {
            var operation = new PreCompileOperation(webApplicationName, webApplicationPhysicalPath,
                                                    preCompileOutputpath);

            OperationExecutor.Execute((LocalBuilder)local, operation);
            return(local);
        }
        /// <summary>
        /// Pre-compile Web Applications to optimize startup time for the application. Even though this operation exist in ConDep, we recommend you to pre-compile web applications as part of your build process, and not the deployment process, using aspnet_compiler.exe.
        /// </summary>
        /// <param name="webApplicationName"></param>
        /// <param name="webApplicationPhysicalPath"></param>
        /// <param name="preCompileOutputpath"></param>
        /// <returns></returns>
        public static IOfferLocalOperations PreCompile(this IOfferLocalOperations local, string webApplicationName, string webApplicationPhysicalPath, string preCompileOutputpath)
        {
            var operation = new PreCompileOperation(webApplicationName, webApplicationPhysicalPath,
                                                    preCompileOutputpath);

            Configure.Operation(local, operation);
            return(local);
        }
        /// <summary>
        /// Provide operations for Amazon AWS
        /// </summary>
        /// <param name="local"></param>
        /// <param name="aws">The Amazon AWS operations</param>
        /// <returns></returns>
        public static IOfferLocalOperations Aws(this IOfferLocalOperations local, Action <IOfferAwsOperations> aws)
        {
            var builder    = local as LocalOperationsBuilder;
            var opsBuilder = new AwsOperationsBuilder(local, builder.Settings, builder.Token);

            if (aws != null)
            {
                aws(opsBuilder);
            }
            return(local);
        }
Exemplo n.º 9
0
        /// <summary>
        /// Provide operations for Amazon AWS
        /// </summary>
        /// <param name="local"></param>
        /// <param name="azure">The Microsoft Azure operations</param>
        /// <returns></returns>
        public static IOfferLocalOperations Azure(this IOfferLocalOperations local, Action <IOfferAzureOperations> azure)
        {
            var builder      = local as LocalOperationsBuilder;
            var azureBuilder = new AzureOperationsBuilder(local, builder.Settings, builder.Token);

            if (azure != null)
            {
                azure(azureBuilder);
            }

            return(local);
        }
        public override void Configure(IOfferLocalOperations local, ConDepSettings settings)
        {
            local.HttpGet("http://www.con-dep.net");
            local.ToEachServer(server =>
                {
                    server
                        .Configure.IIS();

                    server
                        .Execute.PowerShell("ipconfig");
                }
            );
            local.HttpGet("http://blog.torresdal.net");
        }
Exemplo n.º 11
0
        public override void Configure(IOfferLocalOperations onLocalMachine, ConDepSettings settings)
        {
            onLocalMachine.ToEachServer(server => {
                server
                .Configure
                .OnlyIf(x => x.OperatingSystem.Name.StartsWith("Windows"))
                .IIS();

                server
                .OnlyIf(x => x.OperatingSystem.Name.StartsWith("Windows"))
                .Execute.PowerShell("write-host ''");
            }
                                        );
        }
Exemplo n.º 12
0
        public override void Configure(IOfferLocalOperations local, ConDepSettings settings)
        {
            local.HttpGet("http://www.con-dep.net");
            local.ToEachServer(server =>
            {
                server
                .Configure.IIS();

                server
                .Execute.PowerShell("ipconfig");
            }
                               );
            local.HttpGet("http://blog.torresdal.net");
        }
Exemplo n.º 13
0
        public override void Configure(IOfferLocalOperations onLocalMachine, ConDepSettings settings)
        {
            onLocalMachine.ToEachServer(server => {

                server
                    .Configure
                        .OnlyIf(x => x.OperatingSystem.Name.StartsWith("Windows"))
                            .IIS();

                server
                    .OnlyIf(x => x.OperatingSystem.Name.StartsWith("Windows"))
                    .Execute.PowerShell("write-host ''");

            }
            );
        }
Exemplo n.º 14
0
 public override void Configure(IOfferLocalOperations onLocalMachine, ConDepSettings settings)
 {
 }
 public static IOfferBootstrapOperations Bootstrap(this IOfferLocalOperations local)
 {
     return(new BootstrapOperationsBuilder(local));
 }
 public static IOfferTerminateOperations Terminate(this IOfferLocalOperations local)
 {
     return(new TerminateOperationsBuilder(local));
 }
Exemplo n.º 17
0
 public abstract void Configure(IOfferLocalOperations onLocalMachine, ConDepConfig config);
Exemplo n.º 18
0
 public AzureOperationsBuilder(IOfferLocalOperations localOps, ConDepSettings settings, CancellationToken token) : base(settings, token)
 {
     LocalOperations = localOps;
     ResourceGroup   = new AzureResourceGroupOperationsBuilder(this, settings, token);
 }
Exemplo n.º 19
0
 public abstract void Configure(IOfferLocalOperations onLocalMachine, ConDepSettings settings);
Exemplo n.º 20
0
        public static void Operation(IOfferLocalOperations local, LocalOperation operation)
        {
            var seqContainer = local as LocalOperationsBuilder;

            seqContainer.AddOperation(operation);
        }
 public BootstrapOperationsBuilder(IOfferLocalOperations local)
 {
     _local = local;
 }
Exemplo n.º 22
0
 public static void Operation(IOfferLocalOperations local, LocalOperation operation)
 {
     var seqContainer = local as LocalOperationsBuilder;
     seqContainer.AddOperation(operation);
 }
Exemplo n.º 23
0
 public abstract void Configure(IOfferLocalOperations local, ConDepConfig config);
Exemplo n.º 24
0
 public abstract void Configure(IOfferLocalOperations onLocalMachine, ConDepConfig config);
 public TerminateOperationsBuilder(IOfferLocalOperations local)
 {
     _local = local;
 }
 public BootstrapOperationsBuilder(IOfferLocalOperations local)
 {
     _local = local;
 }
 public AzureOperationsBuilder(IOfferLocalOperations localOps, ConDepSettings settings, CancellationToken token)
     : base(settings, token)
 {
     LocalOperations = localOps;
     ResourceGroup = new AzureResourceGroupOperationsBuilder(this, settings, token);
 }
Exemplo n.º 28
0
 public override void Configure(IOfferLocalOperations local, ConDepConfig config)
 {
     local.HttpGet("http://www.con-dep.net");
     local.ToEachServer(server => server.ExecuteRemote.PowerShell("ipconfig"));
     local.HttpGet("http://blog.torresdal.net");
 }
Exemplo n.º 29
0
 public abstract void Configure(IOfferLocalOperations onLocalMachine, ConDepSettings settings);