Hi, my name is Raymond Baziwane.
I'm a program manager on the AKS
on Azure Stack HCI team at Microsoft.
In this demo I'll be showing
you how to deploy Azure SQL
managed instance on a AKS-HCI.
Before you begin,
verify that you have the following
A Kubernetes cluster with Linux only.
Worker nodes
In my case I'm using a AKS-HCI.
Make sure you have configured your
local kubectl environment to
point to your Kubernetes cluster,
and Lastly the latest azdata CLI
installed in your local environment.
In case you're wondering,
what are your SQL managed
instance really means?
Here is a good visual representation
of the Azure arc enabled
data services architecture.
that we're going to be deploying in this demo.
Starting at the bottom,
is the infrastructure layer and this
could be any infrastructure that you
currently have in your environment.
For example,
Windows Server 2019 Data Center with Hyper V,
or Azure Stack HCI or VMWare
Name it.
So on this infrastructure you then deploy a
Kubernetes distribution
like AKS or AKS-HCI,
Openshift, VMWare Tanzu, etc.
We have multiple Kubernetes
distros listed here
because Arc data services
runs on any Kubernetes.
Then, on Kubernetes you then deploy what
we call the Azure Arc data controller.
This controller has integration with
Azure Arc that allows it to exchange
information with Azure. Right here.
Some data such as billing, telemetry
will be sent up to Azure and some
information will flow down which
includes RBAC and policy,
Inventory, Identity, etc.
As you can see in this illustration.
The data controller then helps
you create Azure SQL managed
instances which kind of sit right
here in the architecture.
So given this...
How does one actually deploy
Azure SQL managed instances?
First, is to deploy the Azure Arc Data Controller.
You can do it using Azure Data Studio or
azdata CLI which uses the Kubernetes
API to pull down the container
images needed to stand up the
Azure Arc data controller.
The data controller is simply
a set of container images that
are provisioned on Kubernetes.
And provide all the management
services mentioned right here.
Such as monitoring, backup, etc.
Once the data controller is in place,
the different instances can be
provisioned, such as SQL managed
instance or PostgreSQL hyperscale.
To install the Arc data controller
on AKS-HCI
I have this single azdata CLI command
I have saved in a PowerShell script that
uses the AKS-HCI profile configuration.
And it takes in a series of arguments
which include the Azure Subscription,
resource group and location in which in
which I want to create my instances.
It also takes the cluster
namespace and controller name.
And this is simply the name or title of the
namespace that is created in Kubernetes.
Note that controller pods and eventually
your SQL Server instances with all
reside in whatever namespace you specify.
You specify in in.
In these in these settings.
But before I run this, let's take a
look at my Kubernetes cluster. For this...
I will quickly switch to my command line
and run kubectl get nodes.
As you can tell, I'm running a
two node cluster. On this machine; however
we do not recommend 2-node cluster
deployments for production workloads.
This particular cluster is set up for
lightweight testing and definitely not built
for any kind of production applications.
As you can see,
my cluster is a Linux only nodes.
We're using Mariner Linux based
images for Linux worker nodes.
Mariner is Microsoft's open sourced linux distro
In case you were wondering.
Next, let's check the list of
namespaces that we have on the cluster.
Awesome. So this is a list of
namespaces that I have on this cluster.
This is important as you'll see
later what happens behind the
scenes, post-deployment of the
Arc data controller and SQL managed instance.
To kick off the data controller
installation, I'll switch back
quickly to Visual Studio code and...
run my script...
It will take a minute.
Enter username password here.
Alright, it took less than five
minutes. At the end of the deployment...
You should have an endpoint to your
Arc data controller listed there.
With the Azure Arc data controller now deployed,
we are now ready to start creating SQL
managed instances on our clusters.
Creating Azure SQL managed instance
is quite easy using Azure Data Studio
or the azdata CLI. As you can see,
I have another single azdata CLI
command that simply takes the name of
the instance and the number of replicas
that I want to create, in my case 3.
Before I run the script, I need
to log into my data controller,
so I'll run azdata login command.
I'll just expand this a little.
Okay.
Namespace I'd forgotten
which is contoso
OK. So it shows that I'm successfully
logged in to my data controller.
Now I'll simply run my script.
You will be prompted to provide
details for your SQL Server instance.
I would just skip over to the end.
Once the instance creation is completed,
you should see a ready message.
So the next thing I'll do is I'll take.
This endpoint and. Use Azure Data
Studio to see what was created.
I've gone ahead in Azure Data
Studio and logged into my
Arc data controller.
As you can see I have a
healthy SQL managed instance,
deployed on AKS-HCI.
In Azure Data Studio you will also
notice that they are endpoints
to both Kibana and Grafana.
In case you want to monitor
your your instances.
Lastly, let's switch back to our command
line and take a look at what happened
behind the scenes in Kubernetes.
First I'll run kubectl get namespaces.
Notice that behind the scenes,
the deployment actually created
a namespace, called contoso development.
Let me dig in a bit and see what is in this
namespace so that we can take a look.
Error, sorry.
This here, requires no space. Try that again.
Alright.
You will see all the Kubernetes
resources that were created as
part of these deployments.
And let's quickly take a look at
the persistent volumes.
I can't type
There we go!
So, these are the list of persistent
volumes that our pods are already claiming.
And. This is data, so I would expect
some persistent layer resources,
to be consumed within Kubernetes.
Well that concludes our demo.
Hopefully I have given you some
ideas on how you can use Azure
SQL managed instance in your
stateful application development.
In case you want to learn more,
here's a list of resources.