View
220
Download
2
Tags:
Embed Size (px)
Citation preview
Managing .NET Software Factory Using SYNERGY/Change
Kris KniazKniaz.net
©2007 www.kniaz.net All rights reserved.
Software Factory Process Requirements (1/2)
• Automation– Builds must be automated– Builds must run often
• Scale out (Lab to Pilot Plant to Production Facility)– Run the same build process on any environment
(Developer Desktop, Integration Server, QA server )• UI and MW code as well as data base code
• Testable– Support re-runable automated unit tests
Software Factory Process Requirements (2/2)
• Verifiable– Knowledge of what code (to the file level) was deployed to
production in a given release– Trace code change to developer that changed it and
change request or defect that precipitated the work.• Link binary code to the source code
• Support concurrent and parallel development– Concurrent: development of the major and minor release
at the same time– Parallel: development of many major releases at the same
time
©2007 www.kniaz.net All rights reserved.
Code and Product Flow
`
DEV INT QAPROD
EngineerCodes,Builds,
Unit Tests,Deploys
Build ManagerBuilds,Audits,
DeploysIT Operator
Audits,Deploys
Sr. EngineerBuilds,
Unit Tests,Deploys
PM
QA
Request
Def
ect
©2007 www.kniaz.net All rights reserved.
Task and Change Request Flows
Start Here assign complete End
register
TaskAssigned
TaskCompletd
Taskregistered
©2007 www.kniaz.net All rights reserved.
How this all fits together using Synergy ? QA/Prod
QA QA Complete
QAProject
QA Work AreaQA Build Server
Reconfigure
Deploy
CR Life Line
Task Life Line
Code Life Line
App Life Line
QA
Select TasksLinked to CRsIn QA Status
Refresh
BM
SynergyReport
QA EnvReport
Compare
Prod Srv
QASrv
DeployReleased
QA baseline
IT
PMEngineering
©2007 www.kniaz.net All rights reserved.
How this all fits together using Synergy ? Engineering
Entered Assigned Code Complete
DevelopmentProject
IntegrationProject
Dev StageProject
AssociatedTasks
TasksCompleted
Baseline
CreateBaseline
Development Work AreaDevelopers Desktop
Integration Work AreaEngineering Build Server
DevStage Work AreaEngineering Build Server
`
Int Server Dev Stage Server
Reconfigure Reconfigure Reconfigure
Deploy DeployDeploy
AssociatedTasks
CR Life Line
Task Life Line
Code Life Line
App Life Line
Select TasksFor CR
In C.C. Status
PM PM
E
E E
PM
QA
©2007 www.kniaz.net All rights reserved.
Synergy Customizations
• Automated Build Process– NAnt scripts (http://nant.sourceforge.net)– Re-runable NUnit tests (http://nunit.org)– Continuous Integration Server – automated process
executes build scripts - CruiseControl.NET• Synergy Plug-in for CruiseControl.NET (published Sep 2005)• Communicates via http request/response with the Synergy servlets
– Environment (or locale) specific settings are stored in the configuration files that are dynamically created by the build process
©2007 www.kniaz.net All rights reserved.
CruiseControl.NET integration with Synergy
©2007 www.kniaz.net All rights reserved.
CC.NET synergy plug in configuration<sourcecontrol type="synergy">
<connection><executable>ccm.exe</executable><host>syn01</host><database>\\syn01\ccmdb63\wwdev</database><username>%CCM_UID%</username><password>%CCM_PWD%</password><role>build_mgr</role><homeDirectory>
F:\cmsynergy\cruisecontrol</homeDirectory><clientDatabaseDirectory>
F:\cmsynergy\uidb</clientDatabaseDirectory><polling>true</polling>
</connection>
<project><release>App1</release><projectSpecification>App1~Int</projectSpecification><taskFolder>7601</taskFolder><baseline>false</baseline><purpose>Integration</purpose><template>false</template><reconcile>
<path>bin</path><path>build\version.txt</path><path>root\flash</path>
</reconcile></project>
<changeSynergy><url>http://synergy:8600/cs</url><role>User</role>
</changeSynergy>
</sourcecontrol>
©2007 www.kniaz.net All rights reserved.
Auditing• Link binary products to source code
– Bill of Materials (BOM) concept is built into Synergy– Out of the box utility works only for C files compiled via make, not
particularly useful for .NET files, assemblies, NAnt– Solution:
• During build of each assembly NAnt generates dynamic BOM file• NAnt audit target creates “is_product” attribute for assemblies and “bom”
attribute for files. Then uses “ccm relate” command to establish a link.
• Compare deployed code to the released baseline– Synergy does not provide file paths just object names. Therefore Synergy
default reports are not useful for comparisons with deployment tools– Solution: Create custom attribute and populate paths from BOM
• ccm.exe attribute /create projectpath• ccm.exe attribute /modify projectpath “file”
• Passed SOX audit for the build and deployment process
©2007 www.kniaz.net All rights reserved.
Issue: Integrating Synergy and Defect Tracking Software
New
Open AssignedCode
Complete Fixed Closed
FailedTestDeferred Deployed
Synergy – QC IntegrationEngine
FailedTest
Mercury QC
Synergy
Defect = CRDo not want to create new CR type and flowCR/Defect synchronization would be preferredPlanning on using Synergy – Mercury Integration
©2007 www.kniaz.net All rights reserved.
Issue: Managing global code base
• Architecture of the app must support globalization– Isolate locale (i.e. “en-us” or “fr-ca”) specific logic into configuration
files– Store engineering content (exception messages, names of buttons,
forms etc…) into resource files that could be managed by a separate SCM process
– Establish base code and locale packs• Manage development of the base and configuration of “locale
packs” in Synergy• Use Translation Memory (TM) software to carry out
translation. Use CR’s to manage the process– How do you trace changes (change requests, translation defects) to
the deployed assemblies?
©2007 www.kniaz.net All rights reserved.
Summary
• Software Factory Process works! – Improved Software Quality– Automation– Repeatability– Traceability (Audit)– Scalability
• But..– High initial development costs– Longer build time– Not easy to adapt to new processes (for example Microsoft
BizTalk)– Requires skilled knowledge workers
©2007 www.kniaz.net All rights reserved.