Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
2ad2f64
Cleanup certs + added dockerignore.
vladd-bit Aug 27, 2026
bc7bcea
Removed DS_Store
vladd-bit Aug 27, 2026
9cde36a
Merge branch 'main' of https://github.com/CogStack/CogStack-NiFi into…
vladd-bit Sep 1, 2026
2ab613d
Deploy: added cert generation make commands.
vladd-bit Sep 1, 2026
f96c5d5
Updated uv.lock.
vladd-bit Sep 1, 2026
398fc3f
Updated uv.lock + requirements.txt.
vladd-bit Sep 1, 2026
ae8bd74
Deploy: updated gitea img veresion.
vladd-bit Sep 1, 2026
251f0f3
Added gitea cert gen + revised doc link.
vladd-bit Sep 1, 2026
c1d14a1
Deploy: helm updates for gitea.
vladd-bit Sep 1, 2026
e0ae421
NiFi: requirements update.
vladd-bit Sep 1, 2026
9ab604a
Security: fixed bash sh perms.
vladd-bit Sep 1, 2026
52653d5
Security: removed credential output from sh scripts.
vladd-bit Sep 1, 2026
5fbe569
Security: updates to x509 templates and gitea cert creation sh.
vladd-bit Sep 1, 2026
3e784ad
Gitea fixes.
vladd-bit Sep 1, 2026
cea4b5c
Workflow updates.
vladd-bit Sep 1, 2026
3d83ce7
Fixed pip audit deps.
vladd-bit Sep 1, 2026
539715d
Security: Added proper cert usage to curl commands.
vladd-bit Sep 1, 2026
bf398cd
Updated OS/ES user creation scripts.
vladd-bit Sep 1, 2026
0d7e42a
Updated nifi reqs.
vladd-bit Sep 1, 2026
846de1e
Shellcheck .sh scripts.
vladd-bit Sep 1, 2026
8c98213
NiFi: transitioned to req to pyproject.toml & updated GA workflows.
vladd-bit Sep 1, 2026
df5e04f
Fixed script.
vladd-bit Sep 1, 2026
ce31ad6
Pinned build/lint tooling, depdendabot uv pin.
vladd-bit Sep 2, 2026
c2cd069
GHA updates.
vladd-bit Sep 2, 2026
5e8d336
NiFi: removed old netty download script from docker image build.
vladd-bit Sep 2, 2026
4d73dbd
Updated smoke tests.
vladd-bit Sep 2, 2026
d66b02e
Merge branch 'main' of https://github.com/CogStack/CogStack-NiFi into…
vladd-bit Sep 2, 2026
22f6a96
NiFi: updated Dockerfile, Security: removed legacy nifi cert gen script.
vladd-bit Sep 2, 2026
edad611
Docs fix.
vladd-bit Sep 2, 2026
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
22 changes: 22 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# The NiFi image only copies pyproject.toml and the nifi source tree.
# Keep the build context small and prevent unrelated repository content,
# credentials, and local development state from entering image layers.
**
!pyproject.toml
!uv.lock
!nifi/
!nifi/**

# Local NiFi runtime state. These files may contain environment-specific
# endpoints, identifiers, or other data and are not reproducible inputs.
nifi/conf/flow.json.gz
nifi/conf/archive/

# Development and operating-system artefacts within the included source tree.
nifi/**/__pycache__/
nifi/**/*.py[cod]
nifi/**/.DS_Store
nifi/**/.pytest_cache/
nifi/**/.ruff_cache/
nifi/**/.mypy_cache/
nifi/**/*.egg-info/
8 changes: 7 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,15 @@ updates:
registries:
- dockerhub

# Keep the root Python project and lock file up to date.
- package-ecosystem: "uv"
directory: "/"
schedule:
interval: "weekly"

registries:
dockerhub:
type: "docker-registry"
url: "https://index.docker.io"
username: "${{secrets.DOCKER_HUB_USERNAME}}"
password: "${{secrets.DOCKER_HUB_ACCESS_TOKEN}}"
password: "${{secrets.DOCKER_HUB_ACCESS_TOKEN}}"
28 changes: 24 additions & 4 deletions .github/workflows/_docker_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,20 +125,40 @@ jobs:
type=ref,event=branch,enable=${{ github.event_name != 'pull_request' }}
type=sha,format=short

- name: Wait for Docker Hub to register images
run: sleep 60

- name: Create multi-arch manifest
shell: bash
run: |
set -euo pipefail

wait_for_image() {
local image_ref="$1"
local attempt

for attempt in {1..12}; do
if docker buildx imagetools inspect "$image_ref" >/dev/null 2>&1; then
echo "Available: ${image_ref}"
return 0
fi

if [[ "$attempt" -lt 12 ]]; then
echo "Waiting for ${image_ref} (${attempt}/12)..."
sleep 5
fi
done

echo "Timed out waiting for ${image_ref}" >&2
return 1
}

