Class: App42::Base::Help

Inherits:
Object
  • Object
show all
Defined in:
lib/app42/base/help.rb

Class Method Summary collapse

Class Method Details

.activitiesObject



1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
# File 'lib/app42/base/help.rb', line 1519

def activities
  print <<-DESC
Usage:
  app42 activities

  List all activities with their status 

Example:
  $app42 activities
  +------------+-----------+------+------+-----------------------+
  |                   === User Activities ===                    |
  +------------+-----------+------+------+-----------------------+
  | Operation  | Status    | Name | Type | Date                  |
  +------------+-----------+------+------+-----------------------+
  | setupInfra | COMPLETED | demo | APP  | 2013-10-25 06:18:42.0 |
  | scale      | COMPLETED | demo | APP  | 2013-10-25 06:40:39.0 |
  | scale      | COMPLETED | demo | APP  | 2013-10-25 06:41:25.0 |
  | descale    | COMPLETED | demo | APP  | 2013-10-25 06:42:12.0 |
  | descale    | COMPLETED | demo | APP  | 2013-10-25 06:42:13.0 |
  | restart    | COMPLETED | demo | APP  | 2013-10-25 06:44:31.0 |
  | stop       | COMPLETED | demo | APP  | 2013-10-25 06:45:23.0 |
  | start      | COMPLETED | demo | APP  | 2013-10-25 06:45:49.0 |
  | scale      | COMPLETED | demo | APP  | 2013-10-25 06:52:56.0 |
  | scale      | COMPLETED | demo | APP  | 2013-10-25 06:53:24.0 |
  | descale    | COMPLETED | demo | APP  | 2013-10-25 06:58:10.0 |
  | descale    | COMPLETED | demo | APP  | 2013-10-25 06:58:10.0 |
  +------------+-----------+------+------+-----------------------+
  DESC
end

.addcustomurlObject



517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
# File 'lib/app42/base/help.rb', line 517

def addcustomurl
  print <<-DESC
Usage:
  app42 addCustomURL

  Add a custom URL to an app

Example:
  $app42 addCustomURL
  Enter App Name: demo

  Enter Custom URL: http://test.naveengoswami.com

  Adding Custom URL To Application demo... OK
  Custom URL added successfully.
 DESC
end

.addkeysObject



152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# File 'lib/app42/base/help.rb', line 152

def addkeys
  print <<-DESC
Usage:
  app42 addKeys

  Add API key and Secret key

Options:
  [--apiKey=API_KEY]            # API Key to add.
  [--secretKey=SECRET_KEY]      # Secret Key to add.

Example:
  $app42 addKeys
  == Enter your App42PaaS keys ==
  Enter API Key:: <apiKey>
  Enter Secret Key:: <secretKey>
  Adding keys...done
  DESC
end

.appinfoObject



452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
# File 'lib/app42/base/help.rb', line 452

def appinfo
  print <<-DESC
Usage:
  app42 appInfo

  Show the meta information of the application

Options:
  [--app APP]      # Name of app, you want to info

Example:
  $app42 appInfo
  Enter App Name: demo
  +--------------------------------+------------+-----------------+------+------------+----------------+---------------+--------+
  |                                                      === demo Info ===                                                      |
  +--------------------------------+------------+-----------------+------+------------+----------------+---------------+--------+
  | App Url                        | App Status | Iaas Provider   | Name | Runtime    | Instance Count | Framework     | Memory |
  +--------------------------------+------------+-----------------+------+------------+----------------+---------------+--------+
  | https://demo.iab.app42paas.com | RUNNING    | Amazon (Oregon) | demo | Ruby 2.0.0 | 1              | Ruby on Rack  | 256 MB |
  +--------------------------------+------------+-----------------+------+------------+----------------+---------------+--------+
 DESC
end

.appsObject



431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
# File 'lib/app42/base/help.rb', line 431

def apps
  print <<-DESC
Usage:
  app42 apps

  List all the deployed applications with their meta details

Example:
  $app42 apps
  
  +--------------------------------+------------+-----------------+--------------------------+------+------------+----------------+---------------+--------+
  |                                                                    === My Apps ===                                                                     |
  +--------------------------------+------------+-----------------+--------------------------+------+------------+----------------+---------------+--------+
  | App Url                        | App Status | Iaas Provider   | Email                    | Name | Runtime    | Instance Count | Framework     | Memory |
  +--------------------------------+------------+-----------------+--------------------------+------+------------+----------------+---------------+--------+
  | https://demo.iab.app42paas.com | RUNNING    | Amazon (Oregon) | [email protected] | demo | Ruby 2.0.0 | 1              | Ruby on Rack  | 256 MB |
  +--------------------------------+------------+-----------------+--------------------------+------+------------+----------------+---------------+--------+
DESC

end

.appstateObject



475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
# File 'lib/app42/base/help.rb', line 475

def appstate
  print <<-DESC
Usage:
  app42 appState

  Show current state of the application

Options:
  [--app APP]      # Name of app

Example:
  $app42 appState --app demo
  +--------------------+
  | === demo State === |
  +--------------------+
  | RUNNING            |
  +--------------------+
  DESC
end

.bindinfoObject



856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
# File 'lib/app42/base/help.rb', line 856

def bindinfo
  print <<-DESC
Usage:
  app42 bindInfo

  Show IP bind information related to provisioned service

Example:
  $app42 bindInfo
  1: mysqldb
  2: redisdb
  Select Service [mysqldb]: 

  +---------------+-----------------+----------------------------------+---------------+-----------+---------+------------------+---------+--------------+----------------------------------+--------+--------------+
  |                                                                                             === mysqldb Details ===                                                                                             |
  +---------------+-----------------+----------------------------------+---------------+-----------+---------+------------------+---------+--------------+----------------------------------+--------+--------------+
  | Database Name | Iaas Provider   | Token                            | Vm Ip         | Source Ip | State   | User Name        | Vm Port | Service Type | Password                         | Memory | Service Name |
  +---------------+-----------------+----------------------------------+---------------+-----------+---------+------------------+---------+--------------+----------------------------------+--------+--------------+
  | demo_db       | Amazon (Oregon) | 0pcmpc64srphrwijmy616uipdjv7t0oi | 54.213.93.154 | 0.0.0.0   | RUNNING | admk0ltirejxgh3o | 15847   | MySQL 5.5.31 | vagyqxta6e0a8q5jxunlr43v6cwohmdj | 256 MB | mysqldb      |
  +---------------+-----------------+----------------------------------+---------------+-----------+---------+------------------+---------+--------------+----------------------------------+--------+--------------+
    DESC
