ciinabox-ecs 0.2.14.alpha.1565134498 → 0.2.17.alpha.1608078804

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e880b7dba8c1467738c20447f2c674653a5c07fba682096bb1b4a88c0ad0fc20
4
- data.tar.gz: 0ef6400c28bf7ac39c28097397b43258c6b17dc27142e2a69a285119f94dff5e
3
+ metadata.gz: fe94e1bb46f1ef5e8709aff3b713546cd51db01c1476b8fef33d84df244da729
4
+ data.tar.gz: 429e3ea9cf8a5699d1a926a6019f705eb7ee526835bd20bddd51660ebc57afeb
5
5
  SHA512:
6
- metadata.gz: 324fedec1ea455468cdf7129b9863911790ebc73fb3d7abc1bccd99032158326da723dd23233bb6dbf2939c3df04db8b1877664217cdba89dbf5dd8da01ac661
7
- data.tar.gz: e611e774cce5d858f740917666e1f6694811e49effd4f9659f3b6c77f60ed911ec230475bf8ed4d61aa716541c60aaaffbf45afc590c21eccc3382fbf4352dc8
6
+ metadata.gz: 76888f39206c00d2351f7b4c9e17b38d8cb840deb1c4a5e9c60869c37bafd559f54ab474b3ac71897b1019f0589d8572691ef015b10b36d91585f4f3896a5467
7
+ data.tar.gz: 109ddb00b225e522773e41636007414531f681c8188b29c01a94d341b08603342230d1d2002ee80d8b9aa8e030b7f6928fcfaf01883058a790508969bc945e09
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",
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.14.alpha.1565134498
4
+ version: 0.2.17.alpha.1608078804
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-06 00:00:00.000000000 Z
11
+ date: 2020-12-16 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
@@ -168,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
168
  - !ruby/object:Gem::Version
169
169
  version: 1.3.1
170
170
  requirements: []
171
- rubygems_version: 3.0.4
171
+ rubygems_version: 3.2.1
172
172
  signing_key:
173
173
  specification_version: 4
174
174
  summary: Manage ciinabox on Aws Ecs