ciinabox-ecs 0.2.15 → 0.3.0.alpha.1612323213

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: 4a88f75f5dda20f0aaacdcacf2bec1bf14e77b8cdc13b908b6e5be27cdd84931
4
- data.tar.gz: c2f27fe18ab6635a5e47b3f0089038c4a20217d0ab2c3d72bee930d5f32505b3
3
+ metadata.gz: d200cab46127553027d989b8d951cbff06f1654f255d17ce7949aa37e019c2bc
4
+ data.tar.gz: 6ba4f9c80cb8f01b33b882484382f157fb7457b8b7c5f73a32ac556339ac8faa
5
5
  SHA512:
6
- metadata.gz: 77ae4ba25ddb44ccfbc404354c0b5ff4ea68c41ef9f76527df3c999684a485136bb7b81cd7401e49e624a273f5d0d8afa80518e65a80384c23a5d54cf6466b8e
7
- data.tar.gz: c076b2cd5b69ef7fcf179d58c77caaa863020a08ab569fa23e9cb61a33f769fbed426c47f87a2e6e84dacbd12d23baf1f2eaec36b9ea73de3f173fd0b9cde73a
6
+ metadata.gz: b6dd6406339029c375018d69c903d85e113bfabac3935b7aecfbe871333af93f51668dc918615eb15acc483f3e2cb38097f3fd43791147276fa1577a7945ad18
7
+ data.tar.gz: 741b8b329b8362a1f83c2addc1701a420a53fd5fb1da2140bf4535d8c3cea1b13a9cf151f798cc203878dc611839b5c940aa80b062d6727f786b11188d512b18
data/Rakefile CHANGED
@@ -40,6 +40,8 @@ namespace :ciinabox do
40
40
  config = default_params
41
41
  end
42
42
 