end

.bindipObject



807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
# File 'lib/app42/base/help.rb', line 807

def bindip
  print <<-DESC
Usage:
  app42 bindIP

  Bind IP to provisioned service

Example:
  $app42 bindIP
  Enter Service Name: mysqldb

  Please Provide Source IP
  (For public access, use '0.0.0.0'): 0.0.0.0

  Binding IP to service... OK

  Operation is in progress, Please wait...
  Service binding has been completed successfully.

  +---------------+-----------------+----------------------------------+---------------+-----------+---------+------------------+---------+--------------+----------------------------------+--------+--------------+
  |                                                                                             === mysqldb Details ===                                                                                             |
  +---------------+-----------------+----------------------------------+---------------+-----------+---------+------------------+---------+--------------+----------------------------------+--------+--------------+
  | Database Name | Iaas Provider   | Token                            | Vm Ip         | Source Ip | State   | User Name        | Vm Port | Service Type | Password                         | Memory | Service Name |
  +---------------+-----------------+----------------------------------+---------------+-----------+---------+------------------+---------+--------------+----------------------------------+--------+--------------+
  | demo_db       | Amazon (Oregon) | 0pcmpc64srphrwijmy616uipdjv7t0oi | 54.213.93.154 | 0.0.0.0   | RUNNING | admk0ltirejxgh3o | 15847   | MySQL 5.5.31 | vagyqxta6e0a8q5jxunlr43v6cwohmdj | 256 MB | mysqldb      |
  +---------------+-----------------+----------------------------------+---------------+-----------+---------+------------------+---------+--------------+----------------------------------+--------+--------------+
    DESC
end

.bpaasinfoObject



1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
# File 'lib/app42/base/help.rb', line 1072

def bpaasinfo
  print <<-DESC
Usage:
  app42 bPaaSInfo

  Show setup information

Example:
  $app42 bPaaSInfo
  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                          |
  +-----------------------+----------------------------------------+------------+-----------------+------------+---------+---------------+--------------+-------------------------------------+
  | 2014-02-24 08:00:21.0 | https://democloudapi.iab.app42paas.com | demo       | Amazon (Oregon) | BPaaS      | Shared  | light         | RUNNING      | https://demoapphq.iab.app42paas.com |
  +-----------------------+----------------------------------------+------------+-----------------+------------+---------+---------------+--------------+-------------------------------------+
    DESC
end

.bpaassetupsObject



1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
# File 'lib/app42/base/help.rb', line 1093

def bpaassetups
  print <<-DESC
Usage:
  app42 bPaaSSetups

  List all the BPaaS setups

Example:
  $app42 bPaaSSetups

  +-----------------------+----------------------------------------+------------+-----------------+------------+--------------------------+---------+---------------+--------------+-------------------------------------+
  |                                                                                                 === Setups List ===                                                                                                  |
  +-----------------------+----------------------------------------+------------+-----------------+------------+--------------------------+---------+---------------+--------------+-------------------------------------+
  | Created On            | Api Server Url                         | Setup Name | Iaas Provider   | Setup Type | Email                    | Vm Type | Setup Flavour | Setup Status | App Hq Url                          |
  +-----------------------+----------------------------------------+------------+-----------------+------------+--------------------------+---------+---------------+--------------+-------------------------------------+
  | 2014-02-24 08:00:21.0 | https://democloudapi.iab.app42paas.com | demo       | Amazon (Oregon) | BPaaS      | [email protected] | Shared  | light         | RUNNING      | https://demoapphq.iab.app42paas.com |
  +-----------------------+----------------------------------------+------------+-----------------+------------+--------------------------+---------+---------------+--------------+-------------------------------------+
    DESC
end

.clearkeysObject



172
173
174
175
176
177
178
179
180
181
182
183
184
185
# File 'lib/app42/base/help.rb', line 172

def clearkeys
  print <<-DESC
Usage:
  app42 clearKeys

  Clear API key and Secret key

Example:
  app42 clearKeys
  Do you want to delete existing keys? [Yn]: y

  === API key and Secret key have been deleted. ===
  DESC
end

.commandsObject

list available commands or display help for a specific command



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# File 'lib/app42/base/help.rb', line 15

