Skip to content

Commit

Permalink
213 fixed docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Burykin committed Apr 6, 2021
1 parent 713de81 commit aec752a
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 40 deletions.
5 changes: 3 additions & 2 deletions configurator.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ RUN addgroup -S $CONFIGURATOR_USER \
&& chown -R $CONFIGURATOR_USER:$CONFIGURATOR_USER /home/$CONFIGURATOR_USER

# Create symlink for backward compatibility
RUN ln -s /home/$CONFIGURATOR_USER/data/config /home/$CONFIGURATOR_USER/app/res
RUN ln -s /home/$CONFIGURATOR_USER/data/logs /home/$CONFIGURATOR_USER/logs
RUN ln -s /home/$CONFIGURATOR_USER/data/config /home/$CONFIGURATOR_USER/app/res && \
ln -s /home/$CONFIGURATOR_USER/data/logs /home/$CONFIGURATOR_USER/logs
chown -R $CONFIGURATOR_USER:$CONFIGURATOR_USER /home/$CONFIGURATOR_USER/logs

#######################################
# BUILD JS STAGE
Expand Down
2 changes: 1 addition & 1 deletion documentation/configuration/authorization.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Tokens file must have the same payload as the HTTP response body above.

```yaml
server:
auth: 'file:///home/eventnative/app/res/tokens.json'
auth: 'file:///home/eventnative/data/config/tokens.json'
auth_reload_sec: 30
```

Expand Down
2 changes: 1 addition & 1 deletion documentation/configuration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ server:
path: /home/eventnative/logs/
metrics.prometheus.enabled: true

geo.maxmind_path: /home/eventnative/app/res/
geo.maxmind_path: /home/eventnative/data/config

log:
path: /home/eventnative/logs/events
Expand Down
19 changes: 8 additions & 11 deletions documentation/deployment/configuration-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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>
Expand All @@ -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
```
40 changes: 18 additions & 22 deletions documentation/deployment/deploy-with-docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 &lt;config_dir&gt; and &lt;log_dir&gt; directories have right permissions or just run <code inline="true">chmod 777 &lt;your_dir&gt;</code>
Make sure &lt;data_dir&gt; directory have right permissions or just run <code inline="true">chmod -R 777 &lt;data_dir&gt;</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.
6 changes: 3 additions & 3 deletions documentation/sources-configuration/singer-taps.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ sources:
destinations: [ "postgres_destination_id" ]
config:
tap: tap-facebook
config: /home/eventnative/app/res/facebook_config.json
properties: /home/eventnative/app/res/facebook_props.json
initial_state: /home/eventnative/app/res/facebook_initial_state.json
config: /home/eventnative/data/config/facebook_config.json
properties: /home/eventnative/data/config/facebook_props.json
initial_state: /home/eventnative/data/config/facebook_initial_state.json
jitsu_singer_shopify:
type: singer
destinations: [ "clickhouse_destination_id" ]
Expand Down

0 comments on commit aec752a

Please sign in to comment.