43
+ config.merge!('current_dir'=>current_dir)
44
+
43
45
  Dir["#{ciinaboxes_dir}/#{ciinabox_name}/config/*.yml"].each {|config_file|
44
46
  if not config_file.include?('params.yml')
45
47
  config = config.merge(YAML.load(File.read(config_file)))
@@ -57,6 +57,9 @@ ciinabox_iam_role_name: <%= ciinabox_iam_role_name %>
57
57
  #set the size of the ecs data volume -- NOTE: would take a new volume - i.e. change volume name
58
58
  #ecs_data_volume_size: 250
59
59
 
60
+ #set the spot price for the ECS instance -- NOTE: The default value below is the on-demand price for a t2.large
61
+ #ecs_instance_spot_price: 0.1168
62
+
60
63
  #optional ciinabox name if you need more than one or you want a different name
61
64
  #stack_name: ciinabox-tools
62
65
 
@@ -5,7 +5,7 @@ cd $DIR/..
5
5
  rm -rf lib
6
6
 
7
7
  function pipinstall () {
8
- if [ $(which pip) == '' ]; then
8
+ if [[ $(which pip) == '' ]]; then
9
9
  echo "ERROR! No pip installed. Try installing either python3 pip or docker"
10
10
  exit -1
11
11
  fi
@@ -13,7 +13,7 @@ function pipinstall () {
13
13
  pip install aws-acm-cert-validator==0.1.11 -t lib
14
14
  }
15
15
 
16
- if [ $(which docker) == '' ]; then
16
+ if [[ $(which docker) == '' ]]; then
17
17
  pipinstall
18
18
  else
19
19
  docker run --rm -v $DIR/..:/dst -w /dst -u $UID python:3.6-alpine pip install aws-acm-cert-validator==0.1.11 -t lib
@@ -144,7 +144,7 @@ CloudFormation {
144
144
  if defined? enable_cloudwatch_agent and enable_cloudwatch_agent
145
145
  enable_cloudwatch_agent_userdata = [
146
146
  "mkdir -p /opt/aws/amazon-cloudwatch-agent/etc/\n",
147
- "echo '#{File.open('config/files/amazon-cloudwatch-agent.json').read()}' > /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.json\n",
147
+ "echo '#{File.open("#{config['current_dir']}/config/files/amazon-cloudwatch-agent.json").read()}' > /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.json\n",
148
148
  "wget https://s3.amazonaws.com/amazoncloudwatch-agent/amazon_linux/amd64/latest/amazon-cloudwatch-agent.rpm\n",
149
149
  "echo 'Installing CloudWatch agent...'\n",
150
150
  "rpm -U amazon-cloudwatch-agent.rpm\n",
@@ -181,6 +181,9 @@ CloudFormation {
181
181
  if not ecs_block_device_mapping.empty?
182
182
  Property("BlockDeviceMappings", ecs_block_device_mapping)
183
183
  end
184
+ if defined? ecs_instance_spot_price
185
+ SpotPrice ecs_instance_spot_price
186
+ end
184
187
  UserData FnBase64(FnJoin("", [
185
188
  "#!/bin/bash\n",
186
189
  "echo ECS_CLUSTER=", Ref('ECSCluster'), " >> /etc/ecs/ecs.config\n",
@@ -190,10 +193,9 @@ CloudFormation {
190
193
  "hostname ciinabox-ecs-xx\n",
191
194
  "#{proxy_config_userdata}",
192
195
  "yum install -y python-pip\n",
193
- "python-pip install --upgrade awscli\n",
194
- "/usr/local/bin/aws --region ", Ref("AWS::Region"), " ec2 attach-volume --volume-id ", Ref(volume_name), " --instance-id ${INSTANCE_ID} --device /dev/sdf\n",
196
+ "aws --region ", Ref("AWS::Region"), " ec2 attach-volume --volume-id ", Ref(volume_name), " --instance-id ${INSTANCE_ID} --device /dev/sdf\n",
195
197
  "echo 'waiting for ECS Data volume to attach' && sleep 20\n",
196
- "/usr/local/bin/aws --region ", Ref("AWS::Region"), " ec2 attach-network-interface --network-interface-id ", Ref('ECSENI'), " --instance-id ${INSTANCE_ID} --device-index 1\n",
198
+ "aws --region ", Ref("AWS::Region"), " ec2 attach-network-interface --network-interface-id ", Ref('ECSENI'), " --instance-id ${INSTANCE_ID} --device-index 1\n",
197
199
  "echo 'waiting for ECS ENI to attach' && sleep 20\n",
198
200
  "echo '/dev/xvdf /data ext4 defaults,nofail 0 2' >> /etc/fstab\n",
199
201
  "mkdir -p /data\n",
@@ -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
@@ -18,7 +18,7 @@ if not defined? ciinabox_repo
18
18
  ciinabox_repo=''
19
19
  end
20
20
 
21
- image = "#{ciinabox_repo}base2/ciinabox-jenkins:lts"
21
+ image = "#{ciinabox_repo}ghcr.io/base2services/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}base2/ciinabox-docker-slave:#{docker_slave_version}",
113
+ Image: "#{ciinabox_repo}ghcr.io/base2services/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}base2/ciinabox-docker-slave:#{docker_slave_version}",
144
+ Image: "#{ciinabox_repo}ghcr.io/base2services/ciinabox-docker-slave:#{docker_slave_version}",
145
145
  Environment: [{Name: 'RUN_DOCKER_IN_DOCKER', Value: 0}],
146
146
  MountPoints: [
147
147
  {
@@ -5,7 +5,7 @@ if !defined? timezone
5
5
  timezone = 'GMT'
6
6
  end
7
7
 
8
- image = 'base2/ciinabox-nexus'
8
+ image = 'ghcr.io/base2services/ciinabox-nexus'
9
9
  container_path = '/sonatype-work'
10
10
  java_opts = ''
11
11
  memory = 1024
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.15
4
+ version: 0.3.0.alpha.1612323213
5
5
  platform: ruby
6
6
  authors:
7
7
  - Base2Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-08 00:00:00.000000000 Z
11
+ date: 2021-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -56,16 +56,16 @@ dependencies:
56
56
  name: cfndsl
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: '0.16'
61
+ version: 0.17.1
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: '0.16'
68
+ version: 0.17.1
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: cfn_manage
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -164,11 +164,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
164
164
  version: '0'
165
165
  required_rubygems_version: !ruby/object:Gem::Requirement
166
166
  requirements:
167
- - - ">="
167
+ - - ">"
168
168
  - !ruby/object:Gem::Version
169
- version: '0'
169
+ version: 1.3.1
170
170
  requirements: []
171
- rubygems_version: 3.0.4
171
+ rubygems_version: 3.2.8
172
172
  signing_key:
173
173
  specification_version: 4
174
174
  summary: Manage ciinabox on Aws Ecs