public void DeployHelloWorld() { IFileSystem fileSystem = new FileSystem(); var settings = new DeploymentSettings(@"C:\dev\test-profile\"); IBottleRepository bottles = new BottleRepository(fileSystem, new PackageExploder(new ZipFileService(fileSystem), new PackageExploderLogger(s => { }), fileSystem), settings); var initializer = new IisFubuInitializer(fileSystem, new DeploymentSettings()); var deployer = new IisFubuDeployer(fileSystem, bottles); var directive = new FubuWebsite(); directive.HostBottle = "test"; directive.WebsiteName = "fubu"; directive.WebsitePhysicalPath = @"C:\dev\test-web"; directive.VDir = "bob"; directive.VDirPhysicalPath = @"C:\dev\test-app"; directive.AppPool = "fubizzle"; directive.DirectoryBrowsing = Activation.Enable; initializer.Execute(directive, new HostManifest("something"), new PackageLog()); var host = new HostManifest("a"); deployer.Execute(directive, host, new PackageLog()); }
public void DeployWebsite() { var testRoot = Path.GetFullPath(@".\integration"); var writer = new DeploymentWriter(testRoot, new FileSystem()); writer.AddEnvironmentSetting("name", "dru"); var r = writer.RecipeFor("FubuTestApplication"); var h = r.HostFor("web"); var d = new FubuWebsite(); d.WebsiteName = "test"; d.WebsitePhysicalPath = @"C:\dev\test-web"; d.VDir = "bob"; d.VDirPhysicalPath = @"C:\dev\test-app"; d.HostBottle = "FubuTestApplication"; d.AppPool = "fubu-test"; h.AddDirective(d); writer.Flush(FlushOptions.Wipeout); //copy over bottles var fileName = "FubuTestApplication.zip"; var destination = @".\integration\bottles\"; Directory.CreateDirectory(destination); File.Copy(@"C:\Users\dsellers.fcs\Desktop\ProfileScratch\FubuTestApplication.zip", Path.Combine(destination, fileName), true); //<stop> var settings = new DeploymentSettings(testRoot) { UserForced = true }; var container = DeploymentBootstrapper.Bootstrap(settings); var deploymentController = container.GetInstance <IDeploymentController>(); deploymentController.Deploy(); }
public override bool Execute(CreateDeploymentInput input) { var settings = DeploymentSettings.ForDirectory(input.DeploymentFlag); var directive = new FubuWebsite(); if (input.VirtualDirFlag.IsNotEmpty()) { directive.VDir = input.VirtualDirFlag; } var fileSystem = new FileSystem(); var hostFile = settings.GetHost(input.RecipeFlag, input.HostFlag); Console.WriteLine("Adding a new FubuWebsite directive to " + hostFile); fileSystem.WriteToFlatFile(hostFile, file => { var writer = new DirectiveWriter(file, new TypeDescriptorCache()); writer.Write(directive); }); Console.WriteLine(""); new AddReferenceCommand().Execute(new AddReferenceCommandInput() { Bottle = input.ApplicationBottleName, Host = input.HostFlag, Recipe = input.RecipeFlag }); if (input.OpenFlag) { fileSystem.LaunchEditor(hostFile); } return(true); }