lib/app42/base/help.rb in app42-0.5.5 vs lib/app42/base/help.rb in app42-0.5.6

- old
+ new

@@ -4,20 +4,16 @@ # module App42 module Base class Help - # - # details how to use app42 commands - # + # details, how to use app42 commands def self.how_to Paint["Usage: app42 COMMAND [command-specific-options]", :blue] end - # # list available commands or display help for a specific command - # def self.commands print <<-USAGE #{how_to} @@ -28,10 +24,11 @@ clearKeys # Clear API key and Secret key Applications setupInfra # Setup your deployment and runtime environment i.e. Instance(Memory, CPU) and Technology Stack deploy # Deploy the application over your runtime environment + update # Update the application over your runtime environment scale # Scale application by number of instance(s) descale # Descale application by number of instance(s) start # Start the application stop # Stop the application restart # Restart the application @@ -42,10 +39,13 @@ logs # Returns the log file URL(s) for the application Services createService # Creates a new service e.g. MySQL, MongoDB, CouchDB, PostgreSQL etc. deleteService # Delete provisioned service + startService # Start the service + restartService # Restart the service + stopService # Stop the service services # List all the provisioned services with their meta details serviceInfo # Show meta information of the provisioned service resetServicePassword # Reset password of provisioned service bindIP # Bind IP to provisioned service unbindIP # Unbind IP from provisioned service @@ -55,10 +55,16 @@ supportedServices # List supported services by App42 iaasProviders # List supported IaaS providers by App42 runtimes # List supported runtimes by App42 activities # List all activities with their status + Setup + setupCloudAPI # Setup App42 cloud API by choosing required configuration + deleteCloudAPI # Delete App42 cloud API setup + setupInfo # Show setup information + setups # List all the setups + Help version # Show Ruby client gem version help # List available commands and their description COMMAND --help # Display detailed help of a specific command USAGE @@ -154,31 +160,30 @@ Checking App Name Availability... OK 1: Shared Select Instance Type [Shared]: - 1: Amazon US West-2a - Select IaaS Provider [Amazon US West-2a]: 1 + 1: Amazon us-west-2 + Select IaaS Provider [Amazon us-west-2]: - 1: Ruby 2.0 - 2: Java 6.0 - 3: Java 7.0 - 4: Php 5.3 - 5: Php 5.5 - Select Runtime [Ruby 2.0]: 1 + 1: Ruby 2.0.0 + 2: Java 6 + 3: Java 7 + 4: PHP 5.3 + 5: PHP 5.5 + Select Runtime [Ruby 2.0.0]: - 1: Rails 4.0 - Select Framework [Rails 4.0]: + 1: Ruby on Rack + 2: Rails 4.0 + 3: Sinatra 1.4 + Select Framework [Ruby on Rack ]: - 1: nginx 1.4.2 - Select Web Server [nginx 1.4.2]: + 1: Nginx 1.4.1 + Select Web Server [Nginx 1.4.1]: - 1: 512 MB - 2: 1024 MB - 3: 2048 MB - Memory Limit [512 MB]: - + Specify Kontena Power: 5 + Setting up the infrastructure... OK Operation is in progress, Please wait.../ Setup Infra completed successfully. @@ -220,20 +225,48 @@ [--app APP] # Name of app, you want to update Example: $app42 deploy Enter App Name: demo - Would you like to deploy from the current directory? [Yn]: n - Binary Deployment Path: /home/ubuntu/workspace/Deploycode/ruby + 1: Binary + 2: Source + Choose Upload Type [Binary]: 2 + + Enter Git URL?: https://github.com/shepHertz/demo.git Deploying Application... OK - Operation is in progress, Please wait....| - 1 out of 1 Uploaded - Application deployed successfully. + + Operation is in progress, Please wait...| + App deployed successfully. DESC end + def update + print <<-DESC +Usage: + app42 update + + Update the application over your runtime environment + +Options: + [--app APP] # Name of app, you want to update + +Example: + $app42 update + Enter App Name: demo + 1: Binary + 2: Source + Choose Upload Type [Binary]: 2 + + Updating Application... OK + + Operation is in progress, Please wait...- + App deployed successfully. + DESC + + end + def start print <<-DESC Usage: app42 start @@ -242,11 +275,18 @@ Options: [--app APP] # Name of app, you want to start Example: $app42 start --app demo - Starting app demo ...Done + Starting Application demo... OK + + Operation is in progress, Please wait... + 1 out of 3 started + - + 2 out of 3 started + | + App started successfully. DESC end def stop @@ -259,11 +299,18 @@ Options: [--app APP] # Name of app, you want to stop Example: $app42 stop --app demo - Stopping app demo ...Done + Stopping Application demo... OK + + Operation is in progress, Please wait...- + 1 out of 3 stopped + - + 2 out of 3 stopped + - + App stopped successfully. DESC end def restart print <<-DESC @@ -275,11 +322,18 @@ Options: [--app APP] # Name of app, you want to restart Example: $app42 start --app demo - Restarting app demo ...Done + Restarting Application demo... OK + + Operation is in progress, Please wait... + 1 out of 3 restarted + - + 2 out of 3 restarted + | + App restarted successfully. DESC end def deleteinfra print <<-DESC @@ -291,11 +345,18 @@ Options: [--app APP] # Name of app, you want to delete Example: $app42 deleteInfra --app demo - Deleting app demo ...Done + Deleting Application demo... OK + + Operation is in progress, Please wait... + 1 out of 3 deleted + - + 2 out of 3 deleted + | + App deleted successfully. DESC end def descale print <<-DESC @@ -306,15 +367,18 @@ Options: [--app APP] # Name of app, you want to descale Example: - $app42 descale --app demo - Descale by instance(s): 1 - Descaling Application demo by instance 1... OK - + $app42 descale + Enter App Name: demo + Descale by instance(s) [1]: 2 + Descaling Application demo by instance 2... OK + Operation is in progress, Please wait...| + 1 out of 2 descaled + - Descale completed successfully. DESC end def scale @@ -326,15 +390,18 @@ Options: [--app APP] # Name of app, you want to scale Example: - $app42 scale --app demo - Scale by instance(s): 1 - Scaling Application demo by instance 1... OK - - Operation is in progress, Please wait...| + $app42 scale + Enter App Name: demo + Scale by instance(s) [1]: 2 + Scaling Application demo by instance 2... OK + + Operation is in progress, Please wait...- + 1 out of 2 scaled + | Scale completed successfully. DESC end def appinfo @@ -410,31 +477,27 @@ Creates a new service e.g. MySQL, MongoDB, CouchDB, PostgreSQL etc. Example: $app42 createService Enter Service Name: mysqldemo - Checking Service Name Availability... OK - 1: MySQL 5.5.1 - 2: Mongodb 2.4 - 3: Couchdb 10.1 - 4: PostgreSQL 9.1 - Select Service [MySQL 5.5.1]: 1 + 1: MySQL 5.5.31 + 2: Mongodb 2.4.4 + 3: Couchdb 1.0.1 + 4: PostgreSQL 9.1.9 + Select Service [MySQL 5.5.31]: - Enter Database Name: demodb + Enter Database Name: demo_db 1: Shared - Select Virtual Machine Type [Shared]: + Select Instance Type [Shared]: - 1: Amazon US West-2a - Select IaaS Provider [Amazon US West-2a]: 1 + 1: Amazon us-west-2 + Select IaaS Provider [Amazon us-west-2]: - 1: 512 MB - 2: 1024 MB - 3: 2048 MB - Memory Limit [512 MB]: 1 + Specify Kontena Power: 5 Creating Service... OK Operation is in progress, Please wait...| Service created successfully. @@ -468,10 +531,73 @@ Operation is in progress, Please wait...| Service deleted successfully. DESC end + def startservice + print <<-DESC +Usage: + app42 startService + + Start the service + +Options: + [--app Service] # Name of service, you want to start + +Example: + $app42 startService + Enter Service Name: mysql + Starting Service mysql... OK + + Operation is in progress, Please wait...| + Service started successfully. + DESC + + end + + def stopservice + print <<-DESC +Usage: + app42 stopService + + Stop the service + +Options: + [--app Service] # Name of service, you want to start + +Example: + $app42 stopService + Enter Service Name: mysql + Stopping Service mysql... OK + + Operation is in progress, Please wait...| + Service stopped successfully. + DESC + + end + + def restartservice + print <<-DESC +Usage: + app42 restartService + + Restart the service + +Options: + [--app Service] # Name of service, you want to start + +Example: + $app42 restartService + Enter Service Name: mysql + Restarting Service mysql... OK + + Operation is in progress, Please wait...| + Service restarted successfully. + DESC + + end + def services print <<-DESC Usage: app42 services @@ -715,9 +841,100 @@ +---------------+---------------+----------------+-----------------+---------+------------------+---------+--------------+----------------------------------+--------+--------------+ | Database Name | Iaas Provider | Vm Ip | Source Ip | State | User Name | Vm Port | Service Type | Password | Memory | Service Name | +---------------+---------------+----------------+-----------------+---------+------------------+---------+--------------+----------------------------------+--------+--------------+ | demodb | Amazon | 54.218.127.245 | 122.162.124.222 | RUNNING | j7zz1jsx1bb4eiz1 | 49695 | MySQL 5.5.1 | z2qo1vxeadak6jsmt9upobytwptc5eo0 | 512 MB | mysqldemo | +---------------+---------------+----------------+-----------------+---------+------------------+---------+--------------+----------------------------------+--------+--------------+ + DESC + end + + def setupcloudapi + print <<-DESC +Usage: + app42 setupCloudAPI + + Setup App42 cloud API by choosing required configuration + +Example: + $app42 setupCloudAPI + Enter Setup Name: railsdemo + Checking Setup Name Availability... OK + + 1: Shared + Select Instance Type [Shared]: + + 1: Amazon us-west-2 + Select IaaS Provider [Amazon us-west-2]: + + 1: App42CloudAPI + Select Setup Type [App42CloudAPI]: + + 1: Light + 2: Medium + 3: Heavy + Select Flavour [Light]: 1 + + Setting up the infrastructure... OK + + Operation is in progress, Please wait...| + + Your setup has been completed successfully, For details, Login to your AppHQ console. + + DESC + end + + def deletecloudapi + print <<-DESC +Usage: + app42 deleteCloudAPI + + Delete App42 cloud API setup + +Example: + $app42 deleteCloudAPI + Enter Setup Name: demo + Deleting Cloud API... OK + + Operation is in progress, Please wait...- + Setup deleted successfully. + DESC + end + + def setupinfo + print <<-DESC +Usage: + app42 setupInfo + + Show setup information + +Example: + $app42 setupInfo + Enter Setup Name: demo + +-----------------------+--------------------------------+------------+------------------+------------+---------+---------------+--------------+-----------------------------+ + | === demo Details === | + +-----------------------+--------------------------------+------------+------------------+------------+---------+---------------+--------------+-----------------------------+ + | Created On | Api Server Url | Setup Name | Iaas Provider | Setup Type | Vm Type | Setup Flavour | Setup Status | App Hq Url | + +-----------------------+--------------------------------+------------+------------------+------------+---------+---------------+--------------+-----------------------------+ + | 2013-10-16 13:05:12.0 | democloudapi.aws.app42paas.com | demo | Amazon us-west-2 | CLOUDAPI | Shared | light | RUNNING | demoapphq.aws.app42paas.com | + +-----------------------+--------------------------------+------------+------------------+------------+---------+---------------+--------------+-----------------------------+ + DESC + end + + def setups + print <<-DESC +Usage: + app42 setups + + List all the setups + +Example: + $app42 setups + +-----------------------+--------------------------------+------------+------------------+------------+---------+---------------+--------------+-----------------------------+ + | === Setups List === | + +-----------------------+--------------------------------+------------+------------------+------------+---------+---------------+--------------+-----------------------------+ + | Created On | Api Server Url | Setup Name | Iaas Provider | Setup Type | Vm Type | Setup Flavour | Setup Status | App Hq Url | + +-----------------------+--------------------------------+------------+------------------+------------+---------+---------------+--------------+-----------------------------+ + | 2013-10-16 13:05:12.0 | democloudapi.aws.app42paas.com | demo | Amazon us-west-2 | CLOUDAPI | Shared | light | RUNNING | demoapphq.aws.app42paas.com | + +-----------------------+--------------------------------+------------+------------------+------------+---------+---------------+--------------+-----------------------------+ DESC end def version print <<-DESC