ufo 5.0.0 → 5.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/docs/_docs/conventions.md +1 -1
- data/docs/_docs/extras/codebuild-iam-role.md +1 -1
- data/docs/_docs/extras/dockerfile-erb.md +1 -1
- data/docs/_docs/extras/ecs-network-mode.md +1 -1
- data/docs/_docs/extras/load-balancer.md +1 -1
- data/docs/_docs/extras/minimal-deploy-iam.md +1 -1
- data/docs/_docs/extras/notification-arns.md +1 -1
- data/docs/_docs/extras/redirection-support.md +9 -9
- data/docs/_docs/extras/route53-support.md +4 -4
- data/docs/_docs/extras/security-groups.md +1 -1
- data/docs/_docs/extras/ssl-support.md +5 -5
- data/docs/_docs/faq.md +1 -1
- data/docs/_docs/helpers.md +1 -1
- data/docs/_docs/iam-roles.md +3 -2
- data/docs/_docs/install.md +0 -10
- data/docs/_docs/more/auto-completion.md +1 -1
- data/docs/_docs/more/automated-cleanup.md +1 -1
- data/docs/_docs/more/customize-cloudformation.md +1 -1
- data/docs/_docs/more/migrations.md +1 -1
- data/docs/_docs/more/run-in-pieces.md +1 -1
- data/docs/_docs/more/single-task.md +1 -1
- data/docs/_docs/more/stuck-cloudformation.md +1 -1
- data/docs/_docs/more/why-cloudformation.md +1 -1
- data/docs/_docs/next-steps.md +1 -1
- data/docs/_docs/secrets.md +27 -4
- data/docs/_docs/settings.md +10 -9
- data/docs/_docs/settings/manage-security-groups.md +24 -0
- data/docs/_docs/settings/network.md +11 -1
- data/docs/_docs/structure.md +10 -9
- data/docs/_docs/tutorial-ufo-init.md +1 -7
- data/docs/_docs/ufo-current.md +1 -1
- data/docs/_docs/ufo-env-extra.md +1 -1
- data/docs/_docs/ufo-env.md +3 -5
- data/docs/_docs/ufo-logs.md +1 -2
- data/docs/_docs/ufo-task-params.md +1 -1
- data/docs/_docs/upgrading.md +1 -1
- data/docs/_docs/upgrading/upgrade4.5.md +2 -2
- data/docs/_docs/upgrading/upgrade4.md +2 -2
- data/docs/_docs/upgrading/upgrade5.md +19 -0
- data/docs/_docs/variables.md +1 -1
- data/docs/_includes/cfn-customize.md +18 -4
- data/docs/_includes/footer.html +6 -5
- data/docs/_reference/ufo-init.md +14 -15
- data/docs/articles.md +1 -1
- data/lib/template/.secrets +5 -3
- data/lib/template/.ufo/iam_roles/execution_role.rb +7 -0
- data/lib/template/.ufo/iam_roles/task_role.rb +21 -0
- data/lib/template/.ufo/templates/fargate.json.erb +0 -1
- data/lib/ufo/dsl/helper.rb +2 -2
- data/lib/ufo/dsl/helper/vars.rb +0 -1
- data/lib/ufo/ecr/auth.rb +10 -21
- data/lib/ufo/init.rb +0 -2
- data/lib/ufo/sequence.rb +0 -16
- data/lib/ufo/setting/profile.rb +12 -1
- data/lib/ufo/stack/builder/base.rb +5 -5
- data/lib/ufo/stack/builder/resources/ecs.rb +16 -8
- data/lib/ufo/stack/builder/resources/security_group/ecs.rb +1 -1
- data/lib/ufo/stack/builder/resources/security_group/ecs_rule.rb +1 -1
- data/lib/ufo/stack/builder/resources/security_group/elb.rb +1 -1
- data/lib/ufo/version.rb +1 -1
- data/spec/lib/ecr_auth_spec.rb +32 -20
- data/ufo.gemspec +1 -1
- metadata +11 -7
@@ -2,7 +2,7 @@
|
|
2
2
|
title: Settings Network
|
3
3
|
short_title: Network
|
4
4
|
categories: settings
|
5
|
-
nav_order:
|
5
|
+
nav_order: 17
|
6
6
|
---
|
7
7
|
|
8
8
|
The settings.yml file references a network settings file with the `network_profile` option. This file has configurations that are related to the network. The source code for the starter template file is at [network/default.yml.tt](https://github.com/tongueroo/ufo/blob/master/lib/template/.ufo/settings/network/default.yml.tt) Here's an example network settings file.
|
@@ -22,6 +22,16 @@ elb_subnets: # defaults to same subnets as ecs_subnets when not set
|
|
22
22
|
# - sg-aaa
|
23
23
|
# ecs_security_groups:
|
24
24
|
# - sg-bbb
|
25
|
+
|
26
|
+
# Also supports extra security groups specific to each ECS service.
|
27
|
+
# So you can target security groups on a per-role basis.
|
28
|
+
# ecs_security_groups:
|
29
|
+
# demo-web:
|
30
|
+
# - sg-bbb
|
31
|
+
# - sg-ccc
|
32
|
+
# demo-worker:
|
33
|
+
# - sg-bbb
|
34
|
+
# - sg-ccc
|
25
35
|
```
|
26
36
|
|
27
37
|
Option | Description
|
data/docs/_docs/structure.md
CHANGED
@@ -25,15 +25,16 @@ The table below covers the purpose of each folder and file.
|
|
25
25
|
|
26
26
|
File / Directory | Description
|
27
27
|
------------- | -------------
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
28
|
+
iam_roles/ | Where ufo managed iam roles associated with the task definition can be defined. For more details see: [IAM Roles]({% link _docs/iam-roles.md %}).
|
29
|
+
output/ | The folder where the generated task definitions are written to. The way the task definitions are generated is covered in [ufo tasks build]({% link _docs/tutorial-ufo-tasks-build.md %}).
|
30
|
+
params | This is where you can adjust the params that get send to the aws-sdk api calls for the [ufo task](https://ufoships.com/reference/ufo-task/) command. More info at [Params]({% link _docs/ufo-task-params.md %}).
|
31
|
+
settings.yml | Ufo's general settings file, where you adjust the default [settings]({% link _docs/settings.md %}).
|
32
|
+
settings/cfn/default.yml | Ufo's cfn settings. You can customize the CloudFormation resource properties here.
|
33
|
+
settings/network/default.yml | Ufo's network settings. You can customize the vpc and subnets to used here.
|
34
|
+
task_definitions.rb | This is where you define the task definitions and specify the variables to be used by the ERB templates.
|
35
|
+
templates/ | The ERB templates with the task definition json code. The templates are covered in more detail in [ufo tasks build]({% link _docs/tutorial-ufo-tasks-build.md %}).
|
36
|
+
templates/main.json.erb | This is the main and starter template task definition json file that ufo initially generates.
|
37
|
+
variables | This is where you can define shared variables that are made available to the `template_definitions.rb` and your templates. More info at [Variables]({% link _docs/variables.md %}).
|
37
38
|
|
38
39
|
Now that you know where the ufo configurations are located and what they look like, let’s use ufo!
|
39
40
|
|
@@ -65,8 +65,6 @@ base:
|
|
65
65
|
# clean_keep: 30 # cleans up docker images on your docker server.
|
66
66
|
# ecr_keep: 30 # cleans up images on ECR and keeps this remaining amount. Defaults to keep all.
|
67
67
|
# defaults when an new ECS service is created by ufo ship
|
68
|
-
network_profile: default # .ufo/settings/network/default.yml file
|
69
|
-
cfn_profile: default # .ufo/settings/cfn/default.yml file
|
70
68
|
|
71
69
|
development:
|
72
70
|
# cluster: dev # uncomment if you want the cluster name be other than the default
|
@@ -75,14 +73,10 @@ development:
|
|
75
73
|
# When you have AWS_PROFILE set to one of these values, ufo will switch to the desired
|
76
74
|
# environment. This prevents you from switching AWS_PROFILE, forgetting to
|
77
75
|
# also switch UFO_ENV, and accidentally deploying to production vs development.
|
78
|
-
#
|
79
|
-
# - dev_profile1
|
80
|
-
# - dev_profile2
|
76
|
+
# aws_profile: dev_profile1
|
81
77
|
|
82
78
|
production:
|
83
79
|
# cluster: prod
|
84
|
-
# aws_profiles:
|
85
|
-
# - prod_profile
|
86
80
|
```
|
87
81
|
|
88
82
|
The `image` value is the name that ufo will use as a base portion of the name to generate a Docker image name, it should not include the tag portion.
|
data/docs/_docs/ufo-current.md
CHANGED
data/docs/_docs/ufo-env-extra.md
CHANGED
data/docs/_docs/ufo-env.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
---
|
2
2
|
title: UFO_ENV
|
3
|
-
nav_order:
|
3
|
+
nav_order: 24
|
4
4
|
---
|
5
5
|
|
6
6
|
Ufo's behavior is controlled by the `UFO_ENV` environment variable. For example, the `UFO_ENV` variable is used to layer different ufo variable files together to make it easy to specify settings for different environments like production and development. This is covered thoroughly in the [Variables]({% link _docs/variables.md %}) section. `UFO_ENV` defaults to `development` when not set.
|
@@ -27,12 +27,10 @@ The most interesting way to set `UFO_ENV` is with the `aws_profiles` setting in
|
|
27
27
|
|
28
28
|
```yaml
|
29
29
|
development:
|
30
|
-
|
31
|
-
- my-dev-profile
|
30
|
+
aws_profile: my-dev-profile
|
32
31
|
|
33
32
|
production:
|
34
|
-
|
35
|
-
- my-prod-profile
|
33
|
+
aws_profile: my-prod-profile
|
36
34
|
```
|
37
35
|
|
38
36
|
In this case, when you set `AWS_PROFILE` to switch AWS profiles, ufo picks this up and maps the `AWS_PROFILE` value to the specified `UFO_ENV` using the `aws_profiles` lookup. Example:
|
data/docs/_docs/ufo-logs.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
---
|
2
2
|
title: ufo logs command
|
3
|
-
nav_order:
|
3
|
+
nav_order: 23
|
4
4
|
---
|
5
5
|
|
6
6
|
The ufo logs command will tail the logs of the ecs service if you are using the awslogs driver.
|
@@ -46,5 +46,4 @@ The generated .ufo task definition defaults to the awslogs driver. If you need i
|
|
46
46
|
}
|
47
47
|
```
|
48
48
|
|
49
|
-
|
50
49
|
{% include prev_next.md %}
|
data/docs/_docs/upgrading.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
---
|
2
2
|
title: Upgrading to Version 4.0
|
3
3
|
short_title: Version 4.0
|
4
|
-
order:
|
4
|
+
order: 3
|
5
5
|
categories: upgrading
|
6
|
-
nav_order:
|
6
|
+
nav_order: 41
|
7
7
|
---
|
8
8
|
|
9
9
|
A major change in ufo from version 3 to 4 is that the ECS service is now created by CloudFormation. If you have an existing ECS service deployed by ufo version 3, when you deploy your app again with ufo version 4, there will be a new additional ECS service created. Here is the recommended upgrade path.
|
@@ -0,0 +1,19 @@
|
|
1
|
+
---
|
2
|
+
title: Upgrading to Version 5
|
3
|
+
short_title: Version 5
|
4
|
+
order: 1
|
5
|
+
categories: upgrading
|
6
|
+
nav_order: 39
|
7
|
+
---
|
8
|
+
|
9
|
+
In ufo v5, the ufo went from underscore key names in the [cfn settings files]({% link _docs/settings/cfn.md %}) to camelized key names. So the auto_camelize behavior is disabled for newly `ufo init` projects. This mean ufo is backwards compatiable. You can enable the v5 behavior with `auto_camelize: false`. If you have not adjusted this setting, then ufo should still work with your current `.ufo` files.
|
10
|
+
|
11
|
+
## Upgrading Instructions
|
12
|
+
|
13
|
+
If you want to upgrade to the latest ufo v5 default behavior.
|
14
|
+
|
15
|
+
1. Adjust your .ufo/settings/cfn files so that the keys are camelized
|
16
|
+
2. Add to your .ufo/settings.yml `auto_camelize: false`
|
17
|
+
3. Deploy and verify that your ECS app stil works
|
18
|
+
|
19
|
+
{% include prev_next.md %}
|
data/docs/_docs/variables.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
---
|
2
2
|
title: Shared Variables
|
3
|
-
nav_order:
|
3
|
+
nav_order: 18
|
4
4
|
---
|
5
5
|
|
6
6
|
Often, you end up using the set of common variables across your task definitions for a project. Ufo supports a shared variables concept to support this. You specify variables files in the `.ufo/variables` folder and they are made available to your `.ufo/task_definitions.rb` as well as your `.ufo/templates` files.
|
@@ -5,11 +5,11 @@ The properties in the file `.ufo/settings/cfn/default.yml` map directly to ufo's
|
|
5
5
|
Let's customize the `AWS::ElasticLoadBalancingV2::TargetGroup` resource created by CloudFormation. We'll adjust the `deregistration_delay.timeout_seconds` to `8`. Here's the relevant section of the `.ufo/settings/cfn/default.yml`
|
6
6
|
|
7
7
|
```
|
8
|
-
|
8
|
+
TargetGroup:
|
9
9
|
...
|
10
|
-
|
11
|
-
-
|
12
|
-
|
10
|
+
TargetGroupAttributes:
|
11
|
+
- Key: deregistration_delay.timeout_seconds
|
12
|
+
Value: 8
|
13
13
|
```
|
14
14
|
|
15
15
|
The value will be injected to the generated CloudFormation template under the corresponding "TargetGroup Properties". The generated template looks something like this:
|
@@ -36,4 +36,18 @@ Here's a list of the resources in the [cfn/stack.yml](https://github.com/tonguer
|
|
36
36
|
* Listener
|
37
37
|
* TargetGroup
|
38
38
|
|
39
|
+
## Layering Support
|
40
|
+
|
41
|
+
The `base.yml` profile files always get evaluated and env-specific ENV.yml file are layered or merged together. This miminizes duplication. For example, these files are merged:
|
42
|
+
|
43
|
+
* .ufo/settings/cfn/base.yml
|
44
|
+
* .ufo/settings/cfn/development.yml
|
45
|
+
|
46
|
+
The settings in `development.yml` override the settings in `base.yml`. Here's another example:
|
47
|
+
|
48
|
+
* .ufo/settings/network/base.yml
|
49
|
+
* .ufo/settings/network/development.yml
|
50
|
+
|
51
|
+
Note, this feature is available in v5.0.5+.
|
52
|
+
|
39
53
|
For the most up to date list check out the [cfn/stack.yml](https://github.com/tongueroo/ufo/blob/master/lib/cfn/stack.yml) source code directly.
|
data/docs/_includes/footer.html
CHANGED
@@ -6,11 +6,12 @@
|
|
6
6
|
<div class="footer-col col-md-4">
|
7
7
|
<h3>More Tools</h3>
|
8
8
|
<ul class="list-unstyled tools">
|
9
|
-
<li><a href="
|
10
|
-
<li><a href="
|
11
|
-
<li><a href="
|
12
|
-
<li><a href="
|
13
|
-
<li><a href="https://
|
9
|
+
<li><a href="https://terraspace.cloud">Terraspace</a></li>
|
10
|
+
<li><a href="https://kubes.guru">Kubes</a></li>
|
11
|
+
<li><a href="https://rubyonjets.com">Jets</a></li>
|
12
|
+
<li><a href="https://lono.cloud">Lono</a></li>
|
13
|
+
<li><a href="https://sonic-screwdriver.cloud">Sonic</a></li>
|
14
|
+
<li><a href="https://jack-eb.com">Jack</a></li>
|
14
15
|
</ul>
|
15
16
|
</div>
|
16
17
|
<div class="footer-col col-md-4">
|
data/docs/_reference/ufo-init.md
CHANGED
@@ -107,20 +107,19 @@ If you would like to use a local template that is not on GitHub, then created a
|
|
107
107
|
## Options
|
108
108
|
|
109
109
|
```
|
110
|
-
[--force]
|
111
|
-
--image=IMAGE
|
112
|
-
[--app=APP]
|
113
|
-
[--launch-type=LAUNCH_TYPE]
|
114
|
-
|
115
|
-
[--
|
116
|
-
[--template=
|
117
|
-
[--
|
118
|
-
[--
|
119
|
-
[--
|
120
|
-
[--
|
121
|
-
[--
|
122
|
-
[--
|
123
|
-
[--
|
124
|
-
[--cluster=CLUSTER] # Cluster. Overrides .ufo/settings.yml.
|
110
|
+
[--force] # Bypass overwrite are you sure prompt for existing files.
|
111
|
+
--image=IMAGE # Docker image name without the tag. Example: tongueroo/demo-ufo. Configures ufo/settings.yml
|
112
|
+
[--app=APP] # App name. Preferably one word. Used in the generated ufo/task_definitions.rb. If not specified then the app name is inferred as the folder name.
|
113
|
+
[--launch-type=LAUNCH_TYPE] # ec2 or fargate.
|
114
|
+
# Default: ec2
|
115
|
+
[--template=TEMPLATE] # Custom template to use.
|
116
|
+
[--template-mode=TEMPLATE_MODE] # Template mode: replace or additive.
|
117
|
+
[--vpc-id=VPC_ID] # Vpc id. For settings/network/default.yml.
|
118
|
+
[--ecs-subnets=one two three] # Subnets for ECS tasks, defaults to --elb-subnets set to. For settings/network/default.yml
|
119
|
+
[--elb-subnets=one two three] # Subnets for ELB. For settings/network/default.yml
|
120
|
+
[--verbose], [--no-verbose]
|
121
|
+
[--mute], [--no-mute]
|
122
|
+
[--noop], [--no-noop]
|
123
|
+
[--cluster=CLUSTER] # Cluster. Overrides .ufo/settings.yml.
|
125
124
|
```
|
126
125
|
|
data/docs/articles.md
CHANGED
data/lib/template/.secrets
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
|
1
|
+
# Example starter secrets file. Be sure that the SSM parameters or Secrets exist.
|
2
|
+
# Docs: https://ufoships.com/docs/secrets/
|
3
|
+
#
|
4
|
+
# NAME1=SSM:parameter_name
|
5
|
+
# NAME2=SECRETSMANAGER:secret_name-AbCdEf
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Example starter execution role. Add the iam role permissions that the host needs here:
|
2
|
+
#
|
3
|
+
# More docs: https://ufoships.com/docs/iam-roles/
|
4
|
+
#
|
5
|
+
managed_iam_policy("AmazonSSMReadOnlyAccess")
|
6
|
+
managed_iam_policy("SecretsManagerReadWrite")
|
7
|
+
managed_iam_policy("service-role/AmazonECSTaskExecutionRolePolicy")
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Example starter task role. Add the iam role permissions that the container needs here:
|
2
|
+
#
|
3
|
+
# More docs: https://ufoships.com/docs/iam-roles/
|
4
|
+
#
|
5
|
+
# Examples:
|
6
|
+
#
|
7
|
+
# iam_policy("AmazonS3ReadOnlyAccess",
|
8
|
+
# Action: [
|
9
|
+
# "s3:Get*",
|
10
|
+
# "s3:List*"
|
11
|
+
# ],
|
12
|
+
# Effect: "Allow",
|
13
|
+
# Resource: "*"
|
14
|
+
# )
|
15
|
+
# iam_policy("CloudwatchWrite",
|
16
|
+
# Action: [
|
17
|
+
# "cloudwatch:PutMetricData",
|
18
|
+
# ],
|
19
|
+
# Effect: "Allow",
|
20
|
+
# Resource: "*"
|
21
|
+
# )
|
@@ -2,7 +2,6 @@
|
|
2
2
|
"family": "<%= @family %>",
|
3
3
|
"requiresCompatibilities": ["FARGATE"],
|
4
4
|
"networkMode": "awsvpc",
|
5
|
-
"executionRoleArn": "<%= @execution_role_arn || raise("@execution_role_arn needs to be set") %>",
|
6
5
|
"cpu": "<%= @cpu %>",
|
7
6
|
"memory": "<%= @memory %>",
|
8
7
|
"containerDefinitions": [
|
data/lib/ufo/dsl/helper.rb
CHANGED
@@ -46,11 +46,11 @@ module Ufo
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def secrets(text)
|
49
|
-
Vars.new(text: text
|
49
|
+
Vars.new(text: text).secrets
|
50
50
|
end
|
51
51
|
|
52
52
|
def secrets_file(path)
|
53
|
-
Vars.new(file: path
|
53
|
+
Vars.new(file: path).secrets
|
54
54
|
end
|
55
55
|
|
56
56
|
def current_region
|
data/lib/ufo/dsl/helper/vars.rb
CHANGED
data/lib/ufo/ecr/auth.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'open3'
|
2
|
+
|
1
3
|
=begin
|
2
4
|
Normally, you must authorized to AWS ECR to push to their registry with:
|
3
5
|
|
@@ -27,19 +29,15 @@ module Ufo
|
|
27
29
|
return unless ecr_image?
|
28
30
|
|
29
31
|
auth_token = fetch_auth_token
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
32
|
+
username, password = Base64.decode64(auth_token).split(':')
|
33
|
+
|
34
|
+
command = "docker login -u #{username} --password-stdin #{@repo_domain}"
|
35
|
+
puts "=> #{command}".color(:green)
|
36
|
+
*, status = Open3.capture3(command, stdin_data: password)
|
37
|
+
unless status.success?
|
38
|
+
puts "ERROR: The docker failed to login.".color(:red)
|
39
|
+
exit 1
|
35
40
|
end
|
36
|
-
|
37
|
-
# Handle legacy docker clients that still have old format with https://
|
38
|
-
legacy_entry = "https://#{@repo_domain}"
|
39
|
-
data["auths"][legacy_entry] = {auth: auth_token}
|
40
|
-
|
41
|
-
ensure_dotdocker_exists
|
42
|
-
IO.write(docker_config, JSON.pretty_generate(data))
|
43
41
|
end
|
44
42
|
|
45
43
|
def ecr_image?
|
@@ -50,14 +48,5 @@ module Ufo
|
|
50
48
|
ecr.get_authorization_token.authorization_data.first.authorization_token
|
51
49
|
end
|
52
50
|
|
53
|
-
def docker_config
|
54
|
-
"#{ENV['HOME']}/.docker/config.json"
|
55
|
-
end
|
56
|
-
|
57
|
-
def ensure_dotdocker_exists
|
58
|
-
dirname = File.dirname(docker_config)
|
59
|
-
FileUtils.mkdir_p(dirname) unless File.exist?(dirname)
|
60
|
-
end
|
61
|
-
|
62
51
|
end
|
63
52
|
end
|
data/lib/ufo/init.rb
CHANGED
@@ -9,7 +9,6 @@ module Ufo
|
|
9
9
|
[:image, required: true, desc: "Docker image name without the tag. Example: tongueroo/demo-ufo. Configures ufo/settings.yml"],
|
10
10
|
[:app, desc: "App name. Preferably one word. Used in the generated ufo/task_definitions.rb. If not specified then the app name is inferred as the folder name."],
|
11
11
|
[:launch_type, default: "ec2", desc: "ec2 or fargate."],
|
12
|
-
[:execution_role_arn, desc: "execution role arn used by tasks, required for fargate."],
|
13
12
|
[:template, desc: "Custom template to use."],
|
14
13
|
[:template_mode, desc: "Template mode: replace or additive."],
|
15
14
|
[:vpc_id, desc: "Vpc id. For settings/network/default.yml."],
|
@@ -56,7 +55,6 @@ module Ufo
|
|
56
55
|
# map variables
|
57
56
|
@app = options[:app] || inferred_app
|
58
57
|
@image = options[:image]
|
59
|
-
@execution_role_arn_input = get_execution_role_arn_input
|
60
58
|
# copy the files
|
61
59
|
puts "Setting up ufo project..."
|
62
60
|
exclude_pattern = File.exist?("#{Ufo.root}/Dockerfile") ?
|
data/lib/ufo/sequence.rb
CHANGED
@@ -17,22 +17,6 @@ module Ufo
|
|
17
17
|
File.basename(Dir.pwd)
|
18
18
|
end
|
19
19
|
|
20
|
-
def get_execution_role_arn_input
|
21
|
-
return @execution_role_arn if @execution_role_arn
|
22
|
-
|
23
|
-
if @options[:execution_role_arn]
|
24
|
-
@execution_role_arn = @options[:execution_role_arn]
|
25
|
-
return @execution_role_arn
|
26
|
-
end
|
27
|
-
|
28
|
-
return unless @options[:launch_type] == "fargate"
|
29
|
-
# execution role arn required for fargate
|
30
|
-
puts "For fargate ECS tasks an ECS Task Execution IAM Role is required. "
|
31
|
-
puts "More details here: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_execution_IAM_role.html"
|
32
|
-
print "Please provide a execution role arn role for the ecs task: "
|
33
|
-
@execution_role_arn = $stdin.gets.strip
|
34
|
-
end
|
35
|
-
|
36
20
|
def override_source_paths(*paths)
|
37
21
|
# Using string with instance_eval because block doesnt have access to
|
38
22
|
# path at runtime.
|