while IFS= read -r ref; do
[[ -z "$ref" ]] && continue
img="${ref%%:*}"
tag="${ref#*:}"
wait_for_image "${img}:${tag}-amd64"
wait_for_image "${img}:${tag}-arm64"
echo "🌀 Creating manifest for ${img}:${tag}"
docker buildx imagetools create \
--tag "${img}:${tag}" \
"${img}:${tag}-amd64" \
"${img}:${tag}-arm64"
done < <(printf "%s" "${{ steps.meta_manifest.outputs.tags }}")
done < <(printf "%s\n" "${{ steps.meta_manifest.outputs.tags }}")
37 changes: 37 additions & 0 deletions .github/workflows/compose_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: compose-config

on:
push:
branches: ['**']
paths:
- "deploy/*.env"
- "deploy/export_env_vars.sh"
- "deploy/services*.yml"
- "security/env/*.env"
- ".github/workflows/compose_config.yml"
pull_request:
paths:
- "deploy/*.env"
- "deploy/export_env_vars.sh"
- "deploy/services*.yml"
- "security/env/*.env"
- ".github/workflows/compose_config.yml"
workflow_dispatch:

permissions:
contents: read

jobs:
validate:
name: Validate Docker Compose configuration
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7

- name: Validate Compose files
shell: bash
run: |
set -euo pipefail
source deploy/export_env_vars.sh
docker compose -f deploy/services.yml config --quiet
docker compose -f deploy/services.dev.yml config --quiet
25 changes: 21 additions & 4 deletions .github/workflows/dependency_hygiene.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,23 @@ on:
workflow_dispatch:
schedule:
- cron: "0 6 * * 1" # weekly Monday UTC
push:
branches: ['**']
paths:
- "docs/pyproject.toml"
- "docs/uv.lock"
- "pyproject.toml"
- "uv.lock"
- "scripts/maintenance/audit_pip_dependency.sh"
- ".github/workflows/dependency_hygiene.yml"
pull_request:
paths:
- "docs/requirements.txt"
- "nifi/requirements.txt"
- "docs/pyproject.toml"
- "docs/uv.lock"
- "pyproject.toml"
- "uv.lock"
- "scripts/maintenance/audit_pip_dependency.sh"
- ".github/workflows/dependency_hygiene.yml"

permissions:
contents: read
Expand All @@ -23,7 +35,7 @@ jobs:
uses: actions/cache@v6
with:
path: ~/.cache/pip
key: pip-${{ runner.os }}-${{ hashFiles('docs/requirements.txt', 'nifi/requirements.txt', 'scripts/maintenance/audit_pip_dependency.sh') }}
key: pip-${{ runner.os }}-${{ hashFiles('docs/pyproject.toml', 'docs/uv.lock', 'pyproject.toml', 'uv.lock', 'scripts/maintenance/audit_pip_dependency.sh') }}
restore-keys: |
pip-${{ runner.os }}-

Expand All @@ -32,7 +44,12 @@ jobs:
with:
python-version: "3.11"

- name: Install pip-audit
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version-file: "pyproject.toml"

- name: Install audit tools
run: python -m pip install --upgrade pip pip-audit

- name: Ensure script is executable
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/doc_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ name: doc-build

on:
push:
branches: [ main ]
branches: ['**']
pull_request:
branches: [ main ]

release:
types: [published]
Expand All @@ -24,6 +23,7 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version-file: "pyproject.toml"
python-version: "3.12"
enable-cache: true
cache-dependency-glob: "docs/uv.lock"
Expand All @@ -39,4 +39,4 @@ jobs:

- name: Build docs
working-directory: docs
run: uv run mkdocs build -f ../mkdocs.yml
run: uv run mkdocs build --strict -f ../mkdocs.yml
19 changes: 9 additions & 10 deletions .github/workflows/python_quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,15 @@ on:
branches: ['**']
paths:
- "pyproject.toml"
- "nifi/requirements.txt"
- "nifi/requirements-dev.txt"
- "uv.lock"
- "nifi/**/*.py"
- "scripts/**/*.py"
- "typings/**/*.pyi"
- ".github/workflows/python_quality.yml"
pull_request:
paths:
- "pyproject.toml"
- "nifi/requirements.txt"
- "nifi/requirements-dev.txt"
- "uv.lock"
- "nifi/**/*.py"
- "scripts/**/*.py"
- "typings/**/*.pyi"
Expand All @@ -39,17 +37,18 @@ jobs:
python-version: "3.11"

- name: Install uv
run: |
python -m pip install --upgrade pip uv
uses: astral-sh/setup-uv@v5
with:
version-file: "pyproject.toml"

- name: Install requirements with uv
- name: Install locked project dependencies
run: |
uv pip install --system -r nifi/requirements.txt -r nifi/requirements-dev.txt
uv sync --locked --dev

