Skip to main content

Containerized NBS (NIST Beamline Software) services for beamline simulation

Project description

NBS Pods

Containerized NBS (NIST Beamline Software) services for beamline simulation.

Container Images

This repository provides containerized NBS services that can be run in two modes:

Demo Mode (Pre-built Images)

Uses pre-built images from GitHub Container Registry (GHCR):

# Images are automatically built and pushed to:
# ghcr.io/xraygui/nbs-pods/bluesky:latest
# ghcr.io/xraygui/nbs-pods/nbs:latest  
# ghcr.io/xraygui/nbs-pods/nbs-gui:latest

Development Mode (Local Builds)

Build images locally for development:

# Build all images
podman-compose -f docker-compose.build.yml build

# Build specific image
podman-compose -f docker-compose.build.yml build nbs

# Rebuild with no caching
podman-compose -f docker-compose.build.yml build --no-cache nbs_gui

Image Dependencies

fedora → bluesky → nbs → nbs-gui

Usage

Demo Mode (Default)

# Start all services with pre-built images
./scripts/deploy.sh start

# Start specific services
./scripts/deploy.sh start gui queueserver

# Start demo services (bluesky-services, gui, queueserver, sim, viewer)
./scripts/deploy.sh demo

Development Mode

# Build images locally first
podman-compose -f docker-compose.build.yml build

# Start specific services in development mode
./scripts/deploy.sh start --dev gui

# Mix normal and development mode
./scripts/deploy.sh start queueserver --dev gui

Stopping Services

# Stop all services
./scripts/deploy.sh stop

# Stop specific services
./scripts/deploy.sh stop gui queueserver

Available Services

  • bluesky-services: Core infrastructure (Redis, MongoDB, Kafka, ZMQ proxies)
  • queueserver: RE Manager for experiment orchestration
  • gui: NBS GUI with display protocol detection (Wayland/X11)
  • sim: NBS simulation services
  • viewer: Additional viewing services (if configured)

Development Workflow

Docker Compose Override System

The deployment system uses Docker Compose's override mechanism to enable flexible configuration:

  1. Base Configuration: Each service has a main docker-compose.yml file with default settings
  2. Override Files: docker-compose.override.yml files (if present) are automatically composed with the main file
  3. Development Files: docker-compose.development.yml files are applied when using the --dev flag

Override Files (docker-compose.override.yml)

Override files allow local customization without modifying the base configuration:

  • Testing: Override environment variables, ports, or volumes for testing
  • Bug Fixes: Temporarily modify service parameters to work around issues
  • GUI Configuration: Especially useful for display protocol issues (Wayland/X11)
  • Local Paths: Mount local directories for configuration or data

Example override file:

services:
  qs-gui:
    volumes:
      - ${HOME}/local-config:/etc/bluesky
    environment:
      - DEBUG=true

Development Files (docker-compose.development.yml)

Development files are applied when using the --dev flag and typically:

  • Switch to Local Images: Use locally built images instead of GHCR images
  • Config Mounts: Mount configuration directories to test config changes
  • Code Mounts: Mount local source code directories for live development
  • Local Installs: Install packages from local paths with pip install -e
  • Debug Settings: Enable debugging, logging, or development-specific configurations

Example development file which only mounts local config directories

services:
  qs-gui:
    volumes:
      - ${NBS_PODS_DIR}/config/bluesky:/etc/bluesky
      - ${BEAMLINE_PODS_DIR}/config/ipython:/usr/local/share/ipython
      - ${NBS_PODS_DIR}/config/tiled:/etc/tiled

Example development file which installs local code

services:
  nbs-sim:
    volumes:
      - ${NBSDIR}:/usr/local/src/xraygui
      - ${BEAMLINE_PODS_DIR}/config/ipython:/usr/local/share/ipython
    command: >
      bash -c "
        pip3 install --no-deps --no-build-isolation -e /usr/local/src/xraygui/nbs-sim/src &&
        nbs-sim --startup-dir /usr/local/share/ipython/profile_default/startup --list-pvs
      "

File Resolution Order

The system resolves compose files in this order:

  1. Base service file (e.g., docker-compose.yml)
  2. Override file (docker-compose.override.yml) - if present
  3. Development file (docker-compose.development.yml) - if --dev flag used

Later files override earlier ones, allowing for flexible configuration management.

Configuration

Images include default configurations in /etc/bluesky and /etc/tiled/profiles which can be overridden with volume mounts in development mode.

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

nbs_pods-0.2.2.tar.gz (188.4 kB view details)

Uploaded Source

Built Distribution

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

nbs_pods-0.2.2-py3-none-any.whl (187.6 kB view details)

Uploaded Python 3

File details

Details for the file nbs_pods-0.2.2.tar.gz.

File metadata

  • Download URL: nbs_pods-0.2.2.tar.gz
  • Upload date:
  • Size: 188.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nbs_pods-0.2.2.tar.gz
Algorithm Hash digest
SHA256 e715eed3eafea55f6bd1fae0de4259b4940ed16d9a6178d9f3b1886dab91d7c1
MD5 1e75c09f77044291ac271ee820c40c79
BLAKE2b-256 0221a0d5a572935868ee08eeb73571fc9ad64cec0ca08d2d5b4c88ce3eb9b60e

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbs_pods-0.2.2.tar.gz:

Publisher: python-publish.yml on xraygui/nbs-pods

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nbs_pods-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: nbs_pods-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 187.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nbs_pods-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7dab69c046d19aad8efff02f89b3803f250331662f5ca6b524370f1d79854c80
MD5 d9728cfac7c54e04752c75e8c304c3ee
BLAKE2b-256 88cf8d4185aa519bf7f67b99fa96bd08d3f3f0c8022cc8814bfb8d72493a625f

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbs_pods-0.2.2-py3-none-any.whl:

Publisher: python-publish.yml on xraygui/nbs-pods

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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