Seems to me NAnt is meant as a build tool
not a deployment tool. A deployment tool certainly requires transactions. As a
build tool NAnt does not need transactions although some of the things
mentioned so far in the thread are certainly interesting and should be
considered. My two cents. --Edwin From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Byrd, Payton I agree
that a build is not a deployment, but I do believe a build can be a component
of a deployment. Our team is trying to address a few issues with our
current methodology of deploying via MSI files to a web farm: 1)
Multi-homed servers that receive the same applications require manually
configuring IIS for secondary websites. 3) A
failed MSI installation can introduce garbage to the registry that prevents
assemblies from being removed from the GAC. NAnt allows
us to build on the server and know for a matter of fact that all code that is
built has all dependencies resolved, all unit tests performed and that the code
will operate correctly at run time. However,
NAnt introduces a new set of potential problems: 1) If a
deployment (for any reason, including the automated build) fails then the GAC
may have an incompatible set of assemblies since not all assemblies are given
an opportunity to build and deploy. 2) If a
deployment (for any reason, including the automated build) fails then the GAC
or an application may not be installed leaving the webserver broken. Transactionality
would solve both of these problems by automatically restoring the server to its
previous state should a failure occur. Even if you are not doing a build,
but simply doing an install from NAnt then a failure can cause both of the
above conditions to be true. To me,
the true value of NAnt is its ability to perform a repeatable build process
with an absolute minimum of human interaction. In this world of
Sarbanes-Oxley compliance, separation of duties rules requires that developers
can not perform production deployments without following a very, very stringent
set of logging requirements. NAnt
helps to fill those requirements by allowing developers to write code and
create NAnt scripts, then everything goes through a code review, then systems
engineers execute the NAnt scripts on the staging and production servers using
the logs and unit test results to certify the results. My team is not
completely there yet as we are still structuring our NAnt scripts and support
tools to achieve this goal. One of
the functional requests from our engineers has been the ability to undo any
damage caused by a failed build, thus the desire for transactionality. As
I said before, it can be accomplished with a lot of flags and a lot of
spaghetti code in the NAnt scripts. My request is that the core of NAnt
be extended to support some new optional methods on tasks: OnFailure()
: void This
would allow a task to participate in a transaction. This needs to be in
the core set of interfaces of NAnt so that people can contribute upgraded
versions of the core tasks such as <copy>, <gac-install>, etc that
are used during deployments. The runtime engine must also be upgraded to
hold a stack of transactional tasks that would be called for either a Failure
or Commit. The runtime engine would also need a trigger mechanism, such
as catching a RollbackTransactionException or something similar to trigger a rollback
and would need to trigger a commit at then end of a build or possibly when a
<commit> task is encountered. Transactions
would have to be transitory between executions of NAnt so that when a build
file is executed from another build file that the parent build file can be
rolled back when the child build file fails. Payton
Byrd -----Original
Message----- Sorry,
but I disagree with general "transactionality". A build
is not a deploy. If you choose to use NAnt for a deployment, - Brad
On Mon,
24 Jan 2005 14:53:38 -0600, Byrd, Payton <[EMAIL PROTECTED]> wrote:
-------------------------------------------------------
|
RE: [Nant-users] Transactionality in NAnt
Castro, Edwin Gabriel (Firing Systems Engr.) Tue, 25 Jan 2005 16:13:37 -0800
Title: RE: [Nant-users] Transactionality in NAnt
- RE: [Nant-users] Transactiona... Castro, Edwin Gabriel (Firing Systems Engr.)
- RE: [Nant-users] Transac... Merrill Cornish
- Re: [Nant-users] Tra... Troy Laurin
- Re: [Nant-users] Transac... Chris Taylor
- RE: [Nant-users] Transac... Byrd, Payton
- RE: [Nant-users] Transac... Merrill Cornish
- RE: [Nant-users] Transac... Byrd, Payton
- Re: [Nant-users] Tra... Troy Laurin