akashi 0.0.3 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/akashi/builder.rb +1 -1
- data/lib/akashi/elb/ssl_certificate.rb +1 -1
- data/lib/akashi/rds/db_instance.rb +5 -3
- data/lib/akashi/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: 9578ab2da51b4e6bac5c4649ea48949afa3697e8
|
4
|
+
data.tar.gz: 8e9fc90836052a360b7fa320877095182db95c8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 835bbd20859477ea8f0ad23c1802b46d9407034eb554752e46b9aa96980375455a3a326cd04cf2acca377a3f2f1191341dc5ac6e77d7acba9ef3c4135f1ee837
|
7
|
+
data.tar.gz: 0042ef7066c052ecdc3fde6ccddd8ade64859263d75d8d9801d8b349a043d79999a890a59282365149b986ce2f8d99f47c52b10208b65f648df5432cb59cfd72
|
data/Gemfile.lock
CHANGED
data/lib/akashi/builder.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
module Akashi
|
2
2
|
class Builder
|
3
3
|
def build
|
4
|
+
create_ssl_certificate
|
4
5
|
create_vpc
|
5
6
|
create_internet_gateway
|
6
7
|
create_subnets
|
7
8
|
create_security_groups
|
8
9
|
create_key_pair
|
9
|
-
create_ssl_certificate
|
10
10
|
create_ec2_instances
|
11
11
|
create_subnet_group
|
12
12
|
create_db_instance
|
@@ -18,7 +18,7 @@ module Akashi
|
|
18
18
|
private_key: OpenSSL::PKey::RSA.new(File.read(private_key_path)).to_pem,
|
19
19
|
server_certificate_name: Akashi.name,
|
20
20
|
}
|
21
|
-
options.merge!(
|
21
|
+
options.merge!(certificate_chain: certificate_chain) if !!certificate_chain
|
22
22
|
|
23
23
|
response = Akashi::Aws.iam.client.upload_server_certificate(options)
|
24
24
|
|
@@ -6,7 +6,7 @@ module Akashi
|
|
6
6
|
|
7
7
|
class << self
|
8
8
|
def create(security_group:)
|
9
|
-
password = Akashi.manifest.rds.password || random_password(10)
|
9
|
+
password = Akashi.manifest.rds.password || random_password(length: 10)
|
10
10
|
options = {
|
11
11
|
db_name: Akashi.name(separator: "_"),
|
12
12
|
db_instance_identifier: Akashi.name,
|
@@ -16,7 +16,6 @@ module Akashi
|
|
16
16
|
master_username: Akashi.application,
|
17
17
|
master_user_password: password,
|
18
18
|
multi_az: !!Akashi.manifest.rds.multi_az,
|
19
|
-
availability_zone: Akashi.manifest.rds.availability_zone,
|
20
19
|
vpc_security_group_ids: [ security_group.id ],
|
21
20
|
db_subnet_group_name: Akashi.name,
|
22
21
|
engine_version: Akashi.manifest.rds.engine_version,
|
@@ -26,6 +25,9 @@ module Akashi
|
|
26
25
|
if !!Akashi.manifest.rds.parameter_group_name
|
27
26
|
options.merge!(db_parameter_group_name: Akashi.manifest.rds.parameter_group_name)
|
28
27
|
end
|
28
|
+
unless !!Akashi.manifest.rds.multi_az
|
29
|
+
options.merge!(availability_zone: Akashi.manifest.rds.availability_zone)
|
30
|
+
end
|
29
31
|
|
30
32
|
response = Akashi::Aws.rds.client.create_db_instance(options)
|
31
33
|
|
@@ -34,7 +36,7 @@ module Akashi
|
|
34
36
|
end
|
35
37
|
end
|
36
38
|
|
37
|
-
def random_password(length)
|
39
|
+
def random_password(length:)
|
38
40
|
[*0..9, *"a".."z", *"A".."Z"].sample(length).join
|
39
41
|
end
|
40
42
|
|
data/lib/akashi/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: akashi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- asonas
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-06-
|
12
|
+
date: 2014-06-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|