Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Motivation

The PNDA CLI initially only supported creating PNDA on AWS using the Cloud Formation API. Subsequently, support was added for skipping the Cloud Formation parts and installing PNDA on an existing set of servers (the 'existing machines' approach). 

...

So we would like to move the current PNDA CLI towards a unified CLI that contains specific implementations to support each target deployment environment - AWS, HEAT, Existing machines, and any that may come along in future, while sharing other logic such as user input, configuration and validation. The first step towards this is to refactor the PNDA CLI into a more structured architecture, with the AWS and Existing machines code separated out into their own modules.

Proposal

  • Refactor pnda-cli into clear front ends and back ends
    • Front ends handle command line interface or REST API, for example
    • Back ends handle creating PNDA on different platforms
  • Factor out configuration validation and user input validation cleanly
    • Revise CLI to follow normal conventions
  • Migrate pnda-heat-templates to be a pnda-cli back end and deprecate this repository
  • Longer term, review e.g. Terraform as a cross-cloud approach to handling back end functionality

Plan

Phase 1 (complete)

  • Separate out user input validation
  • Create two classes CloudFormationBackend and ExistingMachinesBackend that inherit from a BaseBackend class.
  • Move all functionality relating to deployment under BaseBackend, with overrides from CloudFormationBackend and ExistingMachinesBackend where target specific functionality is required.

...