Git Product home page Git Product logo

ansible-role_docker-composable's Introduction

docker-composable

A base (dependency-only) role for deploying docker-compose based roles.

Roles using the docker-compose plugin (provided by ansible/docker-roles/toolkit) can use this role as a dependency to automate the most common deployment use cases.

Example (of meta/main.yml):

dependencies:
  - role: docker-composable
    role_name: foo
    compose_data: "{{ foo_compose_data }}"

In most cases, dependent roles will define their compose data in vars/main.yml. Roles may also override the default tasks by passing the deploy_mode_overrides variable and defining their own tasks in tasks/main.yml. (More on this below.)

Deploy Mode

The tasks defined in this role are based on the deploy_mode variable, which is used to specify a deployment use case. Currenty options are:

  • install (default) - installs the dependent role
  • purge - uninstalls the dependent
  • prefetch - pulls docker images for the dependent role

Role Variables

This role must be invoked (as a dependency) with the following variables:

  • role_name is the name of the dependent role; it will be used to save the docker-compose data on the deployed machines; these files can be used to easily recreate deployed containers.
  • compose_data is docker-compose YAML data defining the desired containers and images

This role also supports:

  • deploy_mode is the type of tasks to invoke; optional and defaults to "install"
  • deploy_mode_overrides is a list of deploy modes that will be SKIPPED, allowing dependent roles to define their own override tasks
  • keep_images will bypass Docker image purging if set; use this for faster role debugging.

The following are required for the freeze deployment mode (and can be omitted otherwise):

  • docker_domain - the domain of the docker registry (e.g. "docker-images.locationlabs.com")
  • docker_username - the username to access the docker registry
  • docker_password - the password to access the docker registry
  • release_package_tag - the tag to use to retag target images

ansible-role_docker-composable's People

Contributors

srikalyan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.