renuo-cli 1.4.3 → 1.4.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a14a5db957080089a5f4f809b39fe01ec7e881d9e0b5066d0d2feb6051cb345
|
4
|
+
data.tar.gz: daa82da64aea95acf2efa4ad216652f97ff0822d1b1efb426c0e464b60be7a8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ff506e5db3ec04bd1a207af08ee9bd1a83d20a038391fb19dca2dfe2624b1973537d18223e31ae403c73d87d13034a6e437ba3d9de402d7f6e1c4e2af6c6046
|
7
|
+
data.tar.gz: 89aa94ad40d176b73293fd475416b6aa1a745ceb62f814f1a36612eb5e47052f6be85d68bc6cfa7491e7c696974e6f0b13640786ceb62e4af3c66712e62d8153
|
@@ -75,16 +75,16 @@ class CreateAwsProject
|
|
75
75
|
say "\n# AWS #{branch} \n".colorize :green
|
76
76
|
# wrap_at inserts newlines, after that, the command is no longer copyable
|
77
77
|
$terminal.wrap_at = nil if $terminal
|
78
|
-
|
79
|
-
|
80
|
-
|
78
|
+
puts aws_iam_setup(@aws_profile, aws_user(branch), @aws_app_group)
|
79
|
+
puts aws_s3_setup(@aws_profile, aws_user(branch), @aws_region, @redmine_project)
|
80
|
+
puts aws_s3_versioning_setup(@aws_profile, aws_user(branch)) if branch == 'master'
|
81
81
|
cloudfront_setup(aws_user(branch), branch)
|
82
|
-
$terminal.wrap_at = :auto
|
82
|
+
$terminal.wrap_at = :auto if $terminal
|
83
83
|
end
|
84
84
|
|
85
85
|
def cloudfront_setup(bucket, branch)
|
86
86
|
return unless @setup_cloudfront
|
87
|
-
|
87
|
+
puts aws_cloudfront_setup(@aws_profile, bucket, branch, @redmine_project)
|
88
88
|
if @cloudfront_alias[branch.to_sym]
|
89
89
|
say "\n# Warning: Don't forget to set up `#{cloudfront_alias(branch)}` on the DNS "\
|
90
90
|
'if not yet done'.colorize :yellow
|
@@ -128,7 +128,7 @@ class CreateAwsProject
|
|
128
128
|
cloudfront_config_string = CloudfrontConfigService.new(bucket, cloudfront_alias(branch), tags).to_s
|
129
129
|
|
130
130
|
<<-CLOUDFRONT_COMMANDS
|
131
|
-
aws --profile #{profile} cloudfront create-distribution-with-tags --
|
131
|
+
aws --profile #{profile} cloudfront create-distribution-with-tags --distribution-config-with-tags '#{cloudfront_config_string}'
|
132
132
|
CLOUDFRONT_COMMANDS
|
133
133
|
end
|
134
134
|
end
|
@@ -14,104 +14,103 @@ class CloudfrontConfigService
|
|
14
14
|
# rubocop:disable Metrics/MethodLength
|
15
15
|
def bucket_config
|
16
16
|
{
|
17
|
-
"
|
18
|
-
"
|
19
|
-
|
20
|
-
|
21
|
-
"
|
22
|
-
|
23
|
-
|
24
|
-
{
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
"CustomHeaders": {
|
29
|
-
"Quantity": 0
|
30
|
-
},
|
31
|
-
"S3OriginConfig": {
|
32
|
-
"OriginAccessIdentity": ''
|
33
|
-
}
|
34
|
-
}
|
35
|
-
]
|
36
|
-
},
|
37
|
-
"DefaultCacheBehavior": {
|
38
|
-
"TargetOriginId": "S3-#{@bucket}",
|
39
|
-
"ForwardedValues": {
|
40
|
-
"QueryString": false,
|
41
|
-
"Cookies": {
|
42
|
-
"Forward": 'none'
|
43
|
-
},
|
44
|
-
"Headers": {
|
17
|
+
"DistributionConfig": {
|
18
|
+
"CallerReference": unique_caller_reference,
|
19
|
+
"Aliases": bucket_aliases,
|
20
|
+
"Origins": {
|
21
|
+
"Quantity": 1,
|
22
|
+
"Items": [
|
23
|
+
{
|
24
|
+
"Id": "S3-#{@bucket}",
|
25
|
+
"DomainName": "#{@bucket}.s3.amazonaws.com",
|
26
|
+
"OriginPath": '',
|
27
|
+
"CustomHeaders": {
|
45
28
|
"Quantity": 0
|
46
29
|
},
|
47
|
-
"
|
48
|
-
"
|
30
|
+
"S3OriginConfig": {
|
31
|
+
"OriginAccessIdentity": ''
|
49
32
|
}
|
33
|
+
}
|
34
|
+
]
|
35
|
+
},
|
36
|
+
"DefaultCacheBehavior": {
|
37
|
+
"TargetOriginId": "S3-#{@bucket}",
|
38
|
+
"ForwardedValues": {
|
39
|
+
"QueryString": false,
|
40
|
+
"Cookies": {
|
41
|
+
"Forward": 'none'
|
50
42
|
},
|
51
|
-
"
|
52
|
-
"Enabled": false,
|
43
|
+
"Headers": {
|
53
44
|
"Quantity": 0
|
54
45
|
},
|
55
|
-
"
|
56
|
-
|
57
|
-
|
46
|
+
"QueryStringCacheKeys": {
|
47
|
+
"Quantity": 0
|
48
|
+
}
|
49
|
+
},
|
50
|
+
"TrustedSigners": {
|
51
|
+
"Enabled": false,
|
52
|
+
"Quantity": 0
|
53
|
+
},
|
54
|
+
"ViewerProtocolPolicy": 'redirect-to-https',
|
55
|
+
"MinTTL": 0,
|
56
|
+
"AllowedMethods": {
|
57
|
+
"Quantity": 2,
|
58
|
+
"Items": %w[
|
59
|
+
HEAD
|
60
|
+
GET
|
61
|
+
],
|
62
|
+
"CachedMethods": {
|
58
63
|
"Quantity": 2,
|
59
64
|
"Items": %w[
|
60
65
|
HEAD
|
61
66
|
GET
|
62
|
-
]
|
63
|
-
"CachedMethods": {
|
64
|
-
"Quantity": 2,
|
65
|
-
"Items": %w[
|
66
|
-
HEAD
|
67
|
-
GET
|
68
|
-
]
|
69
|
-
}
|
70
|
-
},
|
71
|
-
"SmoothStreaming": false,
|
72
|
-
"DefaultTTL": 86_400,
|
73
|
-
"MaxTTL": 31_536_000,
|
74
|
-
"Compress": true,
|
75
|
-
"LambdaFunctionAssociations": {
|
76
|
-
"Quantity": 0
|
67
|
+
]
|
77
68
|
}
|
78
69
|
},
|
79
|
-
"
|
70
|
+
"SmoothStreaming": false,
|
71
|
+
"DefaultTTL": 86_400,
|
72
|
+
"MaxTTL": 31_536_000,
|
73
|
+
"Compress": true,
|
74
|
+
"LambdaFunctionAssociations": {
|
80
75
|
"Quantity": 0
|
81
|
-
}
|
82
|
-
|
76
|
+
}
|
77
|
+
},
|
78
|
+
"CacheBehaviors": {
|
79
|
+
"Quantity": 0
|
80
|
+
},
|
81
|
+
"CustomErrorResponses": {
|
82
|
+
"Quantity": 0
|
83
|
+
},
|
84
|
+
"Comment": '',
|
85
|
+
"Logging": {
|
86
|
+
"Enabled": false,
|
87
|
+
"IncludeCookies": false,
|
88
|
+
"Bucket": '',
|
89
|
+
"Prefix": ''
|
90
|
+
},
|
91
|
+
"PriceClass": 'PriceClass_100',
|
92
|
+
"Enabled": true,
|
93
|
+
"ViewerCertificate": {
|
94
|
+
"CloudFrontDefaultCertificate": true,
|
95
|
+
"MinimumProtocolVersion": 'TLSv1.2_2018',
|
96
|
+
"CertificateSource": 'cloudfront'
|
97
|
+
},
|
98
|
+
"Restrictions": {
|
99
|
+
"GeoRestriction": {
|
100
|
+
"RestrictionType": 'none',
|
83
101
|
"Quantity": 0
|
84
|
-
}
|
85
|
-
"Comment": '',
|
86
|
-
"Logging": {
|
87
|
-
"Enabled": false,
|
88
|
-
"IncludeCookies": false,
|
89
|
-
"Bucket": '',
|
90
|
-
"Prefix": ''
|
91
|
-
},
|
92
|
-
"PriceClass": 'PriceClass_100',
|
93
|
-
"Enabled": true,
|
94
|
-
"ViewerCertificate": {
|
95
|
-
"CloudFrontDefaultCertificate": true,
|
96
|
-
"MinimumProtocolVersion": 'TLSv1.2_2018',
|
97
|
-
"CertificateSource": 'cloudfront'
|
98
|
-
},
|
99
|
-
"Restrictions": {
|
100
|
-
"GeoRestriction": {
|
101
|
-
"RestrictionType": 'none',
|
102
|
-
"Quantity": 0
|
103
|
-
}
|
104
|
-
},
|
105
|
-
"WebACLId": '',
|
106
|
-
"HttpVersion": 'http2',
|
107
|
-
"IsIPV6Enabled": true
|
102
|
+
}
|
108
103
|
},
|
109
|
-
"
|
110
|
-
|
111
|
-
|
104
|
+
"WebACLId": '',
|
105
|
+
"HttpVersion": 'http2',
|
106
|
+
"IsIPV6Enabled": true
|
107
|
+
},
|
108
|
+
"Tags": {
|
109
|
+
"Items": @tags
|
112
110
|
}
|
113
111
|
}
|
114
112
|
end
|
113
|
+
|
115
114
|
# rubocop:enable Metrics/MethodLength
|
116
115
|
|
117
116
|
def unique_caller_reference
|
data/lib/renuo/cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: renuo-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Renuo AG
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-09-
|
11
|
+
date: 2019-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|