Class: Ufo::CLI::Help
- Inherits:
-
Object
- Object
- Ufo::CLI::Help
- Defined in:
- lib/ufo/cli/help.rb
Class Method Summary collapse
- .destroy ⇒ Object
- .docker ⇒ Object
- .docker_base ⇒ Object
- .docker_build ⇒ Object
- .docker_cleanup ⇒ Object
- .docker_full_image_name ⇒ Object
- .init ⇒ Object
- .scale ⇒ Object
- .ship ⇒ Object
- .tasks ⇒ Object
- .tasks_build ⇒ Object
- .tasks_register ⇒ Object
Class Method Details
.destroy ⇒ Object
140 141 142 143 144 145 146 147 148 149 |
# File 'lib/ufo/cli/help.rb', line 140 def destroy <<-EOL Examples: Destroys the service. It will automatcally set the desired task size to 0 and stop all task so the destory happens in one command. $ ufo destroy hi-web-prod EOL end |
.docker ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/ufo/cli/help.rb', line 15 def docker <<-EOL Examples: $ ufo docker build $ ufo docker tag EOL end |
.docker_base ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/ufo/cli/help.rb', line 25 def docker_base <<-EOL The docker cache task builds a docker image using the Dockerfile.base file and updates the FROM Dockerfile image with the generated image from Dockerfile.base. Examples: $ ufo docker base $ ufo docker base --no-push # do not push the image to the registry Docker image tongueroo/hi:base-2016-10-21T15-50-57-88071f5 built. EOL end |
.docker_build ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/ufo/cli/help.rb', line 41 def docker_build <<-EOL Examples: $ ufo docker build $ ufo docker build --push # also pushes the image to the docker registry Docker image tongueroo/hi:ufo-2016-10-21T15-50-57-88071f5 built. EOL end |
.docker_cleanup ⇒ Object
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/ufo/cli/help.rb', line 63 def docker_cleanup <<-EOL Examples: Say you currently have these images: * tongueroo/hi:ufo-2016-10-15T19-29-06-88071f5 * tongueroo/hi:ufo-2016-10-16T19-29-06-88071f5 * tongueroo/hi:ufo-2016-10-17T19-29-06-88071f5 * tongueroo/hi:ufo-2016-10-18T19-29-06-88071f5 To clean them up and keep the 3 more recent: $ ufo docker cleanup tongueroo/hi This will remove tongueroo/hi:ufo-2016-10-15T19-29-06-88071f5. EOL end |
.docker_full_image_name ⇒ Object
53 54 55 56 57 58 59 60 61 |
# File 'lib/ufo/cli/help.rb', line 53 def docker_full_image_name <<-EOL Examples: $ ufo docker full_image_name Docker image name that will be used: tongueroo/hi:ufo-2016-10-15T19-29-06-88071f5 EOL end |
.init ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/ufo/cli/help.rb', line 5 def init <<-EOL Examples: $ ufo init --cluster prod --image tongueroo/hi --app hi The image should not include the tag since the tag is generated upon a `ufo ship`. EOL end |
.scale ⇒ Object
151 152 153 154 155 156 157 158 159 160 |
# File 'lib/ufo/cli/help.rb', line 151 def scale <<-EOL Examples: Scales the service. Simple wrapper for `aws ecs update-service --service xxx ----desired-count xxx` $ ufo scale hi-web-prod 5 EOL end |
.ship ⇒ Object
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/ufo/cli/help.rb', line 118 def ship <<-EOL Examples: To build the docker image, generate the task definition and ship it, run: $ ufo ship hi-web-prod By convention the task and service names match. If you need override to this convention then you can specific the task. For example if you want to ship to the `hi-web-prod-1` service and use the `hi-web-prod` task, run: $ ufo ship hi-web-prod-1 --task hi-web-prod The deploy will also created the ECS service if the service does not yet exist on the cluster. The deploy will prompt you for the ELB `--target-group` if you are shipping a web container that does not yet exist. If it is not a web container the `--target-group` option gets ignored. The prommpt can be bypassed by specifying a valid `--target-group` option or specifying the `---no-elb-prompt` option. $ ufo ship hi-web-prod --target-group arn:aws:elasticloadbalancing:us-east-1:123456789:targetgroup/hi-web-prod/jsdlfjsdkd $ ufo ship hi-web-prod --no-elb-prompt EOL end |
.tasks ⇒ Object
85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/ufo/cli/help.rb', line 85 def tasks <<-EOL Examples: $ ufo tasks build Builds all the task defintiions. Note all the existing ufo/output generated task defintions are wiped out. EOL end |
.tasks_build ⇒ Object
97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/ufo/cli/help.rb', line 97 def tasks_build <<-EOL Examples: $ ufo tasks build Builds all the task defintiions. Note all the existing ufo/output generated task defintions are wiped out. EOL end |
.tasks_register ⇒ Object
109 110 111 112 113 114 115 116 |
# File 'lib/ufo/cli/help.rb', line 109 def tasks_register <<-EOL Examples: $ ufo tasks register All the task defintiions in ufo/output registered. EOL end |