Databases: - DevDB: database name (development system) DevServer: SQL server (development system) DevUsername: user login - SQL server (development system) DevPassword: password - SQL server (development system) ProdDB: database name (production system) ProdServer: SQL server (production system) ProdUsername: user login - SQL server (production system) ProdPassword: password - SQL server (production system) ...repeated... Deploy: Type: { zip | folder } To: { path to target folder | zip file (absolute path) } BaseFolder: solution folder (YetaWF *.sln file location, absolute path) From: absolute path to published website created by Visual Studio Publish or dotnet publish ConfigParm: modifier used for AppSettings.json, web.config, etc. Localization: { true | false } SiteTemplates: { true | false } DetermineBlueGreen: https://yoursite.com/_hc.html BlueRegex: \<body\>Blue\<\/body\> GreenRegex: \<body\>Green\<\/body\> FTP: Server: ftp://yourserver Port: port User: FTP user login Password: FTP user password FTPCopy: - From: file name or folder (development system) To: file name or folder (production system) ReplaceBG: { true | false } Conditional: { true | false } ...repeated... Local: PublishFolder: publish folder (complete site) LocalCopy: - From: file name or folder (development system) To: file name or folder (production system) ReplaceBG: { true | false } ...repeated... Site: Location: target folder for deployed site (absolute path, production system) Zip: absolute path to uploaded ZIP file Maintenance: { true | false } SiteRunFirst: - Command: command to run IgnoreErrors: { true | false } ...repeated... SiteRun: - Command: command to run IgnoreErrors: { true | false } ...repeated...
The Databases tag defines 0 or more databases which are backed up and/or restored as part of the deploy. Deploying databases is completely optional and the Databases tag can be omitted.
The information for each database can usually be copied from the connection strings used to connect to the database.
Tag | Required | Description |
---|---|---|
DevDB | yes | Defines the database name on the development system. This is the database that is being backed up. |
DevServer | yes | Defines the SQL server name on the development system. This is usually "localhost" for a local SQL server instance. |
DevUsername | yes | Defines the user login name to sign on the development system's SQL server. The user must have sufficient permission to back up a database. |
DevPassword | yes | Defines the user's password to sign on the development system's SQL server. |
ProdDB | yes | Defines the database name on the target system where the site is deployed. This is the database that is being restored. |
ProdServer | yes | Defines the SQL server name on the target system where the site is deployed. |
ProdUsername | yes | Defines the user login name to sign on the target system's SQL server. The user must have sufficient permission to restore a database. |
ProdPassword | yes | Defines the user's password to sign on the target system's SQL server. |
When a database is restored, it is created in the target folder (Deploy:To) in a subfolder named DBs. Any existing database is replaced. If the database doesn't exist, it is automatically created.
The Deploy tag defines the development system that is used to deploy the site.
A site can be deployed as a ZIP file to be restored on the server using DeploySite, or it can be deployed to a local folder. From there it can be deployed to a server using your favorite deployment tool.
Tag | Required | Description |
---|---|---|
Type | yes | Defines the deployment method, either as a ZIP file (zip) or to a local folder (folder). |
To | yes | Defines the deployment target, either a ZIP file (Deploy:Type = zip) or a local folder (Deploy:Type = folder). If a ZIP file is specified, it must be an absolute path with file name. If a local folder is specified, it must be an absolute path. If the folder doesn't exist, it is automatically created. |
BaseFolder | yes | Defines the absolute path to the YetaWF folder containing the solution file (*.sln) for the site to be deployed. |
From | MVC6 only | Before deploying a site it must be published with Visual Studio Publish or dotnet publish. The published output must be specified using this From tag as an absolute path. The published output is merged with other required files/folders and added to the target ZIP of folder where the final deployed site is created. |
ConfigParm | no, default null | Defines the file name for all configuration files (app.config, AppSettings.json, hosting.json, web.config). When specified, the specified ConfigParm string is added to the config file name before the extension. The ConfigParm string can contain periods. For example, when ConfigParm Prod is specified, the files app.Prod.config, AppSettings.Prod.json, hosting.Prod.json and Web.Prod.config are copied for deployment and are named app.config, AppSettings.json, hosting.json, web.config on the deployed site. If one of the files app.Prod.config, AppSettings.Prod.json, hosting.Prod.json or Web.Prod.config does not exist on the development system, the matching file (without the ConfigParm string) is copied instead. |
Localization | no, default false | Defines whether localization resources are deployed. Localization resources are only required if Application.P.YetaWF_Core.Use-Localization-Resources is set to true in AppSettings.json to enable multi-language support. |
SiteTemplates | no, default false | Defines whether site templates are deployed. This is only required if additional sites (domains) are created on a deployed site. This is rarely used. |
DetermineBlueGreen | no | The specified URL is used to find which site (Blue or Green) is currently running. YetaWF uses a healthcheck file (_hc.html) which contains the current site mode (Blue or Green). This option can only be specified for Blue/Green deployment. |
BlueRegex | no | Defines a regular expression that must be matched by the data retrieved from the URL defined by DetermineBlueGreen. If the expression matches the data, the Green site is deployed (as the Blue site is currently running). |
GreenRegex | no | Defines a regular expression that must be matched by the data retrieved from the URL defined by DetermineBlueGreen. If the expression matches the data, the Blue site is deployed (as the Green site is currently running). |
The FTP tag defines how a site is deployed/uploaded to the server using FTP. This is only used if a ZIP file is created (Deploy:Type = zip) and is otherwise ignored.
Tag | Required | Description |
---|---|---|
Server | yes | Defines the FTP server. Must start with "ftp://". |
Port | no, default 21 | Defines the FTP server port. |
User | yes | Defines user login to sign on to the FTP server. |
Password | yes | Defines user password to sign on to the FTP server. |
The Copy tag defines a list of files/folders to be uploaded. The ZIP file and the DeploySite utility must be explicitly listed in Copy tags as they are not automatically uploaded. Multiple files/folders can be uploaded by adding multiple Copy list items.
Tag | Required | Description |
---|---|---|
From | yes | Defines a file or folder on the development system either as an absolute path or a relative path (to Deploy:BaseFolder). This file is uploaded to the server (Copy:To). |
To | yes | Defines a file or folder on the target system as an absolute path (must start with "/") and is uploaded to the server. |
ReplaceBG | no, default false | Defines whether {BlueGreen} tags are replaced with the current Blue/Green deployment type. See Blue/Green Tags for more information. |
Conditional | no, default false | Defines whether the file is only uploaded if its date/time stamp is newer than the file on the server and if its size is different. This is ignored when uploading folders and only applies to files. When uploading large files such as the DeploySite utility, Conditional should be set to true. |
The Local tag defines how a site is deployed to a folder. This is only used if a ZIP file is created (Deploy:Type = zip) and is otherwise ignored. The Local tag is typically used instead of the FTP tag when FTP upload to the server is not possible or desired.
Tag | Required | Description |
---|---|---|
PublishFolder | yes | Defines the folder where the complete site and all utilities for deployment on a server are saved. |
The Copy tag defines a list of files/folders to be copied to the PublishFolder. The ZIP file and the DeploySite utility must be explicitly listed in Copy tags as they are not automatically copied. Multiple files/folders can be copied by adding multiple Copy list items.
Tag | Required | Description |
---|---|---|
From | yes | Defines a file or folder on the development system either as an absolute path or a relative path (to Deploy:BaseFolder). This file is copied to the PublishFolder (Copy:To). |
To | yes | Defines the file or folder name as it is copied to PublishFolder. |
ReplaceBG | no, default false | Defines whether {BlueGreen} tags are replaced with the current Blue/Green deployment type. See Blue/Green Tags for more information. |
The Site tag defines how an uploaded ZIP file is deployed on the server (by running DeploySite on the server). After running the DeploySite on the development system, all necessary items were uploaded via FTP to the server. Running DeploySite on the server unzips the ZIP file and copies all files into the proper location.
Tag | Required | Description |
---|---|---|
Location | yes | Defines the target location on the server where the deployed site is located. This must be an absolute path. |
ZIP | yes | Defines the absolute path of the uploaded ZIP file which is used to deploy the site. |
Maintenance | no, default false | Defines whether the website is set to "maintenance mode" while the site is deployed on the server by placing an App_Offline.htm file into the root of the server. This is only possible when Blue/Green deployment is not. A YetaWF site has a web page ./wwwroot/Maintenance/Offline For Maintenance.html that is copied to the root of the server. This file can be customized before deployment. |
The RunFirst tag can be used to define 0 or more commands to execute before deploying the site. This could be used to stop application pools, stop sites, or other actions.
Tag | Required | Description |
---|---|---|
Command | yes | Defines the complete command line to execute. |
IgnoreErrors | no, default false | Defines whether site deployment stops if the command line failed (IgnoreErrors = false). If IgnoreErrors true is specified, deployment continues even if the command line failed. |
The Run tag can be used to define 0 or more commands to execute after the ZIP file has been unzipped and all files have been copied to the target location and the site is ready to run. This could be used to perform site testing, before it becomes active.
Tag | Required | Description |
---|---|---|
Command | yes | Defines the complete command line to execute. |
IgnoreErrors | no, default false | Defines whether site deployment stops if the command line failed (IgnoreErrors = false). If IgnoreErrors true is specified, deployment continues even if the command line failed. |
Blue/Green tags can be replaced by the actual site (Blue/Green) when uploading or copying files using FTP:Copy or Local:Copy and ReplaceBG is set to true. The following tags are available:
Tag | When Deploying Blue Site Replaced By | When Deploying Green Site Replaced By |
---|---|---|
{bluegreen} | blue | green |
{BLUEGREEN} | Blue | Green |
{BLUEGREEN-OTHER} | Green | Blue |
Last Updated 04/07/2020 - (email)
© 2023 - Softel vdm, Inc. - YetaWF.com