-
Notifications
You must be signed in to change notification settings - Fork 1
update: wpb-22590 documentation for Fake AWS (SNS/SQS) for websocket #98
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
Open
mohitrajain
wants to merge
1
commit into
main
Choose a base branch
from
wpb-22590-use-websockets-no-fcm-apns
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,3 @@ | ||
| <a id="helm-prod"></a> | ||
|
|
||
| # Installing wire-server (production) components using Helm | ||
|
|
||
| ## Introduction | ||
|
|
@@ -114,19 +112,60 @@ If you are using minio instead of AWS S3, you should also run: | |
| helm upgrade --install minio-external wire/minio-external -f values/minio-external/values.yaml --wait | ||
| ``` | ||
|
|
||
| ## How to install fake AWS services for SNS / SQS | ||
| ## Fake AWS (SNS/SQS) for websocket-only notifications (no FCM/APNS) | ||
|
|
||
| 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). | ||
|
|
||
| Note: *for using real SQS for real native push notifications instead, see also :ref:\`pushsns\`.* | ||
| Note: *for using real SQS for real native push notifications instead, see also :ref:`pushsns`.* | ||
|
|
||
| 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. | ||
|
|
||
| Open a terminal and run: | ||
| To enable **websocket-only notifications** (no FCM/APNS), you must: | ||
|
|
||
| 1. Install the fake-aws services. | ||
| 2. Update the `gundeck` AWS configuration in your wire-server Helm values/secrets to point at fake-aws. | ||
| 3. **Re-deploy the wire-server Helm chart** using the updated values. | ||
|
|
||
| #### NOTE | ||
| - 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). | ||
| - To read more about websockets and Wire notifications, see [Web-sockets](../../understand/overview.md#web-sockets) and [Mobile Notifications](../../understand/overview.md#mobile-notifications). | ||
|
|
||
| First, set up the fake-aws services by running: | ||
|
|
||
| ```shell | ||
| helm install fake-aws ./charts/fake-aws --values ./values/fake-aws/prod-values.example.yaml | ||
| ``` | ||
|
|
||
| You can use the default values provided in the example file. | ||
|
|
||
| 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. In your `values/wire-server/values.yaml`, use the following settings: | ||
|
|
||
| ```yaml | ||
| gundeck: | ||
| config: | ||
| aws: | ||
| # change if using real AWS | ||
| account: "123456789012" | ||
| region: "eu-west-1" | ||
| arnEnv: integration | ||
| queueName: integration-gundeck-events | ||
|
Contributor
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.
Contributor
Author
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. yes, these are value holders |
||
| sqsEndpoint: http://fake-aws-sqs:4568 | ||
| snsEndpoint: http://fake-aws-sns:4575 | ||
| ``` | ||
|
|
||
| For secrets, in your `values/wire-server/secrets.yaml`, set: | ||
|
|
||
| ```yaml | ||
| gundeck: | ||
| secrets: | ||
| awsKeyId: dummykey | ||
| awsSecretKey: dummysecret | ||
| ``` | ||
|
|
||
| Finally, redeploy the wire-server charts using the updated values files: | ||
|
|
||
| ```shell | ||
| cp values/fake-aws/prod-values.example.yaml values/fake-aws/values.yaml | ||
| helm upgrade --install fake-aws wire/fake-aws -f values/fake-aws/values.yaml --wait | ||
| helm upgrade --install wire-server charts/wire-server -f values/wire-server/values.yaml -f values/wire-server/secrets.yaml | ||
| ``` | ||
|
|
||
| You should see some pods being created in your first terminal as the above command completes. | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
May be its a good idea to put some context why
mustand what does the fakeAWS do here? (i.e, for initialization of the gundeck service by design)