qops 1.4.10 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -5
- data/lib/qops/deployment/app.rb +10 -10
- data/lib/qops/deployment/instances.rb +9 -9
- data/lib/qops/environment.rb +1 -1
- data/lib/qops/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd70c30cc7c37b5ecd6518aed0f7a7acbb2f7674
|
4
|
+
data.tar.gz: a565c04736b4e3e6248a08093a4f72c29825a64a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a665a0f24d8bd0870ea908baa0019f1edd3fd143d684c73282a6bc244c4fe421efc8c834746e151844860d7448dfffb4749dde4bb4ae4684ad6537caa536d72
|
7
|
+
data.tar.gz: 522219fb5a32b183826ab4655a13b13390e22e993d6bcaa5e654615a7f53236b27df410e72b4ad6b22d0a48413b08e4c4d6da12b15c3fe466d11bb2341e57262
|
data/README.md
CHANGED
@@ -2,10 +2,10 @@
|
|
2
2
|
|
3
3
|
## Configuring Qops in your project
|
4
4
|
|
5
|
-
1.
|
6
|
-
2.
|
7
|
-
3.
|
8
|
-
4.
|
5
|
+
1. In your repo's config directory create a file called opsworks.yml. See sample.
|
6
|
+
2. Install gem `qops` to your system. Be sure to use gem install `qops`. Do not include it as part of the bundle of your repo as it is mean't to be run outside of the scope of your project.
|
7
|
+
3. Run `qops list` to get a list of commands you can run.
|
8
|
+
4. Run `qops help <command>` for more information on command argument options
|
9
9
|
|
10
10
|
## FAQ:
|
11
11
|
|
@@ -25,7 +25,7 @@ You can use the custom json flag for this. Example:
|
|
25
25
|
|
26
26
|
In this case the `wikiposit` is the opsworks app wikiposit. You will need to change this to whichever app you are deploying.
|
27
27
|
|
28
|
-
See also: http://docs.aws.amazon.com/opsworks/latest/userguide/apps-environment-vars.html
|
28
|
+
See also: <http://docs.aws.amazon.com/opsworks/latest/userguide/apps-environment-vars.html>
|
29
29
|
|
30
30
|
## Sample Config (with all options)
|
31
31
|
|
data/lib/qops/deployment/app.rb
CHANGED
@@ -5,11 +5,7 @@ class Qops::Deploy < Thor
|
|
5
5
|
def app
|
6
6
|
initialize_run
|
7
7
|
|
8
|
-
instances =
|
9
|
-
[retrieve_instance].compact
|
10
|
-
else
|
11
|
-
retrieve_instances
|
12
|
-
end
|
8
|
+
instances = config.deploy_type == 'staging' ? [retrieve_instance].compact : retrieve_instances
|
13
9
|
online_instances = instances.select { |instance| instance.status == 'online' }
|
14
10
|
|
15
11
|
if online_instances.empty?
|
@@ -24,7 +20,9 @@ class Qops::Deploy < Thor
|
|
24
20
|
|
25
21
|
base_deployment_params = {
|
26
22
|
stack_id: config.stack_id,
|
27
|
-
command: {
|
23
|
+
command: {
|
24
|
+
name: 'deploy'
|
25
|
+
}
|
28
26
|
}
|
29
27
|
|
30
28
|
if !config.application_id
|
@@ -38,7 +36,9 @@ class Qops::Deploy < Thor
|
|
38
36
|
base_deployment_params[:custom_json] = custom_json.to_json
|
39
37
|
end
|
40
38
|
|
41
|
-
manifest = {
|
39
|
+
manifest = {
|
40
|
+
environment: config.deploy_type
|
41
|
+
}
|
42
42
|
|
43
43
|
# Deploy the first instance with migration on
|
44
44
|
first_instance = online_instances.first
|
@@ -70,9 +70,7 @@ class Qops::Deploy < Thor
|
|
70
70
|
deployment_params = base_deployment_params.deep_dup
|
71
71
|
run_opsworks_command(deployment_params)
|
72
72
|
|
73
|
-
online_instances.each
|
74
|
-
tag_instance(instance)
|
75
|
-
end
|
73
|
+
online_instances.each { |instance| tag_instance(instance) }
|
76
74
|
|
77
75
|
ping_slack(
|
78
76
|
'Quandl::Slack::Release',
|
@@ -106,6 +104,8 @@ class Qops::Deploy < Thor
|
|
106
104
|
application_name = config.opsworks.describe_apps(app_ids: [config.application_id]).apps.first.name
|
107
105
|
|
108
106
|
@_custom_json[:deploy] = {
|
107
|
+
revision: revision_used,
|
108
|
+
# the following is to be deprecated in favor of the former...
|
109
109
|
application_name => {
|
110
110
|
scm: {
|
111
111
|
revision: revision_used
|
@@ -350,15 +350,15 @@ class Qops::Instance < Thor # rubocop:disable Metrics/ClassLength
|
|
350
350
|
|
351
351
|
ping_slack(
|
352
352
|
'Quandl::Slack::InstanceDown',
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
353
|
+
'Remove existing instance',
|
354
|
+
'success',
|
355
|
+
manifest.merge(
|
356
|
+
completed: Time.now,
|
357
|
+
hostname: instance.hostname,
|
358
|
+
instance_id: instance.instance_id,
|
359
|
+
private_ip: instance.private_ip,
|
360
|
+
public_ip: instance.public_ip
|
361
|
+
)
|
362
362
|
)
|
363
363
|
end
|
364
364
|
end
|
data/lib/qops/environment.rb
CHANGED
@@ -38,7 +38,7 @@ module Qops
|
|
38
38
|
|
39
39
|
begin
|
40
40
|
opsworks.config.credentials.credentials
|
41
|
-
rescue => e
|
41
|
+
rescue => e # rubocop:disable Lint/RescueWithoutErrorClass
|
42
42
|
raise "There may be a problem with your aws credentials. Please correct with `aws configure`. Error: #{e}"
|
43
43
|
end
|
44
44
|
end
|
data/lib/qops/version.rb
CHANGED
metadata
CHANGED
@@ -1,17 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qops
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Basset
|
8
|
-
-
|
8
|
+
- Clement Leung
|
9
9
|
- Jason Byck
|
10
10
|
- Jun Li
|
11
|
+
- Michael Fich
|
11
12
|
autorequire:
|
12
13
|
bindir: bin
|
13
14
|
cert_chain: []
|
14
|
-
date: 2017-
|
15
|
+
date: 2017-09-25 00:00:00.000000000 Z
|
15
16
|
dependencies:
|
16
17
|
- !ruby/object:Gem::Dependency
|
17
18
|
name: qthor
|
@@ -135,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
136
|
version: '0'
|
136
137
|
requirements: []
|
137
138
|
rubyforge_project:
|
138
|
-
rubygems_version: 2.6.
|
139
|
+
rubygems_version: 2.6.13
|
139
140
|
signing_key:
|
140
141
|
specification_version: 4
|
141
142
|
summary: Helper commands for deployment of opsworks projects.
|