As you know from my last blog posting, I’m currently investing a lot of my time into Big Data technologies and especially into SQL Server Big Data Clusters. Running a SQL Server Big Data Cluster is quite easy, because you can deploy it with a simple command into Azure Kubernetes Services.
But to be able to do that you need to have a few command line tools installed on your local machine. In the days of Docker, I don’t really like it have too many tools installed locally on my work machine, because I want to have them isolated in a Docker Container. Therefore, I want to show you in today’s blog posting how to install the SQL Server Big Data Cluster Tools in a Docker Container.
To be able to deploy and manage a SQL Server Big Data Cluster from the command line, you need to have at least the following 3 tools installed:
- Azure CLI
The Azure CLI is used to connect to and manage your Azure Subscription. When you have a Kubernetes Cluster deployed into Azure, you can manage it locally with the kubectl command, which is the command line tool for Kubernetes. And finally, you also need the tool azdata, which is the main command line tool to manage your SQL Server Big Data Cluster.
Creating and configuring the Docker Container
First of all, I have created a new Docker Container which is based on the Linux Ubuntu image:
docker run -t --name bdc_tools -i ubuntu /bin/bash
After I was logged into the newly created Docker Container, I have installed the tool curl:
apt-get update apt-get install -y curl
The next step is the installation of the Azure CLI, which can be done with the following command line:
curl -sL https://aka.ms/InstallAzureCLIDeb | bash
After the installation of the Azure CLI, I have logged in into my Azure Subscription:
After the successful login, I’m able to list my Kubernetes Cluster, which is deployed into Azure:
az aks list --output table
The next step is the installation of kubectl, so that you can manage your Kubernetes Cluster from the command line:
curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl chmod +x ./kubectl mv ./kubectl /usr/local/bin/kubectl
After I have installed kubectl, I had to import the context of my Azure Kubernetes Cluster into my local installation:
az aks get-credentials --resource-group BDC_ResourceGroup --name bdc-cluster
And then I’m able to list my Kubernetes Worker Nodes:
And the final step is the installation of the azdata tool, with which you can manage your SQL Server Big Data Cluster:
apt-get install gnupg ca-certificates curl wget software-properties-common apt-transport-https lsb-release -y curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | tee /etc/apt/trusted.gpg.d/microsoft.asc.gpg > /dev/null add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2019.list)" apt-get update apt-get install -y azdata-cli
After the installation, you can run azdata from the command line:
It seems that everything is fine, but unfortunately this is not the case. When I wanted to deploy a SQL Server Big Data Cluster, I got the following error message:
libreadline.so.6: cannot open shared object file: No such file or directory
It seems that the shared object file libreadline.so.6 is missing in the Docker Container. The only workaround that I have found was the following: I downloaded that file from here, and copied it with the following command line into the Docker Container:
docker cp libreadline6_6.3-8ubuntu2_amd64.deb bdc_tools:/libreadline6_6.3-8ubuntu2_amd64.deb
After I have attached my terminal again against the Docker Container, I manually installed the .deb file:
apt install ./libreadline6_6.3-8ubuntu2_amd64.deb
And finally, everything is working as expected:
Running the necessary command line tools for a SQL Server Big Data Cluster in a Docker Container is not that easy, when you know what you have to do. Unfortunately, there was a missing dependency to a shared object file which costed me some time until I found a solution for it.
In one of my next blog postings I will then show you how you can actually deploy a SQL Server Big Data Cluster with this Docker Container. Stay tuned…
Thanks for your time,