Platform Deployment
Deploy Platform
Hint
fast_data_dir=/home/kaapana
: Location of data that do not take a lot of space and should be loaded fast. Preferably, a SSD is mounted here.slow_data_dir=/home/kaapana
: Location of huge files, like images or our object store is located here. Preferably, a HDD is mounted here.The platform is deployed using the deploy-platform-script, which you can find at kaapana/build/kaapana-admin-chart/deploy_platform.sh
.
Copy the script to your target-system (server) and adjust it as described below:
Open the
deploy_platform.sh
script on the servernano deploy_platform.sh
Have a look at the variables on top of the script. An explanation for all of the variables can be found below under Platform configuration.
You need to do at least the following customizations:
Note: If you have already built the platform, these variables should have been filled in.
...
CONTAINER_REGISTRY_URL="<registry-url>"
...
Make it executable with
chmod +x deploy_platform.sh
Execute the script:
./deploy_platform.sh
Assure yourself that you have files generated in Build Kaapana
Built images:
kaapana-admin-chart-<version>-images.tar
Chart file:
kaapana-admin-chart-<version>.tgz
Run the deployment script to import images into the microk8s registry.
./deploy_platform.sh --import-images-tar kaapana-admin-chart-<version>-images.tar
Run the deployment script with the offline flag and chart.
./deploy_platform.sh --offline --chart-path kaapana-admin-chart-<version>.tgz
You may be asked the following questions:
server domain (FQDN):
You should enter the domain, hostname or IP-address where the server is accessible from client workstations. Keep in mind, that valid SSL-certificates are only working with FQDN domains.
Enable GPU support?
Answer yes if you have a Nvidia GPU, installed drivers and enabled GPU for Microk8s.
Please enter the credentials for the Container-Registry:
Use the credentials to your own registry or the ones provided to you by the Kaapana team.
The script will stop and wait until the platform is deployed. Since all Docker containers must be downloaded, this may take some time (~15 min).
After a successful deployment you’ll get the following message:
Deployment done.
Please wait till all components have been downloaded and started.
You can check the progress with:
watch microk8s.kubectl get pods --all-namespaces
When all pod are in the "running" or "completed" state,
you can visit: <domain>
You should be welcomed by the login page.
Initial credentials:
username: kaapana
password: kaapana
Undeploy Platform
To undeploy the Kaapana platform, the kaapana-platform-chart and all related charts need to be deleted. For that, run the deployment script ./deploy_platform.sh
and choose the 2) Undeploy option.
If the undeployment fails, make sure to manually check that
All helm charts are deleted. All helm charts in Kaapana are created with the same namespace so that they are distinguished from possible other charts
helm ls -n kaapana
All pods are deleted. Kaapana uses multiple namespaces for managing deployment and pods, i.e. kaapana, flow-jobs flow, monitoring, store, meta, base
kubectl get pods -A
Hint
./deploy_platform.sh
script also has some flags that can help with failed undeployments.--no-hooks
will purge all kubernetes deployments and jobs as well as all helm charts. Use this if the undeployment fails or runs forever.--nuke-pods
will force-delete all pods of the Kaapana deployment namespaces.Platform Config
During the build process the file .kaapana/build/kaapana-admin-chart/deploy_platform.sh
is generated.
This section provides a brief explanation about the multiple variables in deploy_platform.sh
which can be changed to configure the Kaapana platform for different use cases.
Some of the variables are automatically set during the build process.
Platform and registry configurations
PLATFORM_NAME
(default: “kaapana-admin-chart”, type: string)PLATFORM_VERSION
(default: “$( git describe )”, type=string)git describe
in your kaapana repository.CONTAINER_REGISTRY_URL
(default: “”, type=string)default_registry
in your build-config.yaml
.CONTAINER_REGISTRY_USERNAME
(default: “”, type=string)include_credentials: true
in your in your build-config.yaml
.CONTAINER_REGISTRY_PASSWORD
(default: “”, type=string)include_credentials: true
in your in your build-config.yaml
.Deployment configurations
DEV_MODE
(default: “true”, type=string)imagePullPolicy: "Always"
for all kubernetes deployments and jobs. In other words, after every pod restart, associated images will be re-downloaded.imagePullPolicy: "IfNotPresent"
and several password policies will be pre-configured in keycloak.GPU_SUPPORT
(default: “false”, type=string)nvidia-smi
and set this to true if any GPUs are available.PREFETCH_EXTENSIONS
(default: “false”, type=string).kaapana/platforms/kaapana-admin-chart/deployment_config.yaml
under preinstall_extensions) along with the platform deployment.CHART_PATH
(default: “”, type=string)PREFETCH_EXTENSIONS="false"
.NO_HOOKS
(default: “”, type=string)helm uninstall
command while removing the platform chart. Only intendet non-emtpy value is "--no-hooks"
. This will disable all pre/post delete jobs.ENABLE_NFS
(default: false, tpye=bool)storageClassName: nfs
.OFFLINE_MODE
(default: false, tpye=bool)Namespace configurations
INSTANCE_UID
(default: “”, type=string)SERVICES_NAMESPACE
, JOBS_NAMESPACE
, EXTENSIONS_NAMESPACE
and HELM_NAMESPACE
. Additionally it is used as suffix for FAST_DATA_DIR
and SLOW_DATA_DIR
.SERVICES_NAMESPACE
(default: “services”, type=string)ADMIN_NAMESPACE
(default: “admin”, type=string)JOBS_NAMESPACE
(default: “jobs”, type=string)EXTENSIONS_NAMESPACE
(default: “extensions”, type=string)HELM_NAMESPACE
(default: “default”, type=string)Data configurations
FAST_DATA_DIR
(default: “/home/kaapana”, type=string)SLOW_DATA_DIR
(default: “/home/kaapana”, type=string)Credentials
Component
Username
Password
Kaapana Login
kaapana
kaapana
Keycloak Administrator
admin
Kaapana2020
Minio
kaapanaminio
Kaapana2020
Grafana
admin
admin
Hint
Login with OpenID
instead.