app42 0.5.6 → 0.5.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app42.gemspec +0 -6
- data/lib/app42/base/constants.rb +1 -2
- data/lib/app42/base/help.rb +98 -86
- data/lib/app42/base/shell.rb +2 -2
- data/lib/app42/command/base.rb +2 -2
- data/lib/app42/command/client.rb +2 -2
- data/lib/app42/command/setup.rb +2 -6
- data/lib/app42/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fff1300a426b87f217e16e059f88b957b068bdc2
|
4
|
+
data.tar.gz: 2c68f5a4897d0bf178f7172b26b04b969a73ad7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afcc0248e4c3aad23efb6f84b77f7c8f8e477a9dc1989dd8765824390ce67581f9c2e665594cd75a11212db471d82b72fedfdea4196dca474b38823344aa494c
|
7
|
+
data.tar.gz: 3ad516f90984a44a4f7e623235dc6000f0fd2865fbc7a94157de7f3479ecc5fc91156e53493ea7abd58e672b24a8867154b544b8ddcde7a4b81eb0770695f6d4
|
data/app42.gemspec
CHANGED
@@ -15,12 +15,6 @@ Gem::Specification.new do |spec|
|
|
15
15
|
spec.summary = "Client library and command-line tool to deploy and manage apps on App42PaaS Server."
|
16
16
|
spec.homepage = "http://shephertz.com"
|
17
17
|
spec.license = "MIT"
|
18
|
-
# FIXME, before release
|
19
|
-
# spec.post_install_message = <<-MESSAGE
|
20
|
-
# ! Download and install from: http://rubygems.org/
|
21
|
-
# ! For API access, see: https://github.com/shephertz/app42.rb
|
22
|
-
# MESSAGE
|
23
|
-
|
24
18
|
spec.files = `git ls-files`.split($/)
|
25
19
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
26
20
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
data/lib/app42/base/constants.rb
CHANGED
@@ -4,8 +4,7 @@ module App42
|
|
4
4
|
VERSION = 1.0.to_s
|
5
5
|
|
6
6
|
# app42 host url
|
7
|
-
|
8
|
-
HOST = "http://api.app42paas.com/paas/#{VERSION}"
|
7
|
+
HOST = "https://paashq.shephertz.com/paas/#{VERSION}"
|
9
8
|
|
10
9
|
# app42 configuration directory
|
11
10
|
CONFIG_DIR = "~/.app42".freeze
|
data/lib/app42/base/help.rb
CHANGED
@@ -18,6 +18,14 @@ module App42
|
|
18
18
|
|
19
19
|
#{how_to}
|
20
20
|
|
21
|
+
Thank You for installing App42 PaaS Ruby Client! This is a powerful tool to make your Applications live with-in minutes.
|
22
|
+
App42 PaaS is world's most advanced PaaS solution which supports multiple languages(Java, PHP, Ruby) and services
|
23
|
+
(RDBMS like MySQL and PostgreSQL to NoSQL storage like MongoDB and CouchDB). To Get Started Signup at app42paas.shephertz.com,
|
24
|
+
get your API Key and Secret key after you login and finally use App42 command to push your code to cloud. Enjoy Coding!!
|
25
|
+
|
26
|
+
$ app42 addKeys
|
27
|
+
|
28
|
+
|
21
29
|
Key
|
22
30
|
keys # List API key and Secret key
|
23
31
|
addKeys # Add API key and Secret key
|
@@ -58,8 +66,8 @@ module App42
|
|
58
66
|
activities # List all activities with their status
|
59
67
|
|
60
68
|
Setup
|
61
|
-
|
62
|
-
|
69
|
+
setupBPaaS # Setup App42 BPaaS by choosing required configuration
|
70
|
+
deleteSetup # Delete the setup
|
63
71
|
setupInfo # Show setup information
|
64
72
|
setups # List all the setups
|
65
73
|
|
@@ -188,7 +196,7 @@ Example:
|
|
188
196
|
|
189
197
|
Setup Infra completed successfully.
|
190
198
|
|
191
|
-
Default application has been deployed. You can visit 'demo.
|
199
|
+
Default application has been deployed. You can visit 'https://demo.iab.app42paas.com' to see the default application.
|
192
200
|
DESC
|
193
201
|
|
194
202
|
end
|
@@ -203,13 +211,13 @@ Usage:
|
|
203
211
|
Example:
|
204
212
|
$app42 apps
|
205
213
|
|
206
|
-
|
207
|
-
|
|
208
|
-
|
209
|
-
| App Url
|
210
|
-
|
211
|
-
| demo.
|
212
|
-
|
214
|
+
+--------------------------------+------------+-----------------+------+------------+----------------+--------+
|
215
|
+
| === My Apps === |
|
216
|
+
+--------------------------------+------------+-----------------+------+------------+----------------+--------+
|
217
|
+
| App Url | App Status | Iaas Provider | Name | Runtime | Instance Count | Memory |
|
218
|
+
+--------------------------------+------------+-----------------+------+------------+----------------+--------+
|
219
|
+
| https://demo.iab.app42paas.com | RUNNING | Amazon (Oregon) | demo | Ruby 2.0.0 | 1 | 256 MB |
|
220
|
+
+--------------------------------+------------+-----------------+------+------------+----------------+--------+
|
213
221
|
DESC
|
214
222
|
|
215
223
|
end
|
@@ -415,15 +423,15 @@ Options:
|
|
415
423
|
[--app APP] # Name of app, you want to info
|
416
424
|
|
417
425
|
Example:
|
418
|
-
$app42 appInfo
|
419
|
-
|
420
|
-
|
421
|
-
|
|
422
|
-
|
423
|
-
| App Url
|
424
|
-
|
425
|
-
| demo.
|
426
|
-
|
426
|
+
$app42 appInfo
|
427
|
+
Enter App Name: demo
|
428
|
+
+--------------------------------+------------+-----------------+------+------------+----------------+--------+
|
429
|
+
| === demo Info === |
|
430
|
+
+--------------------------------+------------+-----------------+------+------------+----------------+--------+
|
431
|
+
| App Url | App Status | Iaas Provider | Name | Runtime | Instance Count | Memory |
|
432
|
+
+--------------------------------+------------+-----------------+------+------------+----------------+--------+
|
433
|
+
| https://demo.iab.app42paas.com | RUNNING | Amazon (Oregon) | demo | Ruby 2.0.0 | 1 | 256 MB |
|
434
|
+
+--------------------------------+------------+-----------------+------+------------+----------------+--------+
|
427
435
|
DESC
|
428
436
|
end
|
429
437
|
|
@@ -457,14 +465,15 @@ Usage:
|
|
457
465
|
Example:
|
458
466
|
$app42 logs
|
459
467
|
Enter App Name: demo
|
460
|
-
|
468
|
+
Please visit below URL(s) to access app logs
|
461
469
|
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
470
|
+
+-----------------------------------------------------------------------------------+
|
471
|
+
| Log URL(s) |
|
472
|
+
+-----------------------------------------------------------------------------------+
|
473
|
+
| https://apphq.app42paas.com/app/getInstanceLog?id=eyk3t10hz9nwc12e08f92jxcmz83uo2u |
|
474
|
+
| https://apphq.app42paas.com/app/getInstanceLog?id=zijqty8n5ufna677wgbxwywca5laqkw5 |
|
475
|
+
| https://apphq.app42paas.com/app/getInstanceLog?id=wynv58rt509yj7fqwbkh80zlw6isf6g2 |
|
476
|
+
+-----------------------------------------------------------------------------------+
|
468
477
|
DESC
|
469
478
|
end
|
470
479
|
|
@@ -478,7 +487,7 @@ Usage:
|
|
478
487
|
|
479
488
|
Example:
|
480
489
|
$app42 createService
|
481
|
-
Enter Service Name:
|
490
|
+
Enter Service Name: mysqldb
|
482
491
|
Checking Service Name Availability... OK
|
483
492
|
|
484
493
|
1: MySQL 5.5.31
|
@@ -492,23 +501,23 @@ Example:
|
|
492
501
|
1: Shared
|
493
502
|
Select Instance Type [Shared]:
|
494
503
|
|
495
|
-
1: Amazon
|
496
|
-
Select IaaS Provider [Amazon
|
504
|
+
1: Amazon (Oregon)
|
505
|
+
Select IaaS Provider [Amazon (Oregon)]:
|
497
506
|
|
498
|
-
Specify Kontena Power:
|
507
|
+
Specify Kontena Power: 1
|
499
508
|
|
500
509
|
Creating Service... OK
|
501
|
-
|
510
|
+
|
502
511
|
Operation is in progress, Please wait...|
|
503
512
|
Service created successfully.
|
504
513
|
|
505
|
-
|
506
|
-
|
|
507
|
-
|
508
|
-
| Database Name | Iaas Provider | Vm Ip
|
509
|
-
|
510
|
-
|
|
511
|
-
|
514
|
+
+---------------+-----------------+----------------------------------+--------------+---------+------------------+---------+--------------+----------------------------------+--------+--------------+
|
515
|
+
| === mysqldb Details === |
|
516
|
+
+---------------+-----------------+----------------------------------+--------------+---------+------------------+---------+--------------+----------------------------------+--------+--------------+
|
517
|
+
| Database Name | Iaas Provider | Token | Vm Ip | State | User Name | Vm Port | Service Type | Password | Memory | Service Name |
|
518
|
+
+---------------+-----------------+----------------------------------+--------------+---------+------------------+---------+--------------+----------------------------------+--------+--------------+
|
519
|
+
| demo_db | Amazon (Oregon) | ytxsq0ov7lf5s4foh2igw01bwy32ydgp | 172.16.2.167 | RUNNING | aoafi8vgczxoftw4 | 12411 | MySQL 5.5.31 | a2rzmvrdr7hpa08a6k1a1r24ixdutyl9 | 256 MB | mysqldb |
|
520
|
+
+---------------+-----------------+----------------------------------+--------------+---------+------------------+---------+--------------+----------------------------------+--------+--------------+
|
512
521
|
DESC
|
513
522
|
end
|
514
523
|
|
@@ -626,17 +635,16 @@ Options:
|
|
626
635
|
[--service SERVICE] # Name of service
|
627
636
|
|
628
637
|
Example:
|
629
|
-
|
630
|
-
|
631
|
-
Select Service: 1
|
638
|
+
1: mysqldb
|
639
|
+
Select Service [mysqldb]:
|
632
640
|
|
633
|
-
|
634
|
-
|
|
635
|
-
|
636
|
-
| Database Name | Iaas Provider | Vm Ip
|
637
|
-
|
638
|
-
|
|
639
|
-
|
641
|
+
+---------------+-----------------+----------------------------------+--------------+---------+------------------+---------+--------------+----------------------------------+--------+--------------+
|
642
|
+
| === mysqldb Details === |
|
643
|
+
+---------------+-----------------+----------------------------------+--------------+---------+------------------+---------+--------------+----------------------------------+--------+--------------+
|
644
|
+
| Database Name | Iaas Provider | Token | Vm Ip | State | User Name | Vm Port | Service Type | Password | Memory | Service Name |
|
645
|
+
+---------------+-----------------+----------------------------------+--------------+---------+------------------+---------+--------------+----------------------------------+--------+--------------+
|
646
|
+
| demo_db | Amazon (Oregon) | ytxsq0ov7lf5s4foh2igw01bwy32ydgp | 172.16.2.167 | RUNNING | aoafi8vgczxoftw4 | 12411 | MySQL 5.5.31 | a2rzmvrdr7hpa08a6k1a1r24ixdutyl9 | 256 MB | mysqldb |
|
647
|
+
+---------------+-----------------+----------------------------------+--------------+---------+------------------+---------+--------------+----------------------------------+--------+--------------+
|
640
648
|
DESC
|
641
649
|
end
|
642
650
|
|
@@ -671,16 +679,24 @@ Usage:
|
|
671
679
|
|
672
680
|
Example:
|
673
681
|
$app42 activities
|
674
|
-
|
675
|
-
|
|
676
|
-
|
677
|
-
| Operation
|
678
|
-
|
679
|
-
| setupInfra
|
680
|
-
| scale
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
682
|
+
+------------+-----------+------+------+-----------------------+
|
683
|
+
| === User Activities === |
|
684
|
+
+------------+-----------+------+------+-----------------------+
|
685
|
+
| Operation | Status | Name | Type | Date |
|
686
|
+
+------------+-----------+------+------+-----------------------+
|
687
|
+
| setupInfra | COMPLETED | demo | APP | 2013-10-25 06:18:42.0 |
|
688
|
+
| scale | COMPLETED | demo | APP | 2013-10-25 06:40:39.0 |
|
689
|
+
| scale | COMPLETED | demo | APP | 2013-10-25 06:41:25.0 |
|
690
|
+
| descale | COMPLETED | demo | APP | 2013-10-25 06:42:12.0 |
|
691
|
+
| descale | COMPLETED | demo | APP | 2013-10-25 06:42:13.0 |
|
692
|
+
| rerstart | COMPLETED | demo | APP | 2013-10-25 06:44:31.0 |
|
693
|
+
| stop | COMPLETED | demo | APP | 2013-10-25 06:45:23.0 |
|
694
|
+
| start | COMPLETED | demo | APP | 2013-10-25 06:45:49.0 |
|
695
|
+
| scale | COMPLETED | demo | APP | 2013-10-25 06:52:56.0 |
|
696
|
+
| scale | COMPLETED | demo | APP | 2013-10-25 06:53:24.0 |
|
697
|
+
| descale | COMPLETED | demo | APP | 2013-10-25 06:58:10.0 |
|
698
|
+
| descale | COMPLETED | demo | APP | 2013-10-25 06:58:10.0 |
|
699
|
+
+------------+-----------+------+------+-----------------------+
|
684
700
|
DESC
|
685
701
|
end
|
686
702
|
|
@@ -721,9 +737,8 @@ Example:
|
|
721
737
|
+-----------------+-----------------+
|
722
738
|
| Name | Zone |
|
723
739
|
+-----------------+-----------------+
|
724
|
-
| Amazon |
|
740
|
+
| Amazon | (Oregon) |
|
725
741
|
+-----------------+-----------------+
|
726
|
-
|
727
742
|
DESC
|
728
743
|
end
|
729
744
|
|
@@ -846,15 +861,15 @@ Example:
|
|
846
861
|
DESC
|
847
862
|
end
|
848
863
|
|
849
|
-
def
|
864
|
+
def setupbpaas
|
850
865
|
print <<-DESC
|
851
866
|
Usage:
|
852
|
-
app42
|
867
|
+
app42 setupBPaaS
|
853
868
|
|
854
|
-
Setup App42
|
869
|
+
Setup App42 BPaaS by choosing required configuration
|
855
870
|
|
856
871
|
Example:
|
857
|
-
$app42
|
872
|
+
$app42 setupBPaaS
|
858
873
|
Enter Setup Name: railsdemo
|
859
874
|
Checking Setup Name Availability... OK
|
860
875
|
|
@@ -864,9 +879,6 @@ Example:
|
|
864
879
|
1: Amazon us-west-2
|
865
880
|
Select IaaS Provider [Amazon us-west-2]:
|
866
881
|
|
867
|
-
1: App42CloudAPI
|
868
|
-
Select Setup Type [App42CloudAPI]:
|
869
|
-
|
870
882
|
1: Light
|
871
883
|
2: Medium
|
872
884
|
3: Heavy
|
@@ -881,17 +893,17 @@ Example:
|
|
881
893
|
DESC
|
882
894
|
end
|
883
895
|
|
884
|
-
def
|
896
|
+
def deletesetup
|
885
897
|
print <<-DESC
|
886
898
|
Usage:
|
887
|
-
app42
|
899
|
+
app42 deleteSetup
|
888
900
|
|
889
|
-
Delete
|
901
|
+
Delete the setup
|
890
902
|
|
891
903
|
Example:
|
892
|
-
$app42
|
904
|
+
$app42 deleteSetup
|
893
905
|
Enter Setup Name: demo
|
894
|
-
Deleting
|
906
|
+
Deleting Setup... OK
|
895
907
|
|
896
908
|
Operation is in progress, Please wait...-
|
897
909
|
Setup deleted successfully.
|
@@ -908,13 +920,13 @@ Usage:
|
|
908
920
|
Example:
|
909
921
|
$app42 setupInfo
|
910
922
|
Enter Setup Name: demo
|
911
|
-
|
912
|
-
|
|
913
|
-
|
914
|
-
| Created On | Api Server Url
|
915
|
-
|
916
|
-
| 2013-10-
|
917
|
-
|
923
|
+
+-----------------------+-------------------------------------+------------+-----------------+------------+---------+---------------+--------------+
|
924
|
+
| === demo Details === |
|
925
|
+
+-----------------------+-------------------------------------+------------+-----------------+------------+---------+---------------+--------------+
|
926
|
+
| Created On | Api Server Url | Setup Name | Iaas Provider | Setup Type | Vm Type | Setup Flavour | Setup Status |
|
927
|
+
+-----------------------+-------------------------------------+------------+-----------------+------------+---------+---------------+--------------+
|
928
|
+
| 2013-10-28 15:00:46.0 | https://demoapphq.iab.app42paas.com | demo | Amazon (Oregon) | CLOUDAPI | Shared | light | RUNNING |
|
929
|
+
+-----------------------+-------------------------------------+------------+-----------------+------------+---------+---------------+--------------+
|
918
930
|
DESC
|
919
931
|
end
|
920
932
|
|
@@ -927,13 +939,13 @@ Usage:
|
|
927
939
|
|
928
940
|
Example:
|
929
941
|
$app42 setups
|
930
|
-
|
931
|
-
|
|
932
|
-
|
933
|
-
| Created On | Api Server Url
|
934
|
-
|
935
|
-
| 2013-10-
|
936
|
-
|
942
|
+
+-----------------------+-------------------------------------+------------+-----------------+------------+---------+---------------+--------------+
|
943
|
+
| === Setups List === |
|
944
|
+
+-----------------------+-------------------------------------+------------+-----------------+------------+---------+---------------+--------------+
|
945
|
+
| Created On | Api Server Url | Setup Name | Iaas Provider | Setup Type | Vm Type | Setup Flavour | Setup Status |
|
946
|
+
+-----------------------+-------------------------------------+------------+-----------------+------------+---------+---------------+--------------+
|
947
|
+
| 2013-10-28 15:00:46.0 | https://demoapphq.iab.app42paas.com | demo | Amazon (Oregon) | CLOUDAPI | Shared | light | RUNNING |
|
948
|
+
+-----------------------+-------------------------------------+------------+-----------------+------------+---------+---------------+--------------+
|
937
949
|
DESC
|
938
950
|
end
|
939
951
|
|
data/lib/app42/base/shell.rb
CHANGED
data/lib/app42/command/base.rb
CHANGED
@@ -320,7 +320,7 @@ module App42
|
|
320
320
|
end
|
321
321
|
|
322
322
|
if host_response['success']
|
323
|
-
puts Paint["Your setup has been completed successfully, For details, Login
|
323
|
+
puts Paint["Your setup has been completed successfully, For details, Login to AppHQ console.", :green]
|
324
324
|
return true
|
325
325
|
else
|
326
326
|
puts Paint["#{response['description']}", :red]
|
@@ -617,7 +617,7 @@ module App42
|
|
617
617
|
# ERROR message in case failed
|
618
618
|
def delete_clouldapi setup_name
|
619
619
|
begin
|
620
|
-
response = with_progress(Paint["Deleting
|
620
|
+
response = with_progress(Paint["Deleting Setup", :yellow]) do |s|
|
621
621
|
query_params = params
|
622
622
|
query_params.store('setupName', setup_name)
|
623
623
|
build_delete_request query_params, "setup", "#{setup_name}"
|
data/lib/app42/command/client.rb
CHANGED
@@ -222,10 +222,10 @@ module App42
|
|
222
222
|
when 'bindinfo'
|
223
223
|
set_cmd(:service, :service_bindInfo)
|
224
224
|
|
225
|
-
when '
|
225
|
+
when 'setupbpaas'
|
226
226
|
set_cmd(:setup, :setup_cloud_api)
|
227
227
|
|
228
|
-
when '
|
228
|
+
when 'deletesetup'
|
229
229
|
set_cmd(:setup, :delete_cloud_api)
|
230
230
|
|
231
231
|
when 'setupinfo'
|
data/lib/app42/command/setup.rb
CHANGED
@@ -14,7 +14,7 @@ module App42
|
|
14
14
|
setup_type = get_setup_type
|
15
15
|
flavour = get_flavour
|
16
16
|
setup_cloud_api_res = App42::Command::Base.new.create_cloud_setup setup_name, iaas, vm_type, setup_type, flavour
|
17
|
-
exit! if
|
17
|
+
exit! if setup_cloud_api_res
|
18
18
|
end
|
19
19
|
|
20
20
|
# Delete App42 cloud API setup, return true or error code/message
|
@@ -30,11 +30,7 @@ module App42
|
|
30
30
|
setup_type = App42::Command::Config.new.get_setup_type_fm_server
|
31
31
|
|
32
32
|
setup_type['setupTypes'].select {|each_setup_type| setup_type_hash["#{each_setup_type['id']}"] = each_setup_type['name']}
|
33
|
-
|
34
|
-
|
35
|
-
setup_type_id = nil
|
36
|
-
setup_type_hash.each_pair{|type| setup_type_id = type[0] if type[1] == setup}
|
37
|
-
return setup_type_id
|
33
|
+
return setup_type_hash.keys.first
|
38
34
|
end
|
39
35
|
|
40
36
|
# return flavour
|
data/lib/app42/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: app42
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ShepHertz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|