def self.commands

 print  <<-USAGE

  #{how_to}

  Thank You for installing App42 PaaS Ruby Client! This is a powerful tool to make your Applications live with-in minutes.
  App42 PaaS is world's most advanced PaaS solution which supports multiple languages(Java, PHP, Ruby, Nodejs) and services
  (RDBMS like MySQL and PostgreSQL to NoSQL storage like MongoDB, Redis and CouchDB). To Get Started Signup at app42paas.shephertz.com,
  get your API Key and Secret key after you login and finally use App42 command to push your code to cloud. Enjoy Coding!! 

  Key
   keys                    #  List API key and Secret key
   addKeys                 #  Add API key and Secret key
   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 either by number of instance(s) OR kontena(s)
   descale                 #  Descale application either by number of instance(s) OR kontena(s)
   start                   #  Start the application
   stop                    #  Stop the application
   restart                 #  Restart the application
   deleteInfra             #  Delete the Infrastructure environment
   apps                    #  List all the deployed applications with their meta details
   appInfo                 #  Show meta information of the application
   appState                #  Show current state of the application
   logs                    #  Returns the log file URL(s) for the application
   addCustomURL            #  Add a custom URL to an app
   removeCustomURL         #  Remove a custom URL from an app
   customURLInfo           #  List all custom URL(s) of an app

  Services 
   createService           #  Creates a new service e.g. MySQL, MongoDB, CouchDB, PostgreSQL, Redis etc.
   deleteService           #  Delete provisioned service
   startService            #  Start the service
   restartService          #  Restart the service
   stopService             #  Stop the service
   resetServicePassword    #  Reset password of provisioned service
   scaleService            #  Vertically scale service by number of Kontena(s)
   descaleService          #  Vertically descale services by number of Kontena(s)
   uploadBackup            #  Upload existing backup into a service
   bindIP                  #  Bind IP to provisioned service
   unbindIP                #  Unbind IP from provisioned service
   bindInfo                #  Show IP bind information related to provisioned service
   services                #  List all the provisioned services with their meta details
   serviceInfo             #  Show meta information of the provisioned service

  BPaaS
   setupBPaaS             #  Setup App42 BPaaS by choosing required configuration
   deleteBPaaS            #  Delete the BPaaS setup
   startBPaaS             #  Start the BPaaS setup
   stopBPaaS              #  Stop the BPaaS setup
   restartBPaaS           #  Restart the BPaaS setup
   upgradeBPaas           #  Upgrade BPaaS by choosing required configuration
   downgradeBPaas         #  Downgrade BPaaS by choosing required configuration
   bPaaSInfo              #  Show BPaaS setup information
   bPaaSSetups            #  List all the BPaaS setups

  WordPress
   setupWordPress         #  Setup App42 WordPress by choosing required configuration
   deleteWordPress        #  Delete the WordPress setup
   startWordPress         #  Start the WordPress setup
   stopWordPress          #  Stop the WordPress setup
   restartWordPress       #  Restart the WordPress setup
   upgradeWordPress       #  Upgrade WordPress by choosing required configuration
   downgradeWordPress     #  Downgrade WordPress by choosing required configuration
   wordPressInfo          #  Show WordPress setup information
   wordPressSetups        #  List all the WordPress setups

  GPaaS
   setupGPaaS             #  Setup App42 GPaaS by choosing required configuration
   deleteGPaaS            #  Delete the GPaaS setup
   startGPaaS             #  Start the GPaaS setup
   stopGPaaS              #  Stop the GPaaS setup
   restartGPaaS           #  Restart the GPaaS setup
   upgradeGPaas           #  Upgrade GPaaS by choosing required configuration
   downgradeGPaas         #  Downgrade GPaaS by choosing required configuration
   gPaaSInfo              #  Show GPaaS setup information
   gPaaSSetups            #  List all the GPaaS setups

  Help
   version                 #  Show Ruby client gem version
   help                    #  List available commands and their description
   COMMAND --help          #  Display detailed help of a specific command

  Misc
   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
  USAGE
end

.createserviceObject



574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
# File 'lib/app42/base/help.rb', line 574

def createservice
  print <<-DESC
Usage:
  app42 createService

  Creates a new service e.g. MySQL, MongoDB, CouchDB, PostgreSQL etc.

Example:
  $app42 createService
  Enter Service Name: mysqldemo

  Deleting Service... OK

  Operation is in progress, Please wait...
  Service has been deleted successfully.

  ubuntu@ubuntu-Lenovo-G580:~/workspace/App42PasS/PaaS/app42$ app42 createService
  Enter Service Name: mysqldb

  Checking Service Name Availability... OK

  1: MySQL 5.5.31
  2: Mongodb 2.4.4
  3: Couchdb 1.0.1
  4: PostgreSQL 9.1.9
  5: Redis 2.8.3
  Select Service [MySQL 5.5.31]: 

  Enter Database Name: demo_db

  1: Shared
  Select Instance Type [Shared]: 

  1: Amazon (Oregon)
  Select IaaS Provider [Amazon (Oregon)]: 

  Specify Kontena Power: 1

  Creating Service... OK

  Operation is in progress, Please wait...-
  Service has been created successfully.

  +---------------+-----------------+----------------------------------+--------------+---------+------------------+-----------+---------+--------------+----------------+----------------------------------+--------+--------------+
  |                                                                                                     === mysqldb Details ===                                                                                                     |
  +---------------+-----------------+----------------------------------+--------------+---------+------------------+-----------+---------+--------------+----------------+----------------------------------+--------+--------------+
  | Database Name | Iaas Provider   | Token                            | Vm Ip        | State   | User Name        | Source Ip | Vm Port | Service Type | Destination Ip | Password                         | Memory | Service Name |
  +---------------+-----------------+----------------------------------+--------------+---------+------------------+-----------+---------+--------------+----------------+----------------------------------+--------+--------------+
  | demo_db       | Amazon (Oregon) | 0pcmpc64srphrwijmy616uipdjv7t0oi | 172.16.2.167 | RUNNING | admk0ltirejxgh3o |           | 27875   | MySQL 5.5.31 |                | a66tyn077yhlx2gue0t2nsjplls56g7m | 256 MB | mysqldb      |
  +---------------+-----------------+----------------------------------+--------------+---------+------------------+-----------+---------+--------------+----------------+----------------------------------+--------+--------------+
  DESC
end

.customurlinfoObject



553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
# File 'lib/app42/base/help.rb', line 553

def customurlinfo
  print <<-DESC
Usage:
  app42 customURLInfo

  List all custom URLs of an app

Example:
  $app42 customURLInfo
  Enter App Name: demo

  +----------+-----------------------+-------------------------------+
  |                === testPhp Custome URLs Details ===              |
  +----------+-----------------------+-------------------------------+
  | App Name | Created On            | Url                           |
  +-------------+-----------------------+----------------------------+
  | demo     | 2014-01-27 06:35:55.0 | http://test.naveengoswami.com |
  +----------+-----------------------+-------------------------------+
DESC
end

.deletebpaasObject



955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
# File 'lib/app42/base/help.rb', line 955

def deletebpaas
  print <<-DESC
Usage:
  app42 deleteBPaaS

  Delete the setup

Example:
  $app42 deleteBPaaS
  Enter Setup Name: demo
  Deleting Setup... OK

  Operation is in progress, Please wait...-
  Setup deleted successfully.
    DESC
end

.deletegpaasObject



1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
# File 'lib/app42/base/help.rb', line 1339

def deletegpaas
print <<-DESC
Usage:
  app42 deleteGPaaS

  Delete the GPaaS setup

