How To Do a Full Release - OptimalBI/optimal-data-engine-mssql GitHub Wiki
ODE configuration releases are aligned with the Agile process. Developers could deploy small releases for a sprint or user story piece of work. Incremental deployment process is described in another article. This article describes a process of synchronisation of two ODE config databases, also it could be called a full release. Read more about a release theory here.
Consider using the automated release tool implemented on the basis of SQL Server Integration Services. This SSIS package executes all of the following steps for you with the pre-defined settings and a number of customised parameters.
First, choose a release number of full release, or you can create a new one:
USE [ODE_Config]
EXECUTE [dv_release].[dv_release_master_insert]
@release_number = 20160201
,@release_description = 'Sprint 7 Full release'
,@reference_number = 'US330'
,@reference_source = 'Jira'
GO
Set all the ODE_Config objects to this release number:
EXECUTE [dv_config].[dv_global_config_update]
@vault_config_update_type = 'Set_Release'
,@vault_release_number = 20160201
GO
Build the full release. Release will be recorded in SQL statements at [dv_release].[dv_release_build] table:
EXECUTE [dv_release].[dv_build_release_config]
@vault_release_number = 20160201
GO
Export release commands to the file:
EXECUTE [dv_release].[dv_export_release_file]
@vault_release_number = 20160201
,@vault_file_location = 'C:\ODE_Releases'
GO
Place the release file to a location in the release target environment. Import release instructions from the file to target ODE Config database:
EXECUTE [dv_release].[dv_import_release_file]
@vault_file_location = 'D:\Copied_ODE_Releases'
,@vault_file_name = 'DV_Release__20160201__20160202_101225.txt'
GO
Back up your target ODE_Config database before the full synchronisation. Once it's done, clean up the target Config:
EXECUTE [dv_config].[dv_global_config_update]
@vault_config_update_type = 'Empty_All_Config'
,@vault_release_number = 20160201
GO
Target ODE_Config is ready; apply the full release:
EXECUTE [dv_release].[dv_apply_release_config]
@vault_release_number = 20160201
GO
Now ODE_Config has new configuration data copied from another environment. If there are any new vault tables configured as a part of this release, they should be created afterwards. Use this helper script to prepare statements to do this.
Note that this release process includes ODE_Config objects only, but not staging objects, such as stored procedures. They should be released separately. Microsoft Visual Studio with SQL Server Data Tools can help to do this. Add your staging database to a Visual Studio solution and keep it up to date with your development environment. Release scripts could be composed by the "Schema compare" tool.