Kubernetes
The Business Edition (BE) Helm chart installation includes support for Horizontal Pod Auto Scaling (HPA), which allows 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 from the Community Edition (CE) to the Business Edition (BE) installed on Kubernetes.
Backup data
Open a shell into one of your current Appsmith pods:
kubectl exec -it <pod> bash
Run the backup command:
appsmithctl backup
Once the backup process is complete, the backup archive is available at a location like this:
/appsmith-stacks/data/backup/appsmith-backup-2022-10-24T07-09-56.930Z.tar.gz
To download the backup archive, run the following command:
kubectl cp <namespace>/appsmith-0:<backup_path_from_above> ./appsmith-ce-backup.tar.gz
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 CE Helm chart
To uninstall the CE helm chart, run the following command:
helm uninstall appsmith
Configure parameters
To ensure that the 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 the license key and a few other variables related to keycloak to
applicationConfig
section:APPSMITH_LICENSE_KEY: ""
APPSMITH_KEYCLOAK_DB_DRIVER: ""
APPSMITH_KEYCLOAK_DB_USERNAME: ""
APPSMITH_KEYCLOAK_DB_PASSWORD: ""
APPSMITH_KEYCLOAK_DB_URL: ""
APPSMITH_KEYCLOAK_DB_NAME: "keycloak"
Install BE 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-ee -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 appsmith-backup-2022-10-24T07-09-56.930Z.tar.gz <namespace>/<pod_name>:/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, as shown above, 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.
Troubleshooting
If you’re having issues with the deployment, please see the debugging deployment errors troubleshooting guide. If you continue to have problems reach out on Discord Server or send an email to support or ask questions on the community forum.