-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(proposal) Transitioning from Mixins to Custom Remote Invocation Images #3239
Comments
We also have to consider how this would affect the Kubernetes Operator. Would it require running Docker inside the pod? |
I think we could start a PoC as a feature (that way it can be disabled within operator for now) - but @kichristensen this is very similar to PEP 005 which is why I would be happy to see some traction on this |
Some of the ideas I have about this are borrowed from kpt and Tekton which both leverage containerized functions heavily. I mean most CI/CD pipelines these days use containers for each step. Github Actions, Concourse, etc. all use containerization for encapsulation of specific CI/CD tooling. |
I agree a PoC would be create. The thing we need to to understand in more detail is the impact of invocation images vs. bundles. Invocation images requires Docker to run them (at least at the moment), bundles in itself technically don't (depending on how it would implemented). The impact migth be different depending on the choice. |
My few cents are that mixins and prebuilt images kind of aim for the same end result: a built docker image tailored to the steps of the bundle. I think making it possible to run different images in each step/action would be great. However, I do think there are features of mixins that would not be possible by only using pre-built invocation images, such as the meta programming aspects that a mixin has (generating the Dockerfile). The terraform mixin, for example, initializes providers for you automatically into the target invocation image. My suggestion is to keep them both, somewhat like docker compose, which lets you specify an image or a Dockerfile that defines the image. |
What design is being proposed?
The proposal suggests transitioning Porter's architecture from utilizing mixins to adopting custom invocation images that can be referenced remotely. The primary motivation for this design is to eliminate the complexities of creating a custom mixin and shift towards using custom invocation images. This encourages community-driven contributions, supports a broader range of languages and technologies, and aligns with Docker's universally accepted standards.
Additionally, invocation images will automatically mount the
porter.yaml
file, reducing or eliminating the need for manual "wiring" ofporter.yaml
metadata, streamlining the process for developers.Publicly available invocation images, much like the mixin CLI, would be indexed and searchable, creating a vibrant ecosystem of pre-built images for various devops stacks such as Kubernetes, Helm, Terraform, etc.
Additional Context
The proposed transition will chiefly impact areas such as the CLI,
porter.yaml
manifests, and the way bundles are defined and managed. This change allows for more flexible use of remote invocation images within theporter.yaml
, enabling reuse and promoting community-created standard images.The existing custom Dockerfile functionality can serve as a precursor to new custom invocation images. Developers can refine custom Dockerfiles into invocation images, which can then be shared through community platforms or repositories, enhancing collaboration and tool accessibility.
Risks/Concerns
What other approaches were considered?
Alternative approaches included maintaining a hybrid model to offer legacy support for mixins. This would reduce disruption but involve maintaining dual models, potentially complicating the overall system architecture. Another approach was enhancing existing mixins to make them easier to use, but this was seen as an insufficient measure given the greater flexibility and community engagement custom invocation images offer.
Implementation Details
Upon acceptance, the proposal would make changes centered around the
porter.yaml
file, allowing direct specification of custom remote invocation images. This encourages the development and uptake of community-driven solution images. Below is an example configuration to illustrate this concept:Additional Examples
Example 1: Kubernetes Deployment Workflow
Example 2: Infrastructure Management with Terraform
Example 3: CI/CD Pipeline with Docker
Checklist
The text was updated successfully, but these errors were encountered: