mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-06-06 23:26:17 +02:00
update nifi
This commit is contained in:
parent
c91004dfd0
commit
f01034e362
@ -9,32 +9,29 @@ and distribute data.
|
|||||||
## up and running
|
## up and running
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ mkdir -p data/nifi/{conf,database_repository,flowfile_repository,content_repository,provenance_repository,state,logs}
|
$ mkdir -p data/nifi/{conf,database_repository,flowfile_repository,content_repository,provenance_repository,state,logs,nar_extensions,python_extensions}
|
||||||
$ mkdir -p data/registry/{database,flow_storage,logs}
|
$ mkdir -p data/registry/{database,flow_storage,logs}
|
||||||
$ chown -R 1000:1000 data
|
$ chown -R 1000:1000 data
|
||||||
|
$ tree data
|
||||||
$ vi docker-compose.yml
|
├── nifi
|
||||||
volumes:
|
│ ├── conf
|
||||||
- ./data/nifi/conf:/tmp
|
│ ├── content_repository
|
||||||
# ./data/nifi/conf:/opt/nifi/nifi-current/conf
|
│ ├── database_repository
|
||||||
|
│ ├── flowfile_repository
|
||||||
$ docker-compose run --rm --entrypoint bash nifi
|
│ ├── logs
|
||||||
>>> cp /opt/nifi/nifi-current/conf/* /tmp
|
│ ├── nar_extensions
|
||||||
>>> exit
|
│ ├── provenance_repository
|
||||||
|
│ ├── python_extensions
|
||||||
$ vi docker-compose.yml
|
│ └── state
|
||||||
volumes:
|
└── registry
|
||||||
# ./data/nifi/conf:/tmp
|
├── database
|
||||||
- ./data/nifi/conf:/opt/nifi/nifi-current/conf
|
├── flow_storage
|
||||||
|
└── logs
|
||||||
|
|
||||||
$ docker-compose up -d
|
$ docker-compose up -d
|
||||||
$ curl http://127.0.0.1:8080/nifi/
|
$ curl -k --resolve nifi:8443:127.0.0.1 https://nifi:8443/nifi/
|
||||||
|
$ open https://nifi:8443/nifi/#/login
|
||||||
$ curl http://127.0.0.1:18080/nifi-registry/
|
$ curl http://127.0.0.1:18080/nifi-registry/
|
||||||
```
|
```
|
||||||
|
|
||||||
Maybe there are better ways to populate a volume:
|
|
||||||
|
|
||||||
- named volumes
|
|
||||||
- anonymous volumes
|
|
||||||
|
|
||||||
[1]: https://nifi.apache.org
|
[1]: https://nifi.apache.org
|
||||||
|
@ -7,15 +7,15 @@ services:
|
|||||||
init-nifi:
|
init-nifi:
|
||||||
image: apache/nifi:2.3.0
|
image: apache/nifi:2.3.0
|
||||||
entrypoint: ["bash", "-c"]
|
entrypoint: ["bash", "-c"]
|
||||||
command: "test -f /data/bootstrap.conf || cp /opt/nifi/nifi-current/conf/* /data"
|
command: ["test -f /tmp/bootstrap.conf || cp -v /opt/nifi/nifi-current/conf/* /tmp"]
|
||||||
volumes:
|
volumes:
|
||||||
- init-nifi-conf:/opt/nifi/nifi-current/conf
|
- init-nifi-conf:/opt/nifi/nifi-current/conf
|
||||||
- /opt/nifi/nifi-current/conf:/data
|
- ./data/nifi/conf:/tmp
|
||||||
|
|
||||||
nifi:
|
nifi:
|
||||||
image: apache/nifi:2.3.0
|
image: apache/nifi:2.3.0
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "8443:8443"
|
||||||
volumes:
|
volumes:
|
||||||
- ./data/nifi/conf:/opt/nifi/nifi-current/conf
|
- ./data/nifi/conf:/opt/nifi/nifi-current/conf
|
||||||
- ./data/nifi/database_repository:/opt/nifi/nifi-current/database_repository
|
- ./data/nifi/database_repository:/opt/nifi/nifi-current/database_repository
|
||||||
@ -27,11 +27,12 @@ services:
|
|||||||
- ./data/nifi/state:/opt/nifi/nifi-current/state
|
- ./data/nifi/state:/opt/nifi/nifi-current/state
|
||||||
- ./data/nifi/logs:/opt/nifi/nifi-current/logs
|
- ./data/nifi/logs:/opt/nifi/nifi-current/logs
|
||||||
environment:
|
environment:
|
||||||
- NIFI_WEB_HTTP_PORT=8080
|
- NIFI_WEB_HTTPS_HOST=nifi
|
||||||
|
- NIFI_WEB_HTTPS_PORT=8443
|
||||||
- NIFI_JVM_HEAP_INIT=8g
|
- NIFI_JVM_HEAP_INIT=8g
|
||||||
- NIFI_JVM_HEAP_MAX=16g
|
- NIFI_JVM_HEAP_MAX=16g
|
||||||
- SINGLE_USER_CREDENTIALS_USERNAME=admin
|
- SINGLE_USER_CREDENTIALS_USERNAME=admin
|
||||||
- SINGLE_USER_CREDENTIALS_PASSWORD=admin
|
- SINGLE_USER_CREDENTIALS_PASSWORD=@hello@world@ # at least 12 characters
|
||||||
depends_on:
|
depends_on:
|
||||||
- init-nifi
|
- init-nifi
|
||||||
hostname: nifi
|
hostname: nifi
|
||||||
@ -45,6 +46,8 @@ services:
|
|||||||
- ./data/registry/database:/opt/nifi-registry/nifi-registry-current/database
|
- ./data/registry/database:/opt/nifi-registry/nifi-registry-current/database
|
||||||
- ./data/registry/flow_storage:/opt/nifi-registry/nifi-registry-current/flow_storage
|
- ./data/registry/flow_storage:/opt/nifi-registry/nifi-registry-current/flow_storage
|
||||||
- ./data/registry/logs:/opt/nifi-registry/nifi-registry-current/logs
|
- ./data/registry/logs:/opt/nifi-registry/nifi-registry-current/logs
|
||||||
|
environment:
|
||||||
|
- NIFI_REGISTRY_WEB_HTTP_PORT=18080
|
||||||
hostname: registry
|
hostname: registry
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user