forked from moven/jitsu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sergey Burykin
committed
Apr 6, 2021
1 parent
713de81
commit aec752a
Showing
6 changed files
with
34 additions
and
40 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 |
---|---|---|
|
@@ -7,11 +7,11 @@ import {Hint} from "../../../components/documentationComponents"; | |
# Configuration Source | ||
|
||
|
||
Regardless of the deployment method, **EventNative** supports local YAML or JSON file, HTTP source, and raw JSON as configuration sources. The configuration might be passed via `-cfg` flag (e.g. to [running service command from an executable binary](/docs/deployment/build-from-sources#run-eventnative)) or via `CONFIG_LOCATION` environment variable. | ||
Regardless of the deployment method, **Jitsu** supports local YAML or JSON file, HTTP source, and raw JSON as configuration sources. The configuration might be passed via `-cfg` flag (e.g. to [running service command from an executable binary](/docs/deployment/build-from-sources#run-eventnative)) or via `CONFIG_LOCATION` environment variable. | ||
|
||
### Local File | ||
|
||
Pass local file path with [configuration](/docs/configuration) to **EventNative**: | ||
Pass local file path with [configuration](/docs/configuration) to **Jitsu**: | ||
|
||
```bash | ||
./eventnative -cfg /home/user/eventnative.yaml | ||
|
@@ -23,17 +23,16 @@ Pass local file path with [configuration](/docs/configuration) to **EventNative* | |
|
||
### HTTP source | ||
|
||
Pass external configuration to **EventNative** with or without basic auth: | ||
Pass external configuration to **Jitsu** with or without basic auth: | ||
|
||
```bash | ||
./eventnative -cfg 'https://username:[email protected]?env=prod' | ||
|
||
#or in docker deployments | ||
|
||
docker run -p <local_port>:8001 \ | ||
-v /<log_dir>/:/home/eventnative/logs/events/ \ | ||
-e CONFIG_LOCATION='https://username:[email protected]?env=prod' \ | ||
ksense/eventnative:beta | ||
jitsucom/server:beta | ||
``` | ||
|
||
<Hint> | ||
|
@@ -42,16 +41,14 @@ docker run -p <local_port>:8001 \ | |
|
||
### Raw JSON | ||
|
||
Pass raw JSON payload to **EventNative**: | ||
Pass raw JSON payload to **Jitsu**: | ||
|
||
```json | ||
./eventnative -cfg '{"server":{"name":"test_instance", "auth":"token1"}}' | ||
|
||
#or in docker deployments | ||
|
||
docker run -p <local_port>:8001 \ | ||
-v /<log_dir>/:/home/eventnative/logs/events/ \ | ||
-e CONFIG_LOCATION='{"server":{"name":"test_instance", "auth":"token1"}}' \ | ||
ksense/eventnative:beta | ||
``` | ||
|
||
-e CONFIG_LOCATION='{"server":{"name":"test_instance", "auth":"token1"}}' \ | ||
jitsucom/server:beta | ||
``` |
This file contains 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 |
---|---|---|
|
@@ -6,50 +6,46 @@ import {Hint} from "../../../components/documentationComponents"; | |
|
||
# Deploying with Docker | ||
|
||
**EventNative** provides a Docker image to simplify deployment on your IaaS or hardware of choice. We build two images: | ||
**Jitsu** provides a Docker image to simplify deployment on your IaaS or hardware of choice. We build two images: | ||
|
||
* `ksense/eventnative:latest` — contains the latest stable production release. This image is built from [master](https://github.com/jitsucom/eventnative/tree/master) branch | ||
* `ksense/eventnative:beta` — contains a latest beta version built from [beta](https://github.com/jitsucom/eventnative/tree/beta) branch | ||
* `jitsucom/server:latest` — contains the latest stable production release. This image is built from [master](https://github.com/jitsucom/jitsu/tree/master) branch | ||
* `jitsucom/server:beta` — contains the latest beta version built from [beta](https://github.com/jitsucom/jitsu/tree/beta) branch | ||
|
||
We recommend using beta for experiments. It's stable and well tested. It usually takes 2-4 months for the feature to graduate from beta to stable. This guide uses beta build. Just replace is with latest if you want to run a stable version | ||
|
||
### Getting started with Docker | ||
|
||
* Pull the image from Docker Hub with: `docker pull ksense/eventnative:beta` | ||
* Create [your config file](/docs/configuration/) and save it in your directory of choice \(referenced below as `<config_dir>`\) as `eventnative.yaml` | ||
* Create an empty directory for log files \(referenced below as `<log_dir>`\). EventNative will use this dir to keep temporary log-files. This parameter is optional, but if it's absent, data-consistency is not guaranteed - EventNative may lose data when the docker container is restarted | ||
* Pull the image from Docker Hub with: `docker pull jitsucom/server:beta` | ||
* Create an `<data_dir>`. It will be used as Docker mount directory for keeping Jitsu config and logs. | ||
* Create [your config file](/docs/configuration/) and save it in `<data_dir>/config/eventnative.yaml`. | ||
|
||
<Hint> | ||
Make sure <config_dir> and <log_dir> directories have right permissions or just run <code inline="true">chmod 777 <your_dir></code> | ||
Make sure <data_dir> directory have right permissions or just run <code inline="true">chmod -R 777 <data_dir></code> | ||
</Hint> | ||
|
||
* Run the Docker image and mount your config file with the following command: | ||
|
||
```javascript | ||
docker run -p <local_port>:8001 \ | ||
-v /<config_dir>/:/home/eventnative/app/res/ \ | ||
-v /<log_dir>/:/home/eventnative/logs/events/ \ | ||
ksense/eventnative:beta | ||
-v /<data_dir>/:/home/eventnative/data/ \ | ||
jitsucom/server:beta | ||
``` | ||
|
||
Please, refer `<log_dir>` and `<config_dir>` by their absolute paths. Use `$PWD` macro if necessary. Example: | ||
Please, refer `<data_dir>` by its absolute path. Use `$PWD` macro if necessary. Example: | ||
|
||
```javascript | ||
docker run --name eventnative-test -p 8000:8001 \n | ||
-v $PWD/eventnative.yaml:/home/eventnative/app/res/eventnative.yaml \ | ||
-v $PWD/eventnative-logs:/home/eventnative/logs/events/ \ | ||
ksense/eventnative:beta | ||
docker run --name jitsu-test -p 8000:8001 \ | ||
-v $PWD/data/:/home/eventnative/data/ \ | ||
jitsucom/server:beta | ||
``` | ||
|
||
Also, **EventNative** supports passing config via `CONFIG_LOCATION` environment variable. The configuration might be one of the [described formats](/docs/deployment/configuration-source). For example, docker run with externalized [HTTP configuration source](/docs/deployment/configuration-source#http-source): | ||
Also, **Jitsu** supports passing config via `CONFIG_LOCATION` environment variable. The configuration might be one of the [described formats](/docs/deployment/configuration-source). For example, docker run with externalized [HTTP configuration source](/docs/deployment/configuration-source#http-source): | ||
|
||
```javascript | ||
docker run --name eventnative-test -p 8000:8001 \n | ||
-v $PWD/eventnative-logs:/home/eventnative/logs/events/ \ | ||
-e CONFIG_LOCATION='https://username:[email protected]?env=dev' \ | ||
ksense/eventnative:beta | ||
docker run --name jitsu-test -p 8000:8001 \n | ||
-e CONFIG_LOCATION='https://username:[email protected]?env=dev' \ | ||
jitsucom/server:beta | ||
``` | ||
|
||
|
||
Once you see Started banner in logs, it **EventNative** is running. | ||
|
||
Once you see Started banner in logs, it **Jitsu** is running. |
This file contains 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