Skip to content

Commit 904cb77

Browse files
authored
update: wpb-22590 documentation for Fake AWS (SNS/SQS) for websocket (#98)
* update: wpb-22590 documentation for Fake AWS (SNS/SQS) for websocket-only notifications (no FCM/APNS) * document fake-aws Helm chart usage and configuration * edit the document on SQS API usage * Enhance documentation for fake-aws Helm chart usage
1 parent 4c4c4f5 commit 904cb77

2 files changed

Lines changed: 76 additions & 8 deletions

File tree

src/how-to/install/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
- [Watching changes as they happen](helm-prod.md#watching-changes-as-they-happen)
5858
- [General installation notes](helm-prod.md#general-installation-notes)
5959
- [How to install charts that provide access to external databases](helm-prod.md#how-to-install-charts-that-provide-access-to-external-databases)
60-
- [How to install fake AWS services for SNS / SQS](helm-prod.md#how-to-install-fake-aws-services-for-sns-sqs)
60+
- [Fake AWS (SNS/SQS) for websocket-only notifications (no FCM/APNS)](helm-prod.md##fake-aws-snssqs-for-websocket-only-notifications-no-fcmapns)
6161
- [Preparing to install wire-server](helm-prod.md#preparing-to-install-wire-server)
6262
- [How to install RabbitMQ](helm-prod.md#how-to-install-rabbitmq)
6363
- [How to configure real SMTP (email) services](helm-prod.md#how-to-configure-real-smtp-email-services)

src/how-to/install/helm-prod.md

Lines changed: 75 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
<a id="helm-prod"></a>
2-
31
# Installing wire-server (production) components using Helm
42

53
## Introduction
@@ -114,19 +112,89 @@ If you are using minio instead of AWS S3, you should also run:
114112
helm upgrade --install minio-external wire/minio-external -f values/minio-external/values.yaml --wait
115113
```
116114

117-
## How to install fake AWS services for SNS / SQS
115+
## Fake AWS (SNS/SQS) for websocket-only notifications (no FCM/APNS) on Android devices
118116

119117
AWS SNS is required to send notifications to clients. SQS is used to get notified of any devices that have discontinued using Wire (e.g. if you uninstall the app, the push notification token is removed, and the wire-server will get feedback for that using SQS).
120118

121-
Note: *for using real SQS for real native push notifications instead, see also :ref:\`pushsns\`.*
119+
> When native notification channels such as **APNS** (Apple Push Notification Service) and **FCM** (Firebase Cloud Messaging) are disabled, notifications can only be delivered while the Wire application **is actively connected to the server via WebSockets.**
120+
>
121+
> This means that notifications will be received **only when the application is active or running with an open WebSocket connection.** If the application has been **stopped or the connection is not active**, there will be no active WebSocket between the device and the Wire server, and therefore **notifications cannot be delivered to the device**.
122+
>
123+
> For the **Wire Android application**, there is a specific setting called **“Keep connection to websocket on”** under **Network Settings**. When this setting is enabled, the application attempts **to maintain a persistent WebSocket connection with the server even when the app is in the background**, allowing notifications to be received.
124+
>
125+
> If this setting is **disabled**, the application may consume **less battery**, but notifications will **not be received while Wire is running in the background**. This setting applies to **all Wire accounts configured on the device**.
126+
>
127+
> Check [Enable push notifications using the public appstore / playstore mobile Wire clients](infrastructure-configuration.md#enable-push-notifications-using-the-public-appstore-playstore-mobile-wire-clients) to enable FCM/APNS notifications.
122128
123129
If you use the fake-aws version, clients will use the websocket method to receive notifications, which keeps connections to the servers open, draining battery.
124130

125-
Open a terminal and run:
131+
To enable **websocket-only notifications** (no FCM/APNS), you must:
132+
133+
1. Install the fake-aws services.
134+
2. Update the `gundeck` AWS configuration in your wire-server Helm values/secrets to point at fake-aws.
135+
3. **Re-deploy the wire-server Helm chart** using the updated values.
136+
137+
### What is the [fake-aws](https://github.com/wireapp/wire-server/tree/develop/charts/fake-aws) Helm chart?
138+
139+
The fake-aws Helm chart deploys two internal services inside the Kubernetes cluster:
140+
- **fake-aws-sns** – a lightweight mock SNS service based on LocalStack. In websocket-only setups, SNS is not used for message delivery; it mainly exists so that the gundeck service has a compatible SNS endpoint available during initialization.
141+
- **fake-aws-sqs** – a dummy, ephemeral SQS service that mocks the Amazon SQS API. This service is actually used for inter-service communication, allowing components such as gundeck to process user events through an SQS-compatible interface without relying on AWS.
142+
143+
Both services include minimal initialization logic required for Wire’s internal service communication. They are not intended to replace real AWS infrastructure in production environments that use native push notifications.
144+
145+
### Why are these Helm charts required when not using APNS/FCM?
146+
147+
Even when APNS (Apple Push Notification Service) or FCM (Firebase Cloud Messaging) are not used, the `wire-server` component **gundeck** still depends on SQS APIs for handling user events.
148+
149+
In websocket-only mode, `gundeck` continues to interact with an SQS-compatible queue for event processing. Therefore, an SQS endpoint must still exist within the Kubernetes cluster. The fake-aws Helm chart provides this mocked SQS service.
150+
151+
The included SNS mock exists primarily so that gundeck can complete its startup initialization with a valid SNS endpoint, even though SNS itself is not used for message delivery in websocket-only setups.
152+
153+
#### NOTE
154+
- To enable push notifications using the public App Store / Play Store mobile Wire clients, see [Enable push notifications using the public appstore / playstore mobile Wire clients](../install/infrastructure-configuration.md#enable-push-notifications-using-the-public-appstore-playstore-mobile-wire-clients).
155+
- To read more about websockets and Wire notifications, see [Web-sockets](../../understand/overview.md#web-sockets) and [Mobile Notifications](../../understand/overview.md#mobile-notifications).
156+
157+
First, set up the fake-aws services by running:
158+
159+
```shell
160+
helm install fake-aws ./charts/fake-aws --values ./values/fake-aws/prod-values.example.yaml
161+
```
162+
163+
You can use the default values provided in the example file.
164+
165+
Next up is changing the gundeck configuration so it does not go out to live/real AWS services and goes to the fake-aws installed.
166+
167+
> **Important:** The following values must be compatible with the AWS Haskell library (amazonka) used by `gundeck`. These cannot be arbitrary strings. Even though fake-aws is used, values such as `account`, `region`, `arnEnv`, and `queueName` must be syntactically valid and well-formed so that the AWS client library can initialize properly.
168+
169+
170+
In your `values/wire-server/values.yaml`, use the following settings:
171+
172+
```yaml
173+
gundeck:
174+
config:
175+
aws:
176+
# change if using real AWS
177+
account: "123456789012"
178+
region: "eu-west-1"
179+
arnEnv: integration
180+
queueName: integration-gundeck-events
181+
sqsEndpoint: http://fake-aws-sqs:4568
182+
snsEndpoint: http://fake-aws-sns:4575
183+
```
184+
185+
For secrets, in your `values/wire-server/secrets.yaml`, set:
186+
187+
```yaml
188+
gundeck:
189+
secrets:
190+
awsKeyId: dummykey
191+
awsSecretKey: dummysecret
192+
```
193+
194+
Finally, redeploy the wire-server charts using the updated values files:
126195

127196
```shell
128-
cp values/fake-aws/prod-values.example.yaml values/fake-aws/values.yaml
129-
helm upgrade --install fake-aws wire/fake-aws -f values/fake-aws/values.yaml --wait
197+
helm upgrade --install wire-server charts/wire-server -f values/wire-server/values.yaml -f values/wire-server/secrets.yaml
130198
```
131199

132200
You should see some pods being created in your first terminal as the above command completes.

0 commit comments

Comments
 (0)