diff --git a/aerospike-vector-search/eks/README.md b/aerospike-vector-search/eks/README.md deleted file mode 100644 index 1220cde..0000000 --- a/aerospike-vector-search/eks/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# EKS Installation - -### Create Local Env -```shell -./install-eks-env.sh -``` - -### Run `qoute-serch` Example App -```shell -./run-quote-search.sh -``` - -### Destroy Local Env -```shell -./uninstall-eks-env.sh -``` diff --git a/aerospike-vector-search/eks/config/gateway.yaml b/aerospike-vector-search/eks/config/gateway.yaml deleted file mode 100644 index d8903eb..0000000 --- a/aerospike-vector-search/eks/config/gateway.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: networking.istio.io/v1alpha3 -kind: Gateway -metadata: - name: avs-gw - namespace: aerospike -spec: - selector: - istio: ingress - servers: - - port: - number: 80 - name: http - protocol: HTTP - hosts: - - "*" - - port: - number: 5000 - name: grpc - protocol: GRPC - hosts: - - "*" - tls: - mode: PASSTHROUGH diff --git a/aerospike-vector-search/eks/config/istio-ingressgateway-values.yaml b/aerospike-vector-search/eks/config/istio-ingressgateway-values.yaml deleted file mode 100644 index 788ba61..0000000 --- a/aerospike-vector-search/eks/config/istio-ingressgateway-values.yaml +++ /dev/null @@ -1,17 +0,0 @@ -service: - type: LoadBalancer - annotations: - service.beta.kubernetes.io/aws-load-balancer-type: nlb - ports: - - name: http - port: 80 - targetPort: 80 - - name: https - port: 443 - targetPort: 443 - - name: status-port - port: 15021 - targetPort: 15021 - - name: grpc - port: 5000 - targetPort: 5000 diff --git a/aerospike-vector-search/eks/config/kube-prometheus-stack-values.yaml b/aerospike-vector-search/eks/config/kube-prometheus-stack-values.yaml deleted file mode 100644 index 0aa14f5..0000000 --- a/aerospike-vector-search/eks/config/kube-prometheus-stack-values.yaml +++ /dev/null @@ -1,20 +0,0 @@ -alertmanager: - enabled: false -grafana: - enabled: false - sidecar: - dashboards: - enabled: true - defaultFolderName: "General" - label: grafana_dashboard - labelValue: "1" - folderAnnotation: grafana_folder - searchNamespace: ALL - provider: - foldersFromFilesStructure: true -prometheus: - prometheusSpec: - serviceMonitorSelectorNilUsesHelmValues: false - serviceMonitorNamespaceSelector: - matchExpressions: - - { key: kubernetes.io/metadata.name, operator: In, values: [ aerospike, monitoring ] } \ No newline at end of file diff --git a/aerospike-vector-search/eks/config/quote-search-eks-values.yaml b/aerospike-vector-search/eks/config/quote-search-eks-values.yaml deleted file mode 100644 index c67f742..0000000 --- a/aerospike-vector-search/eks/config/quote-search-eks-values.yaml +++ /dev/null @@ -1,5 +0,0 @@ -quoteSearchConfig: - avsHost: "istio-ingress.istio-ingress.svc.cluster.local" - avsIsLoadbalancer: "True" - avsNamespace: "avs-meta" - diff --git a/aerospike-vector-search/eks/config/servicemonitor.yaml b/aerospike-vector-search/eks/config/servicemonitor.yaml deleted file mode 100644 index 3b98e4f..0000000 --- a/aerospike-vector-search/eks/config/servicemonitor.yaml +++ /dev/null @@ -1,14 +0,0 @@ ---- -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: avs-service-monitor - namespace: aerospike -spec: - selector: - matchLabels: - app.kubernetes.io/name: aerospike-vector-search - endpoints: - - port: "manage-5040" - interval: 10s - path: "/manage/rest/v1/prometheus" diff --git a/aerospike-vector-search/eks/config/virtual-service-vector-search.yaml b/aerospike-vector-search/eks/config/virtual-service-vector-search.yaml deleted file mode 100644 index a2463e4..0000000 --- a/aerospike-vector-search/eks/config/virtual-service-vector-search.yaml +++ /dev/null @@ -1,29 +0,0 @@ -apiVersion: networking.istio.io/v1alpha3 -kind: VirtualService -metadata: - name: avs-vs - namespace: aerospike -spec: - hosts: - - "*" - gateways: - - avs-gw - http: - - match: - - uri: - prefix: / - port: 80 - route: - - destination: - port: - number: 8080 - host: quote-search-quote-semantic-search.aerospike.svc.cluster.local - - match: - - uri: - prefix: / - port: 5000 - route: - - destination: - port: - number: 5000 - host: avs-eks-aerospike-vector-search.aerospike.svc.cluster.local diff --git a/aerospike-vector-search/eks/install-eks-env.sh b/aerospike-vector-search/eks/install-eks-env.sh deleted file mode 100755 index 36eb76b..0000000 --- a/aerospike-vector-search/eks/install-eks-env.sh +++ /dev/null @@ -1,124 +0,0 @@ -#!/bin/bash -e -WORKSPACE="$(git rev-parse --show-toplevel)" -REGION="" -PROFILE="" - -if [ -z "$REGION" ]; then - echo "Set Region" - exit 1 -fi - -if [ ! -f "$WORKSPACE/aerospike-vector-search/eks/config/features.conf" ]; then - echo "features.conf Not found" - exit 1 -fi - -echo "Install EKS" - -eksctl create cluster \ ---profile="$PROFILE" \ ---region="$REGION" \ ---name=avs-eks-cluster \ ---nodes=3 \ ---node-type=t3.xlarge \ ---with-oidc \ ---set-kubeconfig-context - -eksctl create iamserviceaccount \ ---profile="$PROFILE" \ ---region="$REGION" \ ---name ebs-csi-controller-sa \ ---namespace kube-system \ ---cluster avs-eks-cluster \ ---role-name AmazonEKS_EBS_CSI_DriverRole \ ---role-only \ ---attach-policy-arn arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy \ ---approve - -eksctl create addon \ ---profile="$PROFILE" \ ---region="$REGION" \ ---name aws-ebs-csi-driver \ ---cluster avs-eks-cluster \ ---service-account-role-arn arn:aws:iam::"$(aws sts get-caller-identity \ ---query "Account" \ ---output text)":role/AmazonEKS_EBS_CSI_DriverRole \ ---force - -sleep 60 -echo "Deploying AKO" -curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.25.0/install.sh \ -| bash -s v0.25.0 -kubectl create -f https://operatorhub.io/install/aerospike-kubernetes-operator.yaml -echo "Waiting for AKO" -while true; do - if kubectl --namespace operators get deployment/aerospike-operator-controller-manager &> /dev/null; then - kubectl --namespace operators wait \ - --for=condition=available --timeout=180s deployment/aerospike-operator-controller-manager - break - fi -done - -echo "Grant permissions to the target namespace" -kubectl create namespace aerospike -kubectl --namespace aerospike create serviceaccount aerospike-operator-controller-manager -kubectl create clusterrolebinding aerospike-cluster \ ---clusterrole=aerospike-cluster --serviceaccount=aerospike:aerospike-operator-controller-manager - -echo "Set Secrets for Aerospike Cluster" -kubectl --namespace aerospike create secret generic aerospike-secret \ ---from-file=features.conf="$WORKSPACE/aerospike-vector-search/eks/config/features.conf" -kubectl --namespace aerospike create secret generic auth-secret --from-literal=password='admin123' - -echo "Add Storage Class" -kubectl apply -f https://raw.githubusercontent.com/aerospike/aerospike-kubernetes-operator/master/config/samples/storage/eks_ssd_storage_class.yaml - -sleep 5 -echo "Deploy Aerospike Cluster" -kubectl apply -f "$WORKSPACE/aerospike-vector-search/examples/eks/aerospike.yaml" - -sleep 5 -echo "Waiting for Aerospike Cluster" -while true; do - if kubectl --namespace aerospike get pods --selector=statefulset.kubernetes.io/pod-name &> /dev/null; then - kubectl --namespace aerospike wait pods \ - --selector=statefulset.kubernetes.io/pod-name --for=condition=ready --timeout=180s - break - fi -done - -echo "Deploying Istio" -helm repo add istio https://istio-release.storage.googleapis.com/charts -helm repo update - -helm install istio-base istio/base --namespace istio-system --set defaultRevision=default --create-namespace --wait -helm install istiod istio/istiod --namespace istio-system --create-namespace --wait -helm install istio-ingress istio/gateway \ ---values "$WORKSPACE/aerospike-vector-search/eks/config/istio-ingressgateway-values.yaml" \ ---namespace istio-ingress \ ---create-namespace \ ---wait - -kubectl apply -f "$WORKSPACE/aerospike-vector-search/eks/config/gateway.yaml" -kubectl apply -f "$WORKSPACE/aerospike-vector-search/eks/config/virtual-service-vector-search.yaml" - -echo "Deploy AVS" -helm install avs-eks "$WORKSPACE/aerospike-vector-search" \ ---values "$WORKSPACE/aerospike-vector-search/examples/eks/avs-eks-values.yaml" --namespace aerospike --wait - -echo "Deploying Quote-Search" - -git clone \ ---depth 1 \ ---branch main \ ---no-checkout https://github.com/aerospike/aerospike-vector-search-examples.git -cd aerospike-vector-search-examples -git sparse-checkout set kubernetes/helm/quote-semantic-search -git checkout main -cd - - -helm install quote-search "$PWD/aerospike-vector-search-examples/kubernetes/helm/quote-semantic-search" \ ---values "$WORKSPACE/aerospike-vector-search/eks/config/quote-search-eks-values.yaml" \ ---namespace aerospike \ ---wait \ ---timeout 7m0s diff --git a/aerospike-vector-search/eks/install-prometheus.sh b/aerospike-vector-search/eks/install-prometheus.sh deleted file mode 100755 index f3a2c1e..0000000 --- a/aerospike-vector-search/eks/install-prometheus.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -e -WORKSPACE="$(git rev-parse --show-toplevel)" - -helm repo add prometheus-community https://prometheus-community.github.io/helm-charts -helm repo update -helm install kube-prometheus-stack prometheus-community/kube-prometheus-stack \ ---values "$WORKSPACE"/aerospike-vector-search/eks/config/kube-prometheus-stack-values.yaml \ ---namespace monitoring \ ---create-namespace \ ---wait -kubectl apply -f "$WORKSPACE"/aerospike-vector-search/eks/config/servicemonitor.yaml - -#kubectl port-forward service/kube-prometheus-stack-prometheus 9090 -n monitoring diff --git a/aerospike-vector-search/eks/uninstall-eks-env.sh b/aerospike-vector-search/eks/uninstall-eks-env.sh deleted file mode 100755 index 3ddefe8..0000000 --- a/aerospike-vector-search/eks/uninstall-eks-env.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash -e -WORKSPACE="$(git rev-parse --show-toplevel)" -REGION="" -PROFILE="" - -if [ -z "$REGION" ]; then - echo "set Region" - exit 1 -fi - -rm -rf "$PWD/aerospike-vector-search-examples" -helm uninstall quote-search --namespace aerospike -helm uninstall avs-eks --namespace aerospike -kubectl delete -f "$WORKSPACE/aerospike-vector-search/eks/config/gateway.yaml" -kubectl delete -f "$WORKSPACE/aerospike-vector-search/eks/config/virtual-service-vector-search.yaml" -helm uninstall istio-ingress --namespace istio-ingress -kubectl delete namespace istio-ingress -helm uninstall istiod --namespace istio-system -helm uninstall istio-base --namespace istio-system -kubectl delete namespace istio-system -kubectl delete -f "$WORKSPACE/aerospike-vector-search/examples/eks/aerospike.yaml" -kubectl delete -f https://raw.githubusercontent.com/aerospike/aerospike-kubernetes-operator/master/config/samples/storage/gce_ssd_storage_class.yaml -kubectl --namespace aerospike delete secret auth-secret -kubectl --namespace aerospike delete secret aerospike-secret -kubectl delete clusterrolebinding aerospike-cluster -kubectl --namespace aerospike delete serviceaccount aerospike-operator-controller-manager -kubectl delete namespace aerospike -kubectl delete -f https://operatorhub.io/install/aerospike-kubernetes-operator.yaml -kubectl delete clusterserviceversion "$(kubectl get clusterserviceversion -o=jsonpath='{.items[0].metadata.name}')" -kubectl delete crd aerospikeclusters.asdb.aerospike.com - -eksctl delete iamserviceaccount \ ---profile="$PROFILE" \ ---region="$REGION" \ ---cluster avs-eks-cluster \ ---name ebs-csi-controller-sa \ ---namespace kube-system - -eksctl delete addon \ ---profile="$PROFILE" \ ---region="$REGION" \ ---name aws-ebs-csi-driver \ ---cluster avs-eks-cluster - -eksctl delete cluster \ ---profile="$PROFILE" \ ---region="$REGION" \ ---name avs-eks-cluster diff --git a/aerospike-vector-search/eks/uninstall-prometheus.sh b/aerospike-vector-search/eks/uninstall-prometheus.sh deleted file mode 100755 index dc222c0..0000000 --- a/aerospike-vector-search/eks/uninstall-prometheus.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -e -WORKSPACE="$(git rev-parse --show-toplevel)" - -kubectl delete -f "$WORKSPACE"/aerospike-vector-search/eks/config/servicemonitor.yaml -helm uninstall kube-prometheus-stack --namespace monitoring diff --git a/aerospike-vector-search/examples/eks/README.md b/aerospike-vector-search/examples/eks/README.md deleted file mode 100644 index 78b16c4..0000000 --- a/aerospike-vector-search/examples/eks/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# Aerospike Vector Search EKS example - -## Prerequisites -- EKS cluster -- Helm v3 -- An Aerospike cluster that can connect to Pods in the Kubernetes cluster - The Aerospike cluster can be deployed in the same Kubernetes cluster using [Aerospike Kubernetes Operator](https://docs.aerospike.com/cloud/kubernetes/operator) -- Aerospike Vector Search [Helm chart](../../README.md#configuration) - -## Adding the helm chart repository - -Add the `aerospike` helm repository if not already done - -```shell -helm repo add aerospike https://aerospike.github.io/helm-charts -``` - -## Deploy Aerospike Vector Search Cluster. - -All subsequent commands are run from this directory. - -## Deploy the Aerospike cluster -If you do not have a preexisting Aerospike server, install [Aerospike Kubernetes Operator](https://docs.aerospike.com/cloud/kubernetes/operator/install-operator). -The steps below will deploy an Aerospike cluster using Aerospike Kubernetes Operator and this [sample](aerospike.yaml) custom resource. - -### Create secrets -Create the secret for aerospike using your Aerospike licence file -```shell -kubectl --namespace aerospike create secret generic aerospike-secret --from-file=features.conf=features.conf -``` - -### Launch the Aerospike cluster -```shell -kubectl -n aerospike create -f aerospike.yaml -``` - -### Create a new Kubernetes namespace -Create a Kubernetes namespace if not already done -```shell -kubectl create namespace aerospike -``` - -### EKS LoadBalancer configuration -In this example we configure internal facing L4 LoadBalancer (NLB) for more details please refer to AWS [documentation](https://docs.aws.amazon.com/eks/latest/userguide/network-load-balancing.html). - -### Deploy Aerospike Vector Search. -Update the [avs-eks-values.yaml](avs-eks-values.yaml) file to change Aerospike Vector Search configuration. - - -Deploy the Aerospike Vector Search cluster using configuration from [avs-eks-values.yaml](avs-eks-values.yaml) -```shell -helm install --namespace aerospike avs-eks -f avs-eks-values.yaml ../../../aerospike-vector-search -``` diff --git a/aerospike-vector-search/examples/eks/aerospike.yaml b/aerospike-vector-search/examples/eks/aerospike.yaml deleted file mode 100644 index 5ca0ad4..0000000 --- a/aerospike-vector-search/examples/eks/aerospike.yaml +++ /dev/null @@ -1,86 +0,0 @@ ---- -apiVersion: asdb.aerospike.com/v1 -kind: AerospikeCluster -metadata: - name: aerospike-cluster - namespace: aerospike -spec: - size: 3 - image: aerospike/aerospike-server-enterprise:7.0.0.5 - - podSpec: - multiPodPerHost: false - - storage: - filesystemVolumePolicy: - cascadeDelete: true - initMethod: deleteFiles - volumes: - - name: workdir - source: - persistentVolume: - storageClass: ssd - volumeMode: Filesystem - size: 3Gi - aerospike: - path: /opt/aerospike - - name: nsvol1 - aerospike: - path: /mnt/disks/test - source: - persistentVolume: - storageClass: ssd - volumeMode: Filesystem - size: 5Gi - - name: nsvol2 - aerospike: - path: /mnt/disks/avs - source: - persistentVolume: - storageClass: ssd - volumeMode: Filesystem - size: 5Gi - - name: aerospike-config-secret - source: - secret: - secretName: aerospike-secret - aerospike: - path: /etc/aerospike/secret - - # aerospikeAccessControl: - # users: - # - name: admin - # secretName: auth-secret - # roles: - # - sys-admin - # - user-admin - - aerospikeConfig: - service: - feature-key-file: /etc/aerospike/secret/features.conf - # security: {} - network: - service: - port: 3000 - fabric: - port: 3001 - heartbeat: - port: 3002 - namespaces: - - name: test - replication-factor: 2 - storage-engine: - type: device - filesize: 5368709120 - files: - - /mnt/disks/test/test.dat - - name: avs-meta - nsup-period: 600 - nsup-threads: 2 - evict-tenths-pct: 5 - replication-factor: 2 - storage-engine: - type: device - filesize: 5368709120 - files: - - /mnt/disks/avs/avs-meta.dat diff --git a/aerospike-vector-search/examples/eks/avs-eks-values.yaml b/aerospike-vector-search/examples/eks/avs-eks-values.yaml deleted file mode 100644 index 3314db1..0000000 --- a/aerospike-vector-search/examples/eks/avs-eks-values.yaml +++ /dev/null @@ -1,56 +0,0 @@ -replicaCount: 3 -aerospikeVectorSearchConfig: - cluster: - cluster-name: "avs-db-1" - feature-key-file: "/etc/aerospike-vector-search/features.conf" - service: - ports: - 5000: - addresses: - "0.0.0.0" - manage: - ports: - 5040: { } - heartbeat: - seeds: - - address: avs-eks-aerospike-vector-search-0.avs-eks-aerospike-vector-search.aerospike.svc.cluster.local - port: 5001 - interconnect: - ports: - 5001: - addresses: - 0.0.0.0 - aerospike: - seeds: - - aerospike-cluster-0-0.aerospike-cluster.aerospike.svc.cluster.local: - port: 3000 - logging: - # file: /var/log/aerospike-vector-search/aerospike-vector-search.log - enable-console-logging: false - format: simple - max-history: 30 - levels: - metrics-ticker: info - root: info - ticker-interval: 10 - -service: - enabled: false - type: LoadBalancer - annotations: - service.beta.kubernetes.io/aws-load-balancer-type: nlb - ports: - - name: "svc-port" - port: 5000 - targetPort: 5000 - -affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - topologyKey: "kubernetes.io/hostname" - labelSelector: - matchExpressions: - - key: "app.kubernetes.io/name" - operator: In - values: - - "aerospike-vector-search" diff --git a/aerospike-vector-search/examples/gke/README.md b/aerospike-vector-search/examples/gke/README.md deleted file mode 100644 index 8b90cb7..0000000 --- a/aerospike-vector-search/examples/gke/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# Aerospike Aerospike Vector Search GKE example - -## Prerequisites -- GKE cluster -- Helm v3 -- An Aerospike cluster that can connect to Pods in the Kubernetes cluster - The Aerospike cluster can be deployed in the same Kubernetes cluster using [Aerospike Kubernetes Operator](https://docs.aerospike.com/cloud/kubernetes/operator) -- Aerospike Vector Search [Helm chart](../../README.md#configuration) - -## Adding the helm chart repository - -Add the `aerospike` helm repository if not already done - -```shell -helm repo add aerospike https://aerospike.github.io/helm-charts -``` - -## Deploy Aerospike Vector Search Cluster. - -All subsequent commands are run from this directory. - -## Deploy the Aerospike cluster -If you do not have a preexisting Aerospike server, install [Aerospike Kubernetes Operator](https://docs.aerospike.com/cloud/kubernetes/operator/install-operator). -The steps below will deploy an Aerospike cluster using Aerospike Kubernetes Operator and this [sample](aerospike.yaml) custom resource. - -### Create secrets -Create the secret for aerospike using your Aerospike licence file -```shell -kubectl --namespace aerospike create secret generic aerospike-secret --from-file=features.conf=features.conf -``` - -### Launch the Aerospike cluster -```shell -kubectl -n aerospike create -f aerospike.yaml -``` - -### Create a new Kubernetes namespace -Create a Kubernetes namespace if not already done -```shell -kubectl create namespace aerospike -``` - -### GKE LoadBalancer configuration -In this example we configure internal facing L4 LoadBalancer for more details please refer to GCP [documentation](https://cloud.google.com/kubernetes-engine/docs/concepts/service-load-balancer). - -### Deploy Aerospike Vector Search. -Update the [avs-gke-values.yaml](avs-gke-values.yaml) file to change Aerospike Vector Search configuration. - - -Deploy the Aerospike Vector Search cluster using configuration from [avs-gke-values.yaml](avs-gke-values.yaml) -```shell -helm install --namespace aerospike avs-eks -f avs-gke-values.yaml ../../../aerospike-vector-search -``` diff --git a/aerospike-vector-search/examples/gke/aerospike.yaml b/aerospike-vector-search/examples/gke/aerospike.yaml deleted file mode 100644 index 5ca0ad4..0000000 --- a/aerospike-vector-search/examples/gke/aerospike.yaml +++ /dev/null @@ -1,86 +0,0 @@ ---- -apiVersion: asdb.aerospike.com/v1 -kind: AerospikeCluster -metadata: - name: aerospike-cluster - namespace: aerospike -spec: - size: 3 - image: aerospike/aerospike-server-enterprise:7.0.0.5 - - podSpec: - multiPodPerHost: false - - storage: - filesystemVolumePolicy: - cascadeDelete: true - initMethod: deleteFiles - volumes: - - name: workdir - source: - persistentVolume: - storageClass: ssd - volumeMode: Filesystem - size: 3Gi - aerospike: - path: /opt/aerospike - - name: nsvol1 - aerospike: - path: /mnt/disks/test - source: - persistentVolume: - storageClass: ssd - volumeMode: Filesystem - size: 5Gi - - name: nsvol2 - aerospike: - path: /mnt/disks/avs - source: - persistentVolume: - storageClass: ssd - volumeMode: Filesystem - size: 5Gi - - name: aerospike-config-secret - source: - secret: - secretName: aerospike-secret - aerospike: - path: /etc/aerospike/secret - - # aerospikeAccessControl: - # users: - # - name: admin - # secretName: auth-secret - # roles: - # - sys-admin - # - user-admin - - aerospikeConfig: - service: - feature-key-file: /etc/aerospike/secret/features.conf - # security: {} - network: - service: - port: 3000 - fabric: - port: 3001 - heartbeat: - port: 3002 - namespaces: - - name: test - replication-factor: 2 - storage-engine: - type: device - filesize: 5368709120 - files: - - /mnt/disks/test/test.dat - - name: avs-meta - nsup-period: 600 - nsup-threads: 2 - evict-tenths-pct: 5 - replication-factor: 2 - storage-engine: - type: device - filesize: 5368709120 - files: - - /mnt/disks/avs/avs-meta.dat diff --git a/aerospike-vector-search/examples/gke/avs-gke-values.yaml b/aerospike-vector-search/examples/gke/avs-gke-values.yaml deleted file mode 100644 index 8f8fad6..0000000 --- a/aerospike-vector-search/examples/gke/avs-gke-values.yaml +++ /dev/null @@ -1,58 +0,0 @@ -replicaCount: 3 -aerospikeVectorSearchConfig: - cluster: - cluster-name: "avs-db-1" - feature-key-file: "/etc/aerospike-vector-search/features.conf" - service: - ports: - 5000: - addresses: - "0.0.0.0" - manage: - ports: - 5040: { } - - heartbeat: - seeds: - - address: avs-gke-aerospike-vector-search-0.avs-gke-aerospike-vector-search.aerospike.svc.cluster.local - port: 5001 - interconnect: - ports: - 5001: - addresses: - 0.0.0.0 - aerospike: - seeds: - - aerospike-cluster-0-0.aerospike-cluster.aerospike.svc.cluster.local: - port: 3000 - logging: - # file: /var/log/aerospike-vector-search/aerospike-vector-search.log - enable-console-logging: false - format: simple - max-history: 30 - levels: - metrics-ticker: info - root: info - ticker-interval: 10 - -service: - enabled: false - type: LoadBalancer - annotations: - cloud.google.com/l4-rbs: "enabled" -# networking.gke.io/load-balancer-type: "Internal" - ports: - - name: "svc-port" - port: 5000 - targetPort: 5000 - -affinity: - podAntiAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - - topologyKey: "kubernetes.io/hostname" - labelSelector: - matchExpressions: - - key: "app.kubernetes.io/name" - operator: In - values: - - "aerospike-vector-search" diff --git a/aerospike-vector-search/examples/kind/README.md b/aerospike-vector-search/examples/kind/README.md deleted file mode 100644 index 4c7445c..0000000 --- a/aerospike-vector-search/examples/kind/README.md +++ /dev/null @@ -1,115 +0,0 @@ -# Aerospike Vector Search Quote Search example - -This example deploys Aerospike Vector Search cluster along with an Aerospike cluster and runs `quote-search` example app. - -## Prerequisites -- Kubernetes cluster -- Helm v3 -- An Aerospike cluster that can connect to Pods in the Kubernetes cluster - The Aerospike cluster can be deployed in the same Kubernetes cluster using [Aerospike Kubernetes Operator](https://docs.aerospike.com/cloud/kubernetes/operator) -- Aerospike Vector Search [Helm chart](../../README.md#configuration) - -## Clone this repository. -- A clone of this git repository - -## Deploy Aerospike Vector Search Cluster. - -All subsequent commands are run from this directory. - -### Install and Configure Load-Balancer -Aerospike Vector Search cluster can be reach outside of Kubernetes cluster using a Load-Balancer in this example we're using Metallb but it could be any L4 Load-Balancer of your choice. -#### Deploy MetalLB -```shell -kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.14.4/config/manifests/metallb-native.yaml -``` -Wait for a few minutes until everything is set up -#### Deploy MetalLB Configuration -```shell -kubectl apply -f - < /dev/null; then - kubectl --namespace operators wait \ - --for=condition=available --timeout=180s deployment/aerospike-operator-controller-manager - break - fi -done - -echo "Grant permissions to the target namespace" -kubectl create namespace aerospike -kubectl --namespace aerospike create serviceaccount aerospike-operator-controller-manager -kubectl create clusterrolebinding aerospike-cluster \ ---clusterrole=aerospike-cluster --serviceaccount=aerospike:aerospike-operator-controller-manager - -echo "Set Secrets for Aerospike Cluster" -kubectl --namespace aerospike create secret generic aerospike-secret \ ---from-file=features.conf="$WORKSPACE/aerospike-vector-search/gke/config/features.conf" -kubectl --namespace aerospike create secret generic auth-secret --from-literal=password='admin123' - -echo "Add Storage Class" -kubectl apply -f https://raw.githubusercontent.com/aerospike/aerospike-kubernetes-operator/master/config/samples/storage/gce_ssd_storage_class.yaml - -sleep 5 -echo "Deploy Aerospike Cluster" -kubectl apply -f "$WORKSPACE/aerospike-vector-search/examples/gke/aerospike.yaml" - -sleep 5 -echo "Waiting for Aerospike Cluster" -while true; do - if kubectl --namespace aerospike get pods --selector=statefulset.kubernetes.io/pod-name &> /dev/null; then - kubectl --namespace aerospike wait pods \ - --selector=statefulset.kubernetes.io/pod-name --for=condition=ready --timeout=180s - break - fi -done - -echo "Deploying Istio" -helm repo add istio https://istio-release.storage.googleapis.com/charts -helm repo update - -helm install istio-base istio/base --namespace istio-system --set defaultRevision=default --create-namespace --wait -helm install istiod istio/istiod --namespace istio-system --create-namespace --wait -helm install istio-ingress istio/gateway \ ---values "$WORKSPACE/aerospike-vector-search/gke/config/istio-ingressgateway-values.yaml" \ ---namespace istio-ingress \ ---create-namespace \ ---wait - -kubectl apply -f "$WORKSPACE/aerospike-vector-search/gke/config/gateway.yaml" -kubectl apply -f "$WORKSPACE/aerospike-vector-search/gke/config/virtual-service-vector-search.yaml" - -echo "Deploy AVS" -helm install avs-gke "$WORKSPACE/aerospike-vector-search" \ ---values "$WORKSPACE/aerospike-vector-search/examples/gke/avs-gke-values.yaml" --namespace aerospike --wait - -echo "Deploying Quote-Search" - -git clone \ ---depth 1 \ ---branch main \ ---no-checkout https://github.com/aerospike/aerospike-vector-search-examples.git -cd aerospike-vector-search-examples -git sparse-checkout set kubernetes/helm/quote-semantic-search -git checkout main -cd - - -helm install quote-search "$PWD/aerospike-vector-search-examples/kubernetes/helm/quote-semantic-search" \ ---values "$WORKSPACE/aerospike-vector-search/gke/config/quote-search-gke-values.yaml" \ ---namespace aerospike \ ---wait \ ---timeout 7m0s diff --git a/aerospike-vector-search/gke/install-prometheus.sh b/aerospike-vector-search/gke/install-prometheus.sh deleted file mode 100755 index 41325d9..0000000 --- a/aerospike-vector-search/gke/install-prometheus.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -e -WORKSPACE="$(git rev-parse --show-toplevel)" - -helm repo add prometheus-community https://prometheus-community.github.io/helm-charts -helm repo update -helm install kube-prometheus-stack prometheus-community/kube-prometheus-stack \ ---values "$WORKSPACE"/aerospike-vector-search/gke/config/kube-prometheus-stack-values.yaml \ ---namespace monitoring \ ---create-namespace \ ---wait -kubectl apply -f "$WORKSPACE"/aerospike-vector-search/gke/config/servicemonitor.yaml - -#kubectl port-forward service/kube-prometheus-stack-prometheus 9090 -n monitoring diff --git a/aerospike-vector-search/gke/uninstall-gke-env.sh b/aerospike-vector-search/gke/uninstall-gke-env.sh deleted file mode 100755 index 5ff2532..0000000 --- a/aerospike-vector-search/gke/uninstall-gke-env.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -e -WORKSPACE="$(git rev-parse --show-toplevel)" -PROJECT="" -ZONE="" - -rm -rf "$PWD/aerospike-vector-search-examples" -helm uninstall quote-search --namespace aerospike -helm uninstall avs-gke --namespace aerospike -kubectl delete -f "$WORKSPACE/aerospike-vector-search/gke/config/gateway.yaml" -kubectl delete -f "$WORKSPACE/aerospike-vector-search/gke/config/virtual-service-vector-search.yaml" -helm uninstall istio-ingress --namespace istio-ingress -kubectl delete namespace istio-ingress -helm uninstall istiod --namespace istio-system -helm uninstall istio-base --namespace istio-system -kubectl delete namespace istio-system -kubectl delete -f "$WORKSPACE/aerospike-vector-search/examples/gke/aerospike.yaml" -kubectl delete -f https://raw.githubusercontent.com/aerospike/aerospike-kubernetes-operator/master/config/samples/storage/gce_ssd_storage_class.yaml -kubectl --namespace aerospike delete secret auth-secret -kubectl --namespace aerospike delete secret aerospike-secret -kubectl delete clusterrolebinding aerospike-cluster -kubectl --namespace aerospike delete serviceaccount aerospike-operator-controller-manager -kubectl delete namespace aerospike -kubectl delete -f https://operatorhub.io/install/aerospike-kubernetes-operator.yaml -kubectl delete clusterserviceversion "$(kubectl get clusterserviceversion -o=jsonpath='{.items[0].metadata.name}')" -kubectl delete crd aerospikeclusters.asdb.aerospike.com -gcloud container clusters delete avs-gke-cluster --project="$PROJECT" --zone="$ZONE" --quiet diff --git a/aerospike-vector-search/gke/uninstall-prometheus.sh b/aerospike-vector-search/gke/uninstall-prometheus.sh deleted file mode 100755 index 414d89e..0000000 --- a/aerospike-vector-search/gke/uninstall-prometheus.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -e -WORKSPACE="$(git rev-parse --show-toplevel)" - -kubectl delete -f "$WORKSPACE"/aerospike-vector-search/gke/config/servicemonitor.yaml -helm uninstall kube-prometheus-stack --namespace monitoring diff --git a/aerospike-vector-search/kind/README.md b/aerospike-vector-search/kind/README.md deleted file mode 100644 index 3727e80..0000000 --- a/aerospike-vector-search/kind/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Local Env Installation - -### Create Local Env -```shell -./install-kind.sh -``` - -### Access Quote Search -``` -http://127.0.0.1:80/ -``` - -### Destroy Local Env -```shell -./uninstall-kind.sh -``` diff --git a/aerospike-vector-search/kind/config/gateway.yaml b/aerospike-vector-search/kind/config/gateway.yaml deleted file mode 100644 index d8903eb..0000000 --- a/aerospike-vector-search/kind/config/gateway.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: networking.istio.io/v1alpha3 -kind: Gateway -metadata: - name: avs-gw - namespace: aerospike -spec: - selector: - istio: ingress - servers: - - port: - number: 80 - name: http - protocol: HTTP - hosts: - - "*" - - port: - number: 5000 - name: grpc - protocol: GRPC - hosts: - - "*" - tls: - mode: PASSTHROUGH diff --git a/aerospike-vector-search/kind/config/istio-ingressgateway-values.yaml b/aerospike-vector-search/kind/config/istio-ingressgateway-values.yaml deleted file mode 100644 index 49ef960..0000000 --- a/aerospike-vector-search/kind/config/istio-ingressgateway-values.yaml +++ /dev/null @@ -1,15 +0,0 @@ -service: - type: LoadBalancer - ports: - - name: http - port: 80 - targetPort: 80 - - name: https - port: 443 - targetPort: 443 - - name: status-port - port: 15021 - targetPort: 15021 - - name: grpc - port: 5000 - targetPort: 5000 diff --git a/aerospike-vector-search/kind/config/kind-cluster.yaml b/aerospike-vector-search/kind/config/kind-cluster.yaml deleted file mode 100644 index be969fa..0000000 --- a/aerospike-vector-search/kind/config/kind-cluster.yaml +++ /dev/null @@ -1,17 +0,0 @@ -kind: Cluster -apiVersion: kind.x-k8s.io/v1alpha4 -nodes: - - role: control-plane - extraPortMappings: - - containerPort: 80 - hostPort: 80 - protocol: TCP - - containerPort: 443 - hostPort: 443 - protocol: TCP - - containerPort: 15021 - hostPort: 15021 - protocol: TCP - - containerPort: 5000 - hostPort: 5000 - protocol: TCP \ No newline at end of file diff --git a/aerospike-vector-search/kind/config/metallb-config.yaml b/aerospike-vector-search/kind/config/metallb-config.yaml deleted file mode 100644 index 59afce4..0000000 --- a/aerospike-vector-search/kind/config/metallb-config.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: metallb.io/v1beta1 -kind: IPAddressPool -metadata: - name: example - namespace: metallb-system -spec: - addresses: - - 172.18.255.200-172.18.255.250 ---- -apiVersion: metallb.io/v1beta1 -kind: L2Advertisement -metadata: - name: empty - namespace: metallb-system diff --git a/aerospike-vector-search/kind/config/quote-semantic-search-values.yaml b/aerospike-vector-search/kind/config/quote-semantic-search-values.yaml deleted file mode 100644 index faa441c..0000000 --- a/aerospike-vector-search/kind/config/quote-semantic-search-values.yaml +++ /dev/null @@ -1,4 +0,0 @@ -quoteSearchConfig: - avsHost: "istio-ingress.istio-ingress.svc.cluster.local" - avsIsLoadbalancer: "True" - avsNamespace: "avs-meta" diff --git a/aerospike-vector-search/kind/config/virtual-service-vector-search.yaml b/aerospike-vector-search/kind/config/virtual-service-vector-search.yaml deleted file mode 100644 index 6c193c8..0000000 --- a/aerospike-vector-search/kind/config/virtual-service-vector-search.yaml +++ /dev/null @@ -1,29 +0,0 @@ -apiVersion: networking.istio.io/v1alpha3 -kind: VirtualService -metadata: - name: avs-vs - namespace: aerospike -spec: - hosts: - - "*" - gateways: - - avs-gw - http: - - match: - - uri: - prefix: / - port: 80 - route: - - destination: - port: - number: 8080 - host: quote-search-quote-semantic-search.aerospike.svc.cluster.local - - match: - - uri: - prefix: / - port: 5000 - route: - - destination: - port: - number: 5000 - host: avs-aerospike-vector-search.aerospike.svc.cluster.local diff --git a/aerospike-vector-search/kind/install-kind.sh b/aerospike-vector-search/kind/install-kind.sh deleted file mode 100755 index aad43fe..0000000 --- a/aerospike-vector-search/kind/install-kind.sh +++ /dev/null @@ -1,105 +0,0 @@ -#!/bin/bash -e -WORKSPACE="$(git rev-parse --show-toplevel)" - -# Check prerequisites -REQUISITES=("kubectl" "kind" "docker" "helm") -for item in "${REQUISITES[@]}"; do - if [[ -z $(which "${item}") ]]; then - echo "${item} cannot be found on your system, please install ${item}" - exit 1 - fi -done - -if [ ! -f "$WORKSPACE/aerospike-vector-search/kind/config/features.conf" ]; then - echo "features.conf Not found" - exit 1 -fi - -echo "Installing Kind" -kind create cluster --config "$WORKSPACE/aerospike-vector-search/kind/config/kind-cluster.yaml" -kubectl cluster-info --context kind-kind - -echo "Deploying AKO" -curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.25.0/install.sh \ -| bash -s v0.25.0 -kubectl create -f https://operatorhub.io/install/aerospike-kubernetes-operator.yaml -echo "Waiting for AKO" -while true; do - if kubectl --namespace operators get deployment/aerospike-operator-controller-manager &> /dev/null; then - kubectl --namespace operators wait \ - --for=condition=available --timeout=180s deployment/aerospike-operator-controller-manager - break - fi -done - -echo "Grant permissions to the target namespace" -kubectl create namespace aerospike -kubectl --namespace aerospike create serviceaccount aerospike-operator-controller-manager -kubectl create clusterrolebinding aerospike-cluster \ ---clusterrole=aerospike-cluster --serviceaccount=aerospike:aerospike-operator-controller-manager - -echo "Set Secrets for Aerospike Cluster" -kubectl --namespace aerospike create secret generic aerospike-secret \ ---from-file=features.conf="$WORKSPACE/aerospike-vector-search/kind/config/features.conf" -kubectl --namespace aerospike create secret generic auth-secret --from-literal=password='admin123' - - -sleep 5 -echo "Deploy Aerospike Cluster" -kubectl apply -f "$WORKSPACE/aerospike-vector-search/examples/kind/aerospike.yaml" - -sleep 5 -echo "Waiting for Aerospike Cluster" -while true; do - if kubectl --namespace aerospike get pods --selector=statefulset.kubernetes.io/pod-name &> /dev/null; then - kubectl --namespace aerospike wait pods \ - --selector=statefulset.kubernetes.io/pod-name --for=condition=ready --timeout=180s - break - fi -done - - -echo "Deploy MetalLB" -kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.14.4/config/manifests/metallb-native.yaml -kubectl wait --namespace metallb-system \ - --for=condition=ready pod \ - --selector=app=metallb \ - --timeout=90s -kubectl apply -f "$WORKSPACE/aerospike-vector-search/kind/config/metallb-config.yaml" - - -echo "Deploying Istio" -helm repo add istio https://istio-release.storage.googleapis.com/charts -helm repo update -helm install istio-base istio/base --namespace istio-system --set defaultRevision=default --create-namespace --wait -helm install istiod istio/istiod --namespace istio-system --create-namespace --wait -helm install istio-ingress istio/gateway \ ---values "$WORKSPACE/aerospike-vector-search/kind/config/istio-ingressgateway-values.yaml" \ ---namespace istio-ingress \ ---create-namespace \ ---wait - -kubectl apply -f "$WORKSPACE/aerospike-vector-search/kind/config/gateway.yaml" -kubectl apply -f "$WORKSPACE/aerospike-vector-search/kind/config/virtual-service-vector-search.yaml" - -sleep 30 -echo "Deploy AVS" -helm install avs "$WORKSPACE/aerospike-vector-search" \ ---values "$WORKSPACE/aerospike-vector-search/examples/kind/avs-kind-values.yaml" --namespace aerospike - -echo "Deploying Quote-Search" - -git clone \ ---depth 1 \ ---branch main \ ---no-checkout https://github.com/aerospike/aerospike-vector-search-examples.git -cd aerospike-vector-search-examples -git sparse-checkout set kubernetes/helm/quote-semantic-search -git checkout main -cd - - -helm install quote-search "$PWD/aerospike-vector-search-examples/kubernetes/helm/quote-semantic-search" \ ---values "$WORKSPACE/aerospike-vector-search/kind/config/quote-semantic-search-values.yaml" \ ---namespace aerospike \ ---wait \ ---timeout 7m0s diff --git a/aerospike-vector-search/kind/uninstall-kind.sh b/aerospike-vector-search/kind/uninstall-kind.sh deleted file mode 100755 index b26f9e8..0000000 --- a/aerospike-vector-search/kind/uninstall-kind.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -e - -WORKSPACE="$(git rev-parse --show-toplevel)" - -rm -rf "$PWD/aerospike-vector-search-examples" -helm uninstall quote-search --namespace aerospike -helm uninstall avs --namespace aerospike -kubectl delete -f "$WORKSPACE/aerospike-vector-search/kind/config/virtual-service-vector-search.yaml" -kubectl delete -f "$WORKSPACE/aerospike-vector-search/kind/config/gateway.yaml" -helm uninstall istio-ingress --namespace istio-ingress -kubectl delete namespace istio-ingress -helm uninstall istiod --namespace istio-system -helm uninstall istio-base --namespace istio-system -kubectl delete namespace istio-system -kubectl delete -f "$WORKSPACE/aerospike-vector-search/kind/config/metallb-config.yaml" -kubectl delete -f https://raw.githubusercontent.com/metallb/metallb/v0.14.4/config/manifests/metallb-native.yaml -kubectl delete -f "$WORKSPACE/aerospike-vector-search/examples/kind/aerospike.yaml" -kubectl --namespace aerospike delete secret auth-secret -kubectl --namespace aerospike delete secret aerospike-secret -kubectl delete clusterrolebinding aerospike-cluster -kubectl --namespace aerospike delete serviceaccount aerospike-operator-controller-manager -kubectl delete namespace aerospike -kubectl delete -f https://operatorhub.io/install/aerospike-kubernetes-operator.yaml -kubectl delete clusterserviceversion "$(kubectl get clusterserviceversion -o=jsonpath='{.items[0].metadata.name}')" -kubectl delete crd aerospikeclusters.asdb.aerospike.com -kind delete cluster -docker network rm kind