This repo contains the HELM package for Indexity platform deployment on a Kubernetes cluster.
IMPORTANT: This documentation assumes that you've already setup a Kubernetes cluster, configured kubectl and installed HELM v3
If it's not the case, please refer to CLUSTER_SETUP.md before proceeding.
Create dev
and prod
namespaces:
kubectl create namespace indexity-dev
kubectl create namespace indexity-prod
helm install nginx-ingress stable/nginx-ingress
export DB_VOLUME_PATH="/path/dev/indexity-db_data"
export API_VOLUME_PATH="/path/dev/indexity-storage"
export DOMAIN="dev.indexity.local"
helm install indexity-dev . \
--namespace indexity-dev \
--set env=production \
--set domainName=${DOMAIN} \
--set dbVolumeMountPath=${DB_VOLUME_PATH} \
--set apiVolumeMountPath=${API_VOLUME_PATH} \
--set indexityUiImage.apiConfigBaseUrl=https://api.dev.indexity.local \
--set indexityUiImage.socketConfigBaseUrl=https://api.dev.indexity.local \
--set indexityUiImage.jwtSettingsWhitelistedDomains=api.dev.indexity.local \
--set indexityApiImage.enableSwagger=true \
--set indexityApiImage.adminEmail=<put-admin-email-here> \
--set indexityApiImage.mailFrom=<mail_from> \
--set postfixImage.smtpServer=<put-smtp-host-here> \
--set postfixImage.smtpPort=<put-smtp-port-here> \
--set postfixImage.username=<put-smtp-username-here> \
--set postfixImage.password=<put-smtp-password-here> \
--set postfixImage.serverHostname=<put-hostname-here> \
--set postfixImage.overwriteFrom=<put-overwrite-from-here> \
--set postfixImage.senderCanonical=<put-sender-canonical-here> \
--set trackerEmail=<put-tracker-email-here> \
--set trackerPassword=<put-tracker-password-here> \
--set indexityAdminImage.apiConfigBaseUrl=https://api.dev.indexity.local \
--set indexityAdminImage.socketConfigBaseUrl=https://api.dev.indexity.local \
--set dockerConfigJson=<put-your-base64-encoded-docker-json-configuration-here>
trackerEmail and trackerPassword . |
---|
TIP: See values.yml
file for more params
export DB_VOLUME_PATH="/path/stable/indexity-db_data"
export API_VOLUME_PATH="/path/stable/indexity-storage"
export DOMAIN="indexity.local"
helm install indexity-prod . \
--namespace indexity-prod \
--set env=production \
--set domainName=${DOMAIN} \
--set dbVolumeMountPath=${DB_VOLUME_PATH} \
--set apiVolumeMountPath=${API_VOLUME_PATH} \
--set indexityUiImage.tag=1.0.0 \
--set indexityUiImage.apiConfigBaseUrl=https://api.indexity.local \
--set indexityUiImage.socketConfigBaseUrl=https://api.indexity.local \
--set indexityUiImage.jwtSettingsWhitelistedDomains=api.indexity.local \
--set indexityTrackerImage.tag=1.0.0 \
--set indexityAdminImage.tag=1.0.0 \
--set indexityApiImage.tag=1.0.0 \
--set indexityAdminImage.apiConfigBaseUrl=https://api.indexity.local \
--set indexityAdminImage.socketConfigBaseUrl=https://api.indexity.local \
--set indexityApiImage.enableSwagger=false \
--set indexityApiImage.adminEmail=<put-admin-email-here> \
--set indexityApiImage.mailFrom=<mail_from> \
--set postfixImage.smtpServer=<put-smtp-host-here> \
--set postfixImage.smtpPort=<put-smtp-port-here> \
--set postfixImage.username=<put-smtp-username-here> \
--set postfixImage.password=<put-smtp-password-here> \
--set postfixImage.serverHostname=<put-hostname-here> \
--set postfixImage.overwriteFrom=<put-overwrite-from-here> \
--set postfixImage.senderCanonical=<put-sender-canonical-here> \
--set trackerEmail=<put-tracker-email-here> \
--set trackerPassword=<put-tracker-password-here> \
--set dockerConfigJson=<put-your-base64-encoded-docker-json-configuration-here>
trackerEmail and trackerPassword . |
---|
If files in the HELM package changed, you can update the deployment by using helm upgrade ...
instead of helm install ...
Example:
export DB_VOLUME_PATH="/path/dev/indexity-db_data"
export API_VOLUME_PATH="/path/dev/indexity-storage"
export DOMAIN="dev.indexity.local"
helm upgrade indexity-dev . \
--namespace indexity-dev \
--set env=production \
--set domainName=${DOMAIN} \
--set dbVolumeMountPath=${DB_VOLUME_PATH} \
--set apiVolumeMountPath=${API_VOLUME_PATH} \
--set indexityUiImage.apiConfigBaseUrl=https://api.dev.indexity.local
--set indexityUiImage.socketConfigBaseUrl=https://api.dev.indexity.local
--set indexityUiImage.jwtSettingsWhitelistedDomains=api.dev.indexity.local
--set indexityApiImage.enableSwagger=true \
--set indexityApiImage.adminEmail=<put-admin-email-here> \
--set indexityApiImage.mailFrom=<mail_from> \
--set postfixImage.smtpServer=<put-smtp-host-here> \
--set postfixImage.smtpPort=<put-smtp-port-here> \
--set postfixImage.username=<put-smtp-username-here> \
--set postfixImage.password=<put-smtp-password-here> \
--set postfixImage.serverHostname=<put-hostname-here> \
--set postfixImage.overwriteFrom=<put-overwrite-from-here> \
--set postfixImage.senderCanonical=<put-sender-canonical-here> \
--set trackerEmail=<put-tracker-email-here> \
--set trackerPassword=<put-tracker-password-here> \
--set indexityAdminImage.apiConfigBaseUrl=https://api.dev.indexity.local \
--set indexityAdminImage.socketConfigBaseUrl=https://api.dev.indexity.local \
--set dockerConfigJson=<put-your-base64-encoded-docker-json-configuration-here>
- UI (dev):
kubectl set image deployment/indexity-ui indexity-ui=IMAGE:TAG --namespace indexity-dev
- API (dev):
kubectl set image deployment/indexity-api indexity-api=IMAGE:TAG --namespace indexity-dev
TIP: to update on production just change the --namespace
arg
- Get the IP to the cluster:
kubectl get svc nginx-ingress-controller
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
nginx-ingress-controller LoadBalancer SOME_IP_ADDRESS <pending> 80:30580/TCP,443:30074/TCP 26m
In your reverse proxy (example traeffik), point requests from indexity.local
and api.indexity.local
to the CLUSTER-IP