Skip to content

Commit

Permalink
Document this project in the README
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaffter committed Nov 21, 2024
1 parent 4a2bfd1 commit b4a4c4a
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/openchallenges/nifi-registry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ From the registry home page:
- Name: openchallenges
4. Click on the button "CREATE".

## Stop the registry with Docker Compose
## Stop and remove the NiFi registry container

```console
docker rm -f openchallenges-nifi-registry
Expand Down
58 changes: 58 additions & 0 deletions apps/openchallenges/nifi/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,59 @@
# OpenChallenges NiFi

## Build the Docker image

Build the Docker image of NiFi and the NiFi registry.

```console
nx run-many -t build-image -p openchallenges-{nifi,nifi-registry}
```

## Deploy NiFi with Docker Compose

```console
nx serve-detach openchallenges-nifi
```

## Access NiFi UI

1. In your browser, navigate to http://localhost:8443/nifi.
2. Accept the security risk (in the development environment).
3. Login with the credentials specified in the config file `.env`.

The NiFi canvas should now be visible.

## Connect NiFi to the NiFi registry

Configuring a NiFi registry client enable to version control the Process Groups created in NiFi.

1. Click on the three-line menu button.
2. Click on "Controller Settings".
3. Click on the tab "Registry Clients".
4. Click on the button "+".
5. Add the registry client:
- Name: openchallenges-nifi-registry.
- Type: NifiRegistryFlowRegistryClient.
- Click on "Apply".
6. Configure the registry client:
- Click on the three-dot button.
- Click on "Edit".
- Click on the tab "Properties".
- Set the URL to `http://openchallenges-nifi-registry:18080`.
- Click on "Apply".
7. Click on the NiFi logo in the navigation bar to return to the canvas.

Here is a quick way to check that NiFi can connect to the registry:

1. Add a Process Group to the canvas.
2. Right-click on the PG and select "Version" > "Start Version Control".
3. The "Save Flow Version" dialog should open without any error messages visible.

## Stop and remove the NiFi container

```console
docker rm -f openchallenges-nifi-registry
```

## Data persistence

Process Groups created in NiFi can be saved and version-controlled using the NiFi Registry.
4 changes: 2 additions & 2 deletions docker/openchallenges/services/nifi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ services:
- openchallenges
ports:
- '8443:8443'
volumes:
- ../../../apps/openchallenges/nifi/input:/home/nifi/input
# volumes:
# - ../../../apps/openchallenges/nifi/input:/home/nifi/input
depends_on:
openchallenges-nifi-registry:
condition: service_started
Expand Down
1 change: 1 addition & 0 deletions tools/configure-hostnames.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ declare -a hostnames=(
"127.0.0.1 openchallenges-mariadb"
"127.0.0.1 openchallenges-mysqld-exporter"
"127.0.0.1 openchallenges-nifi-registry"
"127.0.0.1 openchallenges-nifi"
"127.0.0.1 openchallenges-opensearch"
"127.0.0.1 openchallenges-organization-service"
"127.0.0.1 openchallenges-prometheus"
Expand Down

0 comments on commit b4a4c4a

Please sign in to comment.