Skip to content

Commit

Permalink
Some tweaking and rewording
Browse files Browse the repository at this point in the history
  • Loading branch information
arrowplum committed May 31, 2024
1 parent 15b2e00 commit 2efa04d
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions kubernetes/full-create-and-install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash

# This script sets up a GKE cluster with specific configurations for Aerospike and AVS node pools.
# It handles the creation of the cluster, node pools, labeling, tainting of nodes, and deployment of necessary operators and configurations.
# This script sets up a GKE cluster with configurations for Aerospike and AVS node pools.
# It handles the creation of the GKE cluster, the use of AKO (Aerospike Kubernetes Operator) to deploy an Aerospike cluster, deploys the AVS cluster,
# and the deployment of necessary operators, configurations, node pools, etc.
# Additionally, it sets up monitoring using Prometheus and deploys a specific Helm chart for AVS.

# Function to print environment variables for verification
Expand All @@ -22,11 +23,10 @@ print_env() {

# Set environment variables for the GKE cluster setup
export PROJECT_ID="$(gcloud config get-value project)"
export CLUSTER_NAME="${PROJECT_ID}-"
export CLUSTER_NAME="${PROJECT_ID}-cluster"
export NODE_POOL_NAME_AEROSPIKE="aerospike-pool"
export NODE_POOL_NAME_AVS="avs-pool"
export ZONE="us-central1-c"
#export HELM_CHART="aerospike/aerospike-avs"
export HELM_CHART="/home/joem/src/helm-charts/aerospike-vector-search"
export FEATURES_CONF="./features.conf"
export AEROSPIKE_CR="./manifests/ssd_storage_cluster_cr.yaml"
Expand Down Expand Up @@ -101,10 +101,10 @@ echo "Deploying Aerospike cluster..."
kubectl apply -f "$AEROSPIKE_CR"

##############################################
# AVS name space
# AVS namespace
##############################################

echo "Adding avs node pool..."
echo "Adding AVS node pool..."
if ! gcloud container node-pools create "$NODE_POOL_NAME_AVS" \
--cluster "$CLUSTER_NAME" \
--project "$PROJECT_ID" \
Expand All @@ -113,21 +113,21 @@ if ! gcloud container node-pools create "$NODE_POOL_NAME_AVS" \
--disk-type "pd-standard" \
--disk-size "100" \
--machine-type "e2-highmem-4"; then
echo "Failed to create avs node pool"
echo "Failed to create AVS node pool"
exit 1
else
echo "avs node pool added successfully."
echo "AVS node pool added successfully."
fi

echo "Labeling avs nodes..."
echo "Labeling AVS nodes..."
kubectl get nodes -l cloud.google.com/gke-nodepool="$NODE_POOL_NAME_AVS" -o name | \
xargs -I {} kubectl label {} aerospike.com/node-pool=avs --overwrite

echo "Setup complete. Cluster and node pools are configured."

kubectl create namespace avs

echo "Setting secrets for avs cluster..."
echo "Setting secrets for AVS cluster..."
kubectl --namespace avs create secret generic aerospike-secret --from-file=features.conf="$FEATURES_CONF"
kubectl --namespace avs create secret generic auth-secret --from-literal=password='admin123'

Expand All @@ -149,11 +149,9 @@ kubectl apply -f manifests/monitoring
echo "Setup complete."
echo "To include your Grafana dashboards, use 'import-dashboards.sh <your grafana dashboard directory>'"

echo "To view grafana dashboards from your machine use kubectl port-forward -n monitoring svc/monitoring-stack-grafana 3000:80"
echo "To expose grafana ports publically 'kubectl apply -f helpers/EXPOSE-GRAFANA.yaml'"
echo "To find the exposed port with 'kubectl get svc -n monitoring' "


echo To run the quote search sample app on your new cluster you can use
echo helm install sematic-search-app aerospike/quote-semantic-search --namespace avs --values manifests/sematic-search-values.yaml --wait
echo "To view Grafana dashboards from your machine use 'kubectl port-forward -n monitoring svc/monitoring-stack-grafana 3000:80'"
echo "To expose Grafana ports publicly, use 'kubectl apply -f helpers/EXPOSE-GRAFANA.yaml'"
echo "To find the exposed port, use 'kubectl get svc -n monitoring'"

echo "To run the quote search sample app on your new cluster, use:"
echo "helm install semantic-search-app aerospike/quote-semantic-search --namespace avs --values manifests/semantic-search-values.yaml --wait"

0 comments on commit 2efa04d

Please sign in to comment.