Skip to content

Commit

Permalink
Merge branch 'main' into vec-409
Browse files Browse the repository at this point in the history
  • Loading branch information
arrowplum committed Dec 9, 2024
2 parents 50fa784 + a170871 commit c3bd830
Show file tree
Hide file tree
Showing 13 changed files with 1,531 additions and 14 deletions.
489 changes: 489 additions & 0 deletions kubernetes/full-create-and-install-eks.sh

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ USERNAME=$(whoami)

# Default values
DEFAULT_CLUSTER_NAME_SUFFIX="avs"
RUN_INSECURE=0 # Default value for insecure mode (false meaning secure with auth + tls)
RUN_INSECURE=1 # Default value for insecure mode (false meaning secure with auth + tls)

# Function to display the script usage
usage() {
Expand Down Expand Up @@ -79,10 +79,10 @@ reset_build() {
mkdir -p "$BUILD_DIR/input" "$BUILD_DIR/output" "$BUILD_DIR/secrets" "$BUILD_DIR/certs" "$BUILD_DIR/manifests"
cp "$FEATURES_CONF" "$BUILD_DIR/secrets/features.conf"
if [[ "${RUN_INSECURE}" == 1 ]]; then
cp $WORKSPACE/manifests/avs-gke-values.yaml $BUILD_DIR/manifests/avs-gke-values.yaml
cp $WORKSPACE/manifests/avs-values.yaml $BUILD_DIR/manifests/avs-values.yaml
cp $WORKSPACE/manifests/aerospike-cr.yaml $BUILD_DIR/manifests/aerospike-cr.yaml
else
cp $WORKSPACE/manifests/avs-gke-values-auth.yaml $BUILD_DIR/manifests/avs-gke-values.yaml
cp $WORKSPACE/manifests/avs-values-auth.yaml $BUILD_DIR/manifests/avs-values.yaml
cp $WORKSPACE/manifests/aerospike-cr-auth.yaml $BUILD_DIR/manifests/aerospike-cr.yaml
fi
}
Expand Down Expand Up @@ -116,7 +116,7 @@ generate_certs() {
-keyout "$BUILD_DIR/output/asd.aerospike.com.key" \
-subj "/C=UK/ST=London/L=London/O=abs/OU=Server/CN=asd.aerospike.com"

SVC_NAME="avs-gke-aerospike-vector-search.aerospike.svc.cluster.local" COMMON_NAME="avs.aerospike.com" openssl req \
SVC_NAME="avs-app-aerospike-vector-search.aerospike.svc.cluster.local" COMMON_NAME="avs.aerospike.com" openssl req \
-new \
-nodes \
-config "$WORKSPACE/ssl/openssl.conf" \
Expand All @@ -125,7 +125,7 @@ generate_certs() {
-keyout "$BUILD_DIR/output/avs.aerospike.com.key" \
-subj "/C=UK/ST=London/L=London/O=abs/OU=Client/CN=avs.aerospike.com" \

SVC_NAME="avs-gke-aerospike-vector-search.aerospike.svc.cluster.local" COMMON_NAME="svc.aerospike.com" openssl req \
SVC_NAME="avs-app-aerospike-vector-search.aerospike.svc.cluster.local" COMMON_NAME="svc.aerospike.com" openssl req \
-new \
-nodes \
-config "$WORKSPACE/ssl/openssl_svc.conf" \
Expand All @@ -147,7 +147,7 @@ generate_certs() {
-out "$BUILD_DIR/output/asd.aerospike.com.pem" \
-set_serial 110 \

SVC_NAME="avs-gke-aerospike-vector-search.aerospike.svc.cluster.local" COMMON_NAME="avs.aerospike.com" openssl x509 \
SVC_NAME="avs-app-aerospike-vector-search.aerospike.svc.cluster.local" COMMON_NAME="avs.aerospike.com" openssl x509 \
-req \
-extfile "$WORKSPACE/ssl/openssl.conf" \
-in "$BUILD_DIR/input/avs.aerospike.com.req" \
Expand All @@ -159,7 +159,7 @@ generate_certs() {
-out "$BUILD_DIR/output/avs.aerospike.com.pem" \
-set_serial 210 \

SVC_NAME="avs-gke-aerospike-vector-search.aerospike.svc.cluster.local" COMMON_NAME="svc.aerospike.com" openssl x509 \
SVC_NAME="avs-app-aerospike-vector-search.aerospike.svc.cluster.local" COMMON_NAME="svc.aerospike.com" openssl x509 \
-req \
-extfile "$WORKSPACE/ssl/openssl_svc.conf" \
-in "$BUILD_DIR/input/svc.aerospike.com.req" \
Expand Down Expand Up @@ -417,9 +417,9 @@ deploy_avs_helm_chart() {
helm repo add aerospike-helm https://artifact.aerospike.io/artifactory/api/helm/aerospike-helm
helm repo update
if [ -z "$CHART_LOCATION" ]; then
helm install avs-gke --values $BUILD_DIR/manifests/avs-gke-values.yaml --namespace avs aerospike-helm/aerospike-vector-search --version 0.6.0 --wait
helm install avs-app --values $BUILD_DIR/manifests/avs-values.yaml --namespace avs aerospike-helm/aerospike-vector-search --version 0.6.0 --wait
else
helm install avs-gke --values $BUILD_DIR/manifests/avs-gke-values.yaml --namespace avs "$CHART_LOCATION" --wait
helm install avs-app --values $BUILD_DIR/manifests/avs-values.yaml --namespace avs "$CHART_LOCATION" --wait
fi
}

Expand Down
69 changes: 69 additions & 0 deletions kubernetes/logs/avs-secure
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
+ trap 'echo "Error: $? at line $LINENO" >&2' ERR
++ pwd
+ WORKSPACE=/home/joem/src/aerospike-vector/kubernetes
++ gcloud config get-value project
+ PROJECT_ID=performance-eco
++ whoami
+ USERNAME=joem
+ DEFAULT_CLUSTER_NAME_SUFFIX=avs
+ [[ 2 -gt 0 ]]
+ case $1 in
+ CLUSTER_NAME_OVERRIDE=avs-secure
+ shift 2
+ [[ 0 -gt 0 ]]
+ main
+ set_env_variables
+ '[' -n avs-secure ']'
+ export CLUSTER_NAME=joem-avs-secure
+ CLUSTER_NAME=joem-avs-secure
+ export NODE_POOL_NAME_AEROSPIKE=aerospike-pool
+ NODE_POOL_NAME_AEROSPIKE=aerospike-pool
+ export NODE_POOL_NAME_AVS=avs-pool
+ NODE_POOL_NAME_AVS=avs-pool
+ export ZONE=us-central1-c
+ ZONE=us-central1-c
+ export FEATURES_CONF=/home/joem/src/aerospike-vector/kubernetes/features.conf
+ FEATURES_CONF=/home/joem/src/aerospike-vector/kubernetes/features.conf
+ export BUILD_DIR=/home/joem/src/aerospike-vector/kubernetes/generated
+ BUILD_DIR=/home/joem/src/aerospike-vector/kubernetes/generated
+ export REVERSE_DNS_AVS
+ print_env
+ echo 'Environment Variables:'
Environment Variables:
+ echo 'export PROJECT_ID=performance-eco'
export PROJECT_ID=performance-eco
+ echo 'export CLUSTER_NAME=joem-avs-secure'
export CLUSTER_NAME=joem-avs-secure
+ echo 'export NODE_POOL_NAME_AEROSPIKE=aerospike-pool'
export NODE_POOL_NAME_AEROSPIKE=aerospike-pool
+ echo 'export NODE_POOL_NAME_AVS=avs-pool'
export NODE_POOL_NAME_AVS=avs-pool
+ echo 'export ZONE=us-central1-c'
export ZONE=us-central1-c
+ echo 'export FEATURES_CONF=/home/joem/src/aerospike-vector/kubernetes/features.conf'
export FEATURES_CONF=/home/joem/src/aerospike-vector/kubernetes/features.conf
+ echo 'export CHART_LOCATION='
export CHART_LOCATION=
+ echo 'export RUN_INSECURE='
export RUN_INSECURE=
+ reset_build
+ '[' -d /home/joem/src/aerospike-vector/kubernetes/generated ']'
++ mktemp -d /tmp/avs-deploy-previous.XXXXXX
+ temp_dir=/tmp/avs-deploy-previous.360dzx
+ mv -f /home/joem/src/aerospike-vector/kubernetes/generated /tmp/avs-deploy-previous.360dzx
+ mkdir -p /home/joem/src/aerospike-vector/kubernetes/generated/input /home/joem/src/aerospike-vector/kubernetes/generated/output /home/joem/src/aerospike-vector/kubernetes/generated/secrets /home/joem/src/aerospike-vector/kubernetes/generated/certs /home/joem/src/aerospike-vector/kubernetes/generated/manifests
+ cp /home/joem/src/aerospike-vector/kubernetes/features.conf /home/joem/src/aerospike-vector/kubernetes/generated/secrets/features.conf
+ [[ '' == 1 ]]
+ cp /home/joem/src/aerospike-vector/kubernetes/manifests/avs-values-auth.yaml /home/joem/src/aerospike-vector/kubernetes/generated/manifests/avs-values.yaml
+ cp /home/joem/src/aerospike-vector/kubernetes/manifests/aerospike-cr-auth.yaml /home/joem/src/aerospike-vector/kubernetes/generated/manifests/aerospike-cr.yaml
+ create_gke_cluster
++ date '+%Y-%m-%d %H:%M:%S'
+ echo '2024-11-12 17:22:11 - Starting GKE cluster creation...'
2024-11-12 17:22:11 - Starting GKE cluster creation...
+ gcloud container clusters create joem-avs-secure --project performance-eco --zone us-central1-c --num-nodes 1 --disk-type pd-standard --disk-size 100
Note: The Kubelet readonly port (10255) is now deprecated. Please update your workloads to use the recommended alternatives. See https://cloud.google.com/kubernetes-engine/docs/how-to/disable-kubelet-readonly-port for ways to check usage and for migration instructions.
Note: Your Pod address range (`--cluster-ipv4-cidr`) can accommodate at most 1008 node(s).
ERROR: (gcloud.container.clusters.create) ResponseError: code=409, message=Already exists: projects/performance-eco/zones/us-central1-c/clusters/joem-avs-secure.
+ echo 'Failed to create GKE cluster'
Failed to create GKE cluster
+ exit 1
Loading

0 comments on commit c3bd830

Please sign in to comment.