Example:
  $app42 deleteGPaaS
  Enter Setup Name: demo
  Deleting Setup... OK

  Operation is in progress, Please wait...|
  GPaaS Setup has been deleted successfully.
  DESC
end

.deleteinfraObject



408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
# File 'lib/app42/base/help.rb', line 408

def deleteinfra
  print <<-DESC
Usage:
  app42 deleteInfra

  Delete the Infrastructure environment

Options:
  [--app APP]      # Name of app, you want to delete

Example:
  $app42 deleteInfra --app demo
  Deleting Application demo... OK

  Operation is in progress, Please wait...
  1 out of 3 deleted
  -
  2 out of 3 deleted
  |
  App has been deleted successfully.
  DESC
end

.deleteserviceObject



627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
# File 'lib/app42/base/help.rb', line 627

def deleteservice
  print <<-DESC
Usage:
  app42 deleteService

  Delete the provisioned service

Options:
  [--service SERVICE]      # Name of service  

Example:
  $app42 deleteService
  Enter Service Name: mysqldb

  Deleting Service... OK

  Operation is in progress, Please wait...|
  Service has been deleted successfully.
  
  DESC
end

.deletewordpressObject



1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
# File 'lib/app42/base/help.rb', line 1146

def deletewordpress
  print <<-DESC
Usage:
  app42 deleteWordPress

  Delete the WordPress setup

Example:
  $app42 deleteWordPress
  Enter Setup Name: demo
  Deleting Setup... OK

  Operation is in progress, Please wait...-
  WordPress Setup has been deleted successfully.
    DESC
end

.deployObject



236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
# File 'lib/app42/base/help.rb', line 236

def deploy
  print <<-DESC
Usage:
  app42 deploy

  Deploy the application over your runtime environment

Options:
  [--app APP]      # Name of app, you want to update

Example:
  $app42 deploy
  Enter App Name: demo
  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...|
  App has been deployed successfully.
  DESC

end

.descaleObject



312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
# File 'lib/app42/base/help.rb', line 312

def descale
  print <<-DESC
Usage:
  app42 descale

  Descale application either by number of instance(s) OR kontena(s)

Options:
  [--app APP]      # Name of app, you want to descale

Example:
  $app42 descale
  Enter App Name: demo

  1: Horizontal
  2: Vertical
  Choose Scale Type [Horizontal]: 

  Horizontal descale by instance(s) [1]: 1
  Descaling Application demo by instance 1... OK

  Operation is in progress, Please wait...|
  Descale has been completed successfully.
  DESC
end

.descaleserviceObject



759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
# File 'lib/app42/base/help.rb', line 759

def descaleservice
  print <<-DESC
  Usage:
    app42 descaleService
    Vertically descale service by number of kontena(s)

  Options:
    [--service SERVICE]      # Name of service, you want to scale

  Example:
    $app42 descaleService
    Enter Service Name: mysqldb

    Vertical descale by kontena power(s) [1]: 1
    Descaling Service 'mysqldb' by kontena 1... OK

    Operation is in progress, Please wait...-
    Vertical Descale has been completed successfully.
  DESC

end

.downgradebpaasObject



1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
# File 'lib/app42/base/help.rb', line 1049

def downgradebpaas
  print <<-DESC
Usage:
  app42 downgradeBPaaS

  Downgrade BPaaS by choosing required configuration

Example:
  $app42 downgradeBPaaS
  Enter Setup Name: demo

  1: Light
  2: Medium
  Select Flavour [Light]: 2

  Downgrading Setup... OK

  Operation is in progress, Please wait...-
  
  BPaaS setup demo downgraded successfully. 
    DESC
end

.downgradegpaasObject



1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
# File 'lib/app42/base/help.rb', line 1431

def downgradegpaas
  print <<-DESC
Usage:
  app42 downgradeGPaaS

  Downgrade GPaaS by choosing required configuration

Example:
  $app42 downgradeGPaaS
  Enter Setup Name: demo

  1: t1.micro
  Select Instance Configuration [t1.micro]:

  Downgrading Setup... OK

  Operation is in progress, Please wait...-
  GPaaS Setup has been updated successfully.
    DESC
end

.downgradewordpressObject



1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
# File 'lib/app42/base/help.rb', line 1240

def downgradewordpress
  print <<-DESC
Usage:
  app42 downgradeWordpress

  Downgrade WordPress by choosing required configuration

Example:
  $app42 downgradeWordPress
  Enter Setup Name: demo

  1: Light
  2: Medium
  Select Flavour [Light]: 2

  Downgrading Setup... OK

  Operation is in progress, Please wait...-
  
  WordPress setup demo downgraded successfully. 
    DESC
end

.gpaasinfoObject



1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
# File 'lib/app42/base/help.rb', line 1452

def gpaasinfo
  print <<-DESC            
Usage:
  app42 gPaaSInfo

  Show GPaaS setup information

Options:
  [--setup SETUP]      # Name of setup, you want to info

Example:
  $ app42 gPaaSInfo
  Enter Setup Name: demo

  +-----------------------+-------------------------------------------+------------+----------------------------+------------+-----------+---------------+--------------+
  |                                                                        === gpaas Details ===                                                                        |
  +-----------------------+-------------------------------------------+------------+----------------------------+------------+-----------+---------------+--------------+
  | Created On            | Api Server Url                            | Setup Name | Iaas Provider              | Setup Type | Vm Type   | Setup Flavour | Setup Status |
  +-----------------------+-------------------------------------------+------------+----------------------------+------------+-----------+---------------+--------------+
  | 2014-02-21 09:36:43.0 | ec2-54-237-87-107.compute-1.amazonaws.com |  demo      | Amazon (Northern Virginia) | GPaaS      | Dedicated | t1.micro      | RUNNING      |
  +-----------------------+-------------------------------------------+------------+----------------------------+------------+-----------+---------------+--------------+
 DESC
end

.gpaassetupsObject



1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
# File 'lib/app42/base/help.rb', line 1476

def gpaassetups
    print <<-DESC
Usage:
  app42 gPaaSSetups

  List all the GPaaS setups

