app42 0.5.5 → 0.5.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +90 -58
- data/lib/app42/base/constants.rb +0 -1
- data/lib/app42/base/help.rb +271 -54
- data/lib/app42/base/message.rb +2 -0
- data/lib/app42/base/shell.rb +9 -1
- data/lib/app42/base/util.rb +97 -6
- data/lib/app42/client/app42_rest_client.rb +0 -8
- data/lib/app42/command/app.rb +47 -34
- data/lib/app42/command/authorize.rb +1 -1
- data/lib/app42/command/base.rb +208 -30
- data/lib/app42/command/client.rb +23 -2
- data/lib/app42/command/config.rb +14 -0
- data/lib/app42/command/info.rb +1 -1
- data/lib/app42/command/service.rb +23 -2
- data/lib/app42/command/setup.rb +89 -0
- data/lib/app42/version.rb +1 -1
- data/spec/app42/base/constants_spec.rb +1 -1
- data/spec/app42/command/app_spec.rb +4 -4
- data/spec/app42/command/info_spec.rb +5 -5
- data/spec/app42/command/service_spec.rb +4 -4
- metadata +2 -2
- data/TODO.txt +0 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90dc46498e65f25a67ad9bb2d9a1c2f07b784585
|
4
|
+
data.tar.gz: 0ab4c19a91dbe49a8998cd97081f1b3fd4532c45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dfb5b2141d2c629fbcba1d03f6546bcec0a485c7936619ee73cece147d7b70f882838036d5d3091e3bedf47b37969aa4377b0948e630223d382bff941e2fc633
|
7
|
+
data.tar.gz: 56f5ddbdf0f7cd17c4407a2d1dedd0c9dcd172db0ec72a03f23a0b129d0aaee1cf6c085e2dc58c7598b2f7fd4e905c896ed424e08b278568b7aa473c1bb4b6c2
|
data/README.md
CHANGED
@@ -4,25 +4,39 @@ Client library and command-line tool to deploy and manage apps on App42PaaS.
|
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
|
7
|
+
You need to install and run the app42 client gem in your local environment on your development machine. Even if you already have the app42 client gem installed, it is good practice to run “gem install app42″ to make sure that you have the latest version of the gem.
|
8
|
+
|
9
|
+
#### To install the client gem, you must have ruby installed on your system.
|
8
10
|
|
9
11
|
### Linux
|
10
|
-
|
12
|
+
|
13
|
+
Before you do anything else, You should install the below libraries to make sure that your system is ready to install ruby.
|
11
14
|
|
12
15
|
INSTALL THE NEEDED LIBRARIES
|
13
16
|
|
14
17
|
$ sudo apt-get install zlib1g zlib1g-dev build-essential openssl libssl-dev libmysqlclient18 libmysqlclient-dev libyaml-dev
|
15
18
|
|
16
|
-
|
19
|
+
##### Install Ruby on Linux using apt-get tool
|
20
|
+
|
21
|
+
Download and install ruby 1.9.3 (you may install latest ruby too)
|
17
22
|
|
18
23
|
$ sudo apt-get update
|
19
24
|
$ sudo apt-get install ruby1.9.3
|
20
25
|
|
21
|
-
|
26
|
+
##### Install Ruby on Linux from source code.
|
22
27
|
|
23
|
-
|
28
|
+
Download ruby source code from Ruby Site
|
29
|
+
|
30
|
+
$ apt-get -y update
|
31
|
+
$ apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
|
32
|
+
$ cd /tmp
|
33
|
+
$ wget http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.gz
|
34
|
+
$ tar -xvzf ruby-2.0.0-p0.tar.gz
|
35
|
+
$ cd ruby-2.0.0-p0/
|
36
|
+
$ ./configure --prefix=/usr/local
|
37
|
+
$ make
|
38
|
+
$ make install
|
24
39
|
|
25
|
-
Note: app42 require Ruby 1.9.2 or newer.
|
26
40
|
|
27
41
|
### Mac OS X
|
28
42
|
|
@@ -36,79 +50,97 @@ From a terminal window, install Ruby
|
|
36
50
|
$ sudo port select --set ruby ruby19
|
37
51
|
$ alias ruby='/opt/local/bin/ruby1.9'
|
38
52
|
|
39
|
-
INSTALL APP42 CLIENT
|
40
|
-
|
41
|
-
$gem install app42-0.5.0.gem
|
42
|
-
|
43
|
-
Note: app42 require Ruby 1.9.2 or newer.
|
44
|
-
|
45
53
|
### Windows
|
46
54
|
|
47
55
|
To install the client gem, you must have ruby installed on your system.
|
48
56
|
|
49
57
|
Download and install Ruby Installer(http://rubyinstaller.org/) for Windows and set ruby to your path to access App42 from command prompt.
|
50
58
|
|
51
|
-
|
59
|
+
### Install App42 Client Gem
|
52
60
|
|
53
|
-
|
61
|
+
You can install app42 client like any other ruby gem.
|
54
62
|
|
55
|
-
Note: app42 require Ruby 1.9.2 or newer.
|
63
|
+
#### Note: app42 require Ruby 1.9.2 or newer.
|
64
|
+
|
65
|
+
$ gem install app42
|
56
66
|
|
57
67
|
## Commands
|
58
68
|
|
59
|
-
Usage: app42 COMMAND [command-specific-options]
|
60
|
-
|
61
|
-
App42 primary commands:
|
62
|
-
|
63
|
-
keys # List keys of the current user
|
64
|
-
keys:add # Configure API and secret keys on local system
|
65
|
-
setup-infra # Create infrastructure
|
66
|
-
deploy # Deploy application
|
67
|
-
update # Update existing application
|
68
|
-
scale # Scale application by number of instance
|
69
|
-
descale # Descale application by number of instance
|
70
|
-
service-create # Create a new service
|
71
|
-
service-delete # Delete a provisioned service
|
72
|
-
|
73
|
-
App42 additional commands:
|
69
|
+
Usage: app42 COMMAND [command-specific-options]
|
74
70
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
71
|
+
Key
|
72
|
+
keys # List API key and Secret key
|
73
|
+
addKeys # Add API key and Secret key
|
74
|
+
clearKeys # Clear API key and Secret key
|
75
|
+
|
76
|
+
Applications
|
77
|
+
setupInfra # Setup your deployment and runtime environment i.e. Instance(Memory, CPU) and Technology Stack
|
78
|
+
deploy # Deploy the application over your runtime environment
|
79
|
+
update # Update the application over your runtime environment
|
80
|
+
scale # Scale application by number of instance(s)
|
81
|
+
descale # Descale application by number of instance(s)
|
82
|
+
start # Start the application
|
83
|
+
stop # Stop the application
|
84
|
+
restart # Restart the application
|
85
|
+
deleteInfra # Delete the Infrastructure environment
|
86
|
+
apps # List all the deployed applications with their meta details
|
87
|
+
appInfo # Show meta information of the application
|
88
|
+
appState # Show current state of the application
|
89
|
+
logs # Returns the log file URL(s) for the application
|
90
|
+
|
91
|
+
Services
|
92
|
+
createService # Creates a new service e.g. MySQL, MongoDB, CouchDB, PostgreSQL etc.
|
93
|
+
deleteService # Delete provisioned service
|
94
|
+
startService # Start the service
|
95
|
+
restartService # Restart the service
|
96
|
+
stopService # Stop the service
|
97
|
+
services # List all the provisioned services with their meta details
|
98
|
+
serviceInfo # Show meta information of the provisioned service
|
99
|
+
resetServicePassword # Reset password of provisioned service
|
100
|
+
bindIP # Bind IP to provisioned service
|
101
|
+
unbindIP # Unbind IP from provisioned service
|
102
|
+
bindInfo # Show IP bind information related to provisioned service
|
103
|
+
|
104
|
+
Misc
|
105
|
+
supportedServices # List supported services by App42
|
106
|
+
iaasProviders # List supported IaaS providers by App42
|
107
|
+
runtimes # List supported runtimes by App42
|
108
|
+
activities # List all activities with their status
|
109
|
+
|
110
|
+
|
111
|
+
Setup
|
112
|
+
setupCloudAPI # Setup App42 cloud API by choosing required configuration
|
113
|
+
deleteCloudAPI # Delete App42 cloud API setup
|
114
|
+
setupInfo # Show setup information
|
115
|
+
setups # List all the setups
|
116
|
+
|
117
|
+
Help
|
118
|
+
version # Show Ruby client gem version
|
119
|
+
help # List available commands and their description
|
120
|
+
COMMAND --help # Display detailed help of a specific command
|
121
|
+
|
91
122
|
|
92
123
|
## Usage
|
93
124
|
|
94
125
|
### $ app42 keys
|
126
|
+
|
127
|
+
=== API/Secret Key ===
|
95
128
|
|
96
|
-
|
97
|
-
|
98
|
-
API Key = df1dcdb0-958c-0130-9368-3c970e529c4b
|
129
|
+
API Key = df1dcdb0-958c-0130-9368-3c970e529c4b
|
99
130
|
|
100
|
-
|
131
|
+
Secret Key = be9faaf56ff75bacae2ac9712b02c8feb8ffc6bb3381b60e1e9efccccd81086d
|
101
132
|
|
102
133
|
### $ app42 apps
|
103
134
|
|
104
|
-
|
105
|
-
|
|
106
|
-
|
107
|
-
| App
|
108
|
-
|
109
|
-
| demo.aws.app42paas.com
|
110
|
-
| demo1.aws.app42paas.com
|
111
|
-
|
135
|
+
+------------------------+------------+------------------+------+------------+----------------+--------+
|
136
|
+
| === My Apps === |
|
137
|
+
+------------------------+------------+------------------+------+------------+----------------+--------+
|
138
|
+
| App Url | App Status | Iaas Provider | Name | Runtime | Instance Count | Memory |
|
139
|
+
+------------------------+------------+------------------+------+------------+----------------+--------+
|
140
|
+
| demo.aws.app42paas.com | RUNNING | Amazon us-west-2 | demo | Ruby 2.0.0 | 1 | 256 MB |
|
141
|
+
| demo1.aws.app42paas.com| STOPPED | Amazon us-west-2 | demo1| Ruby 2.0.0 | 2 | 520 MB |
|
142
|
+
+------------------------+------------+------------------+------+------------+----------------+--------+
|
143
|
+
|
112
144
|
|
113
145
|
## Contributing
|
114
146
|
|
data/lib/app42/base/constants.rb
CHANGED
@@ -33,5 +33,4 @@ module App42
|
|
33
33
|
# regex for IP Address
|
34
34
|
IP_REGEX = /^([0]?\d\d?|1[0-1,3-9]\d|12[0-6,8-9]|2[0-4]d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\.((?!0)|(?!1)|010|(01[0-9]{1,1}&0[1-9]{1,2})|0[0-9]{1,1}[1-9]{1,1}|[2-9]{0,2}|1[0-9]{1,2}|2[0-4]\d|25[0-4])$/
|
35
35
|
|
36
|
-
|
37
36
|
end
|
data/lib/app42/base/help.rb
CHANGED
@@ -6,16 +6,12 @@ module App42
|
|
6
6
|
module Base
|
7
7
|
class Help
|
8
8
|
|
9
|
-
#
|
10
|
-
# details how to use app42 commands
|
11
|
-
#
|
9
|
+
# details, how to use app42 commands
|
12
10
|
def self.how_to
|
13
11
|
Paint["Usage: app42 COMMAND [command-specific-options]", :blue]
|
14
12
|
end
|
15
13
|
|
16
|
-
#
|
17
14
|
# list available commands or display help for a specific command
|
18
|
-
#
|
19
15
|
def self.commands
|
20
16
|
|
21
17
|
print <<-USAGE
|
@@ -30,6 +26,7 @@ module App42
|
|
30
26
|
Applications
|
31
27
|
setupInfra # Setup your deployment and runtime environment i.e. Instance(Memory, CPU) and Technology Stack
|
32
28
|
deploy # Deploy the application over your runtime environment
|
29
|
+
update # Update the application over your runtime environment
|
33
30
|
scale # Scale application by number of instance(s)
|
34
31
|
descale # Descale application by number of instance(s)
|
35
32
|
start # Start the application
|
@@ -44,6 +41,9 @@ module App42
|
|
44
41
|
Services
|
45
42
|
createService # Creates a new service e.g. MySQL, MongoDB, CouchDB, PostgreSQL etc.
|
46
43
|
deleteService # Delete provisioned service
|
44
|
+
startService # Start the service
|
45
|
+
restartService # Restart the service
|
46
|
+
stopService # Stop the service
|
47
47
|
services # List all the provisioned services with their meta details
|
48
48
|
serviceInfo # Show meta information of the provisioned service
|
49
49
|
resetServicePassword # Reset password of provisioned service
|
@@ -57,6 +57,12 @@ module App42
|
|
57
57
|
runtimes # List supported runtimes by App42
|
58
58
|
activities # List all activities with their status
|
59
59
|
|
60
|
+
Setup
|
61
|
+
setupCloudAPI # Setup App42 cloud API by choosing required configuration
|
62
|
+
deleteCloudAPI # Delete App42 cloud API setup
|
63
|
+
setupInfo # Show setup information
|
64
|
+
setups # List all the setups
|
65
|
+
|
60
66
|
Help
|
61
67
|
version # Show Ruby client gem version
|
62
68
|
help # List available commands and their description
|
@@ -156,27 +162,26 @@ Example:
|
|
156
162
|
1: Shared
|
157
163
|
Select Instance Type [Shared]:
|
158
164
|
|
159
|
-
1: Amazon
|
160
|
-
Select IaaS Provider [Amazon
|
161
|
-
|
162
|
-
1: Ruby 2.0
|
163
|
-
2: Java 6.0
|
164
|
-
3: Java 7.0
|
165
|
-
4: Php 5.3
|
166
|
-
5: Php 5.5
|
167
|
-
Select Runtime [Ruby 2.0]: 1
|
165
|
+
1: Amazon us-west-2
|
166
|
+
Select IaaS Provider [Amazon us-west-2]:
|
168
167
|
|
169
|
-
1:
|
170
|
-
|
168
|
+
1: Ruby 2.0.0
|
169
|
+
2: Java 6
|
170
|
+
3: Java 7
|
171
|
+
4: PHP 5.3
|
172
|
+
5: PHP 5.5
|
173
|
+
Select Runtime [Ruby 2.0.0]:
|
171
174
|
|
172
|
-
1:
|
173
|
-
|
175
|
+
1: Ruby on Rack
|
176
|
+
2: Rails 4.0
|
177
|
+
3: Sinatra 1.4
|
178
|
+
Select Framework [Ruby on Rack ]:
|
174
179
|
|
175
|
-
1:
|
176
|
-
|
177
|
-
3: 2048 MB
|
178
|
-
Memory Limit [512 MB]:
|
180
|
+
1: Nginx 1.4.1
|
181
|
+
Select Web Server [Nginx 1.4.1]:
|
179
182
|
|
183
|
+
Specify Kontena Power: 5
|
184
|
+
|
180
185
|
Setting up the infrastructure... OK
|
181
186
|
|
182
187
|
Operation is in progress, Please wait.../
|
@@ -222,12 +227,40 @@ Options:
|
|
222
227
|
Example:
|
223
228
|
$app42 deploy
|
224
229
|
Enter App Name: demo
|
225
|
-
|
226
|
-
|
230
|
+
1: Binary
|
231
|
+
2: Source
|
232
|
+
Choose Upload Type [Binary]: 2
|
233
|
+
|
234
|
+
Enter Git URL?: https://github.com/shepHertz/demo.git
|
227
235
|
Deploying Application... OK
|
228
|
-
|
229
|
-
|
230
|
-
|
236
|
+
|
237
|
+
Operation is in progress, Please wait...|
|
238
|
+
App deployed successfully.
|
239
|
+
DESC
|
240
|
+
|
241
|
+
end
|
242
|
+
|
243
|
+
def update
|
244
|
+
print <<-DESC
|
245
|
+
Usage:
|
246
|
+
app42 update
|
247
|
+
|
248
|
+
Update the application over your runtime environment
|
249
|
+
|
250
|
+
Options:
|
251
|
+
[--app APP] # Name of app, you want to update
|
252
|
+
|
253
|
+
Example:
|
254
|
+
$app42 update
|
255
|
+
Enter App Name: demo
|
256
|
+
1: Binary
|
257
|
+
2: Source
|
258
|
+
Choose Upload Type [Binary]: 2
|
259
|
+
|
260
|
+
Updating Application... OK
|
261
|
+
|
262
|
+
Operation is in progress, Please wait...-
|
263
|
+
App deployed successfully.
|
231
264
|
DESC
|
232
265
|
|
233
266
|
end
|
@@ -244,7 +277,14 @@ Options:
|
|
244
277
|
|
245
278
|
Example:
|
246
279
|
$app42 start --app demo
|
247
|
-
Starting
|
280
|
+
Starting Application demo... OK
|
281
|
+
|
282
|
+
Operation is in progress, Please wait...
|
283
|
+
1 out of 3 started
|
284
|
+
-
|
285
|
+
2 out of 3 started
|
286
|
+
|
|
287
|
+
App started successfully.
|
248
288
|
DESC
|
249
289
|
|
250
290
|
end
|
@@ -261,7 +301,14 @@ Options:
|
|
261
301
|
|
262
302
|
Example:
|
263
303
|
$app42 stop --app demo
|
264
|
-
Stopping
|
304
|
+
Stopping Application demo... OK
|
305
|
+
|
306
|
+
Operation is in progress, Please wait...-
|
307
|
+
1 out of 3 stopped
|
308
|
+
-
|
309
|
+
2 out of 3 stopped
|
310
|
+
-
|
311
|
+
App stopped successfully.
|
265
312
|
DESC
|
266
313
|
end
|
267
314
|
|
@@ -277,7 +324,14 @@ Options:
|
|
277
324
|
|
278
325
|
Example:
|
279
326
|
$app42 start --app demo
|
280
|
-
Restarting
|
327
|
+
Restarting Application demo... OK
|
328
|
+
|
329
|
+
Operation is in progress, Please wait...
|
330
|
+
1 out of 3 restarted
|
331
|
+
-
|
332
|
+
2 out of 3 restarted
|
333
|
+
|
|
334
|
+
App restarted successfully.
|
281
335
|
DESC
|
282
336
|
end
|
283
337
|
|
@@ -293,7 +347,14 @@ Options:
|
|
293
347
|
|
294
348
|
Example:
|
295
349
|
$app42 deleteInfra --app demo
|
296
|
-
Deleting
|
350
|
+
Deleting Application demo... OK
|
351
|
+
|
352
|
+
Operation is in progress, Please wait...
|
353
|
+
1 out of 3 deleted
|
354
|
+
-
|
355
|
+
2 out of 3 deleted
|
356
|
+
|
|
357
|
+
App deleted successfully.
|
297
358
|
DESC
|
298
359
|
end
|
299
360
|
|
@@ -308,11 +369,14 @@ Options:
|
|
308
369
|
[--app APP] # Name of app, you want to descale
|
309
370
|
|
310
371
|
Example:
|
311
|
-
$app42 descale
|
312
|
-
|
313
|
-
|
314
|
-
|
372
|
+
$app42 descale
|
373
|
+
Enter App Name: demo
|
374
|
+
Descale by instance(s) [1]: 2
|
375
|
+
Descaling Application demo by instance 2... OK
|
376
|
+
|
315
377
|
Operation is in progress, Please wait...|
|
378
|
+
1 out of 2 descaled
|
379
|
+
-
|
316
380
|
Descale completed successfully.
|
317
381
|
DESC
|
318
382
|
end
|
@@ -328,11 +392,14 @@ Options:
|
|
328
392
|
[--app APP] # Name of app, you want to scale
|
329
393
|
|
330
394
|
Example:
|
331
|
-
$app42 scale
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
395
|
+
$app42 scale
|
396
|
+
Enter App Name: demo
|
397
|
+
Scale by instance(s) [1]: 2
|
398
|
+
Scaling Application demo by instance 2... OK
|
399
|
+
|
400
|
+
Operation is in progress, Please wait...-
|
401
|
+
1 out of 2 scaled
|
402
|
+
|
|
336
403
|
Scale completed successfully.
|
337
404
|
DESC
|
338
405
|
end
|
@@ -412,27 +479,23 @@ Usage:
|
|
412
479
|
Example:
|
413
480
|
$app42 createService
|
414
481
|
Enter Service Name: mysqldemo
|
415
|
-
|
416
482
|
Checking Service Name Availability... OK
|
417
483
|
|
418
|
-
1: MySQL 5.5.
|
419
|
-
2: Mongodb 2.4
|
420
|
-
3: Couchdb
|
421
|
-
4: PostgreSQL 9.1
|
422
|
-
Select Service [MySQL 5.5.
|
484
|
+
1: MySQL 5.5.31
|
485
|
+
2: Mongodb 2.4.4
|
486
|
+
3: Couchdb 1.0.1
|
487
|
+
4: PostgreSQL 9.1.9
|
488
|
+
Select Service [MySQL 5.5.31]:
|
423
489
|
|
424
|
-
Enter Database Name:
|
490
|
+
Enter Database Name: demo_db
|
425
491
|
|
426
492
|
1: Shared
|
427
|
-
Select
|
493
|
+
Select Instance Type [Shared]:
|
428
494
|
|
429
|
-
1: Amazon
|
430
|
-
Select IaaS Provider [Amazon
|
495
|
+
1: Amazon us-west-2
|
496
|
+
Select IaaS Provider [Amazon us-west-2]:
|
431
497
|
|
432
|
-
|
433
|
-
2: 1024 MB
|
434
|
-
3: 2048 MB
|
435
|
-
Memory Limit [512 MB]: 1
|
498
|
+
Specify Kontena Power: 5
|
436
499
|
|
437
500
|
Creating Service... OK
|
438
501
|
|
@@ -470,6 +533,69 @@ Example:
|
|
470
533
|
DESC
|
471
534
|
end
|
472
535
|
|
536
|
+
def startservice
|
537
|
+
print <<-DESC
|
538
|
+
Usage:
|
539
|
+
app42 startService
|
540
|
+
|
541
|
+
Start the service
|
542
|
+
|
543
|
+
Options:
|
544
|
+
[--app Service] # Name of service, you want to start
|
545
|
+
|
546
|
+
Example:
|
547
|
+
$app42 startService
|
548
|
+
Enter Service Name: mysql
|
549
|
+
Starting Service mysql... OK
|
550
|
+
|
551
|
+
Operation is in progress, Please wait...|
|
552
|
+
Service started successfully.
|
553
|
+
DESC
|
554
|
+
|
555
|
+
end
|
556
|
+
|
557
|
+
def stopservice
|
558
|
+
print <<-DESC
|
559
|
+
Usage:
|
560
|
+
app42 stopService
|
561
|
+
|
562
|
+
Stop the service
|
563
|
+
|
564
|
+
Options:
|
565
|
+
[--app Service] # Name of service, you want to start
|
566
|
+
|
567
|
+
Example:
|
568
|
+
$app42 stopService
|
569
|
+
Enter Service Name: mysql
|
570
|
+
Stopping Service mysql... OK
|
571
|
+
|
572
|
+
Operation is in progress, Please wait...|
|
573
|
+
Service stopped successfully.
|
574
|
+
DESC
|
575
|
+
|
576
|
+
end
|
577
|
+
|
578
|
+
def restartservice
|
579
|
+
print <<-DESC
|
580
|
+
Usage:
|
581
|
+
app42 restartService
|
582
|
+
|
583
|
+
Restart the service
|
584
|
+
|
585
|
+
Options:
|
586
|
+
[--app Service] # Name of service, you want to start
|
587
|
+
|
588
|
+
Example:
|
589
|
+
$app42 restartService
|
590
|
+
Enter Service Name: mysql
|
591
|
+
Restarting Service mysql... OK
|
592
|
+
|
593
|
+
Operation is in progress, Please wait...|
|
594
|
+
Service restarted successfully.
|
595
|
+
DESC
|
596
|
+
|
597
|
+
end
|
598
|
+
|
473
599
|
def services
|
474
600
|
print <<-DESC
|
475
601
|
Usage:
|
@@ -720,6 +846,97 @@ Example:
|
|
720
846
|
DESC
|
721
847
|
end
|
722
848
|
|
849
|
+
def setupcloudapi
|
850
|
+
print <<-DESC
|
851
|
+
Usage:
|
852
|
+
app42 setupCloudAPI
|
853
|
+
|
854
|
+
Setup App42 cloud API by choosing required configuration
|
855
|
+
|
856
|
+
Example:
|
857
|
+
$app42 setupCloudAPI
|
858
|
+
Enter Setup Name: railsdemo
|
859
|
+
Checking Setup Name Availability... OK
|
860
|
+
|
861
|
+
1: Shared
|
862
|
+
Select Instance Type [Shared]:
|
863
|
+
|
864
|
+
1: Amazon us-west-2
|
865
|
+
Select IaaS Provider [Amazon us-west-2]:
|
866
|
+
|
867
|
+
1: App42CloudAPI
|
868
|
+
Select Setup Type [App42CloudAPI]:
|
869
|
+
|
870
|
+
1: Light
|
871
|
+
2: Medium
|
872
|
+
3: Heavy
|
873
|
+
Select Flavour [Light]: 1
|
874
|
+
|
875
|
+
Setting up the infrastructure... OK
|
876
|
+
|
877
|
+
Operation is in progress, Please wait...|
|
878
|
+
|
879
|
+
Your setup has been completed successfully, For details, Login to your AppHQ console.
|
880
|
+
|
881
|
+
DESC
|
882
|
+
end
|
883
|
+
|
884
|
+
def deletecloudapi
|
885
|
+
print <<-DESC
|
886
|
+
Usage:
|
887
|
+
app42 deleteCloudAPI
|
888
|
+
|
889
|
+
Delete App42 cloud API setup
|
890
|
+
|
891
|
+
Example:
|
892
|
+
$app42 deleteCloudAPI
|
893
|
+
Enter Setup Name: demo
|
894
|
+
Deleting Cloud API... OK
|
895
|
+
|
896
|
+
Operation is in progress, Please wait...-
|
897
|
+
Setup deleted successfully.
|
898
|
+
DESC
|
899
|
+
end
|
900
|
+
|
901
|
+
def setupinfo
|
902
|
+
print <<-DESC
|
903
|
+
Usage:
|
904
|
+
app42 setupInfo
|
905
|
+
|
906
|
+
Show setup information
|
907
|
+
|
908
|
+
Example:
|
909
|
+
$app42 setupInfo
|
910
|
+
Enter Setup Name: demo
|
911
|
+
+-----------------------+--------------------------------+------------+------------------+------------+---------+---------------+--------------+-----------------------------+
|
912
|
+
| === demo Details === |
|
913
|
+
+-----------------------+--------------------------------+------------+------------------+------------+---------+---------------+--------------+-----------------------------+
|
914
|
+
| Created On | Api Server Url | Setup Name | Iaas Provider | Setup Type | Vm Type | Setup Flavour | Setup Status | App Hq Url |
|
915
|
+
+-----------------------+--------------------------------+------------+------------------+------------+---------+---------------+--------------+-----------------------------+
|
916
|
+
| 2013-10-16 13:05:12.0 | democloudapi.aws.app42paas.com | demo | Amazon us-west-2 | CLOUDAPI | Shared | light | RUNNING | demoapphq.aws.app42paas.com |
|
917
|
+
+-----------------------+--------------------------------+------------+------------------+------------+---------+---------------+--------------+-----------------------------+
|
918
|
+
DESC
|
919
|
+
end
|
920
|
+
|
921
|
+
def setups
|
922
|
+
print <<-DESC
|
923
|
+
Usage:
|
924
|
+
app42 setups
|
925
|
+
|
926
|
+
List all the setups
|
927
|
+
|
928
|
+
Example:
|
929
|
+
$app42 setups
|
930
|
+
+-----------------------+--------------------------------+------------+------------------+------------+---------+---------------+--------------+-----------------------------+
|
931
|
+
| === Setups List === |
|
932
|
+
+-----------------------+--------------------------------+------------+------------------+------------+---------+---------------+--------------+-----------------------------+
|
933
|
+
| Created On | Api Server Url | Setup Name | Iaas Provider | Setup Type | Vm Type | Setup Flavour | Setup Status | App Hq Url |
|
934
|
+
+-----------------------+--------------------------------+------------+------------------+------------+---------+---------------+--------------+-----------------------------+
|
935
|
+
| 2013-10-16 13:05:12.0 | democloudapi.aws.app42paas.com | demo | Amazon us-west-2 | CLOUDAPI | Shared | light | RUNNING | demoapphq.aws.app42paas.com |
|
936
|
+
+-----------------------+--------------------------------+------------+------------------+------------+---------+---------------+--------------+-----------------------------+
|
937
|
+
DESC
|
938
|
+
end
|
939
|
+
|
723
940
|
def version
|
724
941
|
print <<-DESC
|
725
942
|
Usage:
|