Before first starting the server make sure to apply all configurations in this section.
The domain name should be updated in 2 palces
config/nginx/nifi.conf
,server_name
parameter.env
file
The following variables should be updated before starting the database
DB_USER
DB_PASSWORD
DB_NAME
The following variables should be updated before starting the NiFi instance
NIFI_USER
NIFI_PASSWORD
After the instance is started these fields do not change the credentials. Instead refer to "Changing username and password to NiFi web UI" section
To function properly, the instance requires a set of keys for secure communication.
fullchain.pem
- X509 public key certificate in PEM formatprivatekey.pem
- corresponding private key in PEM formatdhparams.pem
- dhparam file in PEM format
These files should be copied to config/nginx/ssl/
dir
Additionally the ssl-params.conf
file contains SSL parameters for nginx server
- Run NiFi container
docker compose up -d nifi
- Modify file in host (i.e. nifi.properties)
- Copy file into host
docker compose cp nifi:/opt/nifi/nifi-current/conf/nifi.properties ./nifi.properties
- Edit the file
- Copy the file back into container
docker compose cp ./nifi.properties nifi:/opt/nifi/nifi-current/conf/nifi.properties
- Restart the container
docker compose restart nifi
- Copy file into host
- Run NiFi container
docker compose up -d nifi
- Open shell in container
docker compose exec nifi /bin/bash
- Set username and password
/opt/nifi/nifi-current/bin/nifi.sh set-single-user-credentials <username> <password>
- Restart the container
docker compose restart nifi
To access the database Apache NiFi requires the JDBC PostgreSQL driver. Copy the driver with:
docker compose cp lib/postgresql-*.jar nifi:/opt/nifi/nifi-current/lib/
To upload current version of SIGECA Central Nifi flow:
- Access the NiFi UI
- Insert new
Process Group
- Click
Upload
button (right toProcess Group Name
) - Select the workflow file (
./config/nifi/SIGECA_Central.json
) - Click
Add
The SIGECA_Central
process group should appear in the workspace
Prerequisites:
- Python3 and venv installed.
- .env file created configured.
- Database is running
Steps:
- Go to utils directory
cd utils
- Create new venv
python3 -m venv venv
- Execute script creating demo data
python add_demo_data.py
Mapa Sanitario is accessed through REST API and uses 3 actions to retrieve data
POST /api/login_check
- Login request responding with JWTGET /api/unidade
- Retrieve full list of facilities (requires Bearer token)GET /api/unidade?codigo=<code>
- Retrieve a facility with specified code (requires Bearer token)
For a proper connection, the following fields are required to be filled in .env
:
MAPA_SANITARIO_URL
- FQDN of the Mapa Sanitario APIMAPA_SANITARIO_USERNAME
- Username for the Mapa Sanitario APIMAPA_SANITARIO_PASSWORD
- Password for the Mapa Sanitario API