stack_car 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/stack_car/cli.rb +14 -5
- data/lib/stack_car/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93b58e9c3c162600cc498d4c2242c5da431c090d
|
4
|
+
data.tar.gz: d4608eac83ba102a95180a2045a86e8a061397b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9897dcb06eb7a510182c81157f58c478dde1f4fd029c1721fa64a5f5dc4dbb31948b4cf37eb10c30dc816fc2d0fd4ed9c9cb1e249be371da91bfad44b8b1c3f
|
7
|
+
data.tar.gz: 23b934044181ea9b232226b41d15149b9ea75726d73d91245373a744fa061cf3be39ecfc17d49629e2096a69477c487f75321b477d6f1e1e32d576149408c5bd
|
data/lib/stack_car/cli.rb
CHANGED
@@ -25,12 +25,18 @@ module StackCar
|
|
25
25
|
end
|
26
26
|
|
27
27
|
method_option :service, default: '', type: :string, aliases: '-s'
|
28
|
-
desc "stop", "
|
28
|
+
desc "stop", "stops the specified running service, defaults to all"
|
29
29
|
def stop
|
30
30
|
run("docker-compose stop #{options[:service]}")
|
31
31
|
run("rm -rf tmp/pids/*")
|
32
32
|
end
|
33
33
|
|
34
|
+
method_option :service, default: 'web', type: :string, aliases: '-s'
|
35
|
+
desc "build", "builds specified service, defaults to web"
|
36
|
+
def build
|
37
|
+
run("docker-compose build #{options[:service]}")
|
38
|
+
end
|
39
|
+
|
34
40
|
method_option :service, default: 'web', type: :string, aliases: '-s'
|
35
41
|
desc "push ARGS", "wraps docker-compose push web unless --service is used to specify"
|
36
42
|
def push(*args)
|
@@ -85,22 +91,25 @@ module StackCar
|
|
85
91
|
|
86
92
|
desc "release ENVIRONTMENT", "tag and push and image to the registry"
|
87
93
|
def release(environment)
|
94
|
+
timestamp = Time.now.strftime("%Y%m%d%I%M%S")
|
88
95
|
registry = "#{ENV['REGISTRY_HOST']}#{ENV['REGISTRY_URI']}"
|
89
96
|
run("docker login #{ENV['REGISTRY_HOST']}")
|
90
|
-
run("docker tag #{registry} #{registry}:#{environment}-#{
|
91
|
-
run("docker push #{registry}:#{environment}-#{
|
97
|
+
run("docker tag #{registry} #{registry}:#{environment}-#{timestamp}")
|
98
|
+
run("docker push #{registry}:#{environment}-#{timestamp}")
|
92
99
|
run("docker tag #{registry} #{registry}:#{environment}-latest")
|
93
100
|
run("docker push #{registry}:#{environment}-latest")
|
101
|
+
run("docker tag #{registry} #{registry}:latest")
|
102
|
+
run("docker push #{registry}:latest")
|
94
103
|
end
|
95
104
|
|
96
105
|
desc "provision ENVIRONMENT", "configure the servers for docker and then deploy an image"
|
97
106
|
def provision(environment)
|
98
|
-
run("cd ops && ansible-playbook -i hosts -l #{environment} provision.yml")
|
107
|
+
run("cd ops && ansible-playbook -i hosts -l #{environment}:localhost provision.yml")
|
99
108
|
end
|
100
109
|
|
101
110
|
desc "deploy ENVIRONMENT", "deploy an image from the registry"
|
102
111
|
def deploy(environment)
|
103
|
-
run("cd ops && ansible-playbook -i hosts -l #{environment} deploy.yml")
|
112
|
+
run("cd ops && ansible-playbook -i hosts -l #{environment}:localhost deploy.yml")
|
104
113
|
end
|
105
114
|
|
106
115
|
method_option :elasticsearch, default: false, type: :boolean, aliases: '-e'
|
data/lib/stack_car/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stack_car
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Kaufman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -202,7 +202,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
202
202
|
version: '0'
|
203
203
|
requirements: []
|
204
204
|
rubyforge_project:
|
205
|
-
rubygems_version: 2.6.
|
205
|
+
rubygems_version: 2.6.12
|
206
206
|
signing_key:
|
207
207
|
specification_version: 4
|
208
208
|
summary: A tool to make rails + docker easy
|