- name: Ruff (critical rules)
run: |
python -m ruff check scripts nifi/user_python_extensions --select F,E9
uv run --locked ruff check scripts nifi/user_python_extensions --select F,E9

- name: MyPy
run: |
python -m mypy --config-file pyproject.toml nifi/user_python_extensions scripts
uv run --locked mypy --config-file pyproject.toml nifi/user_python_extensions scripts
36 changes: 36 additions & 0 deletions .github/workflows/shell_script_enforce_exec_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,39 @@ jobs:
echo "Fix with: git update-index --chmod=+x <file>"
exit 1
fi

shell-quality:
name: ShellCheck and syntax
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7

- name: Check root-owned shell scripts
shell: bash
run: |
set -euo pipefail

scripts=()
while IFS= read -r -d '' file; do
scripts+=("$file")
done < <(
git ls-files -z -- '*.sh' \
':(exclude)services/**' \
':(exclude)deploy/charts/**'
)

if [[ "${#scripts[@]}" -eq 0 ]]; then
echo "No root-owned shell scripts found."
exit 0
fi

echo "Checking ${#scripts[@]} root-owned shell scripts."
docker run --rm \
--volume "${GITHUB_WORKSPACE}:/mnt:ro" \
--workdir /mnt \
koalaman/shellcheck:v0.11.0@sha256:61862eba1fcf09a484ebcc6feea46f1782532571a34ed51fedf90dd25f925a8d \
"${scripts[@]}"

for file in "${scripts[@]}"; do
bash -n "$file"
done
5 changes: 3 additions & 2 deletions .github/workflows/smoke_gitea_service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ jobs:
java-version: '21'

- name: Generate certificates
working-directory: security/scripts
run: |
set -euo pipefail
./create_root_ca_cert.sh
make -C deploy init-security-gitea
sudo chown 1000:1000 security/certificates/gitea/gitea.key
sudo chmod 600 security/certificates/gitea/gitea.key

- name: Start Gitea service
run: |
Expand Down
6 changes: 2 additions & 4 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@ build:
python: "3.13"
jobs:
pre_create_environment:
- cd docs
- asdf plugin add uv
- asdf install uv latest
- asdf global uv latest
- UV_VERSION="$(sed -n 's/^required-version = "==\([^"]*\)"$/\1/p' pyproject.toml)" && test -n "${UV_VERSION}" && asdf install uv "${UV_VERSION}" && asdf global uv "${UV_VERSION}"
create_environment:
- uv venv "${READTHEDOCS_VIRTUALENV_PATH}"
install:
- cd docs && UV_PROJECT_ENVIRONMENT="${READTHEDOCS_VIRTUALENV_PATH}" uv sync --frozen

mkdocs:
configuration: mkdocs.yml
configuration: mkdocs.yml
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ All NLP/ML/data services are expected to implement a uniform RESTful API, allowi

## ⚠️ Important Notice

This project is under active development. New features or services may impact existing deployments. Please review the [release notes](https://cogstack-nifi.readthedocs.io/en/latest/news.html) and [documentation](https://cogstack-nifi.readthedocs.io) before upgrading.
This project is under active development. New features or services may impact existing deployments. Please review the [release notes](https://cogstack-nifi.readthedocs.io/en/latest/news/) and [documentation](https://cogstack-nifi.readthedocs.io) before upgrading.

---

Expand Down Expand Up @@ -54,6 +54,7 @@ This table describes repository layout. For setup and operations, use the deploy
git lfs pull
make -C deploy git-update-submodules
make -C deploy help
make -C deploy init-security
make -C deploy start-data-infra
```

Expand All @@ -79,15 +80,15 @@ make -C deploy stop-data-infra

📖 Official documentation: [cogstack-nifi.readthedocs.io](https://cogstack-nifi.readthedocs.io/en/latest/)

🚀 New to the project? Start with the [deployment guide](https://cogstack-nifi.readthedocs.io/en/latest/deploy/main.html) for example setups and workflows.
🚀 New to the project? Start with the [deployment guide](https://cogstack-nifi.readthedocs.io/en/latest/deploy/main/) for example setups and workflows.

🐞 For troubleshooting or bug reports, consult the [known issues section](https://cogstack-nifi.readthedocs.io/en/latest/deploy/troubleshooting.html) before opening a ticket.
🐞 For troubleshooting or bug reports, consult the [known issues section](https://cogstack-nifi.readthedocs.io/en/latest/deploy/troubleshooting/) before opening a ticket.

---

## 🛑 Important Updates

Check the [release notes](https://cogstack-nifi.readthedocs.io/en/latest/news.html) section regularly for:
Check the [release notes](https://cogstack-nifi.readthedocs.io/en/latest/news/) section regularly for:

- Major changes to project structure or configuration
- Security advisories or vulnerabilities affecting deployments
Loading
Loading