Skip to content
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

docs(installation): Add post install instructions for NATS replication #2455

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,23 @@ metadata:
nginx.org/websocket-services: mender-api-gateway
```

## Create the admin user
## Post-installation setup

### Enable replication for NATS Jetstream (Recommended)
For production setup that require high availablility, we recommend enabling replication for the NATS Jetstream work queues.
By default, NATS deploys 3 replicas, but the stream created by the workflows service does not have replication enabled and therefore has no fault tolerance.
The following snippet increases the number of replicas to 3.

!!!! Please replace `NATS_URL` in the following snippet with a URL that resolves to any of the NATS pods.

```bash
NATS_URL="nats://mender-nats" # REPLACE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
NATS_URL="nats://mender-nats" # REPLACE
NATS_URL="nats://mender-nats" # set to your own nats URL

kubectl run --env=NATS_URL=$NATS_URL --image=natsio/nats-box:0.14.5-nonroot \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
kubectl run --env=NATS_URL=$NATS_URL --image=natsio/nats-box:0.14.5-nonroot \
kubectl run --env=NATS_URL='$NATS_URL" --image=natsio/nats-box:0.14.5-nonroot \

nats-increase-replicas -- \
nats stream edit WORKFLOWS --force --replicas=3
```

### Create the admin user

[ui-tabs position="top-left" active="0" theme="default" ]
[ui-tab title="Open Source"]
Expand Down