This project provides a framework for deploying and managing CBA Processors - nano services written in TypeScript - to cloud environments. Currently supports Azure deployments with automated deployment scripts.
A CBA Processor is a lightweight, single-purpose service designed to perform specific tasks. The architecture uses a monorepo workspace structure with automated deployment scripts.
CBA Processor Skeleton: https://github.com/corebapp-tech/cba-processor-skeleton
- Node.js (v14 or higher recommended)
- npm (v7 or higher for workspace support)
- Azure CLI (
az) - Required for Azure deployments- Install from: https://docs.microsoft.com/en-us/cli/azure/install-azure-cli
- Login before deployment:
az login
First, install all project dependencies including workspace packages:
npm run install-dependenciesThis command installs dependencies for all workspaces, including both development and production dependencies.
The project uses a two-level environment configuration:
Create a .env file in the project root with deployment configuration:
DEPLOY_STAGE=prod
DEPLOY_REGION=West Europe
DEPLOY_PROCESSOR=processor-nameEnvironment Variables:
DEPLOY_STAGE: Deployment environment (e.g.,prod,dev,staging)DEPLOY_REGION: Azure region for deployment (e.g.,West Europe,East US)DEPLOY_PROCESSOR: Name of the processor to deploy fromsrc/processor/processor-name
Each processor has its own .env file with processor-specific configuration:
src/processor/processor-name/.env
This file contains environment variables specific to the processor's functionality (API keys, connection strings, etc.).
Compile TypeScript and build all workspace packages:
npm run buildDeploy the specified processor to Azure cloud:
npm run deploy:azureThis command:
- Builds the project
- Deploys using the serverless configuration
- Runs post-deployment setup
Run the processor locally with Azure environment simulation:
npm run dev:azureThis builds the project and starts a local development server.
Remove the deployed processor from Azure:
npm run remove:azure-
Ensure Azure CLI is installed and authenticated:
az login
-
Install dependencies (first time only):
npm run install-dependencies
-
Configure your
.envfile with the target processor name -
Deploy to Azure:
npm run deploy:azure
-
Set up your
.envfile with the processor you want to test -
Run the local development server:
npm run dev:azure
To remove a deployed processor:
npm run remove:azureThe project uses a workspace-based monorepo structure, allowing multiple processors to coexist and share common dependencies. Each processor in src/processor/ can be independently deployed to Azure using the serverless framework.
For issues and questions, please refer to the project's GitHub repository issue tracker.