In this article we would like to show you how the Budget in Brief application was integrated into the real Enterprise Environment.
Two main components of this enterprise environment are:
Subversion is the open source Version Control System (VCS), that is used to manage content across the organization, and the
Team City is the Distributed Build Management and Continuous Integration Server (CIS), that is used to fully automate business process life cycle.
The Budget In Brief application is configured on the Team City server, where it is compiles the budget book, when the process is done, the book is checked back into Subversion for users to review.
We have chosen the existing setup for the Budget In Brief application's integration at our client's real-time environment. The Subversion is the universally recognized centralized version control system characterized by; its reliability, simplicity of its usage, and its ability to support the needs of a wide variety of users and projects, from individuals to large-scale enterprise operations. In this case all documents are stored in a such way that developers, analysts and business decision makers can easily access the files. The Team City is the best continuous integration solution on the market today.
It is good idea to mention that there are many other environments, which could provide similar functionality and where Budget In Brief could be integrated with similar simplicity.
How was that done?
Budget In Brief Configuration
In this configuration the client computers do not need to have the Budget In Brief application installed.
The Budget In Brief application was simply copied into the BiB folder on the C:\ disk of one the Build Agents servers, configured with Team City. We used only one Budget In Brief license.
The following screenshot will show how the files and folders are organized at the Subversion.
Notice that folder has two book files ARI_2_9.book and ARI_2_10.book. These book files represent content for different versions of the document. As you already know you can mix and match any combination of content documents. In our case version 2.9 book will have source documents from the Accounts folder, while the version 2.10 book does not include Accounts folder content. Both books share documents from the Transactions folder.
In Figure 4, you will see a few Microsoft Word DOCX files that are checked into the Accounting Method folder, which is controlled by the Subversion server. All documents are up to date in this folder.
Builder Agent Configuration
As the next step we need to configure the Environment Variable on each Build Agent Server that has the Budget In Brief installed. In our case there was only one Build Agent to be configured.
The reason we need to configure the BiB environment variable is, to minimize hard coding across multiple build scripts, and to simplify the build agent dependency configuration in the Team City server. If you do not want to use an environment variable, then you need to hard code the path to the Budget In Brief application, inside all build scripts, and make sure that that all the build agents have the Budget In Brief application deployed to the same location.
Here is the source code for the build script:
<?xml version="1.0" encoding="utf-8"?>
<Exec Command="C:\BiB\bibc.exe "$(teamcity_build_checkoutDir)\ARI" "$(teamcity_build_checkoutDir)\ARI\ARI_2_10.book" /outputfolder "$(teamcity_build_checkoutDir)\Draft" /outputfile "ARIUseCase""/>
Team City Configuration
We have created "ARI Documentation" project.
1. General Settings page
On the General Settings page, we have configured Artifact. Our final generated book will be that artifact.
Note: The artifact should be configured as ZIP file, otherwise, due to the DOCX file structure, Team City will recognize it as the ZIP archive. To prevent this you need to move the DOCX file into the ZIP file.
Leave all other settings on the General Settings page as default.
2. Version Control Settings page.
Attach the URL path to the Subversion Documentation folder path to the URL: "http://someserver/Documentation", and configure to use build server login credentials.
After we attach the Documentation folder, we need to set up two Checkout rules:
+:Build Scripts/ARI=>Build Scripts
Then configure the checkout directory to the "DocumentationARI" location.
3. Runner: Build Steps
Set the Build File Path to "Build Scripts\build.proj".
Note: On the previous step, we have mapped the Build Script from "ARI\Build Scripts\build.proj" to "Build Scripts\build.proj". We did this trick for convenience, in case we ever need to move build script or use different script. In such a case we would only have to change mappings.
Set MSBuild Version to ".NET Framework 4". Because the script was written in .net 4 framework.
Note: We have used MSBuild, but you can do the same with the Nant.
4. Agent Requirements
Add the requirement for the Budget In Brief Environment Variable, we have created earlier.
Note: Configure the separate Environment Variable for each build agent that will execute the Budget In Brief application
And that is it.
We are ready to run the project build.
When build is done, we have the artifact, which is our final book.
Fully automated life cycle process runs on the server: The user contributes; The content management system ensures in safety of the valuable data and controls the access; The distributed build management and continuous integration server runs automated process; The Budget In Brief application creates the book; Artifacts uploaded back to the content management system to review by the distinguished user.
Besides the Subversion version control system, similar integration could be achieved with the content management systems like the SharePoint. The Team City server will support most of the available source control and content management systems like Clear Case, Microsoft Team Foundation Server.
In the near future, we will demonstrate how to integrate Budget In Brief with the Share Point. Figure 1 shows the full enterprise life cycle process with the Budget In Brief application: