ciinabox-ecs 0.2.11.alpha.1529998710 → 0.2.11.alpha.1531180538

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/templates/ecs-cluster.rb +7 -16
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ac712cc04f8bbeccf6734dc373151fd1eab30fd273882f2e1e6fc39a94594b32
4
- data.tar.gz: 5d0bfef547bfc371e01b6c06a39799187142b2e4b3fce730921086a562808cba
3
+ metadata.gz: 2d63c6bd2656a587a33c23b3710703aaca7dfa66b7e5c9343ac120c9848b919a
4
+ data.tar.gz: aa4e7602c4a47929fea59874f0603685f80422479c0bca452d27b0474cfb596f
5
5
  SHA512:
6
- metadata.gz: 5d3214479c3c4113134c49355beef800d9d610074fc3064a15970cc750dd2298dbe6f98d07dac388cfe14c5bf452fb64191a374c08d8f066cec19b501490b3c5
7
- data.tar.gz: d6be939e1983a2352b7335c1b354233bd869df8b7d039697ab8be79d85e8593f85d8adbe4758344feace7bf2486050917885ec61c8d5a18d5a6d9247fd54dd8e
6
+ metadata.gz: 0877f6b0e84142a1ba131c16379a9b31a75fecb607a780f1a28c8b12342b1bd1b1e6f511a9afb4e94e2f6a854b97ecbb71c772a3bdc2be9fdf26e661aa80930c
7
+ data.tar.gz: 95473503052cb5c7951c55420f2cdb6050cab7e402ebfedec6b8a561bed14a2d6441aab6650b95f224a37da5ba4466b2d061740d3b783e3e2162bf005a5c1b2f
@@ -134,6 +134,12 @@ CloudFormation {
134
134
  end
135
135
  end
136
136
 
137
+ proxy_config_userdata = ''
138
+ if defined? proxy_config
139
+ proxy_config_userdata = "mkdir -p /opt/proxy && " +
140
+ "echo \"#{proxy_config}\" >> /opt/proxy/proxy_config.conf\n"
141
+ end
142
+
137
143
  ecs_allow_sg_ingress = [
138
144
  { IpProtocol: 'tcp', FromPort: '32768', ToPort: '65535', CidrIp: FnJoin( "", [ FnFindInMap('EnvironmentType','ciinabox','NetworkPrefix'),".", FnFindInMap('EnvironmentType','ciinabox','StackOctet'), ".0.0/",FnFindInMap('EnvironmentType','ciinabox','StackMask') ] ) },
139
145
  ]
@@ -162,27 +168,12 @@ CloudFormation {
162
168
  if not ecs_block_device_mapping.empty?
163
169
  Property("BlockDeviceMappings", ecs_block_device_mapping)
164
170
  end
165
- if defined? proxy_config
166
- Metadata(
167
- 'AWS::CloudFormation::Init': {
168
- config: {
169
- files: {
170
- '/opt/proxy/proxy_config.conf': {
171
- content: proxy_config,
172
- mode: "000644",
173
- owner: "root",
174
- group: "root"
175
- }
176
- }
177
- }
178
- }
179
- )
180
- end
181
171
  UserData FnBase64(FnJoin("", [
182
172
  "#!/bin/bash\n",
183
173
  "echo ECS_CLUSTER=", Ref('ECSCluster'), " >> /etc/ecs/ecs.config\n",
184
174
  "INSTANCE_ID=$(echo `/opt/aws/bin/ec2-metadata -i | cut -f2 -d:`)\n",
185
175
  "PRIVATE_IP=`/opt/aws/bin/ec2-metadata -o | cut -f2 -d: | cut -f2 -d-`\n",
176
+ "#{proxy_config_userdata}",
186
177
  "yum install -y python-pip\n",
187
178
  "python-pip install --upgrade awscli\n",
188
179
  "/usr/local/bin/aws --region ", Ref("AWS::Region"), " ec2 attach-volume --volume-id ", Ref(volume_name), " --instance-id ${INSTANCE_ID} --device /dev/sdf\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.11.alpha.1529998710
4
+ version: 0.2.11.alpha.1531180538
5
5
  platform: ruby
6
6
  authors:
7
7
  - Base2Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-26 00:00:00.000000000 Z
11
+ date: 2018-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake