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 codeports
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
- Support updating services.{service_name}.
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 onepex_binary
for requirements
- Each platform has one
- 2
docker_image
targets- Both pex_binaries are copied, copies requirements 1st to take advantage of docker build cache
- 1
helm_chart
with aresource
of all the files u
- 4
- Usage in
pants publish ::
- docker and helm repository =
app-name
- tags:,
app-name-amd
,app-name-arm
,app-name-chart
- docker and helm repository =
- 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
Release history Release notifications | RSS feed
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
File details
Details for the file pants_py_deploy-0.0.16-py3-none-any.whl
.
File metadata
- Download URL: pants_py_deploy-0.0.16-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ff2129cacbad74d070f251e778ea653e4bbf74b73e330187e8bcf31a48acfb8 |
|
MD5 | fb8ef40747697cac1ad0db5c92e3d98c |
|
BLAKE2b-256 | 97762456912d62ece8598c629dc5bf80fc59546cc7e769861750dfac2730c1dd |