ciinabox-ecs 0.2.17.alpha.1612322070 → 0.3.0.alpha.1617686815

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: 950c9d5e0c1f37277b1c365f72315fb1d0807b8cbde7db116517569f850cc196
4
- data.tar.gz: 6ca4a35410b7e9a553b9bddedaaf6805b681403023b7ac106e7bca68a43f2f2b
3
+ metadata.gz: 14782968f00b111af7ccdd5762e480add7a5d0ced53a87e543599fc67345e87e
4
+ data.tar.gz: 845da850d5bf760b74f309c7db3021e4de785f7355b0bef2cbce8ba7f94c9ae4
5
5
  SHA512:
6
- metadata.gz: d35fa68e01405d1f5ca917a8a6f7b13138a924305c1e2aa6d3b71215d6bd66bb39deb3d68660644b0fbda3a3f8f271d738a87c997476c5d906b4a2424188e783
7
- data.tar.gz: 55da6021f706b50bd0c68ef6a6aa506eddfab2b5826a83ef1e08a84b0aea3ee9c4532303643f2bda52f709555c9a38d2b04ba65b877ddb0407c5f0c87f234889
6
+ metadata.gz: 4f14dcc2690e9982f9061f6f653ac8085b389c00ae17f9cccc3abecd6b5028d3d69382f79f5aeb1a5fcdb25df3318c9e24e7fe603fe07b480b9735632f92d42b
7
+ data.tar.gz: f2a58bf4c1a25ccd1be523f0d2590fb37bc4621e2212bcd6e6b15246cff63758c0a2864228632bc12dce6dbacba81a1196f6a0be2c8eab98bcc03e76596d56d0
@@ -285,7 +285,7 @@ CloudFormation {
285
285
  Name: 'proxy',
286
286
  Memory: 256,
287
287
  Cpu: 100,
288
- Image: 'jwilder/nginx-proxy',
288
+ Image: 'ghcr.io/base2services/ciinabox-nginx',
289
289
  PortMappings: [{
290
290
  HostPort: 8080,
291
291
  ContainerPort: 80
@@ -1,6 +1,7 @@
1
1
  require 'cfndsl'
2
2
  require 'securerandom'
3
3
  require 'deep_merge'
4
+ require_relative '../../ext/helper'
4
5
 
5
6
  # default values
6
7
  shared_envs = {
@@ -1,4 +1,5 @@
1
1
  require 'cfndsl'
2
+ require_relative '../../ext/helper'
2
3
 
3
4
  if !defined? timezone
4
5
  timezone = 'GMT'
@@ -15,10 +16,9 @@ end
15
16
  # Prefixing application images allows us to 'vendorize' ciinabox into client's account by setting
16
17
  # ciinabox_repo to ${account_no}.dkr.ecr.${region}.amazonaws.com
17
18
  if not defined? ciinabox_repo
18
- ciinabox_repo=''
19
+ ciinabox_repo = 'ghcr.io/base2services'
19
20
  end
20
-
21
- image = "#{ciinabox_repo}ghcr.io/base2services/ciinabox-jenkins:lts"
21
+ image = "#{ciinabox_repo}/ciinabox-jenkins:lts"
22
22
 
23
23
  jenkins_java_opts = ''
24
24
  memory = 2048
@@ -110,7 +110,7 @@ if defined? include_diind_slave and include_diind_slave
110
110
  dind_definition = {
111
111
  Name: 'jenkins-docker-dind-slave',
112
112
  Memory: slave_memory,
113
- Image: "#{ciinabox_repo}ghcr.io/base2services/ciinabox-docker-slave:#{docker_slave_version}",
113
+ Image: "#{ciinabox_repo}/ciinabox-docker-slave:#{docker_slave_version}",
114
114
  Environment: [{Name: 'RUN_DOCKER_IN_DOCKER', Value: 1}],
115
115
  Essential: false,
116
116
  Privileged: true
@@ -141,7 +141,7 @@ if defined? include_dood_slave and include_dood_slave
141
141
  dood_definition = {
142
142
  Name: 'jenkins-docker-dood-slave',
143
143
  Memory: slave_memory,
144
- Image: "#{ciinabox_repo}ghcr.io/base2services/ciinabox-docker-slave:#{docker_slave_version}",
144
+ Image: "#{ciinabox_repo}/ciinabox-docker-slave:#{docker_slave_version}",
145
145
  Environment: [{Name: 'RUN_DOCKER_IN_DOCKER', Value: 0}],
146
146
  MountPoints: [
147
147
  {
@@ -0,0 +1,127 @@
1
+ require 'cfndsl'
2
+ require_relative '../../ext/helper'
3
+
4
+ if !defined? timezone
5
+ timezone = 'GMT'
6
+ end
7
+
8
+ image = 'sonarqube:lts'
9
+ java_opts = ''
10
+ memory = 2048
11
+ cpu = 300
12
+ container_port = 0
13
+ service = lookup_service('sonarqube', services)
14
+ if service
15
+ java_opts = service['JAVA_OPTS'] || ''
16
+ image = service['ContainerImage'] || image
17
+ memory = service['ContainerMemory'] || 2048
18
+ cpu = service['ContainerCPU'] || 300
19
+ container_port = service['InstancePort'] || 0
20
+ end
21
+
22
+ CloudFormation {
23
+
24
+ AWSTemplateFormatVersion "2010-09-09"
25
+ Description "ciinabox - ECS Service SonarQube v#{ciinabox_version}"
26
+
27
+ Parameter("ECSCluster"){ Type 'String' }
28
+ Parameter("ECSRole"){ Type 'String' }
29
+ Parameter("ServiceELB"){ Type 'String' }
30
+
31
+ Resource('SonarQubeTask') {
32
+ Type "AWS::ECS::TaskDefinition"
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
+ ])
81
+ Property('Volumes', [
82
+ {
83
+ Name: 'timezone',
84
+ Host: {
85
+ SourcePath: '/etc/localtime'
86
+ }
87
+ },
88
+ {
89
+ Name: 'sonarqube_conf',
90
+ Host: {
91
+ SourcePath: '/data/sonarqube/conf'
92
+ }
93
+ },
94
+ {
95
+ Name: 'sonarqube_extensions',
96
+ Host: {
97
+ SourcePath: '/data/sonarqube/extensions'
98
+ }
99
+ },
100
+ {
101
+ Name: 'sonarqube_logs',
102
+ Host: {
103
+ SourcePath: '/data/sonarqube/logs'
104
+ }
105
+ },
106
+ {
107
+ Name: 'sonarqube_data',
108
+ Host: {
109
+ SourcePath: '/data/sonarqube/data'
110
+ }
111
+ }
112
+ ])
113
+ }
114
+
115
+ Resource('SonarQubeService') {
116
+ Type 'AWS::ECS::Service'
117
+ Property('Cluster', Ref('ECSCluster'))
118
+ Property('DesiredCount', 1)
119
+ Property('TaskDefinition', Ref('SonarQubeTask'))
120
+ Property('Role', Ref('ECSRole')) unless container_port == 0
121
+ Property('LoadBalancers', [
122
+ { ContainerName: 'sonarqube', ContainerPort: container_port, LoadBalancerName: Ref('ServiceELB') }
123
+ ]) unless container_port == 0
124
+
125
+ }
126
+
127
+ }
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.2.17.alpha.1612322070
4
+ version: 0.3.0.alpha.1617686815
5
5
  platform: ruby
6
6
  authors:
7
7
  - Base2Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-03 00:00:00.000000000 Z
11
+ date: 2021-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -147,6 +147,7 @@ files:
147
147
  - templates/services/icinga2.rb
148
148
  - templates/services/jenkins.rb
149
149
  - templates/services/nexus.rb
150
+ - templates/services/sonarqube.rb
150
151
  - templates/vpc.rb
151
152
  - templates/vpn.rb
152
153
  homepage: https://github.com/base2Services/ciinabox-ecs
@@ -168,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
169
  - !ruby/object:Gem::Version
169
170
  version: 1.3.1
170
171
  requirements: []
171
- rubygems_version: 3.2.8
172
+ rubygems_version: 3.2.15
172
173
  signing_key:
173
174
  specification_version: 4
174
175
  summary: Manage ciinabox on Aws Ecs