SlideShare ist ein Scribd-Unternehmen logo
1 von 46
Downloaden Sie, um offline zu lesen
Chris Adkin
@ChrisAdkin8
cadkin@purestorage.com
Big Data Clusters
from
Bare Metal to
Kubernetes
Who Am I ?
▪ SQL Server Solution Architect at Pure Storage
▪ SQL Server user for 20 years
▪ Was heavily involved in the SQL Server 2019 EAP
▪ Co-author of the Microsoft workshop:
Big Data Clusters: From Bare Metal to Kubernetes
Why This Session ?
I’d like to deploy a Big Data Cluster,
are there any gotchas
I need to be aware of ?
Most orgs are familiar with Windows
and VMware as platforms, Kubernetes
and Linux, not so much
What We Are Going To Cover
What We Will End Up With
Cluster Build Host
K8s Master 1
K8s Master 2
K8s Worker 1
K8s Worker 2
K8s Worker 3
kubespray, ansible, git, kubectl and azdata
Kubernetes cluster
SQL Server 2019
Big Data Cluster running
on the three worker
nodes
3 node etcd cluster
Cluster Node Host Sizing
Development / Testing Production
K8s Master 1
K8s Master 2
K8s Worker 1
K8s Worker 2
K8s Worker 3
K8s Master 1
K8s Master 2
K8s Worker 1
K8s Worker 2
K8s Worker 3
4 GB memory
2 vCPU each
64 GB memory
8 vCPU each
16 GB memory
4 vCPU each
64 GB memory
8 vCPU each
Cluster Upgrades - The Immutable Infrastructure Way
K8s Master 1
K8s Master 2
K8s Worker 1
K8s Worker 2
K8s Worker 3
Kubernetes 1.15
K8s Master 1
K8s Master 2
K8s Worker 1
K8s Worker 2
K8s Worker 3
Kubernetes 1.19
Basic Knowledge Prerequisites
Part 1: Building out the base infrastructure
Template Creation – ISO
▪ Get Ubuntu 16.04 AMD 64 Server Image
https://releases.ubuntu.com/16.04/
▪ Upload image to your VMware ISO data
store
▪ Create a virtual machine with a DVD drive
that boots from this ISO
▪ Next up creating an Ubuntu guest
Template Creation – Initial Network Configuration
sudo apt-get install -–install-recommends linux-generic-hwe-16.04 –y
DO THIS BEFORE YOU CREATE YOUR
KUBERNETES CLUSTER ON EACH NODE HOST,
OTHERWISE YOU WILL BREAK YOUR CLUSTER
Kernel Update Gotcha
Post Seed VM Creation Steps
▪ sudo apt-get update
▪ sudo apt-get install yamllint
▪ sudo reboot
▪ VMware vcenter -> virtual machine -> Template -> Convert to Template
Ubuntu VM
Template
Cluster Build Host
K8s Master 1
K8s Master 2
K8s Worker 1
K8s Worker 2
K8s Worker 3
Infrastructure Build Out From The Template
As we create each host, we need to do two things:
▪ Give each host a unique name
▪ Give each host a unique ip address
Tip: We could do this with Terraform and the VMware provider (very popular)
Hostname Configuration
sudo hostnamectl set-hostname <hostname>
iSCSI Gotcha
▪ If you are using an iSCSI based storage solution and cloned virtual machines . . .
▪ InitiatorName value in /etc/iscsi/initiatorname.iscsi needs to be unique for each node host
IP Address Configuration
1. Get name of your network adapter, it should be prefixed by ens
For iSCSI storage, you will need two adapters – here we just have the one
IP Address Configuration
2. Edit the netplan configuration file /etc/network/interfaces
auto <primary network interface>
iface <primary network interface> inet static
address <ip address>
netmask <netmask>
gateway <gateway ip address>
iface <secondary network interface> inet static
address <ip address>
netmask <netmask>
dns-nameservers <ip address>
Secondary NIC required,
if iSCSI storage is used
Part 2: Install and Configure Kubespray
▪ A tool based on Ansible playbooks and kubeadm
for managing a Kubernetes cluster’s life cycle:
▪ Cluster creation
▪ Cluster removal
▪ Upgrading a cluster
▪ Adding nodes
▪ Removing node
▪ Rebuilding master nodes
▪ Etc . . .
Kubespray – What Is It ?
Kubespray Installation
▪ sudo apt-get install git python3-pip
▪ git clone https://github.com/kubernetes-sigs/kubespray.git
▪ pip3 install –r kubespray/requirements.txt
Part 3: Kubernetes Cluster Creation
Kubespray – Our (Example) Cluster Topology
z-ca-bdc-master1
192.168.123.03
z-ca-bdc-master2
192.168.123.04
z-ca-bdc-worker1
192.168.123.05
z-ca-bdc-worker2
192.168.123.06
z-ca-bdc-worker3
192.168.123.07
master nodes
worker nodes
nodes for etcd instances
▪ cp –r kubespray/inventory/sample 
kubespray/inventory/<cluster name>
▪ Edit inventory.ini file,
example on the right
▪ Inventory file path:
kubespray/inventory/<cluster name>/inventory.ini
Kubespray – Create An Ansible Inventory
Kubespray – Configure ssh Connectivity
The following commands are all to be run on the server hosting ansible
▪ ssh-keygen
▪ Carry the following out for each node host:
ssh-copy-id <username>@<hostname>
▪ ssh-agent /bin/bash
▪ ssh-add ~/.ssh/id_rsa
▪ Test ssh connectivity from the ansible server:
ansible -i inventory/<cluster name>/inventory.ini all -m ping
Storing ssh Passphrases With keychain
On the server you intend to run Kubespray from:
▪ sudo apt install keychain
▪ Add the following two lines to your .bashrc file, ~cadkin/.bashrc in my case:
/usr/bin/keychain $HOME/.ssh/id_rsa
source $HOME/.keychain/$HOSTNAME-sh
Kubespray – Run Playbook !!!
ansible-playbook -i inventory/<cluster name>/inventory.ini 
--become --become-user=root -K cluster.yml
Cluster Creation Post Deployment Steps
Freeze The containerd.io Package !!!
sudo apt-mark hold containerd.io
▪ Install kubectl on Kubespray server:
snap install kubectl --classic
▪ Create directory on Kubespray server to hold context:
cd ~
mkdir .kube
▪ ssh onto any node in the cluster and then run:
sudo chmod 755 /etc/kubernetes/admin.conf
▪ On the Kubespray server - admin.conf only resides on master node hosts
sudo scp <username>@<hostname>:/etc/kubernetes/admin.conf  ~/.kube/config
▪ ssh back onto the master node you got copied the admin.conf file from and issue:
sudo chmod 620 /etc/kubernetes/admin.conf
Post Deployment Steps
▪Check the health of the cluster nodes
kubectl get nodes –o wide
▪Create the health of the system pods
kubectl get po –n kube-system
Some Quick Post Cluster Creation Sanity Checks
▪ We need a storage plugin that
supports persistent volumes
▪ Never ever use ephemeral storage in
production
▪ Free options:
Portworx essentials
VMware Cloud Native Storage
A Word On Storage
Check That You Have A Storage Plugin Installed
kubectl get sc
Perform A Simple Test
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: test-pvc
spec:
storageClassName: <storage class>
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2Gi
And then . . .
kubectl apply –f test-pvc.yaml
kubectl get pvc
test-pvc.yml file contents:
Part 4: Big Data Cluster Creation
Sizing Your Cluster
Can you give me a reference
architecture for the infrastructure I
need for a Big Data Cluster ?
What you need really depends on
your workload, but . . .
Storage Gotchas
Persistent volume extension
As of CU6 persistent volumes (PVs) cannot be resized
through either azdata or Azure Data Studio
Pro tip: size PVs upfront to allow for data growth
Install azdata
https://docs.microsoft.com/en-us/sql/azdata/install/deploy-install-azdata-linux-package?view=sql-server-ver15
Working With Configuration Profiles
▪ Create a profile
azdata bdc config init --path ca-bdc-kubeadm-dev-test --source kubeadm-dev-test
▪ Specify the storage class for data
azdata bdc config replace --path ca-bdc-kubeadm-dev-test/control.json 
--json-values "$.spec.storage.data.className=pure-block"
▪ Specify the size for data persistent volumes
azdata bdc config replace --path ca-bdc-kubeadm-dev-test/control.json 
--json-values "$.spec.storage.data.size=10Gi"
▪ Specify the storage class for logs
azdata bdc config replace --path ca-bdc-kubeadm-dev-test/control.json 
--json-values "$.spec.storage.logs.className=pure-block"
▪ Specify the size for log persistent volumes
azdata bdc config replace --path ca-bdc-kubeadm-dev-test/control.json 
--json-values "$.spec.storage.logs.size=5Gi"
Configuring The HDFS Replication Factor
azdata bdc config replace --path ca-bdc-kubeadm-dev-test/bdc.json 
--json-values "$.spec.services.hdfs.settings={"hdfs-site.dfs.replication":"1"}"
▪ By default data is replicated three times
▪ If the storage platform has built-in
resilience, e.g. erasure coding we can . . .
‘Affinitize’ Worker Nodes To The Storage Pool
z-ca-bdc-worker1
( worker node 1 )
z-ca-bdc-worker2
( worker node 2 )
z-ca-bdc-worker3
( worker node 3 )
kubectl label node z-ca-bdc-worker1 mssql-cluster=bdc 
mssql-resource=bdc-shared --overwrite=true
kubectl label node z-ca-bdc-worker2 mssql-cluster=bdc 
mssql-resource=bdc-shared --overwrite=true
kubectl label node z-ca-bdc-worker3 mssql-cluster=bdc 
mssql-resource=bdc-storage --overwrite=true
1. Label up the worker nodes
‘Affinitize’ Worker Nodes To The Storage Pool
2. Assign pools to worker nodes in the configuration profile
kubectl label node z-pa-bdc-worker1 mssql-cluster=bdc mssql-resource=bdc-shared --overwrite=true
kubectl label node z-pa-bdc-worker2 mssql-cluster=bdc mssql-resource=bdc-shared --overwrite=true
kubectl label node z-pa-bdc-worker3 mssql-cluster=bdc mssql-resource=bdc-storage --overwrite=true
azdata bdc config add -p ca-bdc-kubeadm-dev-test/control.json -j "$.spec.clusterLabel=bdc"
azdata bdc config add -p ca-bdc-kubeadm-dev-test/control.json -j "$.spec.nodeLabel=bdc-shared"
azdata bdc config add -p ca-bdc-kubeadm-dev-test/bdc.json -j "$.spec.resources.master.spec.nodeLabel=bdc-shared"
azdata bdc config add -p ca-bdc-kubeadm-dev-test/bdc.json -j "$.spec.resources.compute-0.spec.nodeLabel=bdc-shared"
azdata bdc config add -p ca-bdc-kubeadm-dev-test/bdc.json -j "$.spec.resources.data-0.spec.nodeLabel=bdc-shared"
azdata bdc config add -p ca-bdc-kubeadm-dev-test/bdc.json -j "$.spec.resources.storage-0.spec.nodeLabel=bdc-storage"
azdata bdc config add -p ca-bdc-kubeadm-dev-test/bdc.json -j "$.spec.resources.nmnode-0.spec.nodeLabel=bdc-shared"
azdata bdc config add -p ca-bdc-kubeadm-dev-test/bdc.json -j "$.spec.resources.sparkhead.spec.nodeLabel=bdc-shared"
azdata bdc config add -p ca-bdc-kubeadm-dev-test/bdc.json -j "$.spec.resources.zookeeper.spec.nodeLabel=bdc-shared"
azdata bdc config add -p ca-bdc-kubeadm-dev-test/bdc.json -j "$.spec.resources.gateway.spec.nodeLabel=bdc-shared"
azdata bdc config add -p ca-bdc-kubeadm-dev-test/bdc.json -j "$.spec.resources.appproxy.spec.nodeLabel=bdc-shared"
Deploy Your Cluster
azdata bdc create --config-profile <profile name> --accept-eula yes
We’ve Covered The Basics - Where To Next ?
▪ Load balancer installation and configuration - metallb is the easiest option
▪ Deploying the Kubernetes dashboard in a secure manner
▪ Backup and recovery
▪ Using production profiles which include HA and active directory integration
▪ Kubernetes cluster upgrades
▪ Monitoring a Kubernetes cluster via its built-in Prometheus exporter
Bill Of Materials
Component Version
VMware vSphere 6.7
Linux distribution Ubuntu server edition 16.04.7 LTS
Linux kernel 4.15.0-118-generic
Kubernetes 1.19.1
SQL Server 2019 Big Data Cluster CU6
Kubernetes storage plugin Pure Service Orchestrator 6.0.2
Any Questions . . .
twitter: @ChrisAdkin8
email : cadkin@purestorage.com

