Dru Sellers

Sponsors

The Lounge

Wicked Cool Jobs

Advertisement

dropkick - an idea for deployments

Still very rough, but I have the DSL compiling and looking at making file copy work. This is more than anything an exercise in building a framework that uses the same structure as the MassTransit Sagas.

    public class TestDeployment :
        Deployment<TestDeployment>
    {
        public static Part Web { get; set; }
        public static Part Db { get; set; }
        public static Part Service { get; set; }

        //dropkick r:role(web,db,service | full)
        static TestDeployment()
        {
            Define(() =>
                {
                    During(Web, (p) =>
                        {
                            p.OnServer("WebServer")
                                .IisSite("Apps")
                                .VirtualDirectory("dashboard")
                                .Verify()
                                .CreateIfItDoesntExist();

                            p.OnServer("SrvTopeka19")
                                .Msmq()
                                .PrivateQueueNamed("mt_subscriptions")
                                .CreateIfItDoesntExist();

                            p.CopyFrom(@".\code_drop\dashboard\**\*.*").To(@"\\webserver\apps\dashboard\")
                                .And((f) =>
                                    {
                                        f.WebConfig
                                            .ReplaceIdentityTokensWithPrompt()
                                            .EncryptIdentity();
                                    });
                        });

                    During(Db, (p) =>
                        {
                            p.OnServer("sql")
                                .SqlInstance(".")
                                .Database("dashboard")
                                .Verify()
                                .BackupWithLightspeedTo(@"\\sql\\backsups\")
                                .RunTarantinoOn(@".\code_drop\dashboard\sql");
                        });

                    During(Service, (p) =>
                        {
                            p.OnServer("WebServer")
                                .WinService("dashboard service")
                                .Verify()
                                .Do(() =>   //auto-stop
                                    {
                                        p.CopyFrom(@".\code_drop\dashboard").To(@"\\webserver\apps\dashboard-service")
                                            .And((f) =>
                                                {
                                                    f.AppConfig
                                                        .ReplaceIdentityTokensWithPrompt()
                                                        .EncryptIdentity();
                                                });
                                    });        //auto-start
                        });

                });
        }
    }

Posted Fri, May 29 2009 7:01 AM by drusellers

[Advertisement]

Comments

Jeremy Wiebe wrote re: dropkick - an idea for deployments
on Fri, May 29 2009 3:11 PM

I might not have caught the full intent of the DSL, but in order for it to be re-usable, it might be handy to be able to pull values from the deployment's app.config a la StructureMap.  

drusellers wrote re: dropkick - an idea for deployments
on Fri, May 29 2009 3:52 PM

yeah, I have the intent to add configuration. It just would have made the example alot more obtuse (i thought anyway) but yeah, I would assume either a structuremap style or a configuration object of some sort. :) good idea!!!

Sean Scally wrote re: dropkick - an idea for deployments
on Sat, May 30 2009 2:10 PM

I dig the API. I've never found any decent deployment automation tools for the .NET ecosystem. I was hoping maybe someone would port Capistrano from Ruby to C#, but this might be just as good.

Pavel Nikolov wrote re: dropkick - an idea for deployments
on Mon, Jun 1 2009 2:51 AM

Awesome! I can't wait to play with the API. This is the best article in my RSS reader for the last month : )

brady gaster wrote re: dropkick - an idea for deployments
on Fri, Jun 5 2009 2:00 PM

I'd like to see an approach like this on top of (serving as a public API for) the MHS code that exists for hosters. That'd be a dream. Any chance you'd release the interfaces for this DDD spec so that developers could write their own implementations?

drusellers wrote re: dropkick - an idea for deployments
on Fri, Jul 3 2009 9:11 PM
Rob Reynolds - The Fervent Coder wrote Two Major Milestones for RoundhousE and UppercuT
on Fri, Jan 1 2010 4:13 PM

This last year I had a focus to get more involved in Open Source (OSS). The year before I had been involved

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
Devlicio.us