Uploaded by Ogbonna Ekpereka

singlestore docs

advertisement
Logon to Azure and k8s.
K8s that we are going to use resides in Azure, meaning we have to login there first and get k8s credentials from there. Go to the relevant cluster management host (for PNA DEV: pna03au, for PROD: pna05au; need elv password for them).
az login --use-device-code
az account set --subscription "sas-ssod-pna"
az aks install-cli
az aks get-credentials --resource-group pna-dev --name pna-dev --format azure --overwrite-existing (DEV cluster)
az aks get-credentials --resource-group pna-posten --name pna-posten --format azure --overwrite-existing (PROD cluster)
Logon to S2 cluster (with "kubectl exec")
For Prod
$ export NS=posten
or for Dev
$ export NS=pnadev
$ kubectl -n $NS get pods
For the first time, to sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code <code here> to authenticate.
To get the ROOT password only:
$ export MEMPASS=$(kubectl -n $NS get secrets sas-singlestore-cluster -o yaml | grep 'ROOT_PASSWORD' | awk '{print $2}' | base64 -d)
From the your desktop use a browser to the above link, use VPN username and password (it tells you) and enter the above code.
$ kubectl -n $NS exec -it node-sas-singlestore-cluster-master-0 -- memsql -u root --password=$MEMPASS
Logon to S2 cluster (over network)
todo
Logon to Azure and k8s:
1. Login using Azure Portal
Steps:
1. Azure Cloud Shell (Web)
2. Login using CLI options:
1. Azure Cloud Shell (Terminal app)
Steps:
1. Create an Azure Cloud Shell on Azure Portal
2. Open Terminal app on Windows, switch to Azure Cloud Shell
2. Git Bash Steps:
1. Install Git bash from company portal
2. Install Azure CLI: https://learn.microsoft.com/en-us/cli/azure/install-azure-cli
3. Install AKS CLI and Azure Kubelogin: az aks install-cli
NOTES: For Azure Cloud Shell(web or terminal), no need to install Azure CLI, AKS CLI or Azure Kubelogin (Recommended)
For Git bash, you also have to update PATH variable
Logon to S2 cluster (with "kubectl exec"):
DEV cluster:
$ az login --use-device-code
$ az account set --subscription "sas-ssod-pna"
$ az aks get-credentials --resource-group pna-dev --name pna-dev --format azure --overwrite-existing $ kubelogin convert-kubeconfig -l azurecli
$ export NS=pnadev
$ kubectl -n $NS get pods
# For the first time, to sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code <code here> to authenticate.
PROD cluster:
$ az login --use-device-code
$ az account set --subscription "sas-ssod-pna"
$ az aks get-credentials --resource-group pna-posten --name pna-posten --format azure --overwrite-existing $ kubelogin convert-kubeconfig -l azurecli
$ export NS=posten
$ kubectl -n $NS get pods
Connecting to Singlestore database:
Steps:
1. To get the ROOT password only:
$ export MEMPASS=$(kubectl -n $NS get secrets sas-singlestore-cluster -o yaml | grep 'ROOT_PASSWORD' | awk '{print $2}' | base64 -d)
2. Login to database:
$ kubectl -n $NS exec -it node-sas-singlestore-cluster-master-0 -- memsql -u root --password=$MEMPASS
Download