Last active
January 2, 2016 20:49
-
-
Save torresdal/8359122 to your computer and use it in GitHub Desktop.
Code snippets for ConDep Doc version 1.0 - Getting Started
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class WebServerInfrastructure : InfrastructureArtifact | |
{ | |
public override void Configure(IOfferInfrastructure require, ConDepConfig config) | |
{ | |
require | |
.IIS() | |
.IISAppPool("MyAppPool") | |
.IISWebSite("MyWebSite", 5, opt => opt | |
.ApplicationPool("MyAppPool") | |
.WebApp("MyWebApp", webAppOpt => webAppOpt | |
.PhysicalPath(@"E:\MyWebSite\MyWebApp") | |
) | |
); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyWebApp : | |
ApplicationArtifact, | |
IDependOnInfrastructure<WebServerInfrastructure> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Servers" : | |
[ | |
{ | |
"Name": "Server1" | |
}, | |
{ | |
"Name": "Server2" | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyWebApp : ApplicationArtifact | |
{ | |
public override void Configure(IOfferLocalOperations local, ConDepConfig config) | |
{ | |
local.ToEachServer(server => | |
{ | |
server.Deploy.Directory(@"C:\MyWebSite\MyWebApp", @"E:\MyWebSite\MyWebApp"); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment