Skip to main content

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_URL from gateway_public_ip (public URL)
  • API_URL to http://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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pumpwood_deploy_frontend-0.0.1.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pumpwood_deploy_frontend-0.0.1-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file pumpwood_deploy_frontend-0.0.1.tar.gz.

File metadata

  • Download URL: pumpwood_deploy_frontend-0.0.1.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.12.13 Linux/6.17.0-1022-azure

File hashes

Hashes for pumpwood_deploy_frontend-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1b104ae45df058e5826d3ecee6def1d7b250a7e29c2d337342528bed9927de38
MD5 037899b35ba190b567b2765d5fbaaad3
BLAKE2b-256 d4036a4298c9d7a9b52257f065ce615ebd432fe59c7cbace73a9a1be772e0a08

See more details on using hashes here.

File details

Details for the file pumpwood_deploy_frontend-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pumpwood_deploy_frontend-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 52b1b6d2b5b3b585e1d4d46436e5c62052376ed22337f9f34e093f7a3cd3f598
MD5 ce452823ef3098815610ed2a435236a3
BLAKE2b-256 2d61a854dc816b7d4ae5b95da3ab037e93fc03e1d827536d71b9f6a8df183f95

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page