You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/services/general-info/registry.md
+17-10Lines changed: 17 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -10,30 +10,37 @@ geekdocCollapseSection: true
10
10
11
11
To be able to communicate with each other, services need to register in a common registry.
12
12
13
+
{{< toc >}}
14
+
13
15
## Configuration
14
16
15
17
The type of registry to use can be configured with the `MICRO_REGISTRY` environment variable. Supported values are:
16
18
17
-
### `memory`
18
-
19
-
Setting the environment variable to `memory` starts an in-memory registry. This only works with the single binary deployment.
20
-
21
19
### `nats-js-kv` (Default)
22
20
23
21
Set the environment variable to `nats-js-kv` or leave it empty to use a nats-js key value store as registry.
22
+
24
23
- Note: If not running build-in nats, `MICRO_REGISTRY_ADDRESS` needs to be set to the address of the nats-js cluster, which is the same value as `OCIS_EVENTS_ENDPOINT`.
25
24
- Optional: Use `MICRO_REGISTRY_AUTH_USERNAME` and `MICRO_REGISTRY_AUTH_PASSWORD` to authenticate with the nats cluster.
25
+
26
26
### `kubernetes`
27
27
28
-
When deploying in a kubernetes cluster, the kubernetes registry can be used. Additionally, the `MICRO_REGISTRY_ADDRESS` environment
29
-
variable needs to be set to the url of the kubernetes registry.
28
+
When deploying in a kubernetes cluster, the Kubernetes registry can be used. Additionally, the `MICRO_REGISTRY_ADDRESS` environment variable needs to be set to the url of the Kubernetes registry.
29
+
30
+
### `memory`
31
+
32
+
Setting the environment variable to `memory` starts an in-memory registry. This only works with the single binary deployment.
30
33
31
34
### Deprecated Registries
32
35
33
36
These registries are currently working but will be removed in a later version. It is recommended to switch to a supported one.
34
37
35
-
-`nats`. Uses a registry based on nats streams. Requires `MICRO_REGISTRY_ADDRESS` to be set.
36
-
-`etcd`. Uses an etcd cluster as the registry. Requires `MICRO_REGISTRY_ADDRESS` to be set.
37
-
-`consul`. Uses `HashiCorp Consul` as registry. Requires `MICRO_REGISTRY_ADDRESS` to be set.
38
-
-`mdns`. Uses multicast dns for registration. This type can have unwanted side effects when other devices in the local network use mdns too.
38
+
-`nats`\
39
+
Uses a registry based on nats streams. Requires `MICRO_REGISTRY_ADDRESS` to be set.
40
+
-`etcd`\
41
+
Uses an etcd cluster as the registry. Requires `MICRO_REGISTRY_ADDRESS` to be set.
42
+
-`consul`\
43
+
Uses `HashiCorp Consul` as registry. Requires `MICRO_REGISTRY_ADDRESS` to be set.
44
+
-`mdns`\
45
+
Uses multicast dns for registration. This type can have unwanted side effects when other devices in the local network use mdns too.
Copy file name to clipboardExpand all lines: ocis/README.md
+7-11Lines changed: 7 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -1,26 +1,22 @@
1
1
# ocis
2
2
3
-
The ocis package contains the Infinite Scale runtime and the commands for the Infinite Scale cli.
3
+
The ocis package contains the Infinite Scale runtime and the commands for the Infinite Scale CLI.
4
4
5
-
## Service registry
5
+
## Service Registry
6
6
7
-
This package also configures the service registry which will be used to look up the service addresses. It defaults to mDNS. Keep that in mind when using systems with mDNS disabled by default (i.e. SUSE).
7
+
This package also configures the service registry which will be used to look up the service addresses.
8
8
9
9
Available registries are:
10
10
11
-
- nats
11
+
- nats-js-kv (default)
12
12
- kubernetes
13
-
- etcd
14
-
- consul
15
13
- memory
16
-
- mdns (default)
14
+
- etcd (deprecated)
15
+
- consul (deprecated)
16
+
- mdns (deprecated)
17
17
18
18
To configure which registry to use, you have to set the environment variable `MICRO_REGISTRY`, and for all except `memory` and `mdns` you also have to set the registry address via `MICRO_REGISTRY_ADDRESS`.
19
19
20
-
### etcd
21
-
22
-
To authenticate the connection to the etcd registry, you have to set `ETCD_USERNAME` and `ETCD_PASSWORD`.
23
-
24
20
## Memory limits
25
21
26
22
oCIS will automatically set the go native `GOMEMLIMIT` to `0.9`. To disable the limit set `AUTOMEMEMLIMIT=off`. For more information take a look at the official [Guide to the Go Garbage Collector](https://go.dev/doc/gc-guide).
Copy file name to clipboardExpand all lines: services/nats/README.md
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,16 @@ The nats service is the event broker of the system. It distributes events among
4
4
5
5
Services can `Publish` events to the nats service and nats will store these events on disk and distribute these events to other services eventually. Services can `Consume` events from the nats service by registering to a `ConsumerGroup`. Each `ConsumerGroup` is guaranteed to get each event exactly once. In most cases, each service will register its own `ConsumerGroup`. When there are multiple instances of a service, those instances will usually use that `ConsumerGroup` as common resource.
6
6
7
-
## Underlying technology
7
+
## Underlying Technology
8
8
9
9
As the service name suggests, this service is based on [NATS](https://nats.io/) specifically on [NATS Jetstream](https://docs.nats.io/nats-concepts/jetstream) to enable persistence.
10
10
11
+
## Default Registry
12
+
13
+
By default, `nats-js-kv` is configured as embedded default registry via the `MICRO_REGISTRY` environment variable. If you do not want using the build-in nats registry, set `MICRO_REGISTRY_ADDRESS` to the address of the nats-js cluster, which is the same value as `OCIS_EVENTS_ENDPOINT`. Optionally use `MICRO_REGISTRY_AUTH_USERNAME` and `MICRO_REGISTRY_AUTH_PASSWORD` to authenticate with the external nats cluster.
14
+
15
+
Note that when `MICRO_REGISTRY` is configured using `kubernetes`, the NATS service will not be used but the Kubernetes registry. In this case, the `MICRO_REGISTRY_ADDRESS` environment variable needs to be set to the url of the Kubernetes registry.
16
+
11
17
## Persistance
12
18
13
19
To be able to deliver events even after a system or service restart, nats will store events in a folder on the local filesystem. This folder can be specified by setting the `NATS_NATS_STORE_DIR` enviroment variable. If not set, the service will fall back to `$OCIS_BASE_DATA_PATH:/nats`.
0 commit comments