Currently, the client tool is also a WinForm window program, file structure:
Figure 1
1, two config file, one is connected to the local development environment in the database, another basic parameter configuration file
A, db.config for the database connection content as follows:
<dbconfig name= "Dbtestdbbymp" connectionstring= "server= (local);d atabase=dbtest;uid=sa;pwd=123456;" Providername= "System.Data.SqlClient"/>
Currently, only the MSSQL database is adhered to ;
B, YBF. AutoDeployManageTool.exe.config parameter configuration, currently only for the configuration of FTP parameters, operation in accordance with the server-side FTP parameter encryption operation, the content is as follows:
<add key= "Ftpip" value= "81fe139e270645a3af8d02b856d07fd6"/>
<!--FTP login account official:localemail-->
<add key= "Ftploginuser" value= "a72c6b389570619d3675443b96f8646c"/>
<!--FTP login password official:-->
<add key= "Ftploginpassword" value= "d7d02674a2ef7a9f"/>
<!--FTP Path--
<add key= "FTPDir" value= "f:\\win8file\\y-baseframework.ybf\\ybaseframework.ybf.updatefile\\"/>
operating area is divided into database upgrade, service upgrade, site upgrade of three Tab, the operation is also in order to operate, the following sequence to explain the operation and configuration related files, the main interface:
Figure 2
2, the database upgrade, we first want to configure the folder conf two XML files, respectively:
Target.xml This classification for upgrading targets is currently divided into two categories, the test environment and the production environment as follows:
<target key= "Test-lan" value= "On-Line test class" ></target>
<target key= "Online-wan" value= "Production Environment Class" ></target>
Updatedbconfig.xml This is the configuration of the specific server to upgrade the database target, as follows
<dbconfig key= "dbtest" value= "dbtest Database" target= "Test-lan"
Targetserver= "127.0.0.1" targetdatabase= "dbtest_1" targetuid= "sa" targetpwd= "123456" Targetprovidername= " System.Data.SqlClient "Uploadlocalpath=" F:\\win8file\\y-baseframework.ybf\\ybaseframework.ybf.web\\ybaseframewo Rk. YBF. Autodeploymanagetool\\bin\\debug\\updatepack\\{0}.zip "
Wcfserviceurl= "Http://127.0.0.1/Local/LocalService.svc" >
<command name= "Build" >
<! [cdata[
]]>
</command>
</dbconfig>
two files, The content of key in Target.xml is the content of target in Updatedbconfig.xml, in Updatedbconfig.xml
TargetServer Database access Address
TargetDatabase database name
Targetuid Account
Targetpwd Password
Targetprovidername Database Type
Uploadlocalpath path to upload compressed files
Wcfserviceurl the WCF service address of the server provided on the target machine
under the root directory Updatepack folder for the upgrade package is located, Dbscript folder database comparison upgrade script, to provide compression, after the successful upgrade, The value of the node dbupdate in the Lastsuccessruntime.xml file is updated to identify the starting point of the next comparison database, in the actual operation:
A, Operational database
Figure 3
B, the point in time of the last execution,
Figure 4
C, the result of comparison with the target machine database,
Figure 5
D, compare the generated upgrade script file,
Figure 6
the scripts were Field Modification Script the view to back up on the server Stored Procedures the script for the trigger prevents the upgrade from failing after the rollback is used, creating a stored procedure script to create the trigger script to create the view script;
E, Click "One-click Upgrade", the target machine database upgrade,:
Figure 7
F, check the target machine database after the upgrade situation,
Figure 8
Figure 9
Figure 10
In this case, the target database in the test environment has been upgraded successfully, and there is no support for the rollback operation after the successful upgrade, and subsequent development of related functions.
Upgrade operations for subsequent services
Database Upgrade of the Client Upgrade tool of the Automation upgrade tool