Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

ama-docker-compose (3) Versions 0.1.1

Installs/Configures ama-docker-compose

Policyfile
Berkshelf
Knife
cookbook 'ama-docker-compose', '= 0.1.1', :supermarket
cookbook 'ama-docker-compose', '= 0.1.1'
knife supermarket install ama-docker-compose
knife supermarket download ama-docker-compose
README
Dependencies
Quality 29%

ama-docker-compose Cookbook

This cookbook automates installation and usage of
Docker Compose tool.

Please not that most of the actions - at least for 0.1.x - are executed
regardless of current state. Even if all containers are up and running,
action :up will issue a new shell command. Single-service actions
are not yet supported either.

Dev branch state:

Travis branch

Requirements

Platforms

  • Ubuntu LTS 14.04+
  • Debian 7+
  • Fedora 21+
  • Centos 6.5+

Should work on other Linux distros as well, but we don't
have enough time to set up kitchen grounds for all cases. Should work
on Mac as well but never tested.

Chef

  • Chef 12.0 or later

Cookbooks

This cookbook doesn't have any dependencies on other cookbooks.

Attributes

Attributes are used to set default values only.

Key Default
['ama-docker-compose']['version'] 1.12.0

Recipes

You can skip some burden and include default recipe to install
version specified in attribute in default location
(/usr/local/bin/docker-compose).

Resources

docker_compose_installation

Installs Docker Compose, latest version (known by cookbook) by default.

Examples:

docker_compose_installation '/usr/local/bin/docker-compose'
docker_compose_installation 'default' do
  version '1.10.1' 
  path '/usr/local/bin/docker-compose'
end

Available actions are :create/:install and :delete/:remove,
path attribute defaults to resource name, version attribute
defaults to node['ama-docker-compose']['version']. I can't promise
it will always be up to date, though.

docker_compose_deployment

This resource operates with docker composition (named as deployment for
clarity), running commands as up, down, kill and others against set of
docker-compose files.

Examples:

# Runs up command against  specified file
docker_compose_deployment '/srv/router/docker-compose.yml'
docker_compose_deployment 'router' do
  executable '/usr/local/bin/docker-compose'
  files '/srv/router/docker-compose.yml'
  signal 'SIGHUP'
  action :kill
end
docker_compose_deployment 'router' do
  files ['/srv/router/docker-compose.yml', '/srv/router/docker-compose-overrides.yml']
  timeout 10
  action :stop
end

Attributes:

Attribute Types Default Description
files String / String[] Resource name Single or multiple paths to configuration files
executable String /usr/local/bin/docker-compose Path to specific docker-compose executable
timeout Integer / Nil 10 Timeout for internal docker-compose commands where applicable
shell_timeout Integer / Nil 300 Timeout for any underlying command to prevent infinite stalling
signal String SIGKILL Signal for kill command
scale String Arguments for docker-compose scale command e.g. nginx=2

Available actions are:

Action Description
:create Maps to same docker-compose command
:start Maps to same docker-compose command
:stop Maps to same docker-compose command
:delete Alias for :rm to preserve standard Chef action set
:rm Maps to same docker-compose command
:restart Maps to same docker-compose command
:pull Maps to same docker-compose command
:push Maps to same docker-compose command
:up Maps to same docker-compose command
:down Maps to same docker-compose command
:kill Maps to same docker-compose command
:scale Maps to same docker-compose command

Please note that those actions are always executed (at least, for now),
since it is difficult to check whether all containers are up, killed,
stopped or anything else regarding state of deployment. However, you
can always use guard files that, if present, would guarantee action
has been executed.

Contributing

  1. Fork the repository on Github
  2. Create a named feature branch (like add_component_x)
  3. Write your change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass
  6. Submit a Pull Request to dev branch using Github

License and Authors

Authors: AMA Team / Operations

License: MIT

Information about Docker Compose authors and license can be found in
official github repository.

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Collaborator Number Metric
            

0.1.1 failed this metric

Failure: Cookbook has 1 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

0.1.1 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

0.1.1 failed this metric

FC066: Ensure chef_version is set in metadata: ama-docker-compose/metadata.rb:1
FC091: Use property not attribute in custom resources: ama-docker-compose/resources/docker_compose_deployment.rb:6
FC091: Use property not attribute in custom resources: ama-docker-compose/resources/docker_compose_deployment.rb:7
FC091: Use property not attribute in custom resources: ama-docker-compose/resources/docker_compose_deployment.rb:8
FC091: Use property not attribute in custom resources: ama-docker-compose/resources/docker_compose_deployment.rb:9
FC091: Use property not attribute in custom resources: ama-docker-compose/resources/docker_compose_deployment.rb:10
FC091: Use property not attribute in custom resources: ama-docker-compose/resources/docker_compose_deployment.rb:11
FC091: Use property not attribute in custom resources: ama-docker-compose/resources/docker_compose_installation.rb:6
FC091: Use property not attribute in custom resources: ama-docker-compose/resources/docker_compose_installation.rb:7
FC092: Custom resources should not define actions: ama-docker-compose/resources/docker_compose_deployment.rb:3
FC092: Custom resources should not define actions: ama-docker-compose/resources/docker_compose_installation.rb:3
Run with Foodcritic Version 11.2.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

License Metric
            

0.1.1 passed this metric

No Binaries Metric
            

0.1.1 passed this metric

Testing File Metric
            

0.1.1 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

0.1.1 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number