470 likes | 740 Views
AB Suite Builder Behind the Scenes. Russell Pederick, AB Suite Windows Technical Lead UNITE, May 2011. Agenda. Development Environment – Model and Configurations General Build Process Building MCP systems Building Windows systems Transfer Phase Deployment Phase. Development Environment.
E N D
AB Suite BuilderBehind the Scenes Russell Pederick, AB Suite Windows Technical Lead UNITE, May 2011
Agenda • Development Environment – Model and Configurations • General Build Process • Building MCP systems • Building Windows systems • Transfer Phase • Deployment Phase © 2011 Unisys Corporation. All rights reserved.
Development Environment © 2011 Unisys Corporation. All rights reserved.
Platform Independent Model • AB Suite Development Environment • Platform Independent Model • Used to model the structure and behaviour of a system • Independent of any particular platform or technology © 2011 Unisys Corporation. All rights reserved.
Platform Independent Model Configurations Configurations Configurations Configurations Builder Platform Specific Model © 2011 Unisys Corporation. All rights reserved.
Platform Independent Model • Benefits • Model can be deployed to different platforms • MCP • Windows • Can support multiple Operating System levels • E.g. Windows 2003, Windows 2008 • Can take advantage of various technologies • COBOL, C#, .NET • DMSII, SQL Server © 2011 Unisys Corporation. All rights reserved.
Build process © 2011 Unisys Corporation. All rights reserved.
ApplicationDatabase Model Builder Process - Overview • Generate Phase • Transfer Phase • Deployment Phase Configurat Configuratio Configurations Development Server Runtime Server Runtime Application Builder Deploy © 2011 Unisys Corporation. All rights reserved.
Choosing What to Build • Folder – logical grouping mechanism • Used to group a set of elements to build • Create a folder • Set it to “Deployable” • Add elements to build © 2011 Unisys Corporation. All rights reserved.
Choosing What to Build • Build the entire system • Folder contains the Segment class © 2011 Unisys Corporation. All rights reserved.
Choosing What to Build • Build a set of Reports © 2011 Unisys Corporation. All rights reserved.
Choosing What to Build • Build a set of clients (“Bundle”) © 2011 Unisys Corporation. All rights reserved.
Choosing What to Build • Build multiple folders Build © 2011 Unisys Corporation. All rights reserved.
Builder – How to Run • Builder program - Builder.exe • Can be run: • Interactively from Visual Studio • Initiate via Visual Studio menus • Enter build options via dialog boxes • Build information displayed in Visual Studio ‘Output’ window • Using Builder.exe command-line interface via command prompt window or script © 2011 Unisys Corporation. All rights reserved.
Builder – How to Run • When doing an ad-hoc build • Interactively from Visual Studio • When doing a repeatable build operation • E.g. regular full build of test or production system • Use a script • Any scripting language e.g. VB Script © 2011 Unisys Corporation. All rights reserved.
Builder – How to Run • Example script for a Windows Build © 2011 Unisys Corporation. All rights reserved.
Build Log • Shows progress of Build operation • Indicates which phase is being executed • Indicates which build task is currently running © 2011 Unisys Corporation. All rights reserved.
Build Log • Options to choose format and content of Builder log © 2011 Unisys Corporation. All rights reserved.
Build Log • Date and Time • Saved to a Build log file • Command-line interface – Builder output can be redirected to a file © 2011 Unisys Corporation. All rights reserved.
Model Generate Phase • Translates the Model into platform-specific code, and packages it ready for deployment. Configurat Development Server Configuratio Configurations Builder © 2011 Unisys Corporation. All rights reserved.
Generate Phase • Logic validation • Model validation • Model Walk • Identify all of the source elements that need to be generated • Construct a list of tasks to be run – TargetBuilders • MCP • COBOL source files for ispecs • DMSII schema definition • Control files e.g. GSDPROGRAM, SCREENDATA, etc. • Windows • C# source files for ispecs • SQL Server database schema definition • Control files e.g. project files, XML control files © 2011 Unisys Corporation. All rights reserved.
Generate Phase • Run the TargetBuilders © 2011 Unisys Corporation. All rights reserved.
Model Generate Phase - MCP • Generate COBOL files, database schema, control files Target Builder Target Builder Target Builder Target Builder COBOL source Data files © 2011 Unisys Corporation. All rights reserved.
Model Generate Phase - Windows • Generate C# files, project files, XML control files, DB schema • Compile C# source into DLLs • Package all executable files into a single MSI package (Microsoft Installer package) Target Builder Target Builder Compile Package Target Builder Target Builder MSI file Executable files DLLs, EXEs, etc. C# source files © 2011 Unisys Corporation. All rights reserved.
Model Build • ‘Build’ for the first time • Build everything • Save all files in the Builder Cache Target Builder Target Builder Target Builder Target Builder Builder Cache Builder Output © 2011 Unisys Corporation. All rights reserved.
Model Build • On subsequent builds… • TargetBuilder runs and determines if the last-generated file (saved in the Builder Cache) is up-to-date • If so, the file is copied from the Builder Cache Target Builder Target Builder Target Builder Target Builder Builder Cache Builder Output © 2011 Unisys Corporation. All rights reserved.
Build • Elements not changed – TargetBuilder indicates “up-to-date” • Elements changed – TargetBuilders run to generate new file © 2011 Unisys Corporation. All rights reserved.
“Build” versus “Rebuild” • “Build” • Check each file in the BuilderCache. • Only generate a new file if the last-generated file is out-of-date • “Rebuild” • Ignore the BuilderCache • Always rebuild everything © 2011 Unisys Corporation. All rights reserved.
Builder Output and Builder Cache • BuilderOutput – working folder for generation of files • BuilderCache – folder to store “saved” version of generated files. Stored in encrypted format. © 2011 Unisys Corporation. All rights reserved.
Model Builder Output and Builder Cache Standalone Developer Workstations Multi-user Model Server • In multi-user development env. • BuilderOutput folder local on each workstation • BuilderCache folder shared on a mapped drive Builder Z:\BuilderCache C:\BuilderOutput Builder C:\BuilderOutput © 2011 Unisys Corporation. All rights reserved.
Builder Output – Source code format • MCP • Generated COBOL source files • Not human-readable • Windows • Generated C# source files • Not human readable • Internal names are used for all file names and internally for all element names © 2011 Unisys Corporation. All rights reserved.
TRANSFER PHASE © 2011 Unisys Corporation. All rights reserved.
Transfer Phase - Windows • Just one file to be transferred – the package MSI file that contains all runtime files packaged together. • Compiled DLLs for system, reports and clients (Winforms) • Control files (XML configuration files) • Transferred to “Package Intermediate Directory” Development Server Runtime Server MSI file MSI file © 2011 Unisys Corporation. All rights reserved.
Model Transfer Phase - MCP • FTP File Transfer of COBOL files and other files • File by file Configurat Development Server Runtime Server Configuratio Configurations Builder FTP © 2011 Unisys Corporation. All rights reserved.
Transfer Phase - MCP • TargetBuilder includes FTP File Transfer Target Builder Target Builder Target Builder FTP FTP FTP Builder Output Target Host © 2011 Unisys Corporation. All rights reserved.
Transfer Phase - MCP • Upcoming IC – Asynchronous FTP Target Builder Target Builder Target Builder File Transfer FTP FTP FTP Builder Output Target Host © 2011 Unisys Corporation. All rights reserved.
DEPLOYMENT PHASE © 2011 Unisys Corporation. All rights reserved.
ApplicationDatabase Deployment Phase - Windows • MSIEXEC.exe • Unpacks all files from the MSI package and copies them to the target installation folder • Runs a series of scripts to perform deployment actions: • Register application with COM+ • Reorganise database Runtime Server MSIEXEC Runtime Application MSI file © 2011 Unisys Corporation. All rights reserved.
Deployment Phase - Windows • How to run • Interactively from Visual Studio, as part of a full build (generate to deploy) or just the deploy phase • Runtime Transfer • Command line or script – run MSIEXEC with command line parameters © 2011 Unisys Corporation. All rights reserved.
ApplicationDatabase Windows Deployment – Runtime Transfer • Initiated from development server Development Server Runtime Server MSIEXEC Runtime Application Runtime Transfer MSI file MSI file © 2011 Unisys Corporation. All rights reserved.
ApplicationDatabase Windows Deployment – Runtime Transfer • Initiated from runtime server Runtime Server Runtime Transfer MSIEXEC Runtime Application MSI file © 2011 Unisys Corporation. All rights reserved.
Windows Deployment – MSI Package • Contents of an MSI Package MSI Package DLLs, executable files XML Configuration files, Miscellaneous files System name: Sample Database name: SAMPLEDB DB Schema name: SAMPLESYS © 2011 Unisys Corporation. All rights reserved.
TestDatabase ProductionDatabase Windows Deployment Test Server Production Server Test System Production System MSI file MSI file © 2011 Unisys Corporation. All rights reserved.
Windows Deployment - Deployment Package Manager MSI Package MSI Package Deployment Package Manager Files Files System name: SampleTest Database name: SAMPLETESTDB DB Schema name: SAMPLETEST System name: SampleProd Database name: SAMPLEPRODDB DB Schema name: SAMPLEPROD SampleTestDeploy.msi SampleProdDeploy.msi © 2011 Unisys Corporation. All rights reserved.
Windows Deployment – Future Plans • Incorporate Deployment Package Manager as an integrated part of Runtime Transfer • Provide a complete command-line interface for Runtime Transfer © 2011 Unisys Corporation. All rights reserved.
ApplicationDatabase Deployment Phase - MCP • Similar to deployment phase with EAE MCP Host Application Builder Runtime Application WFL BLD Compile and Bind Code Libraries COBOL Files © 2011 Unisys Corporation. All rights reserved.