Example:
  $app42 app42 gPaaSSetups

  +-----------------------+-------------------------------------------+------------+----------------------------+------------+--------------------------+-----------+---------------+--------------+
  |                                                                                      === Setups List ===                                                                                       |
  +-----------------------+-------------------------------------------+------------+----------------------------+------------+--------------------------+-----------+---------------+--------------+
  | Created On            | App Url                                   | Setup Name | Iaas Provider              | Setup Type | Email                    | Vm Type   | Setup Flavour | Setup Status |
  +-----------------------+-------------------------------------------+------------+----------------------------+------------+--------------------------+-----------+---------------+--------------+
  | 2014-02-06 13:49:07.0 | ec2-54-221-96-246.compute-1.amazonaws.com | demo       | Amazon (Northern Virginia) | GPaaS      | [email protected] | Dedicated | t1.micro      | RUNNING      |
  +-----------------------+-------------------------------------------+------------+----------------------------+------------+--------------------------+-----------+---------------+--------------+

  DESC
end

.how_toObject

details, how to use app42 commands



10
11
12
# File 'lib/app42/base/help.rb', line 10

def self.how_to
  Paint["Usage: app42 COMMAND [command-specific-options]", :blue]
end

.iaasprovidersObject



1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
# File 'lib/app42/base/help.rb', line 1572

def iaasproviders
  print <<-DESC
Usage:
  app42 iaasProviders

  List the supported IaaS providers by App42

Example:
  $app42 iaasProviders
  +-----------------+-----------------+
  | === Available IaaS Providers ===  |
  +-----------------+-----------------+
  | Name            | Zone            |
  +-----------------+-----------------+
  | Amazon          | (Oregon)        |
  +-----------------+-----------------+
  DESC
end

.keysObject



138
139
140
141
142
143
144
145
146
147
148
149
150
# File 'lib/app42/base/help.rb', line 138

def keys
  print <<-DESC
Usage:
  app42 keys

  List API key and Secret key

Example:
  === API/Secret Key ===
  API Key      = <apiKey>
  Secret Key   = <secretKey>
  DESC
end

.keys_helpObject



111
112
113
114
115
116
117
118
119
120
# File 'lib/app42/base/help.rb', line 111

def self.keys_help
  print <<-USAGE
  #{how_to}
  app42 api_key:add [KEY]       #  add a api key for the current user
  app42 secret_key:add [KEY]    #  add a Secret Key for the current user
  app42 keys:clear              #  remove all authentication keys from the current user

  USAGE

end

.logsObject



495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
# File 'lib/app42/base/help.rb', line 495

def logs
  print <<-DESC
Usage:
  app42 logs

  Returns the log URL(s) for the application

Example:
  $app42 logs
  Enter App Name: demo
Please visit below URL(s) to access app logs

+-----------------------------------------------------------------------------------+
|                                    Log URL(s)                                     |
+-----------------------------------------------------------------------------------+
| https://apphq.app42paas.com/app/getInstanceLog?id=eyk3t10hz9nwc12e08f92jxcmz83uo2u |
| https://apphq.app42paas.com/app/getInstanceLog?id=zijqty8n5ufna677wgbxwywca5laqkw5 |
| https://apphq.app42paas.com/app/getInstanceLog?id=wynv58rt509yj7fqwbkh80zlw6isf6g2 |
+-----------------------------------------------------------------------------------+
  DESC
end

.removecustomurlObject



535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
# File 'lib/app42/base/help.rb', line 535

def removecustomurl
  print <<-DESC
Usage:
  app42 removeCustomURL

  Remove a custom URL from an app

Example:
  $ app42 removeCustomURL
  Enter App Name: demo

  Enter Custom URL: http://test.naveengoswami.com

  Removing Custom URL... OK
  Custom URL deleted successfully.
 DESC
end

.resetservicepasswordObject



715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
# File 'lib/app42/base/help.rb', line 715

def resetservicepassword
  print <<-DESC
Usage:
  resetServicePassword

  Reset the password of provisioned service

Example:
  $resetServicePassword
  Enter Service Name: mysqldemo

  Enter Old Password: teh77o4b6kpb22ab6oogfu9lwru9vrlj

  Resetting Password... OK
  
  Operation is in progress, Please wait.../
  Service Password has been reset successfully.

  Your new password is: z2qo1vxeadak6jsmt9upobytwptc5eo0
    DESC
end

.restartObject



385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
# File 'lib/app42/base/help.rb', line 385

def restart
  print <<-DESC
Usage:
  app42 restart

  Restart the application

Options:
  [--app APP]      # Name of app, you want to restart

Example:
  $app42 start --app demo
  Restarting Application demo... OK

  Operation is in progress, Please wait...
  1 out of 3 restarted
  -
  2 out of 3 restarted
  |
  App has been restarted successfully.
  DESC
end

.restartbpaasObject



1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
# File 'lib/app42/base/help.rb', line 1008

def restartbpaas
  print <<-DESC
Usage:
  app42 restartBPaaS

  Restart the BPaaS setup

Example:
  $app42 restartBPaaS
  Enter Setup Name: demo
  Restarting BPaaS Setup demo... OK

  Operation is in progress, Please wait...|
  
  BPaaS setup demo restarted successfully. 
    DESC
end

.restartgpaasObject



1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
# File 'lib/app42/base/help.rb', line 1390

def restartgpaas
  print <<-DESC
Usage:
  app42 restartGPaaS

  Restart the GPaaS setup

Example:
  $app42 restartGPaaS
  Enter Setup Name: demo
  Restarting GPaaS Setup demo... OK

  Operation is in progress, Please wait...|
  GPaaS Setup has been restarted successfully.
  DESC
end

.restartserviceObject



671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
# File 'lib/app42/base/help.rb', line 671

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: mysqldb

  Restarting Service mysqldb... OK

  Operation is in progress, Please wait...
  Service has been restarted successfully.
  DESC

end

.restartwordpressObject



1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
# File 'lib/app42/base/help.rb', line 1199

def restartwordpress
  print <<-DESC
Usage:
  app42 restartWordPress

  Restart the WordPress setup

Example:
  $app42 restartWordPress
  Enter Wordpress Name: demo

  Restarting Wordpress Setup demo... OK

  Operation is in progress, Please wait...-
  WordPress Setup has been restarted successfully.
    DESC
end

.runtimesObject



1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
# File 'lib/app42/base/help.rb', line 1549

def runtimes
  print <<-DESC
Usage:
  app42 runtimes

  List the supported runtimes

Example:
  $app42 runtimes
  +--------------+--------------+
  | === Available Runtimes ===  |
  +--------------+--------------+
  | Name         | Version      |
  +--------------+--------------+
  | Ruby         | 2.0          |
  | Java         | 6.0          |
  | Java         | 7.0          |
  | Php          | 5.3          |
  | Php          | 5.5          |
  +--------------+--------------+
  DESC
end

.scaleObject



286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
# File 'lib/app42/base/help.rb', line 286

def scale
  print <<-DESC
Usage:
  app42 scale

  Scale application either by number of instance(s) OR kontena(s)

Options:
  [--app APP]      # Name of app, you want to scale

Example:
  $app42 scale
  Enter App Name: demo

  1: Horizontal
  2: Vertical
  Choose Scale Type [Horizontal]: 

  Horizontal scale by instance(s) [1]: 
  Scaling Application demo by instance 1... OK

  Operation is in progress, Please wait...-
  Scale has been completed successfully.
  DESC
end

.scaleserviceObject



737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
# File 'lib/app42/base/help.rb', line 737

def scaleservice
  print <<-DESC
  Usage:
    app42 scaleService
    Vertically scale service by number of kontena(s)
  
  Options:
    [--service SERVICE]      # Name of service, you want to scale
  
  Example:
  $app42 scaleService
  Enter Service Name: mysqldb

  Vertical scale by kontena power(s) [1]: 1
  Scaling Service 'mysqldb' by kontena 1... OK

  Operation is in progress, Please wait...|
  Vertical Scale has been completed successfully.
  DESC

end

.serviceinfoObject



898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
# File 'lib/app42/base/help.rb', line 898

def serviceinfo
  print <<-DESC
Usage:
  app42 serviceInfo

  Show meta information of the provisioned service

Options:
  [--service SERVICE]      # Name of service

Example:
  $ app42 serviceInfo
  1: mysqldb
  Select Service [mysqldb]: 1

  +---------------+-----------------+----------------------------------+--------------+---------+------------------+-----------+---------+--------------+----------------+----------------------------------+--------+--------------+
  |                                                                                                     === mysqldb Details ===                                                                                                     |
  +---------------+-----------------+----------------------------------+--------------+---------+------------------+-----------+---------+--------------+----------------+----------------------------------+--------+--------------+
  | Database Name | Iaas Provider   | Token                            | Vm Ip        | State   | User Name        | Source Ip | Vm Port | Service Type | Destination Ip | Password                         | Memory | Service Name |
  +---------------+-----------------+----------------------------------+--------------+---------+------------------+-----------+---------+--------------+----------------+----------------------------------+--------+--------------+
  | demo_db       | Amazon (Oregon) | 0pcmpc64srphrwijmy616uipdjv7t0oi | 172.16.2.167 | RUNNING | admk0ltirejxgh3o | 0.0.0.0   | 15847   | MySQL 5.5.31 | 54.213.93.154  | vagyqxta6e0a8q5jxunlr43v6cwohmdj | 256 MB | mysqldb      |
  +---------------+-----------------+----------------------------------+--------------+---------+------------------+-----------+---------+--------------+----------------+----------------------------------+--------+--------------+
  DESC
end

.servicesObject



879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
# File 'lib/app42/base/help.rb', line 879

def services
  print <<-DESC
Usage:
  app42 services

  List the all provisioned services with their meta details

Example:
  $app42 services
  +---------------+---------------+-----------+-----------+---------+------------------+---------+--------------+----------------------------------+--------+
  |                                                                  === Service List ===                                                                   |
  +---------------+---------------+-----------+-----------+---------+------------------+---------+--------------+----------------------------------+--------+
  | Database Name | Iaas Provider | Name      | Vm Ip     | State   | User Name        | Vm Port | Service Type | Password                         | Memory |
  +---------------+---------------+-----------+-----------+---------+------------------+---------+--------------+----------------------------------+--------+
  | demodb        | Amazon        | mysqldemo | 10.0.0.52 | RUNNING | j7zz1jsx1bb4eiz1 | 49695   | MySQL 5.5.1  | teh77o4b6kpb22ab6oogfu9lwru9vrlj | 512 MB |
  +---------------+---------------+-----------+-----------+---------+------------------+---------+--------------+----------------------------------+--------+
  DESC
end

.setupbpaasObject



923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
# File 'lib/app42/base/help.rb', line 923

def setupbpaas
  print <<-DESC
Usage:
  app42 setupBPaaS

  Setup App42 BPaaS by choosing required configuration

Example:
  $app42 setupBPaaS
  Enter Setup Name: demo
  Checking Setup Name Availability... OK

  1: Shared
  Select Instance Type [Shared]: 

  1: Amazon (Oregon)
  Select IaaS Provider [Amazon (Oregon)]: 

  1: Light
  2: Medium
  3: Heavy
  Select Flavour [Light]: 

  Setting up the BPaaS infrastructure... OK

  Operation is in progress, Please wait...-
  BPaaS Setup has been completed successfully.

  Your BPaaS setup has been completed successfully, For details, Login to PaaSHQ console.
    DESC
end

.setupgpaasObject



1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
# File 'lib/app42/base/help.rb', line 1308

def setupgpaas
  print <<-DESC
Usage:
  app42 setupGPaaS

  Setup App42 GPaaS by choosing required configuration

Example:
  $ app42 setupGPaaS
  Enter Setup Name: demo
  Checking Setup Name Availability... OK

  1: Amazon (Northern Virginia)
  Select IaaS Provider [Amazon (Northern Virginia)]: 

  1: t1.micro
  2: m1.small
  3: m1.medium
  4: m1.large
  5: m1.xlarge
  Select Instance Configuration [t1.micro]: 

  Setting up the GPaaS infrastructure... OK

  Operation is in progress, Please wait...|
  GPaaS Setup has been completed successfully.

  Your GPaaS setup has been completed successfully, For details, Login to PaaSHQ console.
 DESC
end

.setupinfraObject



