Install Superset
Expertflow CX uses Apache Superset for historical reports.
Deploy Superset on a dedicated node for a production deployment.
Superset will be deployed in
ef-bi
namespace. Run the following command on the master node.CODEkubectl create namespace ef-bi
Create image pull secret for
ef-bi
namespace.CODEkubectl apply -f pre-deployment/registryCredits/ef-imagePullSecret-ef-bi.yaml
Run the following command to install Superset.
CODEhelm upgrade --install=true --wait=true --timeout=10m0s --debug --namespace=ef-bi --values external/superset/values.yaml superset external/superset/
Please wait for sometime to settle down the deployment, before executing port patching commands below.
Accessing the Superset
Superset can be accessed by two menthods
nodePort , this method gives access to Superset using node-ip:port where node-ip is any of the worker nodes and port range is extracted in next steps.
FQDN. For accessing the superset using FQDN, a separate FQDN is required.
Superset on nodePort
Expose the Superset service from ClusterIP to NodePort by running the following command
kubectl patch svc superset -n ef-bi --type='json' -p '[{"op":"replace","path":"/spec/type","value":"NodePort"}]'
Run the following command to see the higher port that is assigned to Superset.
CODEkubectl -n ef-bi get svc superset -o go-template='{{(index .spec.ports 0).nodePort}}';echo;
Now you can access the Superset on this port on any node.
Superset on FQDN
Run the following command to change subdomain name:
CODEsed -i 's/devops[0-9]*.ef.com/<subdomain.ef.com>/g' cim/Ingresses/nginx/ef-superset-Ingress.yaml
Apply the superset Ingress Route.
CODEkubectl apply -f cim/Ingresses/nginx/ef-superset-Ingress.yaml
please modify the <FQDN> with your current fqdn before applying the following command.
To use a self-signed certificate , generate csr and key files. If using commerical SSL certificate, skip to next step.
BASHopenssl req -x509 \ -newkey rsa:4096 \ -sha256 \ -days 3650 \ -nodes \ -keyout <subdomain>.key \ -out <subdomain>.crt \ -subj "/CN=<subdomain>" \ -addext "subjectAltName=DNS:www.<subdomain>,DNS:<subdomain>"
Now generate a secret with the certificate files. You must have subdomain.key and subdomain.crt files available on the machine and in the correct directory. Substitute with your own cert and key file for commercial SSL certificate.
CODEkubectl -n ef-bi create secret tls ef-ingress-tls-secret-superset \ --key pre-deployment/certificates/server.key \ --cert pre-deployment/certificates/server.crt