crazy-yard 3.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +19 -0
- data/README.md +438 -0
- data/bin/ey +9 -0
- data/lib/engineyard.rb +9 -0
- data/lib/engineyard/cli.rb +816 -0
- data/lib/engineyard/cli/api.rb +98 -0
- data/lib/engineyard/cli/recipes.rb +129 -0
- data/lib/engineyard/cli/ui.rb +275 -0
- data/lib/engineyard/cli/web.rb +85 -0
- data/lib/engineyard/config.rb +158 -0
- data/lib/engineyard/deploy_config.rb +65 -0
- data/lib/engineyard/deploy_config/ref.rb +56 -0
- data/lib/engineyard/error.rb +82 -0
- data/lib/engineyard/eyrc.rb +59 -0
- data/lib/engineyard/repo.rb +105 -0
- data/lib/engineyard/serverside_runner.rb +159 -0
- data/lib/engineyard/templates.rb +6 -0
- data/lib/engineyard/templates/ey.yml.erb +196 -0
- data/lib/engineyard/templates/ey_yml.rb +119 -0
- data/lib/engineyard/thor.rb +215 -0
- data/lib/engineyard/version.rb +4 -0
- data/lib/vendor/thor/Gemfile +15 -0
- data/lib/vendor/thor/LICENSE.md +20 -0
- data/lib/vendor/thor/README.md +35 -0
- data/lib/vendor/thor/lib/thor.rb +473 -0
- data/lib/vendor/thor/lib/thor/actions.rb +318 -0
- data/lib/vendor/thor/lib/thor/actions/create_file.rb +105 -0
- data/lib/vendor/thor/lib/thor/actions/create_link.rb +60 -0
- data/lib/vendor/thor/lib/thor/actions/directory.rb +119 -0
- data/lib/vendor/thor/lib/thor/actions/empty_directory.rb +137 -0
- data/lib/vendor/thor/lib/thor/actions/file_manipulation.rb +314 -0
- data/lib/vendor/thor/lib/thor/actions/inject_into_file.rb +109 -0
- data/lib/vendor/thor/lib/thor/base.rb +652 -0
- data/lib/vendor/thor/lib/thor/command.rb +136 -0
- data/lib/vendor/thor/lib/thor/core_ext/hash_with_indifferent_access.rb +80 -0
- data/lib/vendor/thor/lib/thor/core_ext/io_binary_read.rb +12 -0
- data/lib/vendor/thor/lib/thor/core_ext/ordered_hash.rb +100 -0
- data/lib/vendor/thor/lib/thor/error.rb +28 -0
- data/lib/vendor/thor/lib/thor/group.rb +282 -0
- data/lib/vendor/thor/lib/thor/invocation.rb +172 -0
- data/lib/vendor/thor/lib/thor/parser.rb +4 -0
- data/lib/vendor/thor/lib/thor/parser/argument.rb +74 -0
- data/lib/vendor/thor/lib/thor/parser/arguments.rb +171 -0
- data/lib/vendor/thor/lib/thor/parser/option.rb +121 -0
- data/lib/vendor/thor/lib/thor/parser/options.rb +218 -0
- data/lib/vendor/thor/lib/thor/rake_compat.rb +72 -0
- data/lib/vendor/thor/lib/thor/runner.rb +322 -0
- data/lib/vendor/thor/lib/thor/shell.rb +88 -0
- data/lib/vendor/thor/lib/thor/shell/basic.rb +393 -0
- data/lib/vendor/thor/lib/thor/shell/color.rb +148 -0
- data/lib/vendor/thor/lib/thor/shell/html.rb +127 -0
- data/lib/vendor/thor/lib/thor/util.rb +270 -0
- data/lib/vendor/thor/lib/thor/version.rb +3 -0
- data/lib/vendor/thor/thor.gemspec +24 -0
- data/spec/engineyard/cli/api_spec.rb +50 -0
- data/spec/engineyard/cli_spec.rb +28 -0
- data/spec/engineyard/config_spec.rb +61 -0
- data/spec/engineyard/deploy_config_spec.rb +194 -0
- data/spec/engineyard/eyrc_spec.rb +76 -0
- data/spec/engineyard/repo_spec.rb +83 -0
- data/spec/engineyard_spec.rb +7 -0
- data/spec/ey/console_spec.rb +57 -0
- data/spec/ey/deploy_spec.rb +435 -0
- data/spec/ey/ey_spec.rb +23 -0
- data/spec/ey/init_spec.rb +123 -0
- data/spec/ey/list_environments_spec.rb +120 -0
- data/spec/ey/login_spec.rb +33 -0
- data/spec/ey/logout_spec.rb +24 -0
- data/spec/ey/logs_spec.rb +36 -0
- data/spec/ey/rebuild_spec.rb +18 -0
- data/spec/ey/recipes/apply_spec.rb +29 -0
- data/spec/ey/recipes/download_spec.rb +43 -0
- data/spec/ey/recipes/upload_spec.rb +99 -0
- data/spec/ey/rollback_spec.rb +73 -0
- data/spec/ey/scp_spec.rb +176 -0
- data/spec/ey/servers_spec.rb +209 -0
- data/spec/ey/ssh_spec.rb +273 -0
- data/spec/ey/status_spec.rb +45 -0
- data/spec/ey/timeout_deploy_spec.rb +18 -0
- data/spec/ey/web/disable_spec.rb +21 -0
- data/spec/ey/web/enable_spec.rb +26 -0
- data/spec/ey/web/restart_spec.rb +21 -0
- data/spec/ey/whoami_spec.rb +30 -0
- data/spec/spec_helper.rb +84 -0
- data/spec/support/bundled_ey +7 -0
- data/spec/support/fixture_recipes.tgz +0 -0
- data/spec/support/git_repos.rb +115 -0
- data/spec/support/helpers.rb +330 -0
- data/spec/support/matchers.rb +16 -0
- data/spec/support/ruby_ext.rb +13 -0
- data/spec/support/shared_behavior.rb +278 -0
- metadata +411 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7c56b2161f8c13c0adb594ab2828f3bf37ac6c7808f3dcddbde95ab04b80d598
|
4
|
+
data.tar.gz: 50aab069bdd43e2a98f09b6af611f0aa8d5eb22e8cd19e5dcc09585d7d86c295
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 52aae5c0b8690475c55824aceabcf058e686741edf479613126088546e15be9628059e1346da3ccfff55d8fb9f4e7fee1f4ac3d082ae1f18c6165ef75ea09566
|
7
|
+
data.tar.gz: 49a95c3ef42dd91aef03475fb296e69cc863b163726b9ef2025a33b29622bb989f2ebc7fed1fae42789b6b5a8465b5232171e179363fc3de444b14a43c786d2c
|
data/LICENSE
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright (c) 2010 Engine Yard, Inc
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
5
|
+
in the Software without restriction, including without limitation the rights
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
11
|
+
all copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,438 @@
|
|
1
|
+
# `ey` engineyard Command Line Interface
|
2
|
+
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/engineyard.png)][gem]
|
4
|
+
[![Build Status](https://travis-ci.org/engineyard/engineyard.png?branch=master)][travis]
|
5
|
+
[![Dependency Status](https://gemnasium.com/engineyard/engineyard.png?travis)][gemnasium]
|
6
|
+
[![Code Climate](https://codeclimate.com/github/engineyard/engineyard.png)][codeclimate]
|
7
|
+
|
8
|
+
[gem]: https://rubygems.org/gems/engineyard
|
9
|
+
[travis]: https://travis-ci.org/engineyard/engineyard
|
10
|
+
[gemnasium]: https://gemnasium.com/engineyard/engineyard
|
11
|
+
[codeclimate]: https://codeclimate.com/github/engineyard/engineyard
|
12
|
+
|
13
|
+
The Engine Yard command line utility.
|
14
|
+
|
15
|
+
### Installing on Ruby 1.8.7 or 1.9.2
|
16
|
+
|
17
|
+
**NOTE: This has *no effect* on your Engine Yard environment ruby version. This
|
18
|
+
is only regarding the local development Ruby version for running this gem. An
|
19
|
+
environment can continue using a chosen Ruby version regardless of this change.**
|
20
|
+
|
21
|
+
The `2.x` series of `engineyard` gem will be the last major version to
|
22
|
+
support Ruby 1.8.7 and 1.9.2. If you cannot run Ruby `>= 1.9.3` in your
|
23
|
+
development environment, you may continue using engineyard `~> 2.3.2`. This
|
24
|
+
version will continue to exist but will not receive regular updates or features.
|
25
|
+
|
26
|
+
*As of version 3.0.0, `engineyard` gem will require Ruby 1.9.3. Your application
|
27
|
+
may still use `1.8.7` while running engineyard in `1.9.3` via `rvm` or similar.
|
28
|
+
Deployment will not be affected. This does not affect your Engine Yard Cloud
|
29
|
+
environment. More details will be available when 3.0.0 is released.*
|
30
|
+
|
31
|
+
### Install
|
32
|
+
|
33
|
+
Install engineyard like any other ruby gem:
|
34
|
+
|
35
|
+
gem install engineyard
|
36
|
+
|
37
|
+
Note: Don't add engineyard to your application's Gemfile. The engineyard gem is
|
38
|
+
not made to be a part of your application and may cause version conflicts with
|
39
|
+
other parts of rails.
|
40
|
+
|
41
|
+
### Login
|
42
|
+
|
43
|
+
The first command you run will notice that you are not logged in and will ask
|
44
|
+
you for your Engine Yard email and password.
|
45
|
+
|
46
|
+
### Configuration
|
47
|
+
|
48
|
+
The `ey.yml` file allows options to be saved for each environment to which an
|
49
|
+
application is deployed.
|
50
|
+
|
51
|
+
A typical Rails application will have a `config/ey.yml` like this:
|
52
|
+
|
53
|
+
---
|
54
|
+
# This is all you need for a typical rails application.
|
55
|
+
defaults:
|
56
|
+
migrate: true
|
57
|
+
migration_command: rake db:migrate
|
58
|
+
precompile_assets: true
|
59
|
+
|
60
|
+
The following `ey.yml` file shows other things that can be customized.
|
61
|
+
A typical application will not need most of these options.
|
62
|
+
|
63
|
+
---
|
64
|
+
# 'defaults' applies to all environments running this application.
|
65
|
+
# Only set these options if needed. The defaults are correct for most applications.
|
66
|
+
defaults:
|
67
|
+
bundler: detect # By default, bundler is detected via Gemfile. Options: true: always run bundler; false: never run bundler
|
68
|
+
composer: detect # By default, composer is detected via composer.lock. Options: true: always run composer; false: never run composer
|
69
|
+
npm: detect # By default, npm is detected via package.json. Options: true: always run npm; false: never run npm
|
70
|
+
bundle_without: GROUP1 GROUP2 # exclude groups on bundle install (default: test development)
|
71
|
+
bundle_options: --OPTION # extra bundle install options (--local, --quiet, etc; does not override bundle_without)
|
72
|
+
copy_exclude: # don't rsync the following dirs (some people like to skip .git)
|
73
|
+
- SOME_LARGE_DIR
|
74
|
+
maintenance_on_restart: false # show maintenance page during app restart (default: false except for glassfish and mongrel)
|
75
|
+
maintenance_on_migrate: true # show maintenance page during migrations (default: true)
|
76
|
+
precompile_assets: true # enables rails assets precompilation (default: inferred using app/assets and config/application.rb)
|
77
|
+
precomplie_assets_task: assets:precompile # override the assets:precompile rake task
|
78
|
+
precompile_unchanged_assets: false # if true, does not check git for changes before precompiling assets.
|
79
|
+
asset_dependencies: # a list of relative paths to search for asset changes during each deploy.
|
80
|
+
- app/assets # default
|
81
|
+
- lib/assets # default
|
82
|
+
- vendor/assets # default
|
83
|
+
- Gemfile.lock # default
|
84
|
+
- config/routes.rb # default
|
85
|
+
- config/application.rb # default
|
86
|
+
- config/requirejs.yml # custom option (be sure to include defaults if you specify this option)
|
87
|
+
asset_strategy: shifting # choose an alternet asset management strategy. See rails_assets/strategy.rb for more info.
|
88
|
+
asset_roles: :all # specify on which roles to compile assets (default: [:app, :app_master, :solo])
|
89
|
+
ignore_database_adapter_warning: true # hide database adapter warning if you don't use MySQL or PostgreSQL (default: false)
|
90
|
+
|
91
|
+
# Environment specific options apply only to a single environment and override settings in defaults.
|
92
|
+
environments:
|
93
|
+
env_production:
|
94
|
+
precompile_unchanged_assets: true # precompiles assets even if no changes would be detected (does not check for changes at all).
|
95
|
+
asset_strategy: shifting # choose an alternet asset management strategy (shifting, cleaning, private, shared)
|
96
|
+
asset_roles: :all # specify on which roles to compile assets (default: [:app, :app_master, :solo] - must be an Array)
|
97
|
+
env_staging
|
98
|
+
asset_strategy: private # Use an asset management that always refreshes, so staging enviroments don't get conflicts
|
99
|
+
|
100
|
+
These options in `ey.yml` will only work if the file is committed to your
|
101
|
+
application repository. Make sure to commit this file. Different branches
|
102
|
+
may also have different versions of this file if necessary. The ey.yml file
|
103
|
+
found in the deploying commit will be used for the current deploy.
|
104
|
+
|
105
|
+
|
106
|
+
### Commands
|
107
|
+
|
108
|
+
#### ey init
|
109
|
+
|
110
|
+
Initialize a repository for deployment on Engine Yard Cloud.
|
111
|
+
|
112
|
+
This command writes or updates an ey.yml file which explains options available
|
113
|
+
for customizing the deployment process.
|
114
|
+
|
115
|
+
`ey init` can be run in existing applications to update the ey.yml file
|
116
|
+
without losing existing settings.
|
117
|
+
|
118
|
+
NOTE: Please verify all settings and changes after running ey init for
|
119
|
+
the first time.
|
120
|
+
|
121
|
+
#### ey deploy
|
122
|
+
|
123
|
+
This command must be run within the current directory containing the app to be
|
124
|
+
deployed. If ey.yml specifies a default branch then the ref parameter can be
|
125
|
+
omitted. Furthermore, if a default branch is specified but a different
|
126
|
+
command is supplied the deploy will fail unless `--ignore-default-branch`
|
127
|
+
is used.
|
128
|
+
|
129
|
+
If ey.yml does not specify a default migrate choice, you will be prompted to
|
130
|
+
specify a migration choice. A different command can later be specified via
|
131
|
+
`--migrate "ruby do_migrations.rb"`. Migrations can also be skipped entirely
|
132
|
+
by using --no-migrate.
|
133
|
+
|
134
|
+
Options:
|
135
|
+
|
136
|
+
-r, [--ref=REF] [--branch=] [--tag=] # Git ref to deploy. May be a branch, a tag, or a SHA.
|
137
|
+
-c, [--account=ACCOUNT] # Name of the account in which the environment can be found
|
138
|
+
-a, [--app=APP] # Name of the application to deploy
|
139
|
+
-e, [--environment=ENVIRONMENT] # Environment in which to deploy this application
|
140
|
+
-m, [--migrate=MIGRATE] # Run migrations via [MIGRATE]; use --no-migrate to avoid running migrations
|
141
|
+
-v, [--verbose] # Be verbose
|
142
|
+
[--ignore-default-branch] # Force a deploy of the specified branch even if a default is set
|
143
|
+
[--ignore-bad-master] # Force a deploy even if the master is in a bad state
|
144
|
+
[--extra-deploy-hook-options key:val] # Additional options to be made available in deploy hooks (in the 'config' hash)
|
145
|
+
# Add more keys as follows: --extra-deploy-hook-options key1:val1 key2:val2
|
146
|
+
|
147
|
+
#### ey timeout-deploy
|
148
|
+
|
149
|
+
The latest running deployment will be marked as failed, allowing a
|
150
|
+
new deployment to be run. It is possible to mark a potentially successful
|
151
|
+
deployment as failed. Only run this when a deployment is known to be
|
152
|
+
wrongly unfinished/stuck and when further deployments are blocked.
|
153
|
+
|
154
|
+
NOTICE: This command is will indiscriminately timeout any deploy, with no
|
155
|
+
regard for its potential success or failure. Confirm that the running
|
156
|
+
deploy is actually stuck or broken before running this command. If run
|
157
|
+
against a deploy that would succeed, it could cause the deployment to be
|
158
|
+
marked as failed incorrectly.
|
159
|
+
|
160
|
+
Options:
|
161
|
+
|
162
|
+
-c, [--account=ACCOUNT] # Name of the account in which the environment can be found
|
163
|
+
-a, [--app=APP] # Name of the application containing the environment
|
164
|
+
-e, [--environment=ENVIRONMENT] # Name of the environment with the desired deployment
|
165
|
+
|
166
|
+
|
167
|
+
#### ey status
|
168
|
+
|
169
|
+
Show the status of most recent deployment of the specified application and
|
170
|
+
environment. This action only informational and will not change your application.
|
171
|
+
|
172
|
+
Options:
|
173
|
+
|
174
|
+
-c, [--account=ACCOUNT] # Name of the account in which the environment can be found
|
175
|
+
-a, [--app=APP] # Name of the application containing the environment
|
176
|
+
-e, [--environment=ENVIRONMENT] # Name of the environment with the desired deployment
|
177
|
+
|
178
|
+
#### ey environments
|
179
|
+
|
180
|
+
By default, environments for this app are displayed. The `--all` option will
|
181
|
+
display all environments, including those for this app.
|
182
|
+
|
183
|
+
Options:
|
184
|
+
|
185
|
+
-c, [--account=ACCOUNT] # Name of the account in which the environment can be found
|
186
|
+
-a, [--app=APP] # Name of the application containing the environments
|
187
|
+
-e, [--environment=ENVIRONMENT] # Show only environments matching named environment
|
188
|
+
-s, [--simple] # Print each environment name on its own on a new line
|
189
|
+
-a, [--all] # Show all environments, not just ones associated with this application.
|
190
|
+
|
191
|
+
#### ey servers
|
192
|
+
|
193
|
+
List all servers on an environment.
|
194
|
+
|
195
|
+
Options:
|
196
|
+
|
197
|
+
-c, [--account=ACCOUNT] # Name of the account in which the environment can be found
|
198
|
+
-e, [--environment=ENVIRONMENT] # Show only servers in the named environment
|
199
|
+
-u, [--user] # Print the user@ in front of the server hostname to make ssh connections simpler
|
200
|
+
-s, [--simple] # Print each server on a new line with hostname, role, and name separated by tabs
|
201
|
+
-S, [--host] # Print each server on a new line with hostname only. Use -Su for 'user@host'
|
202
|
+
|
203
|
+
Example output:
|
204
|
+
|
205
|
+
$ ey servers -s
|
206
|
+
ec2-10-0-0-0.us-west-2.compute.amazonaws.com i-aabbccdd app_master
|
207
|
+
ec2-10-0-0-1.us-west-2.compute.amazonaws.com i-bbccddee app
|
208
|
+
ec2-10-0-0-2.us-west-2.compute.amazonaws.com i-ccddeeff db_master
|
209
|
+
ec2-10-0-0-3.us-west-2.compute.amazonaws.com i-ddeeffaa util resque
|
210
|
+
|
211
|
+
$ ey servers -Su
|
212
|
+
deploy@ec2-10-0-0-0.us-west-2.compute.amazonaws.com
|
213
|
+
deploy@ec2-10-0-0-1.us-west-2.compute.amazonaws.com
|
214
|
+
deploy@ec2-10-0-0-2.us-west-2.compute.amazonaws.com
|
215
|
+
deploy@ec2-10-0-0-3.us-west-2.compute.amazonaws.com
|
216
|
+
|
217
|
+
|
218
|
+
#### ey logs
|
219
|
+
|
220
|
+
Displays Engine Yard configuration logs for all servers in the environment. If
|
221
|
+
recipes were uploaded to the environment and run, their logs will also be
|
222
|
+
displayed beneath the main configuration logs.
|
223
|
+
|
224
|
+
Options:
|
225
|
+
|
226
|
+
-e, [--environment=ENVIRONMENT] # Environment with the interesting logs
|
227
|
+
-c, [--account=ACCOUNT] # Name of the account in which the environment can be found
|
228
|
+
|
229
|
+
#### ey rebuild
|
230
|
+
|
231
|
+
Engine Yard's main configuration run occurs on all servers. Mainly used to fix
|
232
|
+
failed configuration of new or existing servers, or to update servers to latest
|
233
|
+
Engine Yard stack (e.g. to apply an Engine Yard supplied security patch).
|
234
|
+
|
235
|
+
Note that uploaded recipes are also run after the main configuration run has
|
236
|
+
successfully completed.
|
237
|
+
|
238
|
+
This command will return immediately, but the rebuild process may take a few
|
239
|
+
minutes to complete.
|
240
|
+
|
241
|
+
Options:
|
242
|
+
|
243
|
+
-e, [--environment=ENVIRONMENT] # Environment to rebuild
|
244
|
+
-c, [--account=ACCOUNT] # Name of the account in which the environment can be found
|
245
|
+
|
246
|
+
#### ey rollback
|
247
|
+
|
248
|
+
Uses code from previous deploy in the `/data/APP_NAME/releases` directory on
|
249
|
+
remote server(s) to restart application servers.
|
250
|
+
|
251
|
+
Options:
|
252
|
+
|
253
|
+
-v, [--verbose] # Be verbose
|
254
|
+
-a, [--app=APP] # Name of the application to roll back
|
255
|
+
-e, [--environment=ENVIRONMENT] # Environment in which to roll back the application
|
256
|
+
-c, [--account=ACCOUNT] # Name of the account in which the environment can be found
|
257
|
+
|
258
|
+
#### ey recipes apply
|
259
|
+
|
260
|
+
This is similar to `ey rebuild` except Engine Yard's main configuration step is
|
261
|
+
skipped.
|
262
|
+
|
263
|
+
Options:
|
264
|
+
|
265
|
+
-e, [--environment=ENVIRONMENT] # Environment in which to apply recipes
|
266
|
+
-c, [--account=ACCOUNT] # Name of the account in which the environment can be found
|
267
|
+
|
268
|
+
#### ey recipes upload
|
269
|
+
|
270
|
+
The current directory should contain a subdirectory named `cookbooks` to be
|
271
|
+
uploaded.
|
272
|
+
|
273
|
+
Options:
|
274
|
+
|
275
|
+
-e, [--environment=ENVIRONMENT] # Environment that will receive the recipes
|
276
|
+
-c, [--account=ACCOUNT] # Name of the account in which the environment can be found
|
277
|
+
[--apply] # Apply the recipes (same as above) immediately after uploading
|
278
|
+
-f, [--file=FILE] # Specify a gzipped tar file (.tgz) for upload instead of cookbooks/ directory
|
279
|
+
|
280
|
+
#### ey recipes download
|
281
|
+
|
282
|
+
The recipes will be unpacked into a directory called `cookbooks` in the current
|
283
|
+
directory. If the cookbooks directory already exists, an error will be raised.
|
284
|
+
|
285
|
+
Options:
|
286
|
+
|
287
|
+
-e, [--environment=ENVIRONMENT] # Environment for which to download the recipes
|
288
|
+
-c, [--account=ACCOUNT] # Name of the account in which the environment can be found
|
289
|
+
|
290
|
+
#### ey web enable
|
291
|
+
|
292
|
+
Remove the maintenance page for this application in the given environment.
|
293
|
+
|
294
|
+
Options:
|
295
|
+
|
296
|
+
-v, [--verbose] # Be verbose
|
297
|
+
-a, [--app=APP] # Name of the application whose maintenance page will be removed
|
298
|
+
-e, [--environment=ENVIRONMENT] # Environment on which to take down the maintenance page
|
299
|
+
-c, [--account=ACCOUNT] # Name of the account in which the environment can be found
|
300
|
+
|
301
|
+
#### ey web disable
|
302
|
+
|
303
|
+
The maintenance page is taken from the app currently being deployed. This means
|
304
|
+
that you can customize maintenance pages to tell users the reason for downtime
|
305
|
+
on every particular deploy.
|
306
|
+
|
307
|
+
Maintenance pages searched for in order of decreasing priority:
|
308
|
+
|
309
|
+
* public/maintenance.html.custom
|
310
|
+
* public/maintenance.html.tmp
|
311
|
+
* public/maintenance.html
|
312
|
+
* public/system/maintenance.html.default
|
313
|
+
|
314
|
+
Options:
|
315
|
+
|
316
|
+
-v, [--verbose] # Be verbose
|
317
|
+
-a, [--app=APP] # Name of the application whose maintenance page will be put up
|
318
|
+
-e, [--environment=ENVIRONMENT] # Environment on which to put up the maintenance page
|
319
|
+
-c, [--account=ACCOUNT] # Name of the account in which the environment can be found
|
320
|
+
|
321
|
+
#### ey web restart
|
322
|
+
|
323
|
+
Restarts the application servers for the given application. Enables maintenance
|
324
|
+
pages if it would be enabled during a normal deploy. Respects the
|
325
|
+
`maintenance_on_restart` ey.yml configuration.
|
326
|
+
|
327
|
+
Options:
|
328
|
+
|
329
|
+
-v, [--verbose] # Be verbose
|
330
|
+
-a, [--app=APP] # Name of the application to restart
|
331
|
+
-e, [--environment=ENVIRONMENT] # Name of the environment to restart
|
332
|
+
-c, [--account=ACCOUNT] # Name of the account in which the app and environment can be found
|
333
|
+
|
334
|
+
#### ey ssh
|
335
|
+
|
336
|
+
If a command is supplied, it will be run, otherwise a session will be opened.
|
337
|
+
The application master is used for environments with clusters. Option `--all`
|
338
|
+
requires a command to be supplied and runs it on all servers.
|
339
|
+
|
340
|
+
Note: this command is a bit picky about its ordering. To run a command with
|
341
|
+
arguments on all servers, like `rm -f /some/file`, you need to order it like so:
|
342
|
+
|
343
|
+
$ ey ssh "rm -f /some/file" -e my-environment --all
|
344
|
+
|
345
|
+
Options:
|
346
|
+
|
347
|
+
[--utilities=one two three] # Run command on the utility servers with the given names. If no names are given, run on all utility servers.
|
348
|
+
[--app-servers] # Run command on all application servers
|
349
|
+
[--db-servers] # Run command on the database servers
|
350
|
+
[--db-master] # Run command on the master database server
|
351
|
+
-A, [--all] # Run command on all servers
|
352
|
+
[--db-slaves] # Run command on the slave database servers
|
353
|
+
-e, [--environment=ENVIRONMENT] # Name of the environment to ssh into
|
354
|
+
-c, [--account=ACCOUNT] # Name of the account in which the environment can be found
|
355
|
+
-s, [--shell] # Use a particular shell instead of the default bash
|
356
|
+
[--no-shell] # Don't use a shell to run the command (default behavior of ssh)
|
357
|
+
|
358
|
+
#### ey launch
|
359
|
+
|
360
|
+
Open the application in a browser.
|
361
|
+
|
362
|
+
Options:
|
363
|
+
|
364
|
+
-c, [--account=ACCOUNT] # Name of the account in which the environment can be found
|
365
|
+
-a, [--app=APP] # Name of the application to launch
|
366
|
+
-e, [--environment=ENVIRONMENT] # Name of the environment for the application
|
367
|
+
|
368
|
+
#### ey whoami
|
369
|
+
|
370
|
+
Who am I logged in as? Prints the name and email of the current logged in user.
|
371
|
+
|
372
|
+
#### ey login
|
373
|
+
|
374
|
+
Log in and verify access to EY Cloud. Use logout first if you need to switch
|
375
|
+
user accounts.
|
376
|
+
|
377
|
+
#### ey logout
|
378
|
+
|
379
|
+
Remove the current API key from `~/.eyrc` or file at env variable `$EYRC`
|
380
|
+
|
381
|
+
|
382
|
+
### Global Options
|
383
|
+
|
384
|
+
All commands accept the following options.
|
385
|
+
|
386
|
+
--api-token=API_TOKEN # Use API-TOKEN to authenticate this command
|
387
|
+
--serverside-version=SERVERSIDE_VERSION # Please use with care! Override deploy system version
|
388
|
+
# (same as ENV variable ENGINEYARD_SERVERSIDE_VERSION)
|
389
|
+
|
390
|
+
Not all commands will make use of these options. For example,
|
391
|
+
ey status does not use, and will ignore the --serverside-version flag.
|
392
|
+
|
393
|
+
Also, please consider that it's usually not a good idea to override the
|
394
|
+
version of serverside unless you know what you're doing. CLI and serverside
|
395
|
+
versions are designed to work together and mixing them can cause errors.
|
396
|
+
|
397
|
+
|
398
|
+
### API Client
|
399
|
+
|
400
|
+
See [engineyard-cloud-client](https://github.com/engineyard/engineyard-cloud-client) for the API client library.
|
401
|
+
|
402
|
+
### DEBUG
|
403
|
+
|
404
|
+
The API commands will print internal information if `$DEBUG` is set:
|
405
|
+
|
406
|
+
$ DEBUG=1 ey environments --all
|
407
|
+
GET https://cloud.engineyard.com/api/v2/apps
|
408
|
+
Params {"no_instances"=>"true"}
|
409
|
+
Headers {"User-Agent"=>"EngineYard/2.0.0 EngineYardCloudClient/1.0.5",
|
410
|
+
"Accept"=>"application/json",
|
411
|
+
"X-EY-Cloud-Token"=>"YOURTOKEN"}
|
412
|
+
Response {"apps"=>
|
413
|
+
[{"environments"=>[],
|
414
|
+
"name"=>"myapp",
|
415
|
+
"repository_uri"=>"git@github.com:myaccount/myapp.git",
|
416
|
+
"app_type_id"=>"rails3",
|
417
|
+
"account"=>{"name"=>"myaccount", "id"=>1234},
|
418
|
+
"id"=>12345}]}
|
419
|
+
|
420
|
+
### Releasing
|
421
|
+
|
422
|
+
To release the engineyard gem, use the command below and then follow the
|
423
|
+
instructions it outputs.
|
424
|
+
|
425
|
+
bundle exec rake release
|
426
|
+
|
427
|
+
This will remove the `.pre` from the current version, then bump the patch level
|
428
|
+
and add `.pre` after for the next version. The version will be tagged in git.
|
429
|
+
|
430
|
+
To release a new `engineyard-serverside` gem that has already been pushed to
|
431
|
+
rubygems.org, update `lib/engineyard/version.rb` to refer to the
|
432
|
+
`engineyard-serverside` version you want to release, then make a commit.
|
433
|
+
Each engineyard gem is hard-linked to a specific default engineyard-serverside
|
434
|
+
version which can be overriden with the `--serverside-version` option.
|
435
|
+
|
436
|
+
The `engineyard-serverside-adapter` version does not need to be bumped in the
|
437
|
+
gemspec unless you're also releasing a new version of that gem. Versions
|
438
|
+
of adapter are no longer linked to serverside.
|