Weitere ähnliche Inhalte

Was ist angesagt?

Cassandra Backups and Restorations Using Ansible (Joshua Wickman, Knewton) | ...
Cassandra Backups and Restorations Using Ansible (Joshua Wickman, Knewton) | ...Cassandra Backups and Restorations Using Ansible (Joshua Wickman, Knewton) | ...
Cassandra Backups and Restorations Using Ansible (Joshua Wickman, Knewton) | ...
DataStax
 

Was ist angesagt? (20)

Seastar @ SF/BA C++UG
Seastar @ SF/BA C++UGSeastar @ SF/BA C++UG
Seastar @ SF/BA C++UG
 
Running Cassandra in AWS
Running Cassandra in AWSRunning Cassandra in AWS
Running Cassandra in AWS
 
ScyllaDB: NoSQL at Ludicrous Speed
ScyllaDB: NoSQL at Ludicrous SpeedScyllaDB: NoSQL at Ludicrous Speed
ScyllaDB: NoSQL at Ludicrous Speed
 
Introducing Scylla Manager: Cluster Management and Task Automation
Introducing Scylla Manager: Cluster Management and Task AutomationIntroducing Scylla Manager: Cluster Management and Task Automation
Introducing Scylla Manager: Cluster Management and Task Automation
 
Kubernetes Hands-On Guide
Kubernetes Hands-On GuideKubernetes Hands-On Guide
Kubernetes Hands-On Guide
 
ClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTO
ClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTOClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTO
ClickHouse on Kubernetes, by Alexander Zaitsev, Altinity CTO
 
Pachyderm: Building a Big Data Beast On Kubernetes
Pachyderm: Building a Big Data Beast On KubernetesPachyderm: Building a Big Data Beast On Kubernetes
Pachyderm: Building a Big Data Beast On Kubernetes
 
Kubernetes on Bare Metal at the Kitchener-Waterloo Kubernetes and Cloud Nativ...
Kubernetes on Bare Metal at the Kitchener-Waterloo Kubernetes and Cloud Nativ...Kubernetes on Bare Metal at the Kitchener-Waterloo Kubernetes and Cloud Nativ...
Kubernetes on Bare Metal at the Kitchener-Waterloo Kubernetes and Cloud Nativ...
 
Spark day 2017 - Spark on Kubernetes
Spark day 2017 - Spark on KubernetesSpark day 2017 - Spark on Kubernetes
Spark day 2017 - Spark on Kubernetes
 
Cassandra Backups and Restorations Using Ansible (Joshua Wickman, Knewton) | ...
Cassandra Backups and Restorations Using Ansible (Joshua Wickman, Knewton) | ...Cassandra Backups and Restorations Using Ansible (Joshua Wickman, Knewton) | ...
Cassandra Backups and Restorations Using Ansible (Joshua Wickman, Knewton) | ...
 
Serverless Data Platform
Serverless Data PlatformServerless Data Platform
Serverless Data Platform
 
Understanding DSE Search by Matt Stump
Understanding DSE Search by Matt StumpUnderstanding DSE Search by Matt Stump
Understanding DSE Search by Matt Stump
 
Beyond Ingresses - Better Traffic Management in Kubernetes
Beyond Ingresses - Better Traffic Management in KubernetesBeyond Ingresses - Better Traffic Management in Kubernetes
Beyond Ingresses - Better Traffic Management in Kubernetes
 
ceph optimization on ssd ilsoo byun-short
ceph optimization on ssd ilsoo byun-shortceph optimization on ssd ilsoo byun-short
ceph optimization on ssd ilsoo byun-short
 
Scylla: 1 Million CQL operations per second per server
Scylla: 1 Million CQL operations per second per serverScylla: 1 Million CQL operations per second per server
Scylla: 1 Million CQL operations per second per server
 
Introduction to the Mysteries of ClickHouse Replication, By Robert Hodges and...
Introduction to the Mysteries of ClickHouse Replication, By Robert Hodges and...Introduction to the Mysteries of ClickHouse Replication, By Robert Hodges and...
Introduction to the Mysteries of ClickHouse Replication, By Robert Hodges and...
 
Scylla Summit 2016: Analytics Show Time - Spark and Presto Powered by Scylla
Scylla Summit 2016: Analytics Show Time - Spark and Presto Powered by ScyllaScylla Summit 2016: Analytics Show Time - Spark and Presto Powered by Scylla
Scylla Summit 2016: Analytics Show Time - Spark and Presto Powered by Scylla
 
Cantainer CI/ CD with Kubernetes
Cantainer CI/ CD with KubernetesCantainer CI/ CD with Kubernetes
Cantainer CI/ CD with Kubernetes
 
Terraform Modules Restructured
Terraform Modules RestructuredTerraform Modules Restructured
Terraform Modules Restructured
 
Steering the Sea Monster - Integrating Scylla with Kubernetes
Steering the Sea Monster - Integrating Scylla with KubernetesSteering the Sea Monster - Integrating Scylla with Kubernetes
Steering the Sea Monster - Integrating Scylla with Kubernetes
 

Ähnlich wie Bdc from bare metal to k8s

kubeadm Cluster Creation Internals_ From Self-Hosting to Upgradability and HA...
kubeadm Cluster Creation Internals_ From Self-Hosting to Upgradability and HA...kubeadm Cluster Creation Internals_ From Self-Hosting to Upgradability and HA...
kubeadm Cluster Creation Internals_ From Self-Hosting to Upgradability and HA...
ssuser92b4be
 

Ähnlich wie Bdc from bare metal to k8s (20)

kubernetes practice
kubernetes practicekubernetes practice
kubernetes practice
 
kubeadm Cluster Creation Internals_ From Self-Hosting to Upgradability and HA...
kubeadm Cluster Creation Internals_ From Self-Hosting to Upgradability and HA...kubeadm Cluster Creation Internals_ From Self-Hosting to Upgradability and HA...
kubeadm Cluster Creation Internals_ From Self-Hosting to Upgradability and HA...
 
Deploying Kubernetes on GCP with Kubespray
Deploying Kubernetes on GCP with KubesprayDeploying Kubernetes on GCP with Kubespray
Deploying Kubernetes on GCP with Kubespray
 
Openstack Magnum: Container-as-a-Service
Openstack Magnum: Container-as-a-ServiceOpenstack Magnum: Container-as-a-Service
Openstack Magnum: Container-as-a-Service
 
CKA_1st.pptx
CKA_1st.pptxCKA_1st.pptx
CKA_1st.pptx
 
Couch to OpenStack: Nova - July, 30, 2013
Couch to OpenStack: Nova - July, 30, 2013Couch to OpenStack: Nova - July, 30, 2013
Couch to OpenStack: Nova - July, 30, 2013
 
Kubernetes Summit 2018 - Kubernetes: Stateless -> Stateful
Kubernetes Summit 2018 - Kubernetes: Stateless -> StatefulKubernetes Summit 2018 - Kubernetes: Stateless -> Stateful
Kubernetes Summit 2018 - Kubernetes: Stateless -> Stateful
 
Postgres the hardway
Postgres the hardwayPostgres the hardway
Postgres the hardway
 
Cloud foundry on kubernetes
Cloud foundry on kubernetesCloud foundry on kubernetes
Cloud foundry on kubernetes
 
An Ensemble Core with Docker - Solving a Real Pain in the PaaS
An Ensemble Core with Docker - Solving a Real Pain in the PaaS An Ensemble Core with Docker - Solving a Real Pain in the PaaS
An Ensemble Core with Docker - Solving a Real Pain in the PaaS
 
From Kubernetes to OpenStack in Sydney
From Kubernetes to OpenStack in SydneyFrom Kubernetes to OpenStack in Sydney
From Kubernetes to OpenStack in Sydney
 
k8s practice 2023.pptx
k8s practice 2023.pptxk8s practice 2023.pptx
k8s practice 2023.pptx
 
Kubernetes Basic Operation
Kubernetes Basic OperationKubernetes Basic Operation
Kubernetes Basic Operation
 
How to create a secured cloudera cluster
How to create a secured cloudera clusterHow to create a secured cloudera cluster
How to create a secured cloudera cluster
 
Kubernetes installation
Kubernetes installationKubernetes installation
Kubernetes installation
 
Artem Zhurbila - docker clusters (solit 2015)
Artem Zhurbila - docker clusters (solit 2015)Artem Zhurbila - docker clusters (solit 2015)
Artem Zhurbila - docker clusters (solit 2015)
 
PGConf.ASIA 2019 Bali - Building PostgreSQL as a Service with Kubernetes - Ta...
PGConf.ASIA 2019 Bali - Building PostgreSQL as a Service with Kubernetes - Ta...PGConf.ASIA 2019 Bali - Building PostgreSQL as a Service with Kubernetes - Ta...
PGConf.ASIA 2019 Bali - Building PostgreSQL as a Service with Kubernetes - Ta...
 
Extending Kubectl.pptx
Extending Kubectl.pptxExtending Kubectl.pptx
Extending Kubectl.pptx
 
Kubeadm Deep Dive (Kubecon Seattle 2018)
Kubeadm Deep Dive (Kubecon Seattle 2018)Kubeadm Deep Dive (Kubecon Seattle 2018)
Kubeadm Deep Dive (Kubecon Seattle 2018)
 
Kubernetes
KubernetesKubernetes
Kubernetes
 

Mehr von Chris Adkin

Sql server engine cpu cache as the new ram
Sql server engine cpu cache as the new ramSql server engine cpu cache as the new ram
Sql server engine cpu cache as the new ram
Chris Adkin
 
Column store indexes and batch processing mode (nx power lite)
Column store indexes and batch processing mode (nx power lite)Column store indexes and batch processing mode (nx power lite)
Column store indexes and batch processing mode (nx power lite)
Chris Adkin
 
Building scalable application with sql server
Building scalable application with sql serverBuilding scalable application with sql server
Building scalable application with sql server
Chris Adkin
 

Mehr von Chris Adkin (16)

Ci with jenkins docker and mssql belgium
Ci with jenkins docker and mssql belgiumCi with jenkins docker and mssql belgium
Ci with jenkins docker and mssql belgium
 
Continuous Integration With Jenkins Docker SQL Server
Continuous Integration With Jenkins Docker SQL ServerContinuous Integration With Jenkins Docker SQL Server
Continuous Integration With Jenkins Docker SQL Server
 
Sql server scalability fundamentals
Sql server scalability fundamentalsSql server scalability fundamentals
Sql server scalability fundamentals
 
Leveraging memory in sql server
Leveraging memory in sql serverLeveraging memory in sql server
Leveraging memory in sql server
 
Super scaling singleton inserts
Super scaling singleton insertsSuper scaling singleton inserts
Super scaling singleton inserts
 
Scaling sql server 2014 parallel insert
Scaling sql server 2014 parallel insertScaling sql server 2014 parallel insert
Scaling sql server 2014 parallel insert
 
Sql server engine cpu cache as the new ram
Sql server engine cpu cache as the new ramSql server engine cpu cache as the new ram
Sql server engine cpu cache as the new ram
 
Sql sever engine batch mode and cpu architectures
Sql sever engine batch mode and cpu architecturesSql sever engine batch mode and cpu architectures
Sql sever engine batch mode and cpu architectures
 
An introduction to column store indexes and batch mode
An introduction to column store indexes and batch modeAn introduction to column store indexes and batch mode
An introduction to column store indexes and batch mode
 
Column store indexes and batch processing mode (nx power lite)
Column store indexes and batch processing mode (nx power lite)Column store indexes and batch processing mode (nx power lite)
Column store indexes and batch processing mode (nx power lite)
 
Scaling out SSIS with Parallelism, Diving Deep Into The Dataflow Engine
Scaling out SSIS with Parallelism, Diving Deep Into The Dataflow EngineScaling out SSIS with Parallelism, Diving Deep Into The Dataflow Engine
Scaling out SSIS with Parallelism, Diving Deep Into The Dataflow Engine
 
Building scalable application with sql server
Building scalable application with sql serverBuilding scalable application with sql server
Building scalable application with sql server
 
TSQL Coding Guidelines
TSQL Coding GuidelinesTSQL Coding Guidelines
TSQL Coding Guidelines
 
J2EE Performance And Scalability Bp
J2EE Performance And Scalability BpJ2EE Performance And Scalability Bp
J2EE Performance And Scalability Bp
 
J2EE Batch Processing
J2EE Batch ProcessingJ2EE Batch Processing
J2EE Batch Processing
 
Oracle Sql Tuning
Oracle Sql TuningOracle Sql Tuning
Oracle Sql Tuning
 

Kürzlich hochgeladen

Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
shivangimorya083
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
shivangimorya083
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
Lars Albertsson
 
Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...
shambhavirathore45
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
amitlee9823
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
AroojKhan71
 

Kürzlich hochgeladen (20)

Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFx
 
Sampling (random) method and Non random.ppt
Sampling (random) method and Non random.pptSampling (random) method and Non random.ppt
Sampling (random) method and Non random.ppt
 
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
 
Data-Analysis for Chicago Crime Data 2023
Data-Analysis for Chicago Crime Data  2023Data-Analysis for Chicago Crime Data  2023
Data-Analysis for Chicago Crime Data 2023
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 
Zuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptxZuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptx
 
Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptx
 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptx
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx
 
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
 

