Unverified Commit 6c02a73f authored by Diego Sampaio's avatar Diego Sampaio Committed by GitHub
Browse files

Micro services improvements (#1827)

parent 888e978f
# Microservices Setup \[beta\]
{% hint style="info" %}
This guide is currently only valid for a special distribution of the Rocket.Chat.
This guide is currently only valid for a special distribution of the Rocket.Chat.
The feature will be release for **General Availability** on the **Enterprise Edition v4.0**
{% endhint %}
......@@ -16,6 +16,15 @@ The feature will be release for **General Availability** on the **Enterprise Edi
* Rocket.Chat
* The setting **Use REST instead of websocket for Meteor calls** under _Admin > General > REST API_, _must_ be **enabled**.
The following environment variables should be set for Rocket.Chat services as well:
| Variable | Value | Description |
| :--- | :--- | :--- |
| `TRANSPORTER` | `nats://nats:4222` | NATS address
| `DISABLE_WATCH_DB` | `true` | Disables internal DB watcher and rely on `mongodb-stream-hub`
| `DISABLE_PRESENCE_MONITOR` | `true` | Disables precense monitoring and rely on the `presence-service`
| `INTERNAL_SERVICES_ONLY` | `true` | Do not run external services on rocket.chat process
### Micro services
Rocket.Chat micro services are composed by a few Docker containers:
......@@ -35,7 +44,7 @@ docker run \
--name accounts-service \
-e MONGO_URL=mongodb://mongo/rocketchat?replicaSet=rs01 \
-e TRANSPORTER=nats://nats:4222 \
registry.rocket.chat/microservices_accounts-service:latest
rocketchat/account-service:latest
```
#### Authorization
......@@ -51,7 +60,7 @@ docker run \
--name authorization-service \
-e MONGO_URL=mongodb://mongo/rocketchat?replicaSet=rs01 \
-e TRANSPORTER=nats://nats:4222 \
registry.rocket.chat/microservices_authorization-service:latest
rocketchat/authorization-service:latest
```
#### DDP Streamer
......@@ -67,7 +76,7 @@ docker run \
--name ddp-streamer \
-e MONGO_URL=mongodb://mongo/rocketchat?replicaSet=rs01 \
-e TRANSPORTER=nats://nats:4222 \
registry.rocket.chat/microservices_ddp-streamer:latest
rocketchat/ddp-streamer-service:latest
```
#### MongoDB Stream Hub
......@@ -79,7 +88,7 @@ docker run \
--name mongodb-stream-hub \
-e MONGO_URL=mongodb://mongo/rocketchat?replicaSet=rs01 \
-e TRANSPORTER=nats://nats:4222 \
registry.rocket.chat/microservices_mongodb-stream-hub:latest
rocketchat/stream-hub-service:latest
```
#### Presence
......@@ -95,9 +104,18 @@ docker run \
--name presence-service \
-e MONGO_URL=mongodb://mongo/rocketchat?replicaSet=rs01 \
-e TRANSPORTER=nats://nats:4222 \
registry.rocket.chat/microservices_presence-service:latest
rocketchat/presence-service:latest
```
#### Environment variables common to all services
Set the following environment variables to enable Prometheus metrics:
| Variable | Default | Description |
| :--- | :--- | :--- |
| `MS_METRICS` | `false` | Enable Prometheus metrics endpoint
| `MS_METRICS_PORT` | `9458` | Port of Prometheus metrics endpoint
### Reverse proxy
Once all services are up and running the web socket connections should be targeted to "ddp-streamer" containers, the configuration depends on the reverse proxy you have set up, but you need to change the following routes:
......@@ -122,4 +140,3 @@ spec:
servicePort: 3000
path: /(sockjs|websocket)
```
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment