Class: EYCli::Command::CreateEnv
- Defined in:
- lib/ey_cli/commands/create_env.rb
Defined Under Namespace
Classes: EnvParser
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #help ⇒ Object
-
#initialize ⇒ CreateEnv
constructor
A new instance of CreateEnv.
- #invoke ⇒ Object
- #options_parser ⇒ Object
Methods inherited from Base
Constructor Details
#initialize ⇒ CreateEnv
Returns a new instance of CreateEnv.
4 5 6 7 8 |
# File 'lib/ey_cli/commands/create_env.rb', line 4 def initialize @accounts = EYCli::Controller::Accounts.new @apps = EYCli::Controller::Apps.new @environments = EYCli::Controller::Environments.new end |
Instance Method Details
#help ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/ey_cli/commands/create_env.rb', line 18 def help <<-EOF It takes the information from the current directory. It will guide you if it cannot reach all that information. Usage: ey_cli create_env Options: --app name Name of the app to create the environment for. --name name Name of the environment. --framework_env env Type of the environment (production, staging...). --url url Domain name for the app. It accepts comma-separated values. --app_instances number Number of application instances. --db_instances number Number of database slaves. --solo A single instance for application and database. --stack App server stack, either passenger, unicorn or trinidad. --db_stack DB stack, valid options: mysql (for MySQL 5.0), mysql5_5 (for MySQL 5.5), postgresql or postgres9_1 (for PostgreSQL 9.1) --app_size Size of the app instances. --db_size Size of the db instances. EOF end |
#invoke ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/ey_cli/commands/create_env.rb', line 10 def invoke account = @accounts.fetch_account([:account]) if [:account] app = @apps.fetch_app(account, {:app_name => [:app]}) = .() @environments.create(app, ) end |