Kubernetes
The Appsmith Business Edition (BE) Helm chart installation supports Horizontal Pod Auto Scaling (HPA), allowing Appsmith pods to scale automatically based on the current load. Additionally, this means that Appsmith pods are managed using a Kubernetes deployment resource instead of a stateful-set resource. Follow this guide to upgrade the Kubernetes installation from Community Edition (CE) to Business Edition (BE).
Generate license key
Sign up on customer.appsmith.com and generate a trial license key.
Backup data
Connect to the shell of a running container:
kubectl exec -it <pod> bash
Run the backup command:
appsmithctl backup
Once the backup process is complete, the backup archive is available at
/appsmith-stacks/data/backup/
To download the backup archive, run the following command:
kubectl cp <namespace>/appsmith-0:<backup_path> ./<name_of_backup_file>
To retrieve the salt and password from the pod, run the following command and copy the values to
values.yaml
.kubectl exec <pod_name> -- grep /appsmith-stacks/configuration/docker.env APPSMITH_ENCRYPTION_
Set the values in the
applicationConfig
section:APPSMITH_ENCRYPTION_PASSWORD: "<PASSWORD>"
APPSMITH_ENCRYPTION_SALT: "<SALT>"
Uninstall Community Edition Helm chart
To uninstall the CE helm chart, run the following command:
helm uninstall appsmith
Configure parameters
To ensure that the Appsmith Business Edition Helm chart runs, you need to make some changes to the values.yaml
file. Follow the steps below to configure parameters:
Add the following snippet to the bottom of your
values.yaml
file. This snippet enables PostgreSQL.postgresql:
enabled: true
auth:
username: root
password: "<PASSWORD>"
postgresPassword: "<POSTGRESQL_PASSWORD>"
database: keycloakIf present, remove the highlighted lines, regardless of their value.
image:
registry: anything
repository: anything
pullPolicy: Always
tag: "latest"To configure high availability, choose or create a shared file system. For more information, see Create a shared file system.
Add variables related to keycloak to
applicationConfig
section:APPSMITH_KEYCLOAK_DB_DRIVER: ""
APPSMITH_KEYCLOAK_DB_USERNAME: ""
APPSMITH_KEYCLOAK_DB_PASSWORD: ""
APPSMITH_KEYCLOAK_DB_URL: ""
APPSMITH_KEYCLOAK_DB_NAME: "keycloak"
Install Business Edition Helm chart
To add and deploy the new Helm chart, run the following command:
helm repo add appsmith-ee https://helm-ee.appsmith.com
helm repo update
helm install appsmith appsmith-ee/appsmith -n <namespace> -f values.yaml
For more information, see installing Business Edition with Kubernetes.
Restore backup
To restore the backup, follow the below steps:
To copy the Appsmith backup into the new Appsmith pod, run the following command:
kubectl cp ./<name_of_backup_file> <namespace>/<pod>:/appsmith-stacks/data/backup/
To copy the keycloak backup into the new Appsmith pod, run the following command:
kubectl cp keycloak_bkp.json <namespace>/<pod_name>:/appsmith-stacks/data/
To restore Appsmith data, run the following command:
kubectl exec -it <namespace>/<pod_name> -- appsmithctl restore
Once the data is restored, the pod restarts automatically.
To restore the keycloak data, run the following command:
kubectl exec -it <namespace>/<pod_name> -- /bin/sh /opt/keycloak/bin/standalone.sh -b 0.0.0.0 -Djboss.socket.binding.port-offset=1 -Dkeycloak.migration.action=import -Dkeycloak.migration.provider=singleFile -Dkeycloak.migration.file=/appsmith-stacks/data/keycloak_bkp.json -Dkeycloak.migration.strategy=OVERWRITE_EXISTING
Monitor the output as shown below:
08:20:54,708 INFO [org.keycloak.services] (ServerService Thread Pool -- 54) KC-SERVICES0030: Full model import requested. Strategy: OVERWRITE_EXISTING
08:20:54,708 INFO [org.keycloak.exportimport.singlefile.SingleFileImportProvider] (ServerService Thread Pool -- 54) Full importing from file /appsmith-stacks/data/keycloak_bkp.json
08:20:54,715 INFO [org.keycloak.exportimport.util.ImportUtils] (ServerService Thread Pool -- 54) Realm 'master' already exists. Removing it before import
08:20:59,160 INFO [org.keycloak.exportimport.util.ImportUtils] (ServerService Thread Pool -- 54) Realm 'master' imported
08:21:01,704 INFO [org.keycloak.exportimport.util.ImportUtils] (ServerService Thread Pool -- 54) Realm 'appsmith' imported
08:21:01,794 INFO [org.keycloak.services] (ServerService Thread Pool -- 54) KC-SERVICES0032: Import finished successfullyWhen you see the output, press Ctrl+c to stop.
To apply the changes, restart using the following command:
kubectl rollout restart deployment/appsmith -n <namespack>
Congratulations, you have successfully upgraded to the Appsmith Business Edition Helm chart v2 installation.
Enter license key
Sign in to your instance again. On successful login, you see a screen where you can enter the license key and activate the instance.
If you’re having issues with the deployment, please reach out on Discord Server or send email to support or ask questions on the community forum.