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: multi client #751

Closed
wants to merge 2 commits into from
Closed
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
57 changes: 45 additions & 12 deletions docs/_ldi-nifi/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,61 @@ The processors can be imported into a NiFi docker instance via volume binding:
1. Create a `docker-compose.yml` file with the following content in a new directory
````yaml
services:
nifi:
image: apache/nifi:2.0.0
environment:
SINGLE_USER_CREDENTIALS_USERNAME: admin
SINGLE_USER_CREDENTIALS_PASSWORD: ctsBtRBKHRAx69EqUghvvgEvjnaLjFEB
ports:
- 8443:8443
volumes:
- ./nifi-ext:/opt/nifi/nifi-current/nar_extensions:rw
nifi:
image: apache/nifi:2.0.0
environment:
SINGLE_USER_CREDENTIALS_USERNAME: admin
SINGLE_USER_CREDENTIALS_PASSWORD: ctsBtRBKHRAx69EqUghvvgEvjnaLjFEB
ports:
- 8443:8443
volumes:
- ./nifi-ext:/opt/nifi/nifi-current/nar_extensions:rw
- ./nifi-drivers:/opt/nifi/nifi-current/lib_temp:rw
entrypoint: [ "/bin/bash",
"-c",
"cp -r /opt/nifi/nifi-current/lib_temp/* /opt/nifi/nifi-current/lib/ && exec /opt/nifi/scripts/start.sh" ]
````
2. Create a directory `nifi-ext` in your current directory.
3. Download either the `...-nar-bundle.jar` and unpack this or download the individual required processors (.nar extension) from the [nexus repository].
Next, place the required processors in the `nifi-ext` directory.
4. Finally, start your instance.
4. Additionally, for using any processor with a persistence layer, you will need to download the needed drivers.
Create a `nifi-drivers` directory and place these drivers inside.
Possible drivers are:
- [PostgreSQL driver](https://jdbc.postgresql.org/download)
- [SQLite driver](https://mvnrepository.com/artifact/org.xerial/sqlite-jdbc)
5. Finally, start your instance.
````shell
docker compose up
````
5. Log in at `https://localhost:8443/nifi` with the credentials mentioned in step 1
6. All downloaded extensions are available under the ``be.vlaanderen.informatievlaanderen.ldes.ldi.nifi`` group.
6. Log in at `https://localhost:8443/nifi` with the credentials mentioned in step 1
7. All downloaded extensions are available under the ``be.vlaanderen.informatievlaanderen.ldes.ldi.nifi`` group.

{: .note }
All documentation and notes about configuration are available in the NiFi component itself.

## Setting up Database Connection Pools

As of LDI 2.13.0, some processors require a database connection pool to be set up.
Although this is a pure NiFi configuration, a minimal explanation will be mentioned here. \
For more details, please refer to
the [NiFi documentation on DBCP](https://nifi.apache.org/components/org.apache.nifi.dbcp.DBCPConnectionPool/).
This can be done by following these steps:

1. Go to the `Controller Services` tab in the NiFi UI.
2. Click on the `Create new service` button.
3. Select the `DBCPConnectionPool` service.
4. Configure the service with the required properties:
- `Database Connection URL`,
- `jdbc:sqlite:/path/to/database.db` for SQLite
- `jdbc:postgresql://localhost:5432/database` for PostgreSQL,
- `Database Driver Class Name`
- `org.sqlite.JDBC` for SQLite
- `org.postgresql.Driver` for PostgreSQL,
- `Database User`,
- `Password`,
5. Save the service.
6. Enable the service.
7. Use the service in the processors that require it.

[Apache NiFi]: https://nifi.apache.org/
[nexus repository]: https://s01.oss.sonatype.org/#nexus-search;quick~be.vlaanderen.informatievlaanderen.ldes.ldi.nifi
Loading