Skip to main content

Installer and management CLI for SURFACE CDMS

Project description

SURFACE CDMS

SURFACE CDMS is a weather and climate data management system.

This repository contains the SURFACE CDMS installer and management CLI, along with the SURFACE application source.

Current Status

SURFACE CDMS is currently in its first stable release.

Current version: 1.0.0

This repository contains:

  • The surface-cdms installer package
  • The surface command-line tool
  • The SURFACE application source under surface/
  • A build process for packaging the SURFACE app into the installer wheel
  • CLI commands for installing, managing, inspecting, and uninstalling SURFACE

What is included?

The installer provides the surface command:

surface --version
surface info
surface doctor
surface install
surface up
surface down
surface restart
surface logs
surface containers
surface uninstall

The installer uses a packaged same-version SURFACE app artifact instead of cloning the SURFACE application from a separate repository.

Recommended Installation Method

The recommended way to install the SURFACE CDMS CLI is with pipx.

pipx installs Python CLI tools in isolated environments, which helps avoid dependency conflicts with other Python software on the system.

pipx install surface-cdms

After installation, check that the command is available:

surface --version
surface info
surface doctor

Then start the installer:

surface install

Basic Usage

Start the installer

surface install

This starts the SURFACE CDMS installation/configuration process.

The installer asks for the sudo password and validates it before continuing.

Show version

surface --version

Show installer and installation information

surface info

This displays useful information such as:

  • Installer version
  • Python executable
  • Python version
  • Operating system
  • Installer package path
  • Install status
  • Installed SURFACE path
  • Docker Compose file
  • Install duration, when available

Check installer and installation health

surface doctor

This checks whether the installer environment appears healthy, including required Python packages, bundled installer assets, Docker availability, Docker Compose availability, and installation metadata when available.

Show containers

surface containers

This shows the Docker Compose containers for the installed SURFACE deployment.

View logs

surface logs --tail 50
surface logs api --tail 50
surface logs api --follow

Start services

surface up

Stop services

surface down

Restart services

surface restart

Uninstall SURFACE CDMS

surface uninstall

This stops SURFACE containers, removes Docker resources used by the installation, deletes the installed SURFACE directory, and removes local install metadata.

This command is destructive and requires explicit confirmation.

To keep Docker images during uninstall:

surface uninstall --keep-images

Local Wheel Testing

During development, build the installer wheel and test it locally with pipx.

From the repository root:

./scripts/build_installer_wheel.sh

Then install the built wheel with pipx:

pipx install installer/dist/surface_cdms-1.0.0-py3-none-any.whl

Then test:

surface --version
surface info
surface doctor
surface install

If you already have an older version installed with pipx, uninstall it first:

pipx uninstall surface-cdms
pipx install installer/dist/surface_cdms-1.0.0-py3-none-any.whl

Development Setup

For local development, use a virtual environment and install the package in editable mode.

cd installer
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip setuptools wheel
python -m pip install -e .

Editable mode allows code changes in installer/src/surface_cdms/ to take effect without reinstalling the package every time.

Test the CLI:

surface --version
surface info
surface doctor
surface install

Building the SURFACE App Artifact

The installer wheel includes a packaged SURFACE app artifact.

The artifact is built from the top-level surface/ directory and copied into:

installer/src/surface_cdms/artifacts/

If you modify anything inside the top-level surface/ directory, rebuild the SURFACE app artifact before building the installer wheel:

./scripts/build_surface_artifact.sh

If you skip this step, the installer wheel may still contain an older SURFACE app artifact.

Building the Installer Package

The recommended development build command is:

./scripts/build_installer_wheel.sh

This script does three required build steps:

  1. Copies the root README.md into installer/README.md
  2. Rebuilds the SURFACE app artifact from surface/
  3. Builds the installer wheel from installer/

The installer wheel is created in:

installer/dist/

If you want to run the steps manually:

cp README.md installer/README.md

./scripts/build_surface_artifact.sh

cd installer
rm -rf build dist *.egg-info src/*.egg-info src/surface_cdms.egg-info
python -m build

Testing

Testing documents are available under:

docs/testing/

Important validation checklists include:

docs/testing/clean-machine-lifecycle-test.md
docs/testing/surface-application-validation-test.md

The clean-machine lifecycle test validates that SURFACE CDMS can be installed, managed, uninstalled, and reinstalled on a clean machine.

The SURFACE application validation test validates that the installed SURFACE application itself works correctly after installation.

Versioning

SURFACE CDMS follows Semantic Versioning.

Example versions:

0.7.0-alpha.2
0.8.0-beta.1
1.0.0-rc.1
1.0.0

The root VERSION file controls the platform version.

The installer package version and the packaged SURFACE app artifact version should always match.

Git tags include the leading v, for example:

v1.0.0

Python package versions do not include the leading v, for example:

1.0.0

Python packaging may normalize prerelease versions. For example:

1.0.0-rc.1

may appear as:

1.0.0rc1

Release notes are tracked in CHANGELOG.md.

Repository Layout

Current structure:

surface-cdms/
├── surface/
│   ├── api/
│   ├── nginx/
│   ├── docker-compose.yml
│   └── pg_hba.custom.conf
├── installer/
│   ├── src/
│   │   └── surface_cdms/
│   │       ├── artifacts/
│   │       ├── wx_config/
│   │       └── wx_playbook/
│   ├── pyproject.toml
│   ├── MANIFEST.in
│   └── requirements.txt
├── scripts/
│   ├── build_surface_artifact.sh
│   └── build_installer_wheel.sh
├── docs/
│   └── testing/
├── AUTHORS.md
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
└── VERSION

License

SURFACE CDMS is licensed under the GNU General Public License v3.0.

See LICENSE for details.

Notes

This is the first stable SURFACE CDMS release.

Future feature work, including backup optimization and additional management commands, should continue in later releases.

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

surface_cdms-1.0.0.tar.gz (40.7 MB view details)

Uploaded Source

Built Distribution

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

surface_cdms-1.0.0-py3-none-any.whl (40.7 MB view details)

Uploaded Python 3

File details

Details for the file surface_cdms-1.0.0.tar.gz.

File metadata

  • Download URL: surface_cdms-1.0.0.tar.gz
  • Upload date:
  • Size: 40.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for surface_cdms-1.0.0.tar.gz
Algorithm Hash digest
SHA256 02bbcf8f63cd92285b44fe61ef3ac7da006c00c61ca3bd5b15f1b197904a77db
MD5 b4279967b0611652ad49cc755de42035
BLAKE2b-256 e1fd0e68a6ca7ef78af9e3b174a600f7ca2713db218e89175f1a2c68e321dc4d

See more details on using hashes here.

File details

Details for the file surface_cdms-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: surface_cdms-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 40.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for surface_cdms-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 89cbb11fe37b07fe89fc8a6a2a368f968270b15e2ae0b0484ddc52200ea75df0
MD5 8acabb76388605e639a31d6a9e014663
BLAKE2b-256 8bf805d37f5d2c3fab8667d380b62e205f33ebb2dd18d5e3075bbf15d8f6384a

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