ansible-container icon indicating copy to clipboard operation
ansible-container copied to clipboard

Separation of image build vs. container deployment

Open jistr opened this issue 6 years ago • 2 comments

ISSUE TYPE
  • Feature Idea

I'd wish for more separation between the "building" vs. "deploying" features of ansible-container, or perhaps even making them two different tools. As things are now, i am only interested in building container images with it (replacing Dockerfiles with Ansible), i don't need the orchestration/deployment features. Conflating image building + container deployment could mean potential difficulty handling simpler use cases, e.g. forcing the users who want to simply replace Dockerfiles with Ansible to deal with more restrictions and complexity than required (restrictions+complexity introduced by the tooling rather than the problem at hand).

(E.g. i'd like to build an image named fedora-synapse, but the $project-$service naming scheme doesn't fit this well. (There's not really any "project" here to speak of in ansible-container terms...) I could work around the issue by defining project_name: fedora and service: { synapse: ... } but that seems like a weird hack, since the project i'm working on here simply isn't "fedora" :) If i had to pick a project name here, i'd like it to be "fedora-synapse" and have the built image be the same name. But again, since i'd simply like to build a container image with Ansible, and not define any deployment on this level, i'd prefer not having to pick any project name.)

Separating builds vs. deployments (not using the same .yml file for both, building images not used in deployments, deploying images not built by ansible-container, ...) might make it easier to address some issues by "things falling into place" from semantics point of view. From a brief scan of currently open issues i think these could be related: #217, #757, #595, #552, #357, #281, #125, #76.

jistr avatar Nov 18 '17 19:11 jistr

We recently added a --config-file option. See #777. So you can at least use different container.yml files for build and deploy.

Completely separating build, run and deploy in some fashion is a much large discussion though.

chouseknecht avatar Dec 01 '17 12:12 chouseknecht

Not sure if build/run/deploy needs to be separated, but as jistr i'm using it for build only (not yet push as that still has some issues for me, but would like to). More attention for scenarios with build only would be appreciated. Currently using Make to workaround some of the items.

hans-d avatar Dec 01 '17 22:12 hans-d