187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/app42/base/help.rb', line 187

def setupinfra
  print <<-DESC
Usage:
  app42 setupInfra

  Setup your deployment and runtime environment i.e. Instance(Memory, CPU) and Technology Stack

Example:
  $app42 setupInfra
  Enter App Name: demo

  Checking App Name Availability... OK

  1: Shared
  Select Instance Type [Shared]: 

  1: Amazon (Oregon)
  Select IaaS Provider [Amazon (Oregon)]: 

  1: Ruby 2.0.0
  2: Java 6
  3: Java 7
  4: PHP 5.3
  5: PHP 5.5
  6: Node 0.10.22
  Select Runtime [Ruby 2.0.0]: 

  1: Ruby on Rack 
  2: Rails 4.0
  3: Sinatra 1.4
  Select Framework [Ruby on Rack ]: 

  1: Passenger 4.0
  2: Thin 1.6
  3: Unicorn 4.7
  Select Web Server [Passenger 4.0]: 

  Specify Kontena Power: 1

  Setting up the infrastructure... OK

  Operation is in progress, Please wait...|
  Setup Infra has been completed successfully.

  Default application has been deployed. You can visit 'https://demo.iab.app42paas.com' to see the default application.
  DESC

end

.setupwordpressObject



1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
# File 'lib/app42/base/help.rb', line 1113

def setupwordpress
  print <<-DESC
Usage:
  app42 setupWordPress

  Setup App42 WordPress by choosing required configuration

Example:
  $app42 setupWordPress
  Enter Wordpress Name: demo

  Checking WordPress Name Availability... OK

  1: Shared
  Select Instance Type [Shared]: 

  1: Amazon (Oregon)
  Select IaaS Provider [Amazon (Oregon)]: 

  1: Light
  2: Medium
  3: Heavy
  Select Flavour [Light]: 

  Setting up the wordpress infrastructure... OK

  Operation is in progress, Please wait...-
  WordPress Setup has been completed successfully.

  Your WordPress setup has been completed successfully, For details, Login to PaaSHQ console.
    DESC
end

.startObject



338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
# File 'lib/app42/base/help.rb', line 338

def start
  print <<-DESC
Usage:
  app42 start

  Start the application

Options:
  [--app APP]      # Name of app, you want to start

Example:
  $app42 start --app demo
  Starting Application demo... OK

  Operation is in progress, Please wait...
  1 out of 3 started
  -
  2 out of 3 started
  |
  App has been started successfully.
  DESC

end

.startbpaasObject



972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
# File 'lib/app42/base/help.rb', line 972

def startbpaas
  print <<-DESC
Usage:
  app42 startBPaaS

  Start the BPaaS setup

Example:
  $app42 startBPaaS
  Enter Setup Name: demo
  Starting BPaaS Setup demo... OK

  Operation is in progress, Please wait...|
  
  BPaaS setup demo started successfully. 
    DESC
end

.startgpaasObject



1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
# File 'lib/app42/base/help.rb', line 1356

def startgpaas
  print <<-DESC
Usage:
  app42 startGPaaS

  Start the GPaaS setup

Example:
  $app42 startGPaaS
  Enter Setup Name: demo
  Starting GPaaS Setup fsdfds... OK

  Operation is in progress, Please wait...-
  GPaaS Setup has been started successfully.
    DESC
end

.startserviceObject



649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
# File 'lib/app42/base/help.rb', line 649

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: mysqldb

  Starting Service mysqldb... OK

  Operation is in progress, Please wait...-
  Service has been started successfully.
  DESC

end

.startwordpressObject



1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
# File 'lib/app42/base/help.rb', line 1163

def startwordpress
  print <<-DESC
Usage:
  app42 startWordPress

  Start the WordPress setup

Example:
  $app42 startWordPress
  Enter Wordpress Name: demo

  Starting Wordpress Setup demo... OK

  Operation is in progress, Please wait...|
  WordPress Setup has been started successfully. 
    DESC
end

.stopObject



362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
# File 'lib/app42/base/help.rb', line 362

def stop
  print <<-DESC
Usage:
  app42 stop

  Stop the application

Options:
  [--app APP]      # Name of app, you want to stop

Example:
  $app42 stop --app demo
  Stopping Application demo... OK

  Operation is in progress, Please wait...-
  1 out of 3 stopped
  -
  2 out of 3 stopped
  -
  App has been stopped successfully.
  DESC
end

.stopbpaasObject



990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
# File 'lib/app42/base/help.rb', line 990

def stopbpaas
  print <<-DESC
Usage:
  app42 stopBPaaS

  Stop the BPaaS setup

Example:
  $app42 stopBPaaS
  Enter Setup Name: demo
  Stopping BPaaS Setup demo... OK

  Operation is in progress, Please wait...|
  
  BPaaS setup demo stopped successfully. 
    DESC
end

.stopgpaasObject



1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
# File 'lib/app42/base/help.rb', line 1373

def stopgpaas
  print <<-DESC
Usage:
  app42 stopGPaaS

  Stop the GPaaS setup

Example:
  $app42 stopGPaaS
  Enter Setup Name: demo
  Stopping GPaaS Setup demo... OK

  Operation is in progress, Please wait...|
  GPaaS Setup has been stopped successfully.
  DESC
end

.stopserviceObject



693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
# File 'lib/app42/base/help.rb', line 693

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: mysqldb

  Stopping Service mysqldb... OK

  Operation is in progress, Please wait...
  Service has been stopped successfully.
  DESC

end

.stopwordpressObject



1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
# File 'lib/app42/base/help.rb', line 1181

def stopwordpress
  print <<-DESC
Usage:
  app42 stopWordPress

  Stop the WordPress setup

Example:
  $app42 stopWordPress
  Enter Wordpress Name: demo

  Stopping Wordpress Setup demo... OK

  Operation is in progress, Please wait...|
  WordPress Setup has been stopped successfully.
    DESC
end

.supportedservicesObject



1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
# File 'lib/app42/base/help.rb', line 1497

def supportedservices
  print <<-DESC
Usage:
  app42 supportedServices

  List the supported services by App42

