ansible / ansible-container

DEPRECATED -- Ansible Container was a tool to build Docker images and orchestrate containers using only Ansible playbooks.
GNU Lesser General Public License v3.0
2.19k stars 394 forks source link

Feature Idea: Allow for individual Services to be built/run/destroyed #934

Closed FearTheBadger closed 6 years ago

FearTheBadger commented 6 years ago
ISSUE TYPE
container.yml
version: "2"
services:
  # Kafka Container
  kafka:
    from: centos:7
    ports:
      - "9092:9092"
    roles:
      - role-kafka
    gather_facts: false
    user: kafka
    command: ['/opt/kafka/bin/kafka-server-start.sh', '/opt/kafka/config/server.properties']

  # Zookeeper Container
  zookeeper:
    from: centos:7
    ports:
      - "2181:2181"
    roles:
      - role-zookeeper
    gather_facts: false
    user: "{{ zoo_user }}"
    command: ['/opt/zookeeper/bin/zkServer.sh', 'start-foreground']

registries: {}
SUMMARY

It would be great if I could rebuild my Kafka without needing to rebuild my Zookeeper as well. When I'm testing my services I don't need to destroy and rebuild the services that are already running/working. For larger sets of services this becomes time consuming.

Chostakovitch commented 6 years ago

Have you tried ansible-container build --services kafka and ansible-container run kafka ?

FearTheBadger commented 6 years ago

Thank you I totally missed this. I saw it was not possible to destroy single instances and made assumptions that it was not implemented elsewhere.