Bdc from bare metal to k8s

  • 1. Chris Adkin @ChrisAdkin8 cadkin@purestorage.com Big Data Clusters from Bare Metal to Kubernetes
  • 2. Who Am I ? ▪ SQL Server Solution Architect at Pure Storage ▪ SQL Server user for 20 years ▪ Was heavily involved in the SQL Server 2019 EAP ▪ Co-author of the Microsoft workshop: Big Data Clusters: From Bare Metal to Kubernetes
  • 3. Why This Session ? I’d like to deploy a Big Data Cluster, are there any gotchas I need to be aware of ? Most orgs are familiar with Windows and VMware as platforms, Kubernetes and Linux, not so much
  • 4. What We Are Going To Cover
  • 5. What We Will End Up With Cluster Build Host K8s Master 1 K8s Master 2 K8s Worker 1 K8s Worker 2 K8s Worker 3 kubespray, ansible, git, kubectl and azdata Kubernetes cluster SQL Server 2019 Big Data Cluster running on the three worker nodes 3 node etcd cluster
  • 6. Cluster Node Host Sizing Development / Testing Production K8s Master 1 K8s Master 2 K8s Worker 1 K8s Worker 2 K8s Worker 3 K8s Master 1 K8s Master 2 K8s Worker 1 K8s Worker 2 K8s Worker 3 4 GB memory 2 vCPU each 64 GB memory 8 vCPU each 16 GB memory 4 vCPU each 64 GB memory 8 vCPU each
  • 7. Cluster Upgrades - The Immutable Infrastructure Way K8s Master 1 K8s Master 2 K8s Worker 1 K8s Worker 2 K8s Worker 3 Kubernetes 1.15 K8s Master 1 K8s Master 2 K8s Worker 1 K8s Worker 2 K8s Worker 3 Kubernetes 1.19
  • 9. Part 1: Building out the base infrastructure
  • 10. Template Creation – ISO ▪ Get Ubuntu 16.04 AMD 64 Server Image https://releases.ubuntu.com/16.04/ ▪ Upload image to your VMware ISO data store ▪ Create a virtual machine with a DVD drive that boots from this ISO ▪ Next up creating an Ubuntu guest
  • 11. Template Creation – Initial Network Configuration
  • 12. sudo apt-get install -–install-recommends linux-generic-hwe-16.04 –y DO THIS BEFORE YOU CREATE YOUR KUBERNETES CLUSTER ON EACH NODE HOST, OTHERWISE YOU WILL BREAK YOUR CLUSTER Kernel Update Gotcha
  • 13. Post Seed VM Creation Steps ▪ sudo apt-get update ▪ sudo apt-get install yamllint ▪ sudo reboot ▪ VMware vcenter -> virtual machine -> Template -> Convert to Template
  • 14. Ubuntu VM Template Cluster Build Host K8s Master 1 K8s Master 2 K8s Worker 1 K8s Worker 2 K8s Worker 3 Infrastructure Build Out From The Template As we create each host, we need to do two things: ▪ Give each host a unique name ▪ Give each host a unique ip address Tip: We could do this with Terraform and the VMware provider (very popular)
  • 15. Hostname Configuration sudo hostnamectl set-hostname <hostname>
  • 16. iSCSI Gotcha ▪ If you are using an iSCSI based storage solution and cloned virtual machines . . . ▪ InitiatorName value in /etc/iscsi/initiatorname.iscsi needs to be unique for each node host
  • 17. IP Address Configuration 1. Get name of your network adapter, it should be prefixed by ens For iSCSI storage, you will need two adapters – here we just have the one
  • 18. IP Address Configuration 2. Edit the netplan configuration file /etc/network/interfaces auto <primary network interface> iface <primary network interface> inet static address <ip address> netmask <netmask> gateway <gateway ip address> iface <secondary network interface> inet static address <ip address> netmask <netmask> dns-nameservers <ip address> Secondary NIC required, if iSCSI storage is used
  • 19. Part 2: Install and Configure Kubespray
  • 20. ▪ A tool based on Ansible playbooks and kubeadm for managing a Kubernetes cluster’s life cycle: ▪ Cluster creation ▪ Cluster removal ▪ Upgrading a cluster ▪ Adding nodes ▪ Removing node ▪ Rebuilding master nodes ▪ Etc . . . Kubespray – What Is It ?
  • 21. Kubespray Installation ▪ sudo apt-get install git python3-pip ▪ git clone https://github.com/kubernetes-sigs/kubespray.git ▪ pip3 install –r kubespray/requirements.txt
  • 22. Part 3: Kubernetes Cluster Creation
  • 23. Kubespray – Our (Example) Cluster Topology z-ca-bdc-master1 192.168.123.03 z-ca-bdc-master2 192.168.123.04 z-ca-bdc-worker1 192.168.123.05 z-ca-bdc-worker2 192.168.123.06 z-ca-bdc-worker3 192.168.123.07 master nodes worker nodes nodes for etcd instances
  • 24. ▪ cp –r kubespray/inventory/sample kubespray/inventory/<cluster name> ▪ Edit inventory.ini file, example on the right ▪ Inventory file path: kubespray/inventory/<cluster name>/inventory.ini Kubespray – Create An Ansible Inventory
  • 25. Kubespray – Configure ssh Connectivity The following commands are all to be run on the server hosting ansible ▪ ssh-keygen ▪ Carry the following out for each node host: ssh-copy-id <username>@<hostname> ▪ ssh-agent /bin/bash ▪ ssh-add ~/.ssh/id_rsa ▪ Test ssh connectivity from the ansible server: ansible -i inventory/<cluster name>/inventory.ini all -m ping
  • 26. Storing ssh Passphrases With keychain On the server you intend to run Kubespray from: ▪ sudo apt install keychain ▪ Add the following two lines to your .bashrc file, ~cadkin/.bashrc in my case: /usr/bin/keychain $HOME/.ssh/id_rsa source $HOME/.keychain/$HOSTNAME-sh
  • 27. Kubespray – Run Playbook !!! ansible-playbook -i inventory/<cluster name>/inventory.ini --become --become-user=root -K cluster.yml
  • 28. Cluster Creation Post Deployment Steps
  • 29. Freeze The containerd.io Package !!! sudo apt-mark hold containerd.io
  • 30. ▪ Install kubectl on Kubespray server: snap install kubectl --classic ▪ Create directory on Kubespray server to hold context: cd ~ mkdir .kube ▪ ssh onto any node in the cluster and then run: sudo chmod 755 /etc/kubernetes/admin.conf ▪ On the Kubespray server - admin.conf only resides on master node hosts sudo scp <username>@<hostname>:/etc/kubernetes/admin.conf ~/.kube/config ▪ ssh back onto the master node you got copied the admin.conf file from and issue: sudo chmod 620 /etc/kubernetes/admin.conf Post Deployment Steps
  • 31. ▪Check the health of the cluster nodes kubectl get nodes –o wide ▪Create the health of the system pods kubectl get po –n kube-system Some Quick Post Cluster Creation Sanity Checks
  • 32. ▪ We need a storage plugin that supports persistent volumes ▪ Never ever use ephemeral storage in production ▪ Free options: Portworx essentials VMware Cloud Native Storage A Word On Storage
  • 33. Check That You Have A Storage Plugin Installed kubectl get sc
  • 34. Perform A Simple Test kind: PersistentVolumeClaim apiVersion: v1 metadata: name: test-pvc spec: storageClassName: <storage class> accessModes: - ReadWriteOnce resources: requests: storage: 2Gi And then . . . kubectl apply –f test-pvc.yaml kubectl get pvc test-pvc.yml file contents:
  • 35. Part 4: Big Data Cluster Creation
  • 36. Sizing Your Cluster Can you give me a reference architecture for the infrastructure I need for a Big Data Cluster ? What you need really depends on your workload, but . . .
  • 37. Storage Gotchas Persistent volume extension As of CU6 persistent volumes (PVs) cannot be resized through either azdata or Azure Data Studio Pro tip: size PVs upfront to allow for data growth
  • 39. Working With Configuration Profiles ▪ Create a profile azdata bdc config init --path ca-bdc-kubeadm-dev-test --source kubeadm-dev-test ▪ Specify the storage class for data azdata bdc config replace --path ca-bdc-kubeadm-dev-test/control.json --json-values "$.spec.storage.data.className=pure-block" ▪ Specify the size for data persistent volumes azdata bdc config replace --path ca-bdc-kubeadm-dev-test/control.json --json-values "$.spec.storage.data.size=10Gi" ▪ Specify the storage class for logs azdata bdc config replace --path ca-bdc-kubeadm-dev-test/control.json --json-values "$.spec.storage.logs.className=pure-block" ▪ Specify the size for log persistent volumes azdata bdc config replace --path ca-bdc-kubeadm-dev-test/control.json --json-values "$.spec.storage.logs.size=5Gi"
  • 40. Configuring The HDFS Replication Factor azdata bdc config replace --path ca-bdc-kubeadm-dev-test/bdc.json --json-values "$.spec.services.hdfs.settings={"hdfs-site.dfs.replication":"1"}" ▪ By default data is replicated three times ▪ If the storage platform has built-in resilience, e.g. erasure coding we can . . .
  • 41. ‘Affinitize’ Worker Nodes To The Storage Pool z-ca-bdc-worker1 ( worker node 1 ) z-ca-bdc-worker2 ( worker node 2 ) z-ca-bdc-worker3 ( worker node 3 ) kubectl label node z-ca-bdc-worker1 mssql-cluster=bdc mssql-resource=bdc-shared --overwrite=true kubectl label node z-ca-bdc-worker2 mssql-cluster=bdc mssql-resource=bdc-shared --overwrite=true kubectl label node z-ca-bdc-worker3 mssql-cluster=bdc mssql-resource=bdc-storage --overwrite=true 1. Label up the worker nodes
  • 42. ‘Affinitize’ Worker Nodes To The Storage Pool 2. Assign pools to worker nodes in the configuration profile kubectl label node z-pa-bdc-worker1 mssql-cluster=bdc mssql-resource=bdc-shared --overwrite=true kubectl label node z-pa-bdc-worker2 mssql-cluster=bdc mssql-resource=bdc-shared --overwrite=true kubectl label node z-pa-bdc-worker3 mssql-cluster=bdc mssql-resource=bdc-storage --overwrite=true azdata bdc config add -p ca-bdc-kubeadm-dev-test/control.json -j "$.spec.clusterLabel=bdc" azdata bdc config add -p ca-bdc-kubeadm-dev-test/control.json -j "$.spec.nodeLabel=bdc-shared" azdata bdc config add -p ca-bdc-kubeadm-dev-test/bdc.json -j "$.spec.resources.master.spec.nodeLabel=bdc-shared" azdata bdc config add -p ca-bdc-kubeadm-dev-test/bdc.json -j "$.spec.resources.compute-0.spec.nodeLabel=bdc-shared" azdata bdc config add -p ca-bdc-kubeadm-dev-test/bdc.json -j "$.spec.resources.data-0.spec.nodeLabel=bdc-shared" azdata bdc config add -p ca-bdc-kubeadm-dev-test/bdc.json -j "$.spec.resources.storage-0.spec.nodeLabel=bdc-storage" azdata bdc config add -p ca-bdc-kubeadm-dev-test/bdc.json -j "$.spec.resources.nmnode-0.spec.nodeLabel=bdc-shared" azdata bdc config add -p ca-bdc-kubeadm-dev-test/bdc.json -j "$.spec.resources.sparkhead.spec.nodeLabel=bdc-shared" azdata bdc config add -p ca-bdc-kubeadm-dev-test/bdc.json -j "$.spec.resources.zookeeper.spec.nodeLabel=bdc-shared" azdata bdc config add -p ca-bdc-kubeadm-dev-test/bdc.json -j "$.spec.resources.gateway.spec.nodeLabel=bdc-shared" azdata bdc config add -p ca-bdc-kubeadm-dev-test/bdc.json -j "$.spec.resources.appproxy.spec.nodeLabel=bdc-shared"
  • 43. Deploy Your Cluster azdata bdc create --config-profile <profile name> --accept-eula yes
  • 44. We’ve Covered The Basics - Where To Next ? ▪ Load balancer installation and configuration - metallb is the easiest option ▪ Deploying the Kubernetes dashboard in a secure manner ▪ Backup and recovery ▪ Using production profiles which include HA and active directory integration ▪ Kubernetes cluster upgrades ▪ Monitoring a Kubernetes cluster via its built-in Prometheus exporter
  • 45. Bill Of Materials Component Version VMware vSphere 6.7 Linux distribution Ubuntu server edition 16.04.7 LTS Linux kernel 4.15.0-118-generic Kubernetes 1.19.1 SQL Server 2019 Big Data Cluster CU6 Kubernetes storage plugin Pure Service Orchestrator 6.0.2
  • 46. Any Questions . . . twitter: @ChrisAdkin8 email : cadkin@purestorage.com