Code Monkey home page Code Monkey logo

condep's Introduction

Project split and moved into seperate repositories

The ConDep repository has now been split into several other repositories located in the ConDep Organization in GitHub. This repo is now only used for sentralized issues (issues where you don't know which ConDep repo it belongs to).

About ConDep

ConDep is a highly extendable Domain Specific Language for Continuous Deployment, Continuous Delivery and Infrastructure as Code on Windows. It's main goal is to make it as simple as possible to deploy software, infrastructure and configuration to remote servers, without causing application downtime.

For mor information about ConDep, documentation, news and more, check out http://www.condep.io

condep's People

Contributors

kjelliverb avatar olsenius avatar torresdal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

condep's Issues

Loading InfrastructureArtifact class

Hi, if you define a class deriving from InfrastructureArtifact to describe your infrastructure you cannot define that class in another referenced assembly. We have several services that (in our deployment scenario) relate to the same IIS and web site root. Ideally we'd like to share the infrastructure definition and have a separate assembly per project defining the ApplicationArtifact.
I can see in the code that the DSL method GetInfrastructureArtifactForApplication() attempts to derive the InfrastructureArtifact from the IDependOnInfrastructure type, however it does not return the full qualified type name (which is available) hence assembly.CreateInstance fails (in this scenario) and a null is returned by the method.
In the calling method no null check is performed and this line "infrastructureInstance.Configure(infrastructureBuilder, envConfig);" fails with a null-reference-exception which is reported back to the console.
Change to code as below will cater for the type in same or referenced assembly:

        var infrastructureType = typeInterface.GetGenericArguments().Single();
        // modified line \/
        var infrastructureInstance = Activator.CreateInstance(infrastructureType) as InfrastructureArtifact;
        //                    /\
        return infrastructureInstance;

Can not install Windows Service - error in arguments

When trying out ConDep on my local machine i got the error in the log below.
Seems like two $null is sent to powershell command "New-ConDepWinService" and it can not handle that.

Update: If i Specify the startup-type in the options it works fine. Maybe make this a bit clearer?

Version from nuget: 2.0.24

[10:28:29,646] Executing PowerShell commandOrScript: New-ConDepWinService 'MyService' 'c:\app\MyService\MyService.ex
[10:28:29,647] e ' 'MyService' $null $null
[10:28:30,074] ConDep execution failed.
System.Management.Automation.RemoteException: Cannot process argument transformation on parameter 'startupType'. Cannot convert null to type "System.ServiceProc
ess.ServiceStartMode" due to enumeration values that are not valid. Specify one of the following enumeration values and try again. The possible enumeration valu
es are "Automatic, Manual, Disabled".
at System.Management.Automation.PowerShell.CoreInvokeRemoteHelper[TInput,TOutput](PSDataCollection1 input, PSDataCollection1 output, PSInvocationSettings s
ettings)
at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection1 input, PSDataCollection1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.CoreInvoke[TOutput](IEnumerable input, PSDataCollection1 output, PSInvocationSettings settings) at System.Management.Automation.RemotePipeline.Invoke(IEnumerable input) at ConDep.Dsl.Remote.PowerShellExecutor.Execute(String commandOrScript, IEnumerable1 parameters)
at ConDep.Dsl.SemanticModel.Sequence.CompositeSequence.Execute(ServerConfig server, IReportStatus status, ConDepSettings settings)
at ConDep.Dsl.SemanticModel.Sequence.RemoteSequence.ExecuteOnServer(ServerConfig server, IReportStatus status, ConDepSettings settings)
at ConDep.Dsl.SemanticModel.Sequence.RemoteSequence.ExecuteOnServer(ServerConfig server, IReportStatus status, ConDepSettings settings, ILoadBalance loadBala
ncer, Boolean bringServerOfflineBeforeExecution, Boolean bringServerOnlineAfterExecution)
at ConDep.Dsl.SemanticModel.Sequence.RemoteSequence.ExecuteWithRoundRobin(ConDepSettings settings, IReportStatus status)
at ConDep.Dsl.SemanticModel.Sequence.RemoteSequence.Execute(IReportStatus status, ConDepSettings settings)
at ConDep.Dsl.SemanticModel.Sequence.LocalSequence.Execute(IReportStatus status, ConDepSettings settings)
at ConDep.Dsl.SemanticModel.Sequence.ExecutionSequenceManager.Execute(IReportStatus status, ConDepSettings settings)
at ConDep.Dsl.SemanticModel.ConDepConfigurationExecutor.Execute(ConDepSettings settings, IValidateClient clientValidator, IValidateServer serverValidator, Ex
ecutionSequenceManager execManager)

How do I use tiers?

ConDep 3 allows you to specify Tiers in the configuration, however it is not clear how you can deploy artefacts to a specific tiers. At first I thought this would be achieved by using an OnlyIf command and specifying the tier, however this is currently not available.

Can you clarify how you intend this to be used?

Infrastructure IIS Website fails when updating existing website

Using 2.0.50
I am using the InfrastructureArtifact below. The first time I deploy against a server everything works fine. The second time I get an exception (below).

public class MyWebServerInfrastructure : InfrastructureArtifact
{
    public override void Configure(IOfferInfrastructure require, ConDepSettings settings)
    {
        require
            .IIS(iis => iis.Include.AspNet35())

            .IISAppPool("FooAppPool", appPool => appPool.NetFrameworkVersion(NetFrameworkVersion.Net4_0))

            .IISWebSite("FooSite", 10, opt => opt
                .AddHttpBinding(binding => binding.Port(8011))
                .ApplicationPool("FooAppPool"));
    }
}
[18:47:04,513] IIS Web Site - FooSite
[18:47:04,514]  Remote PowerShell
[18:47:05,404]   Executing command/script...
[18:47:05,405]   New-ConDepIisWebSite 'FooSite' 10 @(@{protocol='http';bindingInformation=':8011:'}) $null 'FooAppPool' '';
[18:47:07,008] ConDep execution failed.
System.Management.Automation.Remoting.PSRemotingTransportException: Remoting data is missing InvocationInfo property. --
-> System.Management.Automation.Remoting.PSRemotingDataStructureException: Remoting data is missing InvocationInfo prope
rty.
   at System.Management.Automation.RemotingDecoder.GetPropertyValue[T](PSObject psObject, String propertyName)
   at System.Management.Automation.ErrorRecord.ConstructFromPSObjectForRemoting(PSObject serializedErrorRecord)
   at System.Management.Automation.Internal.ClientPowerShellDataStructureHandler.ProcessReceivedData(RemoteDataObject`1
receivedData)
   at System.Management.Automation.Internal.ClientRunspacePoolDataStructureHandler.DispatchMessageToPowerShell(RemoteDat
aObject`1 rcvdData)
   at System.Management.Automation.Remoting.ClientRemoteSessionDSHandlerImpl.ProcessNonSessionMessages(RemoteDataObject`
1 rcvdData)
   at System.Management.Automation.Remoting.ClientRemoteSessionDSHandlerImpl.DispatchInputQueueData(Object sender, Remot
eDataEventArgs dataArg)
   at System.Management.Automation.Remoting.BaseTransportManager.OnDataAvailableCallback(RemoteDataObject`1 remoteObject
)
   at System.Management.Automation.Remoting.Client.BaseClientTransportManager.ServicePendingCallbacks(Object objectToPro
cess)
   --- End of inner exception stack trace ---
   at System.Management.Automation.PowerShell.CoreInvokeRemoteHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCol
lection`1 output, PSInvocationSettings settings)
   at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 ou
tput, PSInvocationSettings settings)
   at System.Management.Automation.PowerShell.CoreInvoke[TOutput](IEnumerable input, PSDataCollection`1 output, PSInvoca
tionSettings settings)
   at System.Management.Automation.RemotePipeline.Invoke(IEnumerable input)
   at ConDep.Dsl.Remote.PowerShellExecutor.Execute(String commandOrScript, IEnumerable`1 parameters, Boolean logOutput)
   at ConDep.Dsl.Logging.Logger.WithLogSection(String sectionName, Action action)
   at ConDep.Dsl.SemanticModel.Sequence.CompositeSequence.<>c__DisplayClass2.<Execute>b__0()
   at ConDep.Dsl.Logging.Logger.WithLogSection(String sectionName, Action action)
   at ConDep.Dsl.SemanticModel.Sequence.InfrastructureSequence.<>c__DisplayClass6.<Execute>b__4()
   at ConDep.Dsl.Logging.Logger.WithLogSection(String sectionName, Action action)
   at ConDep.Dsl.SemanticModel.Sequence.LoadBalancerExecutorBase.ExecuteOnServer(ServerConfig server, IReportStatus stat
us, ConDepSettings settings)
   at ConDep.Dsl.SemanticModel.Sequence.LoadBalancerExecutorBase.<>c__DisplayClass1.<ExecuteOnServer>b__0()
   at ConDep.Dsl.Logging.Logger.WithLogSection(String sectionName, Action action)
   at ConDep.Dsl.SemanticModel.Sequence.RoundRobinLoadBalancerExecutor.Execute(IReportStatus status, ConDepSettings sett
ings)
   at ConDep.Dsl.SemanticModel.Sequence.RemoteSequence.Execute(IReportStatus status, ConDepSettings settings)
   at ConDep.Dsl.Logging.Logger.WithLogSection(String sectionName, Action action)
   at ConDep.Dsl.SemanticModel.Sequence.LocalSequence.Execute(IReportStatus status, ConDepSettings settings)
   at ConDep.Dsl.Logging.Logger.WithLogSection(String sectionName, Action action)
   at ConDep.Dsl.SemanticModel.Sequence.ExecutionSequenceManager.Execute(IReportStatus status, ConDepSettings settings)
   at ConDep.Dsl.SemanticModel.ConDepConfigurationExecutor.Execute(ConDepSettings settings, IValidateClient clientValida
tor, IValidateServer serverValidator, ExecutionSequenceManager execManager, CancellationToken token)
[18:47:07,070] Removing ConDepNode from server...

ConDep in NuGet package ships with wrong version of log4net.

Running ConDep.exe from command line fails:

Unhandled Exception: System.TypeInitializationException:
The type initializer for 'ConDep.Dsl.Logging.Logger' threw an exception. ---> System.IO.FileLoadException: Could not load file or assembly 'log4net, Version=1.2.11.0,
Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a' or one of its dependencies.

That is because the installed log4net is version 1.2.12

Execute local operation *after* remote operations have finished

Hiya,

I'd like to be able to run a local operation after the remote operations, but before the ConDep process exits. Adding a custom local operation appears to execute right before the remote operations begin. I want to execute it as a local operation because I want it to run one time. I can do a workaround where I execute it as a remote operation and restrict its execution based on a server predicate, but it would be better if I could insert a local operation into the overall sequence at the end.

Is it possible to "bookend" the overall execution sequence like this, or is the local -> remote sequence hard-coded?

Thanks!

Condep.exe throws null reference exception for all versions >3.0.7

I have no idea what just happened. When I run condep from the command line, this is what I get:

& condep

Unhandled Exception: System.NullReferenceException: Object reference not set to
an instance of an object.
   at ConDep.Dsl.Logging.Logger.Error(String message, Object[] formatArgs)
   at ConDep.Console.Program.Main(String[] args)

I tried all versions from 3.0.8 and up. And I am pretty sure that 3.0.8 (or 3.0.9) worked a few days ago. Somehow, I must have unintenti

Validation ConDepNode fails

I installed 'ConDep.Node 3.0.2-beta from NuGet today and gave it a test-run on my development machine.

When I run my deployment, ConDep stops at 'Validating ConDepNode'. The error message says:

The term 'Start-ConDepNode' is not recognized as the name of a cmdlet, function, script file, or operable program

Since this is a RemoteException, I take it that ConDep.Node is not installed. But how do I install it?

The full stack trace:

[20:33:19,830]    Validating ConDepNode
[20:33:21,457] ConDep execution failed.
System.Management.Automation.RemoteException: The term 'Start-ConDepNode' is not recognized as the name of a cmdlet, function, script file, or operable program.  Check the spelling of the name, or if a path was included, verify that the path  is correct and try again.
   at System.Management.Automation.PowerShell.CoreInvokeRemoteHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
   at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
   at System.Management.Automation.PowerShell.CoreInvoke[TOutput](IEnumerable input, PSDataCollection`1 output, PSInvocationSettings settings)
   at System.Management.Automation.RemotePipeline.Invoke(IEnumerable input)
   at ConDep.Dsl.Remote.PowerShellExecutor.Execute(String commandOrScript, IEnumerable`1 parameters, Boolean logOutput)
   at ConDep.Dsl.Operations.PreRemoteOps.<>c__DisplayClass8.<TempInstallConDepNode>b__7()
   at ConDep.Dsl.Logging.Logger.WithLogSection(String sectionName, Action action)
   at ConDep.Dsl.Operations.PreRemoteOps.<>c__DisplayClass3.<Execute>b__0()
   at ConDep.Dsl.Logging.Logger.WithLogSection(String sectionName, Action action)
   at ConDep.Dsl.Execution.ConDepConfigurationExecutor.<>c__DisplayClass10.<>c__DisplayClass13.<ExecutePreOps>b__f()
   at ConDep.Dsl.Logging.Logger.WithLogSection(String sectionName, Action action)
   at ConDep.Dsl.Execution.ConDepConfigurationExecutor.<>c__DisplayClass10.<ExecutePreOps>b__e()
   at ConDep.Dsl.Logging.Logger.WithLogSection(String sectionName, Action action)
   at ConDep.Dsl.Execution.ConDepConfigurationExecutor.Execute(ConDepSettings settings, IValidateClient clientValidator, IValidateServer serverValidator, ExecutionSequenceManager execManager, CancellationToken token)

Grant Log On as a Service for Service User

The user account configured to run a NServiceBus endpoint, should be grated 'Log On as a Service' automatically when deploying.

If the user is not granted, the service will not start.

Split ConDep into mode modules for easier customization?

ConDep is very biased against the condep.exe-file and a certain deployment workflow which doesn't quite work in all circumstances. Well, not mine anyway ;-)

I don't expect the project to change course, nor do I want to build a deployment solution from scratch. But I would like to capitalize on the work done by the ConDep project and my time already invested in it.

From my point of view, the split ConDep does between the *.env.json and the target class is a bit odd:

  • I am forced to put information in the json-file, which I would rather have in the target class.
  • ConDep expects a json-file, it fails when there is none.
  • I don't like to put passwords in the json-file, not in any source code for that matter.
  • Because of small differences between internal test-servers, customers' test servers, and production servers, I need target classes like InternalTest, CustomerATest, CustomerAProd,
  • Because I have added database-migrations to the mix, the user/password combo is even more complex.

I guess the simplest solution would be to make the json-file optional or have a -noenv parameter.

The harder solution would be to split ConDep.exe into one exe just doing setup, like deserialize the json and create the deployment runner class, then invoke the runner and pass the deserialized json and the deployment target name.

So if I want to create my own exe, all I have to do is to reference the deployment runner assembly, create the runner class and invoke it.

Configuring a web.config per server in a load balance environment

We have a system that is load balanced between two servers. At first we were deploying both servers identically. However, we have a recent requirement where we will need to configure a certain part of the web.config differently per server.

At what point in the deployment process is this possible and is it possible to provide the unique information to the .json files since that is where the server definitions are?

NuGet package install fails with Already referencing a newer version...

Installing ConDep from NuGet Package Manager Console fails with

Already referencing a newer version of 'Microsoft.AspNet.WebApi.Client'.

The reason seems to be that earlier dependencies to WebApi.Client is less restrictive than later. Trying to install with -DependencyVersion on earlier versions seems to load incompatible dependencies.

Workaround for latest build (3.0.16-beta):

PM> Install-Package ConDep -Pre -DependencyVersion HighestMinor
PM> Install-Package ConDep -Pre 
...
Attempting to resolve dependency 'Microsoft.AspNet.WebApi.Client (≥ 4.0.20710.0)'.
...
Attempting to resolve dependency 'Microsoft.AspNet.WebApi.Client (≥ 4.0.20710.0 && < 4.1)'.
Install-Package : Already referencing a newer version of 'Microsoft.AspNet.WebApi.Client'.

Failed deployment reported as successful in teamcity

Got an access denied when deploying to remote server, but the build was still reported as successfull in Team City.

teamcity[message text='Unable to access remote server |[xxxxxx|] using WMI. Unauthorized Access Exception reported. Please check your credentials.' errorDetails='Message: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.