Demo code for SQL Server Integration Services Continuous Integration Continuous Delivery on Microsoft Azure Cloud
ANNOYANCE @MICROSOFT: To compile dockerFiles on Visual Studio 2019, you must have Docker Desktop setup on your VM. However Docker Desktop is not available for Windows Server 2019, only Windows 10. You must use Windows Server 2019 as the base OS for windows containers running on AKS. So despite including container support in VS2019, that support is meaningless when trying to build windows containers for AKS.
ANNOYANCE @MICROSOFT: In order to deploy dacpacs which reference the master db, the master.dacpac (and probably msdb.dacpac) are required to be included in the project. Why is this? It seems like sqlpackage should be smart enough to allow users to circumvent the errors, and assume that a master db exists, as an option.
ANNOYANCE @MICROSOFT: Why does the Powershell@1 task wait for the script to finish and Powershell@2 does not? Very confusing, please explain. "This is a breaking change."
ANNOYANCE @MICROSOFT: Why is not possible to extract the commandOutput easily into a variable when using Kubernetes@1? Not being able to do this means that get and describe are basically worthless when used in this task. You must write a script task instead.
- Create a Dev Test Lab environment
- Create a new VM within the environment on the Windows Server 2019 Data Center image
- RDP into the machine
- Install and configure the tools needed for your build pipeline
- Install the SQL Server Data Tools for Visual Studio 2017 using the Standalone installer, https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt?view=sql-server-ver15#ssdt-for-vs-2017-standalone-installer
- Find devenv.exe. On my build box, it is here: "C:\Program Files (x86)\Microsoft Visual Studio\2017\SQL\Common7\IDE\devenv.com"
- Install kubectl by following these instructions https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl-on-windows
- I add kubectl to C:\agentTools\kubernetes
- Add this to your path
- Install OpenJDK because Java is required by Maven (https://jdk.java.net/13/)
- I unpack to C:\agentTools\java
- Add C:\agentTools\java\jdk-13.0.1\bin to your path
- Add the JAVA_HOME env variable with the value C:\agentTools\java\jdk-13.0.1\bin
- Install maven by downloading and following these instructions
- https://maven.apache.org/download.cgi
- https://maven.apache.org/install.html
- I unpack to C:\agentTools\maven
- Add C:\agentTools\maven\apache-maven-3.6.2\bin to your path
- Install the Azure CLI https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-windows?view=azure-cli-latest
- Install sqlpackage.exe to deploy dacpacas https://docs.microsoft.com/en-us/sql/tools/sqlpackage-download?view=sql-server-ver15
- Install Microsoft® ODBC Driver 17 for SQL Server® - Windows, Linux, & macOS, https://www.microsoft.com/en-us/download/details.aspx?id=56567
- Install sqlcmd.exe to run unit tests from self-hosted agent https://docs.microsoft.com/en-us/sql/tools/sqlcmd-utility?view=sql-server-ver15
- Install the SQL Server Data Tools for Visual Studio 2017 using the Standalone installer, https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt?view=sql-server-ver15#ssdt-for-vs-2017-standalone-installer
- Setup the agent on the VM, so that Azure DevOps Pipelines can run builds on this machine (https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2-windows?view=azure-devops)
- Pro-tip: set everything up, get it to work, and then commit to killing the VM and using it to create a custom image. Before you do that though, run
./config.cmd remove
in powershell, so that you can configure each new instance of the image as a unique build agent in Azure DevOps.
- Pro-tip: set everything up, get it to work, and then commit to killing the VM and using it to create a custom image. Before you do that though, run
- https://docs.microsoft.com/en-us/azure/aks/windows-container-cli
- https://docs.microsoft.com/en-us/sql/samples/adventureworks-install-configure?view=sql-server-2017
az aks create \
-g <yourResourceGroup> \
--name ssiscicdAKS \
--node-count 1 \
--kubernetes-version 1.14.6 \
--generate-ssh-keys \
--windows-admin-password $PASSWORD_WIN \
--windows-admin-username azureuser \
--vm-set-type VirtualMachineScaleSets \
--network-plugin azure
--resource-group <yourResourceGroup> \
--cluster-name ssiscicdAKS \
--os-type Windows \
--name npwin \
--node-count 1 \
--kubernetes-version 1.14.6
az aks get-credentials --resource-group <yourResourceGroup> --name ssiscicdAKS