f2y_aws_tool 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/f2y-aws-tool +6 -5
- data/lib/f2y_aws_tool/deploy.rb +5 -0
- data/lib/f2y_aws_tool/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1634d466b5e4424aee9ff293191e0d7044f53d6c
|
|
4
|
+
data.tar.gz: 2e2aaf23e6a18bdc238e640c6efe141cb9da71a4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 17d893afff97107eae7ad01750fdc64058769108afd54a37d5521c02e76a093da8d9ceb21754fbe5e6f3415418fee69d6dd054469225c04d49ac05d60c69dfed
|
|
7
|
+
data.tar.gz: 1a5cc1f3f46c1dc37beaccffff7c2ed762006641f4ffade11c20a3bece3de3b6bce7d6e08842624a72faa9be2785c6e0cbf3a1800347776d1baaea7d4f804bf8
|
data/bin/f2y-aws-tool
CHANGED
|
@@ -4,14 +4,15 @@ require_relative '../lib/f2y_aws_tool'
|
|
|
4
4
|
require 'thor'
|
|
5
5
|
|
|
6
6
|
class F2yAwsToolCli < Thor
|
|
7
|
-
method_option :stack_id, aliases: "-s", desc: "Opsworks
|
|
8
|
-
method_option :app_id, aliases: "-a", desc: "Opsworks
|
|
7
|
+
method_option :stack_id, aliases: "-s", desc: "AWS Opsworks Stack Id", required: true, type: :string
|
|
8
|
+
method_option :app_id, aliases: "-a", desc: "AWS Opsworks App Id", required: true, type: :string
|
|
9
|
+
method_option :region, aliases: "-r", desc: "AWS Opsworks Region", required: true, type: :string
|
|
9
10
|
method_option :wait, aliases: "-w", desc: "Wait until deploy is completed", type: :boolean, default: true
|
|
10
11
|
method_option :migrate, aliases: "-m", desc: "Migrate database", type: :boolean, default: true
|
|
11
|
-
method_option :access_key_id, aliases: "-k", desc: "Access Key Id", type: :string, default: ENV['AWS_ACCESS_KEY_ID']
|
|
12
|
-
method_option :secret_access_key, aliases: "-p", desc: "Secret Access Key", type: :string, default: ENV['AWS_SECRET_ACCESS_KEY']
|
|
12
|
+
method_option :access_key_id, aliases: "-k", desc: "AWS Access Key Id", type: :string, default: ENV['AWS_ACCESS_KEY_ID']
|
|
13
|
+
method_option :secret_access_key, aliases: "-p", desc: "AWS Secret Access Key", type: :string, default: ENV['AWS_SECRET_ACCESS_KEY']
|
|
13
14
|
method_option :log_level, aliases: "-l", desc: "Log level", type: :string, default: 'INFO', enum: ['DEBUG', 'INFO', 'ERROR']
|
|
14
|
-
method_option :log_aws, aliases: "-s", type: :boolean, default: false
|
|
15
|
+
method_option :log_aws, aliases: "-s", desc: "Enable AWS Log", type: :boolean, default: false
|
|
15
16
|
|
|
16
17
|
desc "deploy", "Deploy Opsworks App"
|
|
17
18
|
def deploy
|
data/lib/f2y_aws_tool/deploy.rb
CHANGED
|
@@ -19,6 +19,7 @@ module F2yAwsTool
|
|
|
19
19
|
|
|
20
20
|
def client
|
|
21
21
|
@client ||= Aws::OpsWorks::Client.new(
|
|
22
|
+
region: region,
|
|
22
23
|
access_key_id: access_key_id,
|
|
23
24
|
secret_access_key: secret_access_key,
|
|
24
25
|
logger: aws_logger,
|
|
@@ -49,6 +50,10 @@ module F2yAwsTool
|
|
|
49
50
|
@app_id ||= @options.fetch(:app_id)
|
|
50
51
|
end
|
|
51
52
|
|
|
53
|
+
def region
|
|
54
|
+
@region ||= @options.fetch(:region){ENV.fetch('AWS_REGION')}
|
|
55
|
+
end
|
|
56
|
+
|
|
52
57
|
def migrate?
|
|
53
58
|
@migrate ||= @options.fetch(:migrate)
|
|
54
59
|
end
|
data/lib/f2y_aws_tool/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: f2y_aws_tool
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- nakedmoon
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-02-
|
|
11
|
+
date: 2017-02-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|