|
| 1 | + |
| 2 | +# Deploy a SQL Server big data cluster on single node Kubernetes cluster (kubeadm) |
| 3 | + |
| 4 | +Using this sample bash script, you will deploy a single node Kubernetes cluster using kubeadm and a SQL Server big data cluster that is integrated with Active Directory domain. The script must be run from the VM you are planning to use for your kubeadm deployment. |
| 5 | + |
| 6 | +## Pre-requisites |
| 7 | + |
| 8 | +1. A vanilla Ubuntu 16.04 or 18.04 virtual or physical machine on your corporate network. All dependencies will be setup by the script. Using Azure Linux VMs is not yet supported. |
| 9 | +1. Machine should have at least 8 CPUs, 64GB RAM and 100GB disk space. After installing the images you will be left with 50GB for data/logs across all components. |
| 10 | +1. Update existing packages using commands below to ensure that the OS image is up to date |
| 11 | + |
| 12 | +``` bash |
| 13 | +sudo apt update&&apt upgrade -y |
| 14 | +sudo systemctl reboot |
| 15 | +``` |
| 16 | + |
| 17 | +## Recommended Virtual Machine settings |
| 18 | + |
| 19 | +1. Use static memory configuration for the virtual machine. For example, in hyper-v installations do not use dynamic memory allocation but instead allocate the recommended 64 GB or higher. |
| 20 | + |
| 21 | +1. Use checkpoint or snapshot capability in your hyper visor so that you can rollback the virtual machine to a clean state. |
| 22 | + |
| 23 | +## Instructions to deploy SQL Server big data cluster |
| 24 | + |
| 25 | +1. Download the script on the VM you are planning to use for the deployment |
| 26 | + |
| 27 | +``` bash |
| 28 | +curl --output setup-bdc.sh https://raw.githubusercontent.com/microsoft/sql-server-samples/master/samples/features/sql-big-data-cluster/deployment/kubeadm/ubuntu-single-node-vm-ad/setup-bdc.sh |
| 29 | +curl --output endpoint-patch.json https://raw.githubusercontent.com/microsoft/sql-server-samples/master/samples/features/sql-big-data-cluster/deployment/kubeadm/ubuntu-single-node-vm-ad/endpoint-patch.json |
| 30 | +curl --output security-patch.json https://raw.githubusercontent.com/microsoft/sql-server-samples/master/samples/features/sql-big-data-cluster/deployment/kubeadm/ubuntu-single-node-vm-ad/security-patch.json |
| 31 | +``` |
| 32 | + |
| 33 | +1. Edit and modify the endpoint-patch.json & security-patch.json files to supply the values specific to your Active Directory environment |
| 34 | + |
| 35 | +1. Make the script executable |
| 36 | + |
| 37 | +``` bash |
| 38 | +chmod +x setup-bdc-ad.sh |
| 39 | +``` |
| 40 | + |
| 41 | +1. Run the script (make sure you are running with sudo) |
| 42 | + |
| 43 | +``` bash |
| 44 | +sudo ./setup-bdc-ad.sh |
| 45 | +``` |
| 46 | + |
| 47 | +1. Refresh alias setup for azdata |
| 48 | + |
| 49 | +``` bash |
| 50 | +source ~/.bashrc |
| 51 | +``` |
| 52 | + |
| 53 | +When prompted, provide your input for the password that will be used for all external endpoints: controller, SQL Server master and gateway. The password should be sufficiently complex based on existing rules for SQL Server password. The controller username is defaulted to *admin*. |
| 54 | + |
| 55 | +## Cleanup |
| 56 | + |
| 57 | +1. The [cleanup-bdc.sh](cleanup-bdc.sh/) script is provided as convenience to reset the environment in case of errors. However, we recommend that you use a virtual machine for testing purposes and use the snapshot capabiility in your hyper-visor to rollback the virtual machine to a clean state. |
0 commit comments