pumpwood-deploy-frontend
Satellite deploy package for the Pumpwood Frontend (React) microservice
on Kubernetes. It generates manifests for the frontend secrets and the
pumpwood-frontend-react Deployment/Service — then hands them to
pumpwood-deploy
for apply.
Developed by Murabei Data Science. BSD-3-Clause.
Pumpwood is a native Brazilian tree
with a symbiotic relation to ants (Murabei)
What it deploys
| Manifest | Kubernetes resources |
|---|---|
pumpwood_frontend__secrets |
Secret pumpwood-frontend-react |
pumpwood_frontend__deploy |
Deployment + Service pumpwood-frontend-react |
The React app is the main Pumpwood UI. It uses the public gateway URL for
browser API calls and registers with the platform via the
microservice--frontend service user.
flowchart LR
subgraph pkg [pumpwood-deploy-frontend]
A[PumpwoodFrontEndMicroservice]
end
subgraph core [pumpwood-deploy]
B[DeployPumpWood]
end
subgraph cluster [Cluster]
S[pumpwood-frontend-react Secret]
APP[pumpwood-frontend-react]
LB[load-balancer / Kong]
end
A --> B
B --> S
B --> APP
APP --> LB
Prerequisites
This package does not stand alone. Before frontend pods can start, the cluster should already provide:
| Resource | Provided by |
|---|---|
| API gateway / ingress | pumpwood-deploy-ingress-api-gateway or AWS ALB |
| Internal REST proxy | Kong load-balancer service (port 8000) |
| Auth (typical) | pumpwood-deploy-auth |
The pod sets:
NEXT_PUBLIC_APP_API_URLfromgateway_public_ip(public URL)API_URLtohttp://load-balancer:8000/rest(in-cluster Kong)
No Postgres or storage ConfigMap is required for the frontend pod.
Installation
pip install pumpwood-deploy-frontend
Requires pumpwood-deploy.
Quick start
import os
import simplejson as json
from dotenv import load_dotenv
from pumpwood_deploy.deploy import DeployPumpWood
from pumpwood_deploy_frontend import PumpwoodFrontEndMicroservice
with open("secrets/production.json", "r") as file:
secrets = json.loads(file.read())
load_dotenv()
deploy = DeployPumpWood(
model_user_password=secrets["microservices--model"],
rabbitmq_secret=secrets["rabbitmq_secret"],
hash_salt=secrets["hash_salt"],
k8_provider="aws",
k8_deploy_args={
"region": "us-east-1",
"cluster_name": "my-cluster",
},
k8_namespace="pumpwood",
)
deploy.add_microservice(
PumpwoodFrontEndMicroservice(
version=os.getenv("PUMPWOOD_FRONTEND"),
gateway_public_ip="https://pumpwood.example.com",
repository="my-registry.example.com",
microservice_password=secrets["microservice--frontend"],
debug="FALSE",
))
deploy.create_deploy_files()
deploy.deploy_microservices()
Environment variables
PUMPWOOD_FRONTEND=2.1.0
If the rendered manifest matches what is already on the cluster, kubectl apply produces no changes — safe for rolling image updates.
Configuration reference
Required
| Parameter | Description |
|---|---|
version |
Image tag for pumpwood-frontend-react |
gateway_public_ip |
Public URL or IP for NEXT_PUBLIC_APP_API_URL |
Optional
| Parameter | Default | Description |
|---|---|---|
microservice_password |
microservice--frontend |
Service user password |
debug |
FALSE |
Debug flag (TRUE / FALSE) |
repository |
GCR default | Docker registry |
Migration note
Older deploy scripts imported from the monolithic package:
# Before
from pumpwood_deploy.microservices.frontend.deploy import (
PumpwoodFrontEndMicroservice)
# After
from pumpwood_deploy_frontend import PumpwoodFrontEndMicroservice
Related packages
| Package | Role |
|---|---|
pumpwood-deploy |
Orchestrator, Kong, RabbitMQ |
pumpwood-deploy-auth |
Authorization microservice |
pumpwood-deploy-ingress-api-gateway |
NGINX API gateway |
Development
pip install -e ../pumpwood-deploy
pip install -e .
PYTHONPATH="src:../pumpwood-deploy/src" \
python3 -m unittest discover \
-s src/pumpwood_deploy_frontend/tests -p "test_*.py" -v
ruff check src/
License
BSD-3-Clause — see LICENSE.
Metadata
Release files for pumpwood-deploy-frontend 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pumpwood_deploy_frontend-0.0.1.tar.gz | 6.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pumpwood_deploy_frontend-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.7 kB
Release files / pumpwood_deploy_frontend-0.0.1.tar.gz
| Download URL | pumpwood_deploy_frontend-0.0.1.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1b104ae45df058e5826d3ecee6def1d7b250a7e29c2d337342528bed9927de38
|
|
BLAKE2b-256 checksum How to use checksums |
d4036a4298c9d7a9b52257f065ce615ebd432fe59c7cbace73a9a1be772e0a08
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.12.13 Linux/6.17.0-1022-azure
|
Release files / pumpwood_deploy_frontend-0.0.1-py3-none-any.whl
| Download URL | pumpwood_deploy_frontend-0.0.1-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
52b1b6d2b5b3b585e1d4d46436e5c62052376ed22337f9f34e093f7a3cd3f598
|
|
BLAKE2b-256 checksum How to use checksums |
2d61a854dc816b7d4ae5b95da3ab037e93fc03e1d827536d71b9f6a8df183f95
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.12.13 Linux/6.17.0-1022-azure
|