Release Management and Version Control
Release Management and Version Control
Release Management and Version Control
Paper 467-2013
INTRODUCTION
The process of Release Management can be defined as follows:
Release management is a software engineering process intended to oversee the development, testing,
deployment and support of software releases. The practice of release management combines the general
business emphasis of traditional project management with a detailed technical knowledge of the systems
development lifecycle (SDLC) and IT Infrastructure Library (ITIL) practices.
- SearchSystemsChannel.com Definitions, Stephen J. Bigelow, 26 Jun 2008
Release management is the bridge that moves assets from development into production.
- The above definition is excerpted from Chapter 5, "Implementing System Management Services, Part 1:
Deploying Service Support" of The Definitive Guide to Service-Oriented Systems Management by Dan
Sullivan.
The process of managing and migrating code from environment to environment is normally an after thought once the
products have been purchased, the project is underway and code needs to be migrated from development to test and
then from test to production.
The practical steps of Release Management are:
The assembly of a Release Package by creating a static copy of the changed solution software components.
Backing up existing software components which will change as part of the Release.
Migration of the release package objects using an auditable and repeatable process.
Many software vendors include some capability to support this process although it is normally not very well
documented, communicated or consistent across products. Release management features do not sell software
licenses and are rarely included in evaluations; however the features greatly influence the risk of the product
implementation and the quality of the solution.
2.
For this paper I have used Collabnet Subversion Edge as the server and TortoiseSVN for the client tool.
SUBVERSION
TORTOISESVN INSTALLATION
TortoiseSVN allows you to interact with Subversion from Windows Explorer. This allows you to check files in and out
from version control and is necessary as most SAS tools do not provide native Subversion (version control) support.
Once you have downloaded the relevant version of TortoiseSVN for Windows you can double click on the install
package.
Select the option I accept the terms in the License Agreement and Click Next.
defined above.
Baseline will store all the complete code releases and backups
Releases will store incremental releases
10
11
12
13
SAS DI STUDIO
Navigate to the SAS Home directory for your SAS DI Studio installation on your client machine and locate the
plugins for CVS version control. Note the version numbers may be different depending on the patch level your are
on.
-
sas.dbuilder.versioncontrol.cvsplugin_903200.0.0.20111215144003_v930m2
sas.dbuilder.versioncontrol.cvsplugin.nls_903200.9.0.20120808210635_v930m2
sas.dbuilder.versioncontrol.cvsplugin_903101.0.0.20120215190000_d3dis51
sas.dbuilder.versioncontrol.cvsplugin.nls_903101.0.0.20120215190000_d3dis51
14
Rename the directories as Archive directory name. Notice you may have numerous directories. Be sure to
rename them all.
15
If the previous step was successful the CVS Plu-in tab will not be present and only the SVN Plug-in will be available.
Enter the details related to your Collabnet Subversion Edge Installation.
1.
2.
3.
4.
5.
6.
7.
8.
Program Path this is the location of the svn.exe installed with TortoiseSVN above.
Local Root Path temporary location for
Server Collabnet Subversion Edge Server
Repository the name of the repository for DI Studio e.g. SAS_DIStudio
Username admin
Password admin
Port 80
Type HTTP
SAS Enterprise Guide projects and programs can be saved to Subversion folders and then added to the
Subversion repository using TortoiseSVN. The process allows code to be is centrally stored, managed and
updated.
2.
SAS DI Studio before changes are made to objects they can be archived and stored in Subversion.
These changes are then available to everyone if they are needed to be rolled back.
3.
Custom Code any custom code which is used in your project and stored as a text file, including macros
can be stored in the same way.
Within the a SAS toolset there are minimal products which do not make use of the SAS Metadata Server and
therefore you need to consider if collaboration makes more sense using the SAS Metadata Server or TortoiseSVN.
Version Control
For version control SAS DI Studio is the only product which links into SVN natively. You have the capability of
archiving most objects at either the object or the folder level. The ability to archive objects at the object level allows
you to track changes at a granular level. Note this capability operates independently of Change Management.
In SAS DI Studio when you create a job before a change you archive the job or object by right clicking and selecting
Archive as a SAS Package.
16
When you right click on the object now you can chose compare.
17
18
19
RootFolder this is the top of the folder structure within SAS Management Console you wish to export all
the objects from.
machinename the SAS Metadata server name. Can be found in the SAS Management Console under
Server Manager -> SASMeta -> SASMeta Logical Metadata Server.
username a user who has access to the entire structure and all the objects
password the password of the user from above. This can also be encrypted using the following code in
SAS Enterprise Guide. Replace password with the result.
proc pwencode in="password" method=sas002;
run;
Result
{SAS002}155E1222579A284D2DF718543CE8FFAB3FD8AA67
5.
includeDep This will include all the dependant objects within the export.
After the code has run a A log file will be produced generated after the code is run and the output will also be sent to
the screen. Review the log file for any errors or warnings.
20
In the same command window you can now test your import in your target environment.
C:\Program Files\SASHome\SASPlatformObjectFramework\9.3>ImportPackage -host
"machinename" -port "8561" -user "username" -password "password" -package
"c:\temp\full.spk" preservePaths -log "c:\temp\full.log" target "/RootFolder"
noexecute
1.
2.
3.
4.
5.
6.
machinename the SAS Metadata server name. Can be found in the SAS Management Console under
Server Manager -> SASMeta -> SASMeta Logical Metadata Server. This is the target server
username a user who has access to the entire structure and all the objects
password the password of the user from above. This can also be encrypted using the following code in
SAS Enterprise Guide. Replace password with the result.
preservePaths ensures the folder structure is maintained in the target.
Target target location for the objects
Noexecute this option allows you to run the command and produce the log. This does not execute the
import but allows you to validate the command and see what will be imported. This is advisable to reviewing
before executing the import.
Once the test log has been reviewed the import can be executed.
C:\Program Files\SASHome\SASPlatformObjectFramework\9.3>ImportPackage -host
"machinename" -port "8561" -user "username" -password "password" -package
"c:\temp\full.spk" target "/RootFolder" preservePaths -log "c:\temp\full.log"
SUMMARY
For the initial release a full export can be executed from the root folder within your source environment and then
imported into your target environment. Some tips for the export and import are as follows:
1.
2.
3.
4.
Create a root folder which contains all your code within SAS Management Console
Ensure your environments are setup as identical as possible. Libraries, folders, paths etc. This is important
as it can cause a lot of problems during the release process.
Determine if you need to replicate your security structure in the source environment. If not then purely
configure your target environment with your access control lists etc.
Post release, remember to setup your security for the objects and re-deploy any jobs necessary.
7.
21
For planning purposes it is recommended that you plan your releases into the future on a regular timeframe. For
example your release code every month, two months, quarter, six months etc. Each release should be assigned a
release number for easy identification and tracking. Release numbers can normally be very complex, a simplier
th
option is create a release number from a date for example 20130308 would be the release for Mar 8 2013. Note
releases are specific to each target environment. So if you are migrating code from Dev to Test and then from Test
to Production you may have different release numbers for Dev to Test and then for Test to Prod.
During the development lifecycle once a component is completed and tested it can be moved into the Releases
folder. This way multiple developers can contribute to an upcoming release. This release folder makes it simple to
create a standard script to export all the components within the folder.
To export the code the batch export tool can be used as follows:
C:\Program Files\SASHome\SASPlatformObjectFramework\9.3>ExportPackage -host
"machinename" -port "8561" -user "username" -password "password" -package "
C:\SASReleaseManagement\Development\Releases\Release.spk" -objects "/Releases" -log
"C:\SASReleaseManagement\Development\Releases\Release.log"
Note this time the command has been changed to include the release management folder used to store the code
under version control. Also the package name is a standard name. Under your directory structure for version control
you should create a folder for the upcoming release. The includeDep option has been removed so as not to export
dependant objects. This is to preserve the objects in the target environment. Be careful should you include this as
duplicate objects will be created such as libraries, tables etc. It is a better practice to place all the objects which have
22
Notice from the export the package and the log have been created as well as the version control folder. You should
copy the package and the log into the Release folder to ensure a copy is keep for the specific release. In Windows
Explorer you need to multi select the folder, package and log. Right click and select TortoiseSVN -> Add.
Select OK to add the code to Version Control. Once added right click and select SVN Commit.
23
Click OK.
Click OK. The code now has been committed to the SVN repository. This is now available for anyone to use if
necessary. Development in the existing environment can continue as a static copy of the code is available for the
release into the next environment.
In order to promote the code to the new environment we will assume that another team member is responsible to
perform the actions. From Windows Explorer you would right click and select TortoiseSVN -> Repo-Browser.
24
Select the source environment location and repository. Click on OK. Enter username and password when prompted.
Navigate to the release folder and select the package. Right click and select Checkout
25
Select the folder you wish to check the code out to and select OK.
26
1.
2.
3.
4.
5.
6.
Once completed the release code needs to be merged into the release for the target environment. In Windows
Explorer Right Click and open the Repo-Browser under TortoiseSVN connecting to the target repository.
Right Click under releases and select Create Folder. Enter the Release Number for the folder and then navigate into
the folder. Right Click and select Add File.
Select the Release Package and the Promote Log. These need to be done individually. Once completed the code
will be stored in your repository. A full copy of the code should be exported using the batch export tool and placed
into the repository under the baseline folder. After every successful release a new baseline should be created to
ensure that there is also a complete copy of the working code which can be used to restore and environment or
component of an environment.
SUMMARY
Patch releases are a little more complicated than a full release. Using a incremental release processes within a data
warehouse environment is highly recommended as predefined release dates communicates a commitment to your
stakeholders that new requirements and functionality will be released. The requirements and functionality within each
27
release can be negotiated and prioritized with the stakeholders. Each release should be assigned a number per
target environment and each environment should have a SVN repository created with a baseline and a releases
folder. In SAS you need to create a Releases folder at the root within each environment to support incremental
releases. Once completed incremental releases can be achieved as follows
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
Export your release to a local folder monitored by SVN using the Batch Export tool into a common location.
Copy the release to a specific release directory with the SVN directory.
Add and commit the code to the SVN repository.
Checkout the release package from the Source repository.
Import the release package into the Target repository using the Batch Import tool.
Perform any post import steps.
Test your release.
Create a release directory within the Target environment
Import you Release package and logs into the target release directory
Create a complete code export using the batch export
Import the complete code export into the Baseline directory for the Target environment
CONCLUSION
SAS DI Studio supports version control, but no SAS products support the use of version control within a Release
Management process. This is a very manual and error prone process which is time consuming and potentially
disastrous should errors occur. Release Management needs to be considered at the beginning of the project so that
the appropriate decisions can be made on how code will be controlled, managed and the environment configured to
support a release process. SAS DI Studio should be used to archive changes before and after any changes to the
environment is made. This way code can be rolled back or forward as necessary insuring the quality and integrity of
the release.
Using the Batch Import and Export tools an effective release management process can be constructed utilizing
Subversion for version control. These scripts can be automated and included into the release process of most
projects.
REFERENCES
SAS. SAS(R) 9.3 Intelligence Platform: System Administration Guide, Second Edition. Using the Promotion Tools
SAS Knowledge Base. 2013.
http://support.sas.com/documentation/cdl/en/bisag/65422/HTML/default/viewer.htm#titlepage.htm
CONTACT INFORMATION
Your comments and questions are valued and encouraged. Contact the author at:
Name: John Heaton
Enterprise: Heritage Bank
Address: 400 Ruthven Drive
City, State ZIP: Toowoomba, Queensland, Australia, 4350
Work Phone: +61 4694 9129
Fax: +61 4694 9785
E-mail: Heaton.j@heritage.com.au
Web: http://www.heritage.com.au
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS
Institute Inc. in the USA and other countries. indicates USA registration.
Other brand and product names are trademarks of their respective companies.
28