Skip to main content

Make it easy to maintain docker-compose files and helm-charts across projects with pants-py-deploy

Project description

Pants py_deploy plugin

  • Purpose: Make it easy to maintain docker-compose files and helm-charts across projects
  • Goals
    • Support updating services.{service_name}.
      • environment by scanning source code
      • ports by scanning source code
    • Support updating {chart}/
      • values.yaml
      • {deployment|statefulset}.yaml
    • Use Pantsbuild pants to write a plugin that can be pip installed
    • Then invoking it should be pants fix ::
    • Less pants boilerplate and support multi-platform (arm+amd) with a macro
    • Enabling docker-compose|helm-chart templates by using the macro and adding fields to pex_binary

Draft api

  • BUILD file
py_deploy(
    name="app-name",
    entrypoint=package_name,
    docker={},
    helm={},# support more config in the future
)
  • generates
    • 4 pex_binary targets
      • Each platform has one pex_binary for sources and one pex_binary for requirements
    • 2 docker_image targets
      • Both pex_binaries are copied, copies requirements 1st to take advantage of docker build cache
    • 1 helm_chart with a resource of all the files u
  • Usage in pants publish ::
    • docker and helm repository = app-name
    • tags:, app-name-amd, app-name-arm, app-name-chart
  • Usage in pants fix ::
    • docker-compose.yaml file & chart/* are create if they don't exist
    • if they exist: ensure environment & ports are up-to-date

Later ideas

  • support passing env_config=dict(ignore_globs=[], include_globs=[])
  • support analyzing env-vars and using them for adding services like postgres/rabbitmq/mongo etc. to the docker-compose file

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pants_py_deploy-0.0.15rc1-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file pants_py_deploy-0.0.15rc1-py3-none-any.whl.

File metadata

File hashes

Hashes for pants_py_deploy-0.0.15rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 b7efb7e3c17d69dc6aff08eb3220e9b810d053ea0b1e01c718ce64553a7a90e2
MD5 25c0dfaaf5620fefd5c0b3b65ac26a1c
BLAKE2b-256 94c59b6eb217433c8db346661968c6ce9d68d135954192aca6f0d91f9678cfdd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page