From af126daf11909df59b4d4eb50e0fbcc33d163044 Mon Sep 17 00:00:00 2001 From: Dr Nic Williams Date: Tue, 10 Apr 2012 13:32:39 -0700 Subject: [PATCH] No use of engineyard gem (which has a conflicting dependency on chef + net-ssh) Only unicorn and passenger initially supported Don't check for available app name - it takes too long --- scrolls/eycloud.rb | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/scrolls/eycloud.rb b/scrolls/eycloud.rb index f029100..c6b7ac9 100644 --- a/scrolls/eycloud.rb +++ b/scrolls/eycloud.rb @@ -2,13 +2,12 @@ gem_group :development do gem 'ey_cli', '>= 0.3.0' - gem 'engineyard', '>= 1.4.28' end gem 'ey_config' # for partner services required_dbs = %w[mysql postgresql] -required_app_servers = %w[unicorn trinidad passenger puma thin] +required_app_servers = %w[unicorn passenger] # TODO trinidad puma thin selected_db = required_dbs.find { |db| scroll? db } unless selected_db @@ -29,8 +28,6 @@ if @git_url.size == 0 say_custom "eycloud", "Skipping... no git URI discovered" else - run "ey login" - framework_env = multiple_choice "Which framework environment?", [ ['Production', 'production'], ['Staging (solo environment only)', 'staging'] @@ -38,18 +35,18 @@ # TODO check for app name first app_name = (@repo_name && @repo_name.size > 0) ? @repo_name : @name - say_custom "eycloud", "Checking for availability of #{app_name}" - @app_names ||= `bundle exec ey_cli apps | grep "-" | sed "s/.* //"`.split(/\n/) - while @app_names.include?(app_name) - app_name = ask_wizard "Application #{app_name} is already exists. What name?" - end + # say_custom "eycloud", "Checking for availability of #{app_name}" + # @app_names ||= `bundle exec ey_cli apps | grep "-" | sed "s/.* //"`.split(/\n/) + # while @app_names.include?(app_name) + # app_name = ask_wizard "Application #{app_name} is already exists. What name?" + # end if framework_env == "production" say_custom "eycloud", "All configurations use High-CPU VM worth $170/mth each." say_custom "eycloud", "Process numbers below are estimates." cluster_config = multiple_choice "Select application cluster configuration?", [ - ['Basic - 5 CPU-based processes (1 VM) & DB Master VM', 'basic'], - ['Pro - 15 CPU-based highly-available processes (3 VMs) & DB Master VM', 'ha'], + ['Basic - 1 app VM (5 CPU-based processes) & DB Master VM', 'basic'], + ['Pro - 3 app highly-available VMs (15 CPU-based processes) & DB Master VM', 'ha'], ['Solo - 1 VM for app processes, DB and other services', 'solo'] ] else @@ -58,6 +55,7 @@ name = File.basename(".") command = "bundle exec ey_cli create_app --name #{app_name} --type rails3 " + # command += "--account #{account_name} " if account_name command += "--git #{@git_url} " command += "--framework_env #{framework_env} " command += "--env_name #{@name}_#{framework_env} "