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
- .init ⇒ Object
- .scale ⇒ Object
- .ship ⇒ Object
- .ships ⇒ Object
- .task ⇒ Object
- .tasks ⇒ Object
Class Method Details
.destroy ⇒ Object
100 101 102 103 104 105 106 107 108 109 |
# File 'lib/ufo/cli/help.rb', line 100 def destroy "Examples:\n\nDestroys the service. It will automatcally set the desired task size to 0 and stop all task so the destory happens in one command.\n\n$ ufo destroy hi-web-prod\n\n" end |
.docker ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/ufo/cli/help.rb', line 15 def docker "Examples:\n\n$ ufo docker build\n\n$ ufo docker tag\n" end |
.init ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/ufo/cli/help.rb', line 5 def init "Examples:\n\n$ ufo init --app=hi --cluster=stag --image=tongueroo/hi\n\nThe image should not include the tag since the tag is generated upon a `ufo ship`.\n" end |
.scale ⇒ Object
111 112 113 114 115 116 117 118 119 120 |
# File 'lib/ufo/cli/help.rb', line 111 def scale "Examples:\n\nScales the service. Simple wrapper for `aws ecs update-service --service xxx ----desired-count xxx`\n\n$ ufo scale hi-web-prod 5\n\n" end |
.ship ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/ufo/cli/help.rb', line 37 def ship "Examples:\n\nTo build the docker image, generate the task definition and ship it, run:\n\n$ ufo ship hi-web-prod\n\nBy 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:\n\n$ ufo ship hi-web-prod-1 --task hi-web-prod\n\nThe 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.\n\nThe prommpt can be bypassed by specifying a valid `--target-group` option or specifying the `---no-target-group-prompt` option.\n\n$ ufo ship hi-web-prod --target-group arn:aws:elasticloadbalancing:us-east-1:123456789:targetgroup/hi-web-prod/jsdlfjsdkd\n\n$ ufo ship hi-web-prod --no-target-group-prompt\n" end |
.ships ⇒ Object
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/ufo/cli/help.rb', line 59 def ships "Builds docker image, registers it and ships it to multiple services. This deploys the same docker image to multiple ECS services.\n\nExamples:\n\n$ ufo ships hi-web-prod hi-clock-prod hi-worker-prod\n\nBy convention the task definition and service names match for each of the services you ship. If you need to override to this convention then you can specify the task definition for each service with a special syntax. In the special syntax the service and task definition is separated by a colon. Example:\n\n$ ufo ships hi-web-prod-1:hi-web-prod hi-clock-prod-1 hi-worker-prod-1\n\nHere ufo will deploy to the hi-web-prod-1 ECS Service using the hi-web-prod task definition, but use the convention for the rest of the service.\n\nFor each service being deployed to, ufo will create the ECS service if the service does not yet exist on the cluster. The deploy process will prompt you for the ELB `--target-group` if you are deploying to a 'web' service that does not yet exist. Ufo determines that it is a web service by the name of the service. If the service has 'web' in the name then it is considered a web service. If it is not a web service then the `--target-group` option gets ignored.\n\nThe prommpt can be bypassed by specifying a valid `--target-group` option or specifying the `---no-target-group-prompt` option. Examples:\n\n$ ufo ships hi-web-prod hi-clock-prod hi-worker-prod --target-group arn:aws:elasticloadbalancing:us-east-1:123456789:targetgroup/hi-web-prod/jsdlfjsdkd\n\n$ ufo ships hi-web-prod hi-clock-prod hi-worker-prod --no-target-group-prompt\n" end |
.task ⇒ Object
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/ufo/cli/help.rb', line 83 def task "Examples:\n\nTo run a one time task with ECS:\n\n$ ufo task hi-migrate-prod\n\nYou can also override the command used by the Docker container in the task definitions via command.\n\nufo task hi-web-prod --command bin/migrate\n\nufo task hi-web-prod --command bin/with_env bundle exec rake db:migrate:redo VERSION=xxx\n\n" end |
.tasks ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/ufo/cli/help.rb', line 25 def tasks "Examples:\n\n$ ufo tasks build\n\nBuilds all the task defintiions.\n\nNote all the existing ufo/output generated task defintions are wiped out.\n" end |