Skip to main content

CLI tool for managing FDP Workflow Engine bundles

Project description

FDP Bundle CLI

CLI tool for managing and deploying workflow bundles to FDP Workflow Engine.

Installation

pip install fdpbundle

Quick Start

1. Initialize a new project

fdpbundle init my-project
cd my-project

This command will create the following structure:

my-project/
├── bundles/
│   └── example/
│       └── bundle.json
├── .gitlab-ci.yml
├── .gitignore
├── .env.example
└── README.md

2. Configure credentials

cp .env.example .env
# Edit .env with your credentials

Or export environment variables:

export WORKFLOW_ENGINE_URL=https://airflow.example.com/fdp_tools
export SERVICE_ACCOUNT_NAME=your-service-account-name
export SERVICE_ACCOUNT_TOKEN=your-service-account-token

3. Validate bundle

fdpbundle validate bundles/example/bundle.json

4. Deploy

# Deploy to DEV
fdpbundle deploy bundles/example/bundle.json --env dev

# Dry run before production deployment
fdpbundle deploy bundles/example/bundle.json --env prod --dry-run

# Deploy to production
fdpbundle deploy bundles/example/bundle.json --env prod

Commands

fdpbundle init [PROJECT_NAME]

Initialize a new FDP bundles project with standard structure.

fdpbundle init my-project
fdpbundle init  # Use default name 'fdp-bundles'
fdpbundle init my-project --force  # Override if already exists

fdpbundle validate BUNDLE_FILE

Validate bundle spec with Workflow Engine API.

fdpbundle validate bundles/etl-pipeline/bundle.json

fdpbundle import BUNDLE_FILE

Import bundle spec into the system (create new version).

fdpbundle import bundles/etl-pipeline/bundle.json
fdpbundle import bundles/etl-pipeline/bundle.json --no-set-current

fdpbundle diff BUNDLE_FILE

Compare bundle with current state.

fdpbundle diff bundles/etl-pipeline/bundle.json --env dev
fdpbundle diff bundles/etl-pipeline/bundle.json --env prod -v  # Verbose

fdpbundle apply BUNDLE_FILE

Apply bundle changes to environment.

fdpbundle apply bundles/etl-pipeline/bundle.json --env dev
fdpbundle apply bundles/etl-pipeline/bundle.json --env prod --dry-run

fdpbundle deploy BUNDLE_FILE

Full deployment flow: validate → import → diff → apply

fdpbundle deploy bundles/etl-pipeline/bundle.json --env dev
fdpbundle deploy bundles/etl-pipeline/bundle.json --env prod --dry-run

Global Options

Option Environment Variable Description
--api-url WORKFLOW_ENGINE_URL Workflow Engine API URL
--username SERVICE_ACCOUNT_NAME Service account name for Basic Auth
--password SERVICE_ACCOUNT_TOKEN Service account token for Basic Auth
-v, --verbose - Show detailed output
--version - Show version
--help - Show help

CI/CD Integration

This package is designed for use in GitLab CI/CD. When running fdpbundle init, the .gitlab-ci.yml file will be automatically created with the following jobs:

  • validate:changed-bundles - Validate changed bundle files
  • deploy:dev - Auto deploy to DEV when pushing to dev branch
  • deploy:stg - Auto deploy to Staging when pushing to stg branch
  • deploy:prod - Manual deploy to Production when pushing to main branch

GitLab Variables to configure

Variable Protected Masked
WORKFLOW_ENGINE_URL_DEV No No
WORKFLOW_ENGINE_URL_STG Yes No
WORKFLOW_ENGINE_URL_PROD Yes No
SERVICE_ACCOUNT_NAME_DEV No No
SERVICE_ACCOUNT_NAME_STG Yes No
SERVICE_ACCOUNT_NAME_PROD Yes No
SERVICE_ACCOUNT_TOKEN_DEV No Yes
SERVICE_ACCOUNT_TOKEN_STG Yes Yes
SERVICE_ACCOUNT_TOKEN_PROD Yes Yes

Bundle JSON Schema

{
  "bundle": {
    "name": "string (required, unique)",
    "description": "string",
    "owner": "string"
  },
  "workflows": [
    {
      "name": "string (required)",
      "description": "string",
      "schedule_interval": "cron expression or null",
      "tasks": [...]
    }
  ],
  "environments": {
    "dev": { "overrides": {...} },
    "stg": { "overrides": {...} },
    "prod": { "overrides": {...} }
  }
}

Project details


Download files

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

Source Distribution

fdpbundle-0.6.0.tar.gz (18.7 kB view details)

Uploaded Source

Built Distribution

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

fdpbundle-0.6.0-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

Details for the file fdpbundle-0.6.0.tar.gz.

File metadata

  • Download URL: fdpbundle-0.6.0.tar.gz
  • Upload date:
  • Size: 18.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for fdpbundle-0.6.0.tar.gz
Algorithm Hash digest
SHA256 1b7d62f2e3069eb5e159b4b5eb8681973bade935756fa964c7b67015ae36713b
MD5 14af5d1c432f786bed9193056287c210
BLAKE2b-256 c0dd2ae5dd3a0efa16a979f84c25020cb64bf050d893c8bc73c6628bbda4518b

See more details on using hashes here.

File details

Details for the file fdpbundle-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: fdpbundle-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 24.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for fdpbundle-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4c1ee68e5e3c87b9483b5c7f77fd1899e1938ce9822161bfe28ad8a77c97350d
MD5 bcfe81518506b8431004f3a335524df2
BLAKE2b-256 7b0c951a2d4c6f9af404c7f6fb4bcd0be6f4a5e1521d93341464c9b18578480e

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 Pingdom Monitoring Sentry Error logging StatusPage Status page