Install Aizen Foresight on Azure¶
Aizen Foresight install consists of infrastructure and core components
Infrastructure components¶
Create namespace
kubectl create ns aizen-infra
If you have Docker credential information, first create kubernetes secret for accessing Aizen images
kubectl create secret docker-registry aizenrepo-creds
--docker-username=aizencorp
--docker-password=<YOUR DOCKER CREDENTIALS>
-n aizen
Deploy infra components. (Copy the below contents to a script file, start_aizen_infra.sh to deploy)
NAMESPACE=aizen-infra
SECURE_HTTPS=false
INGRESS_ENABLED=false
GATEWAY_ENABLED=true
GATEWAY_CLASSNAME=istio
STORAGE_CLASS=
INGRESS_HOST=
BUCKET_NAME=
CLUSTER_NAME=
CLOUD_ENDPOINT_URL=
CLOUD_ACCESSKEY_ID=
CLOUD_SECRET_KEY=
CLOUD_PROVIDER_REGION=
CLOUD_PROVIDER_TYPE=azure
STORAGE_ACCOUNT_NAME=
STORAGE_CONTAINER_NAME=
NODESELECTOR_LABEL_NAME=agentpool
NODESELECTOR_LABEL_VALUE=system
AUTH_TYPE=ldap
#specify external name http(s)://dnsORingresshost
AIZEN_EXTERNAL_BASE_URL=
#IMAGE
IMAGE_REPO=aizencorp
IMAGE_REPO_SECRET=
IMAGE_TAG=1.0.0
#MLFLOW
MLFLOW_ACCESSKEY_ID=$CLOUD_ACCESSKEY_ID
MLFLOW_SECRET_KEY=$CLOUD_SECRET_KEY
MLFLOW_ENDPOINT_URL=$CLOUD_ENDPOINT_URL
MLFLOW_ARTIFACT_DESTINATION=mlflow-artifacts
MLFLOW_ARTIFACT_REGION=$CLOUD_PROVIDER_REGION
if [[ "$GATEWAY_CLASSNAME" = "istio" ]]; then
GATEWAY_CLASSNAME=istio
GATEWAY_NAMESPACE=istio-system
GATEWAY_NAME=istio-gateway
else
GATEWAY_CLASSNAME=nginx
GATEWAY_NAMESPACE=nginx-gateway
GATEWAY_NAME=aizen-nginx-gateway
fi
if [[ -n "$AIZEN_EXTERNAL_BASE_URL" ]]; then
GATEWAY_HOST="${AIZEN_EXTERNAL_BASE_URL#*//}"
fi
if [[ "$AUTH_TYPE" = "ldap" ]]; then
LDAP_SERVER_HOST="ldap://aizen-openldap-service.aizen-infra.svc.cluster.local:1389"
LDAP_BIND_DN="uid={username}\,ou=users\,dc=aizencorp\,dc=local\,dc=com|uid={username}\,ou=people\,dc=aizencorp\,dc=local\,dc=com"
LDAP_USER_DN="ou=users\,dc=aizencorp\,dc=local\,dc=com"
LDAP_ADMIN_DN="cn=admin\,dc=aizencorp\,dc=local\,dc=com"
LDAP_ADMIN_DNPWD="admin"
LDAP_GROUP_DN="ou=groups\,dc=aizencorp\,dc=local\,dc=com"
LDAP_ALLOWED_GROUPS="cn=dbgrp\,ou=groups\,dc=aizencorp\,dc=local\,dc=com"
LDAP_SEARCH_FILTER="(uid={username})"
AIZEN_ADMIN_USER="aizenadmin"
elif [[ "$AUTH_TYPE" = "oauth" ]]; then
AUTH0_DOMAIN=
AUTH0_AUDIENCE=
AUTH0_CLIENT_ID="test"
AUTH0_CLIENT_SECRET="test"
JWT_SECRET=$AUTH0_CLIENT_SECRET
AIZEN_ADMIN_USER="aizenadmin"
fi
#PVC
MLFLOW_MYSQL_PERSISTENCE_SIZE=200Gi
PROMETHEUS_PERSISTENCE_SIZE=55Gi
GRAFANA_PERSISTENCE_SIZE=20Gi
ELASTIC_SEARCH_LOG_SIZE=55Gi
VECTORDB_PERSISTENCE_SIZE=25Gi
VAULT_PERSISTENCE_SIZE=25Gi
#You don't need to change anything below this line
kubectl get ns ${NAMESPACE} >/dev/null 2>&1 || kubectl create ns ${NAMESPACE}
helm -n $NAMESPACE install aizen-infra aizen/aizen --version $IMAGE_TAG \
--set infra.enabled=true,\
infra.kafka.kafka.global.storageClass=$STORAGE_CLASS,\
infra.prometheus-operator.kube-prometheus-stack.prometheus.prometheusSpec.storageSpec.volumeClaimTemplate.spec.storageClassName=$STORAGE_CLASS,\
infra.prometheus-operator.kube-prometheus-stack.alertmanager.alertmanagerSpec.storage.volumeClaimTemplate.spec.storageClassName=$STORAGE_CLASS,\
infra.prometheus-operator.kube-prometheus-stack.prometheus.prometheusSpec.storageSpec.volumeClaimTemplate.spec.resources.requests.storage=$PROMETHEUS_PERSISTENCE_SIZE,\
infra.prometheus-operator.kube-prometheus-stack.grafana.persistence.size=$GRAFANA_PERSISTENCE_SIZE,\
infra.mlflow.mysql.primary.persistence.storageClass=$STORAGE_CLASS,\
infra.mlflow.mysql.primary.persistence.size=$MLFLOW_MYSQL_PERSISTENCE_SIZE,\
global.mlflow.artifact.region=$MLFLOW_ARTIFACT_REGION,\
global.mlflow.artifact.secrets.values.mlflow_access_key_id=$MLFLOW_ACCESSKEY_ID,\
global.mlflow.artifact.secrets.values.mlflow_access_secret_key=$MLFLOW_SECRET_KEY,\
global.mlflow.artifact.secrets.values.mlflow_endpoint_url=$MLFLOW_ENDPOINT_URL,\
global.mlflow.artifact.secrets.values.mlflow_artifacts_destination=$MLFLOW_ARTIFACT_DESTINATION,\
global.ingress.enabled=$INGRESS_ENABLED,\
global.gateway.enabled=$GATEWAY_ENABLED,\
global.gateway.classname=$GATEWAY_CLASSNAME,\
global.gateway.name=$GATEWAY_NAME,\
global.gateway.namespace=$GATEWAY_NAMESPACE,\
global.gateway.host=$GATEWAY_HOST,\
global.image_registry=$IMAGE_REPO,\
global.storage_class=$STORAGE_CLASS,\
global.image_secret=$IMAGE_REPO_SECRET,\
global.image_tag=$IMAGE_TAG,\
global.ingress.host=$INGRESS_HOST,\
global.log.volume_size=$ELASTIC_SEARCH_LOG_SIZE,\
global.clustername=$CLUSTER_NAME,\
global.s3.endpoint_url=$CLOUD_ENDPOINT_URL,\
global.s3.secrets.values.s3_access_key=$CLOUD_ACCESSKEY_ID,\
global.s3.secrets.values.s3_secret_key=$CLOUD_SECRET_KEY,\
global.customer_bucket_name=$BUCKET_NAME,\
global.secure_https=$SECURE_HTTPS,\
global.label_keyname=$NODESELECTOR_LABEL_NAME,\
global.label_keyvalue=$NODESELECTOR_LABEL_VALUE,\
infra.vectordb.vectordb.primary.persistence.size=$VECTORDB_PERSISTENCE_SIZE,\
infra.hashicorp-vault.enabled=false,\
global.s3.azure.enabled=true,\
global.s3.azure.values.storage_account_name=$STORAGE_ACCOUNT_NAME,\
global.s3.azure.values.storage_access_key=$CLOUD_ACCESSKEY_ID,\
global.s3.azure.values.storage_connection_string=$CLOUD_SECRET_KEY,\
global.mlflow.artifact.secrets.values.mlflow_endpoint_url=https://$STORAGE_ACCOUNT_NAME.blob.core.windows.net,\
global.mlflow.artifact.secrets.values.mlflow_artifacts_destination=wasbs://${STORAGE_CONTAINER_NAME}@${STORAGE_ACCOUNT_NAME}.blob.core.windows.net/${MLFLOW_ARTIFACT_DESTINATION}
Check the status of all infrastucture components
kubectl -n aizen-infra get pods
For any reason if any of the components are not in Running state please check troubleshooting section