-
Notifications
You must be signed in to change notification settings - Fork 244
fix: Workflow Postgres #2913
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix: Workflow Postgres #2913
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,126 @@ | ||||||
# Deploy Appsmith as a Non-Root User on Kubernetes | ||||||
|
||||||
This page shows you how to deploy Appsmith as a non-root user on a Kubernetes cluster. Running containers as non-root enhances security and is often required by organizational or platform policies. This setup works on clusters like KIND, Minikube, EKS, or GKE. It does not cover Docker-based deployments. | ||||||
|
||||||
## Prerequisites | ||||||
|
||||||
- A running Kubernetes cluster (KIND, Minikube, or any cloud-based Kubernetes provider) | ||||||
- `kubectl` and `helm` installed and configured | ||||||
- Access to Docker Hub or a compatible container registry | ||||||
- (Optional) [External PostgreSQL](/getting-started/setup/instance-configuration/external-postgresql-rds) and [Redis](/getting-started/setup/instance-configuration/external-redis) instances, if you prefer not to use Helm-managed services | ||||||
|
||||||
## Configure Pull Secret and Helm Values | ||||||
|
||||||
Set up the image pull secret and define Helm chart values to deploy Appsmith securely as a non-root user. | ||||||
|
||||||
|
||||||
1. Create a DockerHub image pull secret to access the Appsmith image: | ||||||
|
||||||
<dd> | ||||||
|
||||||
```bash | ||||||
kubectl create secret docker-registry dockerhub \ | ||||||
--docker-username=<your-username> \ | ||||||
--docker-password=<your-password> \ | ||||||
--docker-email=<your-email> | ||||||
``` | ||||||
|
||||||
</dd> | ||||||
|
||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove 12-28 and replace it with the above line |
||||||
2. Prepare a `values.yaml` file with the following configuration to run Appsmith as a non-root user: | ||||||
|
||||||
<dd> | ||||||
|
||||||
```yaml | ||||||
_image: | ||||||
repository: appsmith/appsmith-ee | ||||||
tag: latest | ||||||
pullPolicy: Always | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't need the |
||||||
|
||||||
image: | ||||||
pullSecrets: dockerhub | ||||||
|
||||||
mongodb: | ||||||
enabled: true | ||||||
|
||||||
redis: | ||||||
enabled: true | ||||||
|
||||||
postgresql: | ||||||
enabled: true | ||||||
|
||||||
podSecurityContext: | ||||||
fsGroup: 1001 | ||||||
sysctls: | ||||||
- name: net.ipv4.ip_unprivileged_port_start | ||||||
value: "80" | ||||||
|
||||||
securityContext: | ||||||
runAsNonRoot: true | ||||||
runAsUser: 1001 | ||||||
runAsGroup: 1001 | ||||||
fsGroup: 1001 | ||||||
seccompProfile: | ||||||
type: RuntimeDefault | ||||||
|
||||||
applicationConfig: | ||||||
LD_PRELOAD: /usr/local/lib/libnss_wrapper.so | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is automatically handled by the Helm chart now. No need to set it explicitly. You can drop these two lines. |
||||||
``` | ||||||
|
||||||
</dd> | ||||||
|
||||||
## Install Appsmith with Helm | ||||||
|
||||||
Install Appsmith using Helm and verify that the application is running successfully in your Kubernetes cluster. | ||||||
|
||||||
1. Add the Appsmith Helm repository and install the chart using your customized `values.yaml` file: | ||||||
|
||||||
<dd> | ||||||
|
||||||
```bash | ||||||
helm repo add appsmith https://helm.appsmith.com | ||||||
helm repo update | ||||||
|
||||||
helm install appsmith appsmith/appsmith \ | ||||||
-f values.yaml | ||||||
``` | ||||||
|
||||||
</dd> | ||||||
|
||||||
2. To test the deployment, wait for all pods to reach the Running state: | ||||||
|
||||||
<dd> | ||||||
|
||||||
```bash | ||||||
kubectl get pods | ||||||
``` | ||||||
|
||||||
Then, check if the Appsmith service is accessible: | ||||||
|
||||||
```bash | ||||||
kubectl port-forward service/appsmith 8080:80 | ||||||
``` | ||||||
|
||||||
Open `http://localhost:8080` in your browser. You should see the Appsmith setup screen. | ||||||
|
||||||
</dd> | ||||||
|
||||||
3. For best security practices, make sure Appsmith is running with the following container settings: | ||||||
|
||||||
<dd> | ||||||
|
||||||
- Runs as a non-root user (`runAsNonRoot: true`) | ||||||
- Uses a fixed `runAsUser`, `runAsGroup`, and `fsGroup` (all set to `1001`) | ||||||
- Enables `seccompProfile: RuntimeDefault `for syscall filtering | ||||||
- Applies `net.ipv4.ip_unprivileged_port_start` sysctl so Appsmith can bind to ports `<1024` without root access | ||||||
|
||||||
|
||||||
|
||||||
</dd> | ||||||
|
||||||
|
||||||
:::note | ||||||
- MongoDB, Redis, and PostgreSQL are enabled and managed via Helm | ||||||
|
||||||
- Ensure the image pull secret is created beforehand and correctly referenced in values.yaml | ||||||
::: |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
# Workflow Errors | ||
|
||
Appsmith workflows allow you to build backend logic visually. If your workflow isn't working as expected, this guide will help you troubleshoot and resolve common setup or connectivity issues. | ||
|
||
|
||
## Workflow Setup Requirements | ||
|
||
If you’re encountering issues with workflows not running or triggering, start by reviewing the following setup checklist. These are required for workflows to function correctly in Appsmith. | ||
|
||
1. **Verify PostgreSQL is configured and accessible**: | ||
|
||
<dd> | ||
|
||
Appsmith requires a PostgreSQL database for all setups. | ||
|
||
- Supported versions: 13 to 16 | ||
- Version 17 is not supported | ||
|
||
See [how to configure PostgreSQL](https://docs.appsmith.com/getting-started/setup/instance-configuration/external-postgresql-rds). | ||
|
||
</dd> | ||
|
||
|
||
2. **Use external PostgreSQL for ECS or Kubernetes**: | ||
|
||
<dd> | ||
|
||
If you’re deploying Appsmith on ECS or Kubernetes, you must use an external PostgreSQL instance (e.g., AWS RDS). The embedded PostgreSQL database is not suitable for production or containerized environments. | ||
Check failure on line 28 in website/docs/help-and-support/troubleshooting-guide/action-errors/workflow-errors.md
|
||
|
||
</dd> | ||
|
||
|
||
3. **Confirm Temporal and RTS services are running**: | ||
|
||
<dd> | ||
|
||
Workflows depend on the following services: | ||
|
||
- Temporal for workflow execution | ||
|
||
- RTS (Real-Time Service) for triggering and communication | ||
|
||
- Make sure both services are running and healthy: | ||
|
||
- For Docker: Run `docker ps` to confirm containers are up | ||
|
||
- For Kubernetes: Use `kubectl get pods` to check pod status | ||
|
||
[See required services for self-hosted Appsmith](/getting-started/setup/instance-configuration). | ||
|
||
</dd> | ||
|
||
## Common Workflow Errors | ||
|
||
If the required services are set up correctly and you're still experiencing issues, review the following common workflow errors and their resolutions. | ||
|
||
### Workflow not triggering | ||
|
||
|
||
<Message | ||
messageContainerClassName="error" | ||
messageContent="Workflow failed to start. Temporal client is not connected."/> | ||
|
||
|
||
This error occurs when the Temporal service is unavailable or not connected to the Appsmith instance. | ||
|
||
**Resolution:** | ||
|
||
- Ensure the Temporal service is running. | ||
- For Docker: Run `docker ps` and check that the `temporal` container is listed. | ||
- For Kubernetes: Run `kubectl get pods` and verify the Temporal pod is running and healthy. | ||
- Check Temporal logs for startup or connectivity issues. | ||
- Restart the Temporal service if needed. | ||
|
||
--- | ||
|
||
### Real-time service not responding | ||
|
||
|
||
<Message | ||
messageContainerClassName="error" | ||
messageContent="Failed to start workflow. RTS service is not responding."/> | ||
|
||
|
||
This error indicates that the RTS (Real-Time Service) is not running or not communicating with the Appsmith server. | ||
|
||
**Resolution:** | ||
|
||
- Confirm that the RTS service is running. | ||
- For Docker: Run `docker ps` and look for the `rts` container. | ||
- For Kubernetes: Run `kubectl get pods` and ensure the RTS pod is running. | ||
- Check RTS logs for connection errors. | ||
- Ensure network access between RTS, Appsmith server, and Temporal. | ||
|
||
### Payload too large | ||
|
||
|
||
<Message | ||
messageContainerClassName="error" | ||
messageContent="Workflow execution failed: Payload size exceeds allowed limit."/> | ||
|
||
|
||
This error is triggered when the data passed into a workflow exceeds the supported payload size. | ||
|
||
**Resolution:** | ||
|
||
- Avoid sending large data blobs (e.g., files, large arrays) directly into workflows. | ||
Check failure on line 107 in website/docs/help-and-support/troubleshooting-guide/action-errors/workflow-errors.md
|
||
- Instead, store large data in external services like S3 or a database, and pass only a reference (e.g., URL or ID) into the workflow. | ||
Check failure on line 108 in website/docs/help-and-support/troubleshooting-guide/action-errors/workflow-errors.md
|
||
|
||
|
||
### Temporal migration failure (rare) | ||
|
||
|
||
<Message | ||
messageContainerClassName="error" | ||
messageContent="Temporal schema migration failed. See logs for details."/> | ||
|
||
|
||
This is an uncommon error that may occur during upgrades if the Temporal database schema is not updated properly. | ||
|
||
**Resolution:** | ||
|
||
- Review the Temporal migration logs to identify the issue. | ||
- Follow the correct upgrade steps for Temporal. | ||
- If the issue persists, reset the Temporal schema in a non-production environment to test. | ||
|
||
If you've verified the setup and reviewed the common errors but are still facing issues, please [get in touch with Appsmith Support](/product/support) with relevant logs and configuration details. | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While doing this is highly recommended and good practice, it's not unique to non-root setup. What do you think @pratapaprasanna should we just have a separate doc on this?