Applies to
ApexSQL DevOps toolkit -Web dashboard
Summary
This article will explain the procedure of moving or copying an existing ApexSQL DevOps toolkit – Web dashboard continuous integration and continuous delivery pipeline configurations to another instance on a different PC machine.
Description
It is usual that popular continuous integration servers like TeamCity, Bamboo, or Jenkins are located on a dedicated build machine and are accessed remotely via the standard web interface. This recommendation also applies to the standalone, web-based ApexSQL DevOps toolkit – Web dashboard database continuous integration solution. In events where maintenance or redundancy for such machine is required, or simply different machine becomes newly designated build and CI server, the question occurs – how to continue using existing configuration which already has significant time invested in it?
Configuration data
The ApexSQL DevOps toolkit – Web dashboard application has four sections where the user configured information resides.
Pipeline list
This is the main overview of existing database CI or CD pipelines with their designated names, startup triggers, and last execution status and the summary for that execution:
Pipeline configuration
This is the section where an individual pipeline’s configuration is made. It contains used steps and their own individual configuration:
Data sources
In this section, all created data sources with their properties like database or source control repository connections can be found:
Application options
This section contains all user saved data that configures general application operations. Application users, outgoing email settings, project, and output folder settings reside here:
All this information is stored in the Users.xml file which is strictly located at the following folder location: C:\ProgramData\ApexSQL\ApexSQL DevOps toolkit dashboard\
Note that the ProgramData folder is usually hidden.
The Users.xml fie is the essential part of complete configuration migration and it can be copied to a medium that can be used to place it on a new machine (e.g. USB memory stick). If the application is uninstalled, the Users.bak file will be automatically created and if a file corruption or accidental deletion of the Users.xml file occurs, it can be restored by simply renaming the Users.bak to Users.xml.
Migration
Before migrating existing database, the CI and CD pipeline configuration it is necessary to first install the Web dashboard application to the new machine. After installation, the Users.xml will be created, but it will be empty, i.e. without any user configuration.
Next step is to open Windows Services for the new machine, find the ApexSQL Dashboard service and stop it:
The service will take few moments to shut down and close opened ports.
Last thing left to do is to copy the original Users.xml from the USB stick, or other chosen medium, to the ProgramData location on the new machine and overwrite the blank Users.xml file.
After that the ApexSQL Dashboard service can be started again and it will load entire configuration immediately, so firing up those database CI and CD pipelines can commence right after logging in to application form browser.
There are few things that are worth mentioning here:
- The username and password used for creating initial application user, during the application installation, will no longer be valid as it will be imported with the old configuration file
- The project and output folder will be created automatically, with the same location as on the previous machine, on service startup when configuration is loaded
- The project files for customization of steps should also be copied from a previous to a new machine, or reference errors will occur if some steps are using them
- It is recommended to review database type data sources as they have saved connections to SQL Server instances that might be differently referenced from a new machine
- It is recommended to review NuGet type data sources as some of them might be defined as import from an existing NuGet on a local path in the previous machine
The explained procedure is quite basic and can be used to migrate or replicate existing database continuous integration (CI) and continuous delivery (CD) pipelines to a new PC machine without any additional utility or advanced troubleshooting.