Example:
  $app42 supportedServices
  +--------------+--------------+
  | === App42 PaaS Services === |
  +--------------+--------------+
  | Name         | Version      |
  +--------------+--------------+
  | MySQL        | 5.5.1        |
  | Mongodb      | 2.4          |
  | Couchdb      | 10.1         |
  | PostgreSQL   | 9.1          |
  +--------------+--------------+
  DESC
end

.unbindipObject



836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
# File 'lib/app42/base/help.rb', line 836

def unbindip
  print <<-DESC
Usage:
  app42 unbindIP

  Unbind IP from provisioned service

Example:
  $app42 unbindIP
  Enter Service Name: mysqldb

  Please Provide Source IP: 0.0.0.0

  Unbinding IP to service... OK

  Operation is in progress, Please wait...
  Service unbinding has been completed successfully.
    DESC
end

.updateObject



262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
# File 'lib/app42/base/help.rb', line 262

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 has been deployed successfully.
  DESC
end

.upgradebpaasObject



1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
# File 'lib/app42/base/help.rb', line 1026

def upgradebpaas
  print <<-DESC
Usage:
  app42 upgradeBPaaS

  Upgrade BPaaS by choosing required configuration

Example:
  $app42 upgradeBPaaS
  Enter Setup Name: demo

  1: Medium
  2: Heavy
  Select Flavour [Medium]: 2

  Upgrading Setup... OK

  Operation is in progress, Please wait...-
  
  BPaaS setup demo upgraded successfully. 
    DESC
end

.upgradegpaasObject



1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
# File 'lib/app42/base/help.rb', line 1407

def upgradegpaas
  print <<-DESC
Usage:
  app42 upgradeGPaaS

  Upgrade GPaaS by choosing required configuration

Example:
  $app42 upgradeGPaaS
  Enter Setup Name: demo

  1: m1.small
  2: m1.medium
  3: m1.large
  4: m1.xlarge
  Select Instance Configuration [m1.small]:

  Upgrading Setup... OK

  Operation is in progress, Please wait...|
  GPaaS Setup has been updated successfully.
    DESC
end

.upgradewordpressObject



1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
# File 'lib/app42/base/help.rb', line 1217

def upgradewordpress
  print <<-DESC
Usage:
  app42 upgradeWordpress

  Upgrade WordPress by choosing required configuration

Example:
  $app42 upgradeWordPress
  Enter Setup Name: demo

  1: Medium
  2: Heavy
  Select Flavour [Medium]: 2

  Upgrading Setup... OK

  Operation is in progress, Please wait...-
  
  WordPress setup demo upgraded successfully. 
    DESC
end

.uploadbackupObject



781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
# File 'lib/app42/base/help.rb', line 781

def uploadbackup
  print <<-DESC
Usage:
  app42 uploadBackup

  Upload file data into a service

Options:
  [--service SERVICE]      # Name of service, you want to scale

Example:
  $app42 uploadBackup
  Enter Service Name: mysqldb

  Enter Backup File Path: /home/ubuntu/Downloads/demo_production-27Nov2013.sql

  Do you also want to restore uploaded backup? [Yn]: n
  Please be patient... This process may take a while to complete.

  Uploading Service Backup... OK

  Operation is in progress, Please wait...
  Backup has been successfully restored.
  DESC
end

.usage(command) ⇒ Object

call help methods



123
124
125
126
127
128
129
130
131
132
133
134
# File 'lib/app42/base/help.rb', line 123

def Help.usage command
  if self.respond_to?(command)
    send command 
  elsif self.respond_to?(command.split(':').last)
    send command.split(':').last
  elsif self.respond_to?(command.split('-').join('_'))
    send command.split('-').join('_')  
  else
    Paint["Sorry..!!, Help is not available.\n", :red]   
  end

end

.versionObject



1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
# File 'lib/app42/base/help.rb', line 1591

def version
  print <<-DESC
Usage:
  app42 version

  Show Ruby client gem version 

Example:
  $app42 version
  App42 current version: 0.5.3
  DESC
end

.wordpressinfoObject



1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
# File 'lib/app42/base/help.rb', line 1263

def wordpressinfo
  print <<-DESC
     
Usage:
  app42 wordPressInfo

  Show WordPress setup information

Options:
  [--setup SETUP]      # Name of setup, you want to info

Example:
  $app42 wordPressInfo
  Enter Setup Name: demo
  +-----------------------+----------------------------------------+------------+----------------------------+------------+---------+---------------+--------------+
  |                                                                      === demo Details ===                                                                      |
  +-----------------------+----------------------------------------+------------+----------------------------+------------+---------+---------------+--------------+
  | Created On            | Api Server Url                         | Setup Name | Iaas Provider              | Setup Type | Vm Type | Setup Flavour | Setup Status |
  +-----------------------+----------------------------------------+------------+----------------------------+------------+---------+---------------+--------------+
  | 2014-01-02 10:10:38.0 | http://demowordpress.iaa.app42paas.com | demo       | Amazon (Northern Virginia) | WP         | Shared  | medium        | RUNNING      |
  +-----------------------+----------------------------------------+------------+----------------------------+------------+---------+---------------+--------------+

 DESC
end

.wordpresssetupsObject



1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
# File 'lib/app42/base/help.rb', line 1288

def wordpresssetups
  print <<-DESC
Usage:
  app42 wordPressSetups

  List all the WordPress setups

Example:
  $app42 wordPressSetups
  +-----------------------+----------------------------------------+------------+----------------------------+------------+---------+---------------+--------------+
  |                                                                      === Setups List ===                                                                       |
  +-----------------------+----------------------------------------+------------+----------------------------+------------+---------+---------------+--------------+
  | Created On            | App Url                                | Setup Name | Iaas Provider              | Setup Type | Vm Type | Setup Flavour | Setup Status |
  +-----------------------+----------------------------------------+------------+----------------------------+------------+---------+---------------+--------------+
  | 2014-01-02 10:10:38.0 | http://demowordpress.iaa.app42paas.com | demo       | Amazon (Northern Virginia) | WP         | Shared  | medium        | RUNNING      |
  +-----------------------+----------------------------------------+------------+----------------------------+------------+---------+---------------+--------------+

 DESC
end