Skip to content

Commit 2b1d9dc

Browse files
committed
Backporting master updates
2 parents cefb928 + 575d0d6 commit 2b1d9dc

File tree

5 files changed

+14
-3
lines changed

5 files changed

+14
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## [0.1.1] - 2017-07-31
8+
### Added
9+
- `scale` option by [cvakiitho](https://github.com/cvakiitho) ([#2](https://github.com/ama-team/cookbook-docker-compose/pull/2))
10+
711
## [0.1.0]
812
### Added
913
- Added `docker_compose_installation` resource

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ Attributes:
110110
| `timeout` | Integer / Nil | `10` | Timeout for internal docker-compose commands where applicable |
111111
| `shell_timeout` | Integer / Nil | `300` | Timeout for any underlying command to prevent infinite stalling |
112112
| `signal` | String | `SIGKILL` | Signal for kill command |
113+
| `scale` | String | | Arguments for docker-compose scale command e.g. `nginx=2`|
113114

114115
Available actions are:
115116

@@ -126,6 +127,7 @@ Available actions are:
126127
| `:up` | Maps to same docker-compose command |
127128
| `:down` | Maps to same docker-compose command |
128129
| `:kill` | Maps to same docker-compose command |
130+
| `:scale` | Maps to same docker-compose command |
129131

130132

131133
Please note that those actions are always executed (at least, for now),

metadata.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
license 'MIT'
77
description 'Installs/Configures ama-docker-compose'
88
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
9-
version '0.1.0'
9+
version '0.1.1'
1010

1111
supports 'debian', '>= 7.0'
1212
supports 'ubuntu', '>= 14.04'

resources/docker_compose_deployment.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
resource_name :docker_compose_deployment
22

3-
actions :create, :start, :stop, :delete, :rm, :restart, :pull, :push, :up, :down, :kill
3+
actions :create, :start, :stop, :delete, :rm, :restart, :pull, :push, :up, :down, :kill, :scale
44
default_action :up
55

66
attribute :executable, String, default: '/usr/local/bin/docker-compose'
77
attribute :files, [Array, String], name_property: true
88
attribute :timeout, Integer, default: 10
99
attribute :shell_timeout, Integer, default: 300
1010
attribute :signal, String, default: 'SIGKILL'
11+
attribute :scale, String
1112

1213
action_class do
1314
def configuration_files
@@ -71,3 +72,6 @@ def command_rm
7172
execute_command(*arguments)
7273
end
7374

75+
action :scale do
76+
execute_command 'scale', new_resource.scale
77+
end

test/cookbooks/ama-docker-compose-integration/recipes/deployment_lifecycle.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@
2929

3030
cookbook_file path
3131
docker_compose_deployment path do
32-
action [:create, :start, :stop, :rm, :delete]
32+
scale 'nginx=2'
33+
action [:create, :start, :scale, :stop, :rm, :delete]
3334
end

0 commit comments

Comments
 (0)