ciinabox-ecs 0.3.1.alpha.1622698898 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/templates/ecs-cluster.rb +0 -2
- data/templates/services/sonarqube.rb +48 -87
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 15b9d63e5865821399629cc2350959b6c883f9b44778e7c383e76687c726800f
|
4
|
+
data.tar.gz: 13786bc661b595ea995b125bb30606986e56bee3e887e8031a428c40170136d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5765a699f82ed330a819b3a40c5640445648060e596ffd380a5d023f373154ee08c5d245b54c10099beb735a7625a2ea947e5edd982223b69cdeca54f943bf38
|
7
|
+
data.tar.gz: a6f72e6360747b853654f750c36a5db3bd04ed69a5143e5086f16dafbaa36846e458804b432da80c4b2802108135871ffe5865ebc45b3b7cd62b95d784ff14d6
|
data/templates/ecs-cluster.rb
CHANGED
@@ -190,8 +190,6 @@ CloudFormation {
|
|
190
190
|
"echo ECS_ENABLE_TASK_CPU_MEM_LIMIT=false >> /etc/ecs/ecs.config\n",
|
191
191
|
"INSTANCE_ID=$(echo `/opt/aws/bin/ec2-metadata -i | cut -f2 -d:`)\n",
|
192
192
|
"PRIVATE_IP=`/opt/aws/bin/ec2-metadata -o | cut -f2 -d: | cut -f2 -d-`\n",
|
193
|
-
"echo 'vm.max_map_count=262144' >> /etc/sysctl.conf\n",
|
194
|
-
"sysctl -p\n",
|
195
193
|
"hostname ciinabox-ecs-xx\n",
|
196
194
|
"#{proxy_config_userdata}",
|
197
195
|
"yum install -y python-pip\n",
|
@@ -17,9 +17,6 @@ if service
|
|
17
17
|
memory = service['ContainerMemory'] || 2048
|
18
18
|
cpu = service['ContainerCPU'] || 300
|
19
19
|
container_port = service['InstancePort'] || 0
|
20
|
-
postgres_url_param_arn = service['PostgresUrlParamArn'] || nil
|
21
|
-
postgres_user_param_arn = service['PostgresUserParamArn'] || nil
|
22
|
-
postgres_password_param_arn = service['PostgresPasswordParamArn'] || nil
|
23
20
|
end
|
24
21
|
|
25
22
|
CloudFormation {
|
@@ -33,70 +30,54 @@ CloudFormation {
|
|
33
30
|
|
34
31
|
Resource('SonarQubeTask') {
|
35
32
|
Type "AWS::ECS::TaskDefinition"
|
36
|
-
Property('
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
sonarqube_container_def[:Secrets] = [
|
85
|
-
{
|
86
|
-
Name: 'SONARQUBE_JDBC_URL',
|
87
|
-
ValueFrom: postgres_url_param_arn
|
88
|
-
},
|
89
|
-
{
|
90
|
-
Name: 'SONARQUBE_JDBC_USERNAME',
|
91
|
-
ValueFrom: postgres_user_param_arn
|
92
|
-
},
|
93
|
-
{
|
94
|
-
Name: 'SONARQUBE_JDBC_PASSWORD',
|
95
|
-
ValueFrom: postgres_password_param_arn
|
96
|
-
}
|
97
|
-
]
|
98
|
-
end
|
99
|
-
Property('ContainerDefinitions', [sonarqube_container_def])
|
33
|
+
Property('ContainerDefinitions', [
|
34
|
+
{
|
35
|
+
Name: 'sonarqube',
|
36
|
+
MemoryReservation: memory,
|
37
|
+
Cpu: cpu,
|
38
|
+
Image: image,
|
39
|
+
Environment: [
|
40
|
+
{
|
41
|
+
Name: 'VIRTUAL_HOST',
|
42
|
+
Value: "sonar.#{dns_domain}"
|
43
|
+
},
|
44
|
+
{
|
45
|
+
Name: 'VIRTUAL_PORT',
|
46
|
+
Value: '9000'
|
47
|
+
}
|
48
|
+
],
|
49
|
+
Ulimits: [
|
50
|
+
{
|
51
|
+
Name: "nofile",
|
52
|
+
SoftLimit: 65536,
|
53
|
+
HardLimit: 65536
|
54
|
+
}
|
55
|
+
],
|
56
|
+
Essential: true,
|
57
|
+
MountPoints: [
|
58
|
+
{
|
59
|
+
ContainerPath: '/etc/localtime',
|
60
|
+
SourceVolume: 'timezone',
|
61
|
+
ReadOnly: true
|
62
|
+
},
|
63
|
+
{
|
64
|
+
ContainerPath: '/opt/sonarqube/extensions',
|
65
|
+
SourceVolume: 'sonarqube_extensions',
|
66
|
+
ReadOnly: false
|
67
|
+
},
|
68
|
+
{
|
69
|
+
ContainerPath: '/opt/sonarqube/logs',
|
70
|
+
SourceVolume: 'sonarqube_logs',
|
71
|
+
ReadOnly: false
|
72
|
+
},
|
73
|
+
{
|
74
|
+
ContainerPath: '/opt/sonarqube/data',
|
75
|
+
SourceVolume: 'sonarqube_data',
|
76
|
+
ReadOnly: false
|
77
|
+
}
|
78
|
+
]
|
79
|
+
}
|
80
|
+
])
|
100
81
|
Property('Volumes', [
|
101
82
|
{
|
102
83
|
Name: 'timezone',
|
@@ -131,26 +112,6 @@ CloudFormation {
|
|
131
112
|
])
|
132
113
|
}
|
133
114
|
|
134
|
-
Resource('TaskExecutionRole') {
|
135
|
-
Type 'AWS::IAM::Role'
|
136
|
-
Property('AssumeRolePolicyDocument', {
|
137
|
-
"Version": "2012-10-17",
|
138
|
-
"Statement": [
|
139
|
-
{
|
140
|
-
"Effect": "Allow",
|
141
|
-
"Principal": {
|
142
|
-
"Service": "ecs-tasks.amazonaws.com"
|
143
|
-
},
|
144
|
-
"Action": "sts:AssumeRole"
|
145
|
-
}
|
146
|
-
]
|
147
|
-
})
|
148
|
-
Property('ManagedPolicyArns', [
|
149
|
-
'arn:aws:iam::aws:policy/AmazonSSMReadOnlyAccess',
|
150
|
-
'arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy'
|
151
|
-
])
|
152
|
-
}
|
153
|
-
|
154
115
|
Resource('SonarQubeService') {
|
155
116
|
Type 'AWS::ECS::Service'
|
156
117
|
Property('Cluster', Ref('ECSCluster'))
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ciinabox-ecs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.1
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Base2Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-06
|
11
|
+
date: 2021-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -165,11 +165,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
165
165
|
version: '0'
|
166
166
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
167
167
|
requirements:
|
168
|
-
- - "
|
168
|
+
- - ">="
|
169
169
|
- !ruby/object:Gem::Version
|
170
|
-
version:
|
170
|
+
version: '0'
|
171
171
|
requirements: []
|
172
|
-
rubygems_version: 3.2.
|
172
|
+
rubygems_version: 3.2.15
|
173
173
|
signing_key:
|
174
174
|
specification_version: 4
|
175
175
|
summary: Manage ciinabox on Aws Ecs
|