From a213a0e7cbc062e24e218a0d9a742a06b516cb2a Mon Sep 17 00:00:00 2001 From: "Anton Antonov (TONY)" Date: Tue, 19 Nov 2019 17:48:03 -0800 Subject: [PATCH] Removing unused scripts. --- .../deployment/aks/README.md | 49 --------- .../deployment/aks/deploy-controller-aks.py | 102 ------------------ 2 files changed, 151 deletions(-) delete mode 100644 samples/features/azure-arc-data-controller/deployment/aks/README.md delete mode 100644 samples/features/azure-arc-data-controller/deployment/aks/deploy-controller-aks.py diff --git a/samples/features/azure-arc-data-controller/deployment/aks/README.md b/samples/features/azure-arc-data-controller/deployment/aks/README.md deleted file mode 100644 index 349a1630..00000000 --- a/samples/features/azure-arc-data-controller/deployment/aks/README.md +++ /dev/null @@ -1,49 +0,0 @@ - -# Deploy a SQL Server big data cluster on Azure Kubernetes Service (AKS) - -Using this sample Python script, you will deploy a Kubernetes cluster in Azure using AKS and a SQL Server big data cluster using this AKS cluster as its environment. The script can be run from any client OS. - - -## Pre-requisites - -1. Install latest version of [az cli](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli) -1. Running the script will require: [python minimum version 3.0](https://www.python.org/downloads) -1. Install the latest version of [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) -1. Ensure you have installed `mssqlctl` CLI and its prerequisites: - - Install [pip3](https://pip.pypa.io/en/stable/installing/). - - Install/update requests package. Run the command below using elevated priviledges (sudo or admin cmd window): - ``` - python -m pip install requests - python -m pip install requests --upgrade - ``` - - Install latest version of the cluster management tool **azdata** (previously named mssqlctl) using below command. Run the command below using elevated priviledges (sudo or admin cmd window): - ``` - pip3 install -r https://aka.ms/azdata - ``` -1. Login into your Azure account. Run this command: -``` -az login -``` - -## Instructions - -Run the script using: -``` -python deploy-sql-big-data-aks.py -``` - ->**Note** -> ->If you have both python3 and python2 on your client machine and in the path, you will have to run the command using python3: ->``` ->python3 deploy-sql-big-data-aks.py ->``` - - -When prompted, provide your input for Azure subscription ID, Azure resource group to create the resources in, and Docker credentials. Optionally, you can also provide your input for below configurations or use the defaults provided: -- azure_region -- vm_size - we recommend to use a VM size to accommodate your workload. For an optimal experience while you are validating basic scenarios, we recommend at least 8 vCPUs and 64GB memory across all agent nodes in the cluster. The script uses **Standard_L8s** as default. A default size configuration also uses about 24 disks for persistent volume claims across all components. -- aks_node_count - this is the number of the worker nodes for the AKS cluster, excluding master node. The script is using a default of 1 agent node. This is the minimum required for this VM size to have enough resources and disks to provision all the necessary persistent volumes. -- cluster_name - this value is used for both AKS cluster and SQL big data cluster created on top of AKS. Note that the name of the SQL big data cluster is going to be a Kubernetes namespace -- password - same value is going to be used for all accounts that require user password input: SQL Server master instance account created for the below **username**, controller user and Knox **root** user -- username - this is the username for the accounts provisioned during deployment for the controller admin account and SQL Server master instance account. Note that **sa** SQL Server account is disabled automatically for you, as a best practice. Username for Knox gateway account is going to be **root**. diff --git a/samples/features/azure-arc-data-controller/deployment/aks/deploy-controller-aks.py b/samples/features/azure-arc-data-controller/deployment/aks/deploy-controller-aks.py deleted file mode 100644 index cb71cff7..00000000 --- a/samples/features/azure-arc-data-controller/deployment/aks/deploy-controller-aks.py +++ /dev/null @@ -1,102 +0,0 @@ -# -# Prerequisites: -# -# Azure CLI (https://docs.microsoft.com/en-us/cli/azure/install-azure-cli), python3 (https://www.python.org/downloads), azdata CLI (pip3 install -r https://aka.ms/azdata) -# -# Run `az login` at least once BEFORE running this script -# - -from subprocess import check_output, CalledProcessError, STDOUT, Popen, PIPE -import os -import getpass - -def executeCmd (cmd): - if os.name=="nt": - process = Popen(cmd.split(),stdin=PIPE, shell=True) - else: - process = Popen(cmd.split(),stdin=PIPE) - stdout, stderr = process.communicate() - if (stderr is not None): - raise Exception(stderr) - -# -# MUST INPUT THESE VALUES!!!!! -# -SUBSCRIPTION_ID = input("Provide your Azure subscription ID:").strip() -GROUP_NAME = input("Provide Azure resource group name to be created:").strip() -# Use this only if you are using a private registry different than default Micrososft registry (mcr). -#DOCKER_USERNAME = input("Provide your Docker username:").strip() -#DOCKER_PASSWORD = getpass.getpass("Provide your Docker password:").strip() - -# -# Optionally change these configuration settings -# -AZURE_REGION=input("Provide Azure region - Press ENTER for using `westus`:").strip() or "westus" -VM_SIZE=input("Provide VM size for the AKS cluster - Press ENTER for using `Standard_L8s`:").strip() or "Standard_L8s" -AKS_NODE_COUNT=input("Provide number of worker nodes for AKS cluster - Press ENTER for using `1`:").strip() or "1" - -#This is both Kubernetes cluster name and SQL Big Data cluster name -CLUSTER_NAME=input("Provide name of AKS cluster and SQL big data cluster - Press ENTER for using `sqlbigdata`:").strip() or "sqlbigdata" - -#This password will be use for Controller user, Knox user and SQL Server Master SA accounts -# -AZDATA_USERNAME=input("Provide username to be used for Controller and SQL Server master accounts - Press ENTER for using `admin`:").strip() or "admin" -AZDATA_PASSWORD = getpass.getpass("Provide password to be used for Controller user, Knox user (root) and SQL Server Master accounts - Press ENTER for using `MySQLBigData2019`").strip() or "MySQLBigData2019" - -# Docker registry details -# Use this only if you are using a private registry different than mcr. If so, make sure you are also setting the environment variables for DOCKER_USERNAME and DOCKER_PASSWORD -# DOCKER_REGISTRY="" -# DOCKER_REPOSITORY="" -# DOCKER_IMAGE_TAG="" - -print ('Setting environment variables') -os.environ['AZDATA_PASSWORD'] = AZDATA_PASSWORD -os.environ['AZDATA_USERNAME'] = AZDATA_USERNAME -# Use this only if you are using a private registry different than mcr. If so, you must set the environment variables for DOCKER_USERNAME and DOCKER_PASSWORD -# os.environ['DOCKER_USERNAME']=DOCKER_USERNAME -# os.environ['DOCKER_PASSWORD']=DOCKER_PASSWORD -os.environ['ACCEPT_EULA']="Yes" - -print ("Set azure context to subcription: "+SUBSCRIPTION_ID) -command = "az account set -s "+ SUBSCRIPTION_ID -executeCmd (command) - -print ("Creating azure resource group: "+GROUP_NAME) -command="az group create --name "+GROUP_NAME+" --location "+AZURE_REGION -executeCmd (command) - -print("Creating AKS cluster: "+CLUSTER_NAME) -command = "az aks create --name "+CLUSTER_NAME+" --resource-group "+GROUP_NAME+" --generate-ssh-keys --node-vm-size "+VM_SIZE+" --node-count "+AKS_NODE_COUNT -executeCmd (command) - -command = "az aks get-credentials --overwrite-existing --name "+CLUSTER_NAME+" --resource-group "+GROUP_NAME+" --admin" -executeCmd (command) - -print("Creating SQL Big Data cluster:" +CLUSTER_NAME) -command="azdata bdc config init --source aks-dev-test --target custom --force" -executeCmd (command) - -command="azdata bdc config replace -c custom/bdc.json -j ""metadata.name=" + CLUSTER_NAME + "" -executeCmd (command) - -# Use this only if you are using a private registry different than default Micrososft registry (mcr). -# command="azdata bdc config replace -c custom/control.json -j ""$.spec.controlPlane.spec.docker.registry=" + DOCKER_REGISTRY + "" -# executeCmd (command) - -# command="azdata bdc config replace -c custom/control.json -j ""$.spec.controlPlane.spec.docker.repository=" + DOCKER_REPOSITORY + "" -# executeCmd (command) - -# command="azdata bdc config replace -c custom/control.json -j ""$.spec.controlPlane.spec.docker.imageTag=" + DOCKER_IMAGE_TAG + "" -# executeCmd (command) - -command="azdata bdc create -c custom --accept-eula yes" -executeCmd (command) - -command="azdata login -n " + CLUSTER_NAME -executeCmd (command) - -print("") -print("SQL Server big data cluster endpoints: ") -command="azdata bdc endpoint list -o table" -executeCmd(command) -