pi 0.1.23 → 0.1.24
Sign up to get free protection for your applications and to get access to all the features.
- data/README +367 -404
- data/lib/cli.rb +1 -0
- data/lib/cli/choose_helper.rb +123 -25
- data/lib/cli/commands/apps.rb +241 -303
- data/lib/cli/commands/dns.rb +38 -73
- data/lib/cli/commands/projects.rb +179 -160
- data/lib/cli/commands/services.rb +55 -80
- data/lib/cli/commands/user.rb +26 -10
- data/lib/cli/interact_helper.rb +538 -0
- data/lib/cli/runner.rb +77 -53
- data/lib/cli/usage.rb +55 -39
- data/lib/cli/version.rb +1 -1
- data/lib/pi/client.rb +92 -77
- data/lib/pi/const.rb +2 -0
- metadata +5 -5
- data/lib/cli/commands/admin.rb +0 -19
data/README
CHANGED
@@ -59,52 +59,68 @@ _Copyright 2010-2012, Samsung.
|
|
59
59
|
Currently available pi commands are:
|
60
60
|
|
61
61
|
User
|
62
|
-
login [url]
|
63
|
-
logout
|
64
|
-
info
|
65
|
-
user
|
66
|
-
targets
|
67
|
-
github [name]
|
68
|
-
runtimes
|
69
|
-
frameworks
|
70
|
-
version
|
71
|
-
help [command]
|
72
|
-
help options
|
73
|
-
|
62
|
+
login [url] [--user,--password] Login
|
63
|
+
logout Logs current user out of the system
|
64
|
+
info List system information
|
65
|
+
user Display user information
|
66
|
+
targets List available targets infomation
|
67
|
+
github [name] [--email,--password] Bind to the github account
|
68
|
+
runtimes Display the supported runtimes of the system
|
69
|
+
frameworks Display the supported frameworks of the system
|
70
|
+
version Display version information
|
71
|
+
help [command] Get general help or help on a specific command
|
72
|
+
help options Get help on available options
|
73
|
+
|
74
74
|
Project
|
75
|
-
projects
|
76
|
-
create-project [
|
77
|
-
delete-project [
|
78
|
-
project-events [
|
79
|
-
project-tags [
|
80
|
-
project-commits [
|
81
|
-
|
82
|
-
upload [projectname] Upload the war package for java project
|
75
|
+
projects List created projects
|
76
|
+
create-project [project] Create a new project
|
77
|
+
delete-project [project] Delete the project
|
78
|
+
project-events [project] List the event info for the project
|
79
|
+
project-tags [project] List the tags for the project
|
80
|
+
project-commits [project] List the commit log for the project
|
81
|
+
upload [project][--path,--ver,--desc] Upload the war package for java project
|
83
82
|
|
84
|
-
Application
|
85
|
-
apps
|
86
|
-
create-app [appname]
|
87
|
-
delete-app [appid]
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
app
|
95
|
-
|
96
|
-
|
97
|
-
app
|
83
|
+
Application
|
84
|
+
apps [--project,--target] List deployed applications for the project
|
85
|
+
create-app [appname] Create a new application
|
86
|
+
delete-app [appid] Delete the application
|
87
|
+
delete-app <appname> <--target TARGET> Delete the application
|
88
|
+
start-app [appid] Start the application
|
89
|
+
start-app <appname> <--target TARGET> Start the application
|
90
|
+
stop-app [appid] Stop the application
|
91
|
+
stop-app <appname> <--target TARGET> Stop the application
|
92
|
+
restart-app [appid] Restart the application
|
93
|
+
restart-app <appname> <--target TARGET> Restart the application
|
94
|
+
scale-app [appid] Scale the application instances up or down
|
95
|
+
scale-app <appname> <--target TARGET> Scale the application instances up or down
|
96
|
+
update-app [appid] Update the application
|
97
|
+
update-app <appname> <--target TARGET> Update the application
|
98
|
+
status [appid] Display resource usage for the application
|
99
|
+
status <appname> <--target TARGET> Display resource usage for the application
|
100
|
+
app-env [appid] Display the environments for the application
|
101
|
+
app-env <appname> <--target TARGET> Display the environments for the application
|
102
|
+
create-env [appid] Create the environment for the application
|
103
|
+
create-env <appname> <--target TARGET> Create the environment for the application
|
104
|
+
delete-env [appid] Delete the environment for the application
|
105
|
+
delete-env <appname> <--target TARGET> Delete the environment for the application
|
106
|
+
app-log [appid] List the logs for the application
|
107
|
+
app-log <appname> <--target TARGET> List the logs for the application
|
98
108
|
|
99
109
|
Service
|
100
|
-
app-service [
|
101
|
-
|
102
|
-
|
103
|
-
|
110
|
+
app-service [appid] Display the binded services for the application
|
111
|
+
app-service <appname> <--target TARGET> Display the binded services for the application
|
112
|
+
bind-service [appid] Bind the services for the application
|
113
|
+
bind-service <appname> <--target TARGET> Bind the services for the application
|
114
|
+
unbind-service [appid] Unbind the service for the application
|
115
|
+
unbind-service <appname> <--target TARGET> Unbind the service for the application
|
116
|
+
|
104
117
|
DNS
|
105
|
-
app-dns [
|
106
|
-
|
107
|
-
|
118
|
+
app-dns [appid] Display the mapped urls for the application
|
119
|
+
app-dns <appname> <--target TARGET> Display the mapped urls for the application
|
120
|
+
map-dns [appid] Map the urls for the application
|
121
|
+
map-dns <appname> <--target TARGET> Map the urls for the application
|
122
|
+
unmap-dns [appid] Unmap the url for the application
|
123
|
+
unmap-dns <appname> <--target TARGET> Unmap the url for the application
|
108
124
|
|
109
125
|
4. Example
|
110
126
|
|
@@ -114,8 +130,11 @@ User: wangjing
|
|
114
130
|
Password: *******
|
115
131
|
Successfully logged into [http://api.staging.samsungcloud.org]
|
116
132
|
|
133
|
+
ubuntu@admin:~$ pi login api.staging.samsungcloud.org --user wangjing --password cloudpi
|
134
|
+
Successfully logged into [http://api.staging.samsungcloud.org]
|
135
|
+
|
117
136
|
ubuntu@admin:~$ pi version
|
118
|
-
pi 0.1.
|
137
|
+
pi 0.1.24
|
119
138
|
|
120
139
|
ubuntu@admin:~$ pi user
|
121
140
|
|
@@ -132,6 +151,7 @@ ubuntu@admin:~$ pi targets
|
|
132
151
|
| Name | URL |
|
133
152
|
+------------+------------------------------------+
|
134
153
|
| ap-ne-test | http://ap-ne-test.samsungcloud.org |
|
154
|
+
| target | http://target.samsungcloud.org |
|
135
155
|
+------------+------------------------------------+
|
136
156
|
|
137
157
|
ubuntu@admin:~$ pi runtimes
|
@@ -170,57 +190,83 @@ Try 'pi help [command]' or 'pi help options' for more information.
|
|
170
190
|
Currently available pi commands are:
|
171
191
|
|
172
192
|
User
|
173
|
-
login [url]
|
174
|
-
logout
|
175
|
-
info
|
176
|
-
user
|
177
|
-
targets
|
178
|
-
github [name]
|
179
|
-
runtimes
|
180
|
-
frameworks
|
181
|
-
version
|
182
|
-
help [command]
|
183
|
-
help options
|
193
|
+
login [url] [--user,--password] Login
|
194
|
+
logout Logs current user out of the system
|
195
|
+
info List system information
|
196
|
+
user Display user information
|
197
|
+
targets List available targets infomation
|
198
|
+
github [name] [--email,--password] Bind to the github account
|
199
|
+
runtimes Display the supported runtimes of the system
|
200
|
+
frameworks Display the supported frameworks of the system
|
201
|
+
version Display version information
|
202
|
+
help [command] Get general help or help on a specific command
|
203
|
+
help options Get help on available options
|
184
204
|
|
185
205
|
Project
|
186
|
-
projects
|
187
|
-
create-project [
|
188
|
-
delete-project [
|
189
|
-
project-events [
|
190
|
-
project-tags [
|
191
|
-
project-commits [
|
192
|
-
|
193
|
-
upload [projectname] Upload the war package for java project
|
206
|
+
projects List created projects
|
207
|
+
create-project [project] Create a new project
|
208
|
+
delete-project [project] Delete the project
|
209
|
+
project-events [project] List the event info for the project
|
210
|
+
project-tags [project] List the tags for the project
|
211
|
+
project-commits [project] List the commit log for the project
|
212
|
+
upload [project][--path,--ver,--desc] Upload the war package for java project
|
194
213
|
|
195
|
-
Application
|
196
|
-
apps
|
197
|
-
create-app [appname]
|
198
|
-
delete-app [appid]
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
app
|
206
|
-
|
207
|
-
|
208
|
-
app
|
214
|
+
Application
|
215
|
+
apps [--project,--target] List deployed applications for the project
|
216
|
+
create-app [appname] Create a new application
|
217
|
+
delete-app [appid] Delete the application
|
218
|
+
delete-app <appname> <--target TARGET> Delete the application
|
219
|
+
start-app [appid] Start the application
|
220
|
+
start-app <appname> <--target TARGET> Start the application
|
221
|
+
stop-app [appid] Stop the application
|
222
|
+
stop-app <appname> <--target TARGET> Stop the application
|
223
|
+
restart-app [appid] Restart the application
|
224
|
+
restart-app <appname> <--target TARGET> Restart the application
|
225
|
+
scale-app [appid] Scale the application instances up or down
|
226
|
+
scale-app <appname> <--target TARGET> Scale the application instances up or down
|
227
|
+
update-app [appid] Update the application
|
228
|
+
update-app <appname> <--target TARGET> Update the application
|
229
|
+
status [appid] Display resource usage for the application
|
230
|
+
status <appname> <--target TARGET> Display resource usage for the application
|
231
|
+
app-env [appid] Display the environments for the application
|
232
|
+
app-env <appname> <--target TARGET> Display the environments for the application
|
233
|
+
create-env [appid] Create the environment for the application
|
234
|
+
create-env <appname> <--target TARGET> Create the environment for the application
|
235
|
+
delete-env [appid] Delete the environment for the application
|
236
|
+
delete-env <appname> <--target TARGET> Delete the environment for the application
|
237
|
+
app-log [appid] List the logs for the application
|
238
|
+
app-log <appname> <--target TARGET> List the logs for the application
|
209
239
|
|
210
240
|
Service
|
211
|
-
app-service [
|
212
|
-
|
213
|
-
|
241
|
+
app-service [appid] Display the binded services for the application
|
242
|
+
app-service <appname> <--target TARGET> Display the binded services for the application
|
243
|
+
bind-service [appid] Bind the services for the application
|
244
|
+
bind-service <appname> <--target TARGET> Bind the services for the application
|
245
|
+
unbind-service [appid] Unbind the service for the application
|
246
|
+
unbind-service <appname> <--target TARGET> Unbind the service for the application
|
214
247
|
|
215
248
|
DNS
|
216
|
-
app-dns [
|
217
|
-
|
218
|
-
|
249
|
+
app-dns [appid] Display the mapped urls for the application
|
250
|
+
app-dns <appname> <--target TARGET> Display the mapped urls for the application
|
251
|
+
map-dns [appid] Map the urls for the application
|
252
|
+
map-dns <appname> <--target TARGET> Map the urls for the application
|
253
|
+
unmap-dns [appid] Unmap the url for the application
|
254
|
+
unmap-dns <appname> <--target TARGET> Unmap the url for the application
|
219
255
|
|
220
256
|
ubuntu@admin:~$ pi help options
|
221
257
|
|
222
258
|
Available options:
|
223
259
|
|
260
|
+
--url URL
|
261
|
+
--user USER
|
262
|
+
--password PASS
|
263
|
+
--name NAME
|
264
|
+
--email EMAIL
|
265
|
+
--path PATH
|
266
|
+
--ver VERSION
|
267
|
+
--desc DESC
|
268
|
+
--project PROJ
|
269
|
+
--target TARG
|
224
270
|
-t [TKEY]
|
225
271
|
--trace [TKEY]
|
226
272
|
-q, --quiet
|
@@ -229,179 +275,188 @@ Available options:
|
|
229
275
|
-v, --version
|
230
276
|
-h, --help
|
231
277
|
--options
|
278
|
+
|
279
|
+
ubuntu@admin:~$ pi help start-app
|
280
|
+
Usage: pi start-app [appid] or pi start-app <appname> <--target TARGET>
|
232
281
|
|
233
282
|
ubuntu@admin:~$ pi projects
|
234
283
|
|
235
|
-
|
236
|
-
| Name
|
237
|
-
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
284
|
+
+-------------+---------+-----------+----------+-------------------------------------------------------------------+-------------+
|
285
|
+
| Name | Runtime | Framework | Git Type | GitUrl | Description |
|
286
|
+
+-------------+---------+-----------+----------+-------------------------------------------------------------------+-------------+
|
287
|
+
| javagithub | java | spring | github | https://ruanzhimin@github.com/ruanzhimin/javagithub.git | test |
|
288
|
+
| javawj | java | spring | cloudpi | http://wangjing@git-staging.samsungcloud.org/wangjing/javawj.git | test |
|
289
|
+
| railsgithub | ruby18 | rails3 | github | https://ruanzhimin@github.com/ruanzhimin/railsgithub.git | test |
|
290
|
+
| railswj | ruby18 | rails3 | cloudpi | http://wangjing@git-staging.samsungcloud.org/wangjing/railswj.git | test |
|
291
|
+
| sinatra | ruby18 | sinatra | cloudpi | http://wangjing@git-staging.samsungcloud.org/wangjing/sinatra.git | test |
|
292
|
+
+-------------+---------+-----------+----------+-------------------------------------------------------------------+-------------+
|
242
293
|
|
243
294
|
ubuntu@admin:~$ pi create-project
|
244
|
-
Project Name:
|
245
|
-
|
246
|
-
|
247
|
-
2. ruby18
|
295
|
+
Project Name: javatest
|
296
|
+
1: java
|
297
|
+
2: ruby18
|
248
298
|
Select Runtime: 1
|
249
299
|
Selected Runtime: java
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
4. java_web
|
300
|
+
1: lift
|
301
|
+
2: spring
|
302
|
+
3: grails
|
303
|
+
4: java_web
|
255
304
|
Select Framework: 2
|
256
305
|
Selected Framework: spring
|
257
306
|
Please enter in the description: test
|
258
|
-
|
259
|
-
|
260
|
-
2. github
|
307
|
+
1: cloudpi
|
308
|
+
2: github
|
261
309
|
Select Repository Type: 1
|
262
310
|
Selected Repository Type: cloudpi
|
263
|
-
Creating project "
|
311
|
+
Creating project "javatest": ................OK
|
264
312
|
|
265
313
|
ubuntu@admin:~$ pi upload
|
266
|
-
|
267
|
-
|
268
|
-
|
314
|
+
1: javagithub
|
315
|
+
2: javatest
|
316
|
+
3: javawj
|
269
317
|
Select Project: 2
|
270
|
-
Selected Project:
|
271
|
-
Please enter the version: paashelp
|
272
|
-
Please enter in the description: paashelp
|
318
|
+
Selected Project: javatest
|
273
319
|
Please enter the path of upload war file: /home/wangjing/paashelp.war
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
=============Project Name===========
|
278
|
-
1. javatestgithub
|
279
|
-
2. javawj
|
280
|
-
3. railstestgithub
|
281
|
-
4. railswj
|
282
|
-
Select Project: 4
|
283
|
-
Selected Project: railswj
|
284
|
-
+------------+-----------+-----------------------------------------------+--------+---------+-----------+
|
285
|
-
| Target | AppName | URL | Tag | Status | Instances |
|
286
|
-
+------------+-----------+-----------------------------------------------+--------+---------+-----------+
|
287
|
-
| ap-ne-test | railsdemo | railsdemo.wangjing.ap-ne-test.samsungpaas.com | v0.0.0 | STARTED | 1 |
|
288
|
-
+------------+-----------+-----------------------------------------------+--------+---------+-----------+
|
320
|
+
Please enter the version: test
|
321
|
+
Please enter in the description: test
|
322
|
+
Uploading "paashelp.war": ..OK
|
289
323
|
|
290
324
|
ubuntu@admin:~$ pi create-app
|
291
|
-
|
292
|
-
|
293
|
-
1
|
294
|
-
|
295
|
-
|
296
|
-
|
325
|
+
1: ap-ne-test
|
326
|
+
2: target
|
327
|
+
Select Target: 1
|
328
|
+
Selected Target: ap-ne-test
|
329
|
+
Available memory: 5952 M
|
330
|
+
1: javagithub
|
331
|
+
2: javatest
|
332
|
+
3: javawj
|
333
|
+
4: railsgithub
|
334
|
+
5: railswj
|
335
|
+
6: sinatra
|
297
336
|
Select Project: 2
|
298
|
-
Selected Project:
|
299
|
-
|
300
|
-
1
|
337
|
+
Selected Project: javatest
|
338
|
+
Application Name: java
|
339
|
+
1: test
|
301
340
|
Select Version: 1
|
302
|
-
Selected Version:
|
303
|
-
|
304
|
-
1. ap-ne-test-http://ap-ne-test.samsungcloud.org
|
305
|
-
Select Target: 1
|
306
|
-
Selected Target: ap-ne-test-http://ap-ne-test.samsungcloud.org
|
307
|
-
Available memory: 6080 M
|
308
|
-
URL: javaapp.wangjing.ap-ne-test.samsungpaas.com
|
341
|
+
Selected Version: test
|
342
|
+
URL: java.wangjing.ap-ne-test.samsungpaas.com
|
309
343
|
Memory reservation (64M, 128M, 256M, 512M, 1G, 2G) [64M]:
|
310
344
|
How many instances? [1]:
|
311
345
|
Need debug? [yN]:
|
312
346
|
Need restart? [yN]:
|
313
347
|
Need monitor? [yN]:
|
314
|
-
|
315
|
-
|
348
|
+
1: master
|
349
|
+
Select Branch [master]:
|
350
|
+
Selected Branch: master
|
351
|
+
Creating application "java": .........................OK
|
316
352
|
|
317
353
|
ubuntu@admin:~$ pi apps
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
354
|
+
+------+------------+----------+----------------------------------------------+-------------+----------+---------+-----------+-------------------+
|
355
|
+
| ID | Target | App name | URL | Deploy Type | Version | Status | Instances | Running Instances |
|
356
|
+
+------+------------+----------+----------------------------------------------+-------------+----------+---------+-----------+-------------------+
|
357
|
+
| 1817 | ap-ne-test | java | java.wangjing.ap-ne-test.samsungpaas.com | binary | test | STARTED | 1 | 1 |
|
358
|
+
| 1800 | target | javatest | javatest.wangjing.target.samsungpaas.com | binary | paashelp | ERROR | 1 | 1 |
|
359
|
+
| 1803 | ap-ne-test | javatest | javatest.wangjing.ap-ne-test.samsungpaas.com | binary | paashelp | STARTED | 1 | 1 |
|
360
|
+
| 1793 | ap-ne-test | test | test.wangjing.ap-ne-test.samsungpaas.com | binary | paashelp | ERROR | 1 | 0 |
|
361
|
+
+------+------------+----------+----------------------------------------------+-------------+----------+---------+-----------+-------------------+
|
362
|
+
|
363
|
+
ubuntu@admin:~$ pi apps --target ap-ne-test
|
364
|
+
+------+------------+----------+----------------------------------------------+-------------+----------+---------+-----------+-------------------+
|
365
|
+
| ID | Target | App name | URL | Deploy Type | Version | Status | Instances | Running Instances |
|
366
|
+
+------+------------+----------+----------------------------------------------+-------------+----------+---------+-----------+-------------------+
|
367
|
+
| 1817 | ap-ne-test | java | java.wangjing.ap-ne-test.samsungpaas.com | binary | test | STARTED | 1 | 1 |
|
368
|
+
| 1803 | ap-ne-test | javatest | javatest.wangjing.ap-ne-test.samsungpaas.com | binary | paashelp | STARTED | 1 | 1 |
|
369
|
+
| 1793 | ap-ne-test | test | test.wangjing.ap-ne-test.samsungpaas.com | binary | paashelp | ERROR | 1 | 0 |
|
370
|
+
+------+------------+----------+----------------------------------------------+-------------+----------+---------+-----------+-------------------+
|
330
371
|
|
331
372
|
ubuntu@admin:~$ pi stop-app
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
Select Application:
|
342
|
-
Selected Application:
|
343
|
-
Stoping application: OK
|
344
|
-
|
345
|
-
ubuntu@admin:~$ pi
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
Starting application: ...............................OK
|
358
|
-
|
359
|
-
ubuntu@admin:~$ pi status
|
360
|
-
=============Project Name===========
|
361
|
-
1. javatestgithub
|
362
|
-
2. javawj
|
363
|
-
3. railstestgithub
|
364
|
-
4. railswj
|
373
|
+
1: all
|
374
|
+
2: project
|
375
|
+
3: target
|
376
|
+
Select application by: 1
|
377
|
+
Select application by all
|
378
|
+
1: test
|
379
|
+
2: javatest
|
380
|
+
3: javatest
|
381
|
+
4: java
|
382
|
+
Select Application: 4
|
383
|
+
Selected Application: java
|
384
|
+
Stoping application 'java'(target:ap-ne-test): OK
|
385
|
+
|
386
|
+
ubuntu@admin:~$ pi stop-app
|
387
|
+
1: all
|
388
|
+
2: project
|
389
|
+
3: target
|
390
|
+
Select application by: 2
|
391
|
+
Select application by project
|
392
|
+
1: javagithub
|
393
|
+
2: javatest
|
394
|
+
3: javawj
|
395
|
+
4: railsgithub
|
396
|
+
5: railswj
|
397
|
+
6: sinatra
|
365
398
|
Select Project: 2
|
366
|
-
Selected Project:
|
367
|
-
|
368
|
-
1. javaapp
|
399
|
+
Selected Project: javatest
|
400
|
+
1: java
|
369
401
|
Select Application: 1
|
370
|
-
Selected Application:
|
402
|
+
Selected Application: java
|
403
|
+
The application 'java'(target:ap-ne-test) has already stopped.
|
404
|
+
|
405
|
+
ubuntu@admin:~$ pi stop-app
|
406
|
+
1: all
|
407
|
+
2: project
|
408
|
+
3: target
|
409
|
+
Select application by: 3
|
410
|
+
Select application by target
|
411
|
+
1: ap-ne-test
|
412
|
+
2: target
|
413
|
+
Select Target: 1
|
414
|
+
Selected Target: ap-ne-test
|
415
|
+
1: test
|
416
|
+
2: javatest
|
417
|
+
3: java
|
418
|
+
Select Application: 3
|
419
|
+
Selected Application: java
|
420
|
+
The application 'java'(target:ap-ne-test) has already stopped.
|
421
|
+
|
422
|
+
ubuntu@admin:~$ pi start-app java --target ap-ne-test
|
423
|
+
Starting application 'java'(target:ap-ne-test): .........................................................OK
|
424
|
+
|
425
|
+
ubuntu@admin:~$ pi status 1817
|
371
426
|
+-------------+---------+--------+-----------+---------+--------------+------------+
|
372
427
|
| Instance ID | Status | CPU(%) | Memory(M) | Disk(M) | RequestCount | ErrorCount |
|
373
428
|
+-------------+---------+--------+-----------+---------+--------------+------------+
|
374
|
-
|
|
375
|
-
|
|
429
|
+
| 1be721 | running | 0 | 0 | 0 | 0 | 0 |
|
430
|
+
| 4ae3b2 | running | 0 | 0 | 0 | 0 | 0 |
|
376
431
|
+-------------+---------+--------+-----------+---------+--------------+------------+
|
377
432
|
|
378
|
-
ubuntu@admin:~$ pi scale-app
|
379
|
-
=============Project Name===========
|
380
|
-
1. javatestgithub
|
381
|
-
2. javawj
|
382
|
-
3. railstestgithub
|
383
|
-
4. railswj
|
384
|
-
Select Project: 2
|
385
|
-
Selected Project: javawj
|
386
|
-
=============Application Name===========
|
387
|
-
1. javaapp
|
388
|
-
Select Application: 1
|
389
|
-
Selected Application: javaapp
|
433
|
+
ubuntu@admin:~$ pi scale-app 1817
|
390
434
|
How many instances? [1]: 2
|
391
|
-
Scaling application:
|
392
|
-
|
393
|
-
ubuntu@admin:~$ pi app
|
394
|
-
|
395
|
-
1
|
396
|
-
|
397
|
-
|
398
|
-
|
435
|
+
Scaling application: ...................................OK
|
436
|
+
|
437
|
+
ubuntu@admin:~$ pi update-app 1817
|
438
|
+
1: test
|
439
|
+
Select Version: 1
|
440
|
+
Error: Don't need update application!
|
441
|
+
|
442
|
+
ubuntu@admin:~$ pi upload
|
443
|
+
1: javagithub
|
444
|
+
2: javatest
|
445
|
+
3: javawj
|
399
446
|
Select Project: 2
|
400
|
-
Selected Project:
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
447
|
+
Selected Project: javatest
|
448
|
+
Please enter the path of upload war file: /home/wangjing/paashelp.war
|
449
|
+
Please enter the version: paashelp
|
450
|
+
Please enter in the description: test
|
451
|
+
Uploading "paashelp.war": ..OK
|
452
|
+
|
453
|
+
ubuntu@admin:~$ pi update-app 1817
|
454
|
+
1: test
|
455
|
+
2: paashelp
|
456
|
+
Select Version: 2
|
457
|
+
Updating application: .............................................OK
|
458
|
+
|
459
|
+
ubuntu@admin:~$ pi app-log 1817
|
405
460
|
Select instance index(from 0 to 1) [0]: 0
|
406
461
|
1: stderr.log 914B
|
407
462
|
2: stdout.log 0B
|
@@ -425,195 +480,99 @@ INFO: Starting Coyote HTTP/1.1 on http-39652
|
|
425
480
|
Jul 20, 2012 7:25:57 AM org.apache.catalina.startup.Catalina start
|
426
481
|
INFO: Server startup in 5332 ms
|
427
482
|
|
428
|
-
ubuntu@admin:~$ pi create-env
|
429
|
-
=============Project Name===========
|
430
|
-
1. javatestgithub
|
431
|
-
2. javawj
|
432
|
-
3. railstestgithub
|
433
|
-
4. railswj
|
434
|
-
Select Project: 2
|
435
|
-
Selected Project: javawj
|
436
|
-
=============Application Name===========
|
437
|
-
1. javaapp
|
438
|
-
Select Application: 1
|
439
|
-
Selected Application: javaapp
|
483
|
+
ubuntu@admin:~$ pi create-env 1817
|
440
484
|
Environment Name: aa
|
441
485
|
Environment Value: bb
|
442
486
|
OK
|
443
487
|
|
444
|
-
ubuntu@admin:~$ pi app-env
|
445
|
-
=============Project Name===========
|
446
|
-
1. javatestgithub
|
447
|
-
2. javawj
|
448
|
-
3. railstestgithub
|
449
|
-
4. railswj
|
450
|
-
Select Project: 2
|
451
|
-
Selected Project: javawj
|
452
|
-
=============Application Name===========
|
453
|
-
1. javaapp
|
454
|
-
Select Application: 1
|
455
|
-
Selected Application: javaapp
|
488
|
+
ubuntu@admin:~$ pi app-env 1817
|
456
489
|
+------+-------+
|
457
490
|
| Name | Value |
|
458
491
|
+------+-------+
|
459
492
|
| aa | bb |
|
460
493
|
+------+-------+
|
461
494
|
|
462
|
-
ubuntu@admin:~$ pi delete-env
|
463
|
-
|
464
|
-
1
|
465
|
-
|
466
|
-
3. railstestgithub
|
467
|
-
4. railswj
|
468
|
-
Select Project: 2
|
469
|
-
Selected Project: javawj
|
470
|
-
=============Application Name===========
|
471
|
-
1. javaapp
|
472
|
-
Select Application: 1
|
473
|
-
Selected Application: javaapp
|
474
|
-
Environment Name: aa
|
495
|
+
ubuntu@admin:~$ pi delete-env 1817
|
496
|
+
1: aa
|
497
|
+
Environment Name: 1
|
498
|
+
Selected Environment Name: aa
|
475
499
|
OK
|
476
500
|
|
477
|
-
ubuntu@admin:~$ pi map-dns
|
478
|
-
|
479
|
-
|
480
|
-
2
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
Select
|
488
|
-
Selected
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
4. railswj
|
500
|
-
Select Project: 2
|
501
|
-
Selected Project: javawj
|
502
|
-
=============Application Name===========
|
503
|
-
1. javaapp
|
504
|
-
Select Application: 1
|
505
|
-
Selected Application: javaapp
|
506
|
-
+-----------------------+
|
507
|
-
| Mapped DNS Name |
|
508
|
-
+-----------------------+
|
509
|
-
| dnswj.samsungpaas.com |
|
510
|
-
+-----------------------+
|
511
|
-
|
512
|
-
ubuntu@admin:~$ pi unmap-dns
|
513
|
-
=============Project Name===========
|
514
|
-
1. javatestgithub
|
515
|
-
2. javawj
|
516
|
-
3. railstestgithub
|
517
|
-
4. railswj
|
518
|
-
Select Project: 2
|
519
|
-
Selected Project: javawj
|
520
|
-
=============Application Name===========
|
521
|
-
1. javaapp
|
522
|
-
Select Application: 1
|
523
|
-
Selected Application: javaapp
|
524
|
-
=============DNS============
|
525
|
-
1. dnswj.samsungpaas.com
|
526
|
-
Select DNS: 1
|
527
|
-
Selected DNS: dnswj.samsungpaas.com
|
528
|
-
Unmapping dns: ..OK
|
529
|
-
|
530
|
-
ubuntu@admin:~$ pi bind-service
|
531
|
-
=============Project Name===========
|
532
|
-
1. javatestgithub
|
533
|
-
2. javawj
|
534
|
-
3. railstestgithub
|
535
|
-
4. railswj
|
536
|
-
Select Project: 2
|
537
|
-
Selected Project: javawj
|
538
|
-
=============Application Name===========
|
539
|
-
1. javaapp
|
540
|
-
Select Application: 1
|
541
|
-
Selected Application: javaapp
|
501
|
+
ubuntu@admin:~$ pi map-dns 1817
|
502
|
+
1: javatest1.samsungpaas.com
|
503
|
+
2: javatest2.samsungpaas.com
|
504
|
+
Select dns, indexed list?: 1,2
|
505
|
+
Selected dns: javatest1.samsungpaas.com javatest2.samsungpaas.com
|
506
|
+
Mapping dns: ...OK
|
507
|
+
|
508
|
+
ubuntu@admin:~$ pi unmap-dns 1817
|
509
|
+
1: javatest1.samsungpaas.com
|
510
|
+
2: javatest2.samsungpaas.com
|
511
|
+
Select DNS: 2
|
512
|
+
Selected DNS: javatest2.samsungpaas.com
|
513
|
+
Unmapping dns: ...OK
|
514
|
+
|
515
|
+
ubuntu@admin:~$ pi app-dns 1817
|
516
|
+
+---------------------------+
|
517
|
+
| Mapped DNS Name |
|
518
|
+
+---------------------------+
|
519
|
+
| javatest1.samsungpaas.com |
|
520
|
+
+---------------------------+
|
521
|
+
|
522
|
+
ubuntu@admin:~$ pi bind-service 1817
|
542
523
|
1: mysql_demo_251_cloudpi-dedicated-mysql_wangjing
|
543
524
|
Select services, indexed list?: 1
|
544
525
|
Selected services: mysql_demo_251_cloudpi-dedicated-mysql_wangjing
|
545
526
|
Binding service: ...............................OK
|
546
527
|
|
547
|
-
ubuntu@admin:~$ pi app-service
|
548
|
-
=============Project Name===========
|
549
|
-
1. javatestgithub
|
550
|
-
2. javawj
|
551
|
-
3. railstestgithub
|
552
|
-
4. railswj
|
553
|
-
Select Project: 2
|
554
|
-
Selected Project: javawj
|
555
|
-
=============Application Name===========
|
556
|
-
1. javaapp
|
557
|
-
Select Application: 1
|
558
|
-
Selected Application: javaapp
|
528
|
+
ubuntu@admin:~$ pi app-service 1817
|
559
529
|
+-------------------------------------------------+---------+-----------+
|
560
530
|
| Name | Version | Type |
|
561
531
|
+-------------------------------------------------+---------+-----------+
|
562
532
|
| mysql_demo_251_cloudpi-dedicated-mysql_wangjing | 5.1.410 | dedicated |
|
563
533
|
+-------------------------------------------------+---------+-----------+
|
564
534
|
|
565
|
-
ubuntu@admin:~$ pi unbind-service
|
566
|
-
=============Project Name===========
|
567
|
-
1. javatestgithub
|
568
|
-
2. javawj
|
569
|
-
3. railstestgithub
|
570
|
-
4. railswj
|
571
|
-
Select Project: 2
|
572
|
-
Selected Project: javawj
|
573
|
-
=============Application Name===========
|
574
|
-
1. javaapp
|
575
|
-
Select Application: 1
|
576
|
-
Selected Application: javaapp
|
577
|
-
=============Services============
|
535
|
+
ubuntu@admin:~$ pi unbind-service 1817
|
578
536
|
1. mysql_demo_251_cloudpi-dedicated-mysql_wangjing
|
579
537
|
Select Service: 1
|
580
538
|
Selected Service: mysql_demo_251_cloudpi-dedicated-mysql_wangjing
|
581
539
|
Unbinding service: ...................................................OK
|
582
540
|
|
583
541
|
ubuntu@admin:~$ pi project-events
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
542
|
+
1: javagithub
|
543
|
+
2: javatest
|
544
|
+
3: javawj
|
545
|
+
4: railsgithub
|
546
|
+
5: railswj
|
547
|
+
6: sinatra
|
589
548
|
Select Project: 2
|
590
|
-
Selected Project:
|
591
|
-
|
592
|
-
| Target | AppName | EventTime | EventInfo | EventDetail
|
593
|
-
|
594
|
-
| | | 2012-
|
595
|
-
| ap-ne-test |
|
596
|
-
| ap-ne-test |
|
597
|
-
| ap-ne-test |
|
598
|
-
| ap-ne-test |
|
599
|
-
| ap-ne-test |
|
600
|
-
| ap-ne-test |
|
601
|
-
| ap-ne-test |
|
602
|
-
| ap-ne-test |
|
603
|
-
| ap-ne-test |
|
604
|
-
| ap-ne-test |
|
605
|
-
| ap-ne-test |
|
606
|
-
|
607
|
-
+------------+---------+-----------------------+-----------+------------------------------------+
|
549
|
+
Selected Project: javatest
|
550
|
+
+------------+---------+-----------------------+-----------+--------------------------------------------------------------------------------------------------+
|
551
|
+
| Target | AppName | EventTime | EventInfo | EventDetail |
|
552
|
+
+------------+---------+-----------------------+-----------+--------------------------------------------------------------------------------------------------+
|
553
|
+
| | | 2012-08-04 08:15:06.0 | INFO | Success to create project : javatest |
|
554
|
+
| ap-ne-test | java | 2012-08-04 08:18:32.0 | INFO | Success to create appliation. |
|
555
|
+
| ap-ne-test | java | 2012-08-04 08:22:19.0 | INFO | Success to stop application. |
|
556
|
+
| ap-ne-test | java | 2012-08-04 08:23:38.0 | INFO | Success to start application. |
|
557
|
+
| ap-ne-test | java | 2012-08-04 08:28:40.0 | INFO | Success to scale instances to 2 |
|
558
|
+
| ap-ne-test | java | 2012-08-04 08:32:59.0 | INFO | Success to upgrade application to : paashelp |
|
559
|
+
| ap-ne-test | java | 2012-08-04 08:34:26.0 | ERROR | Fail to get log , the detail is :( Target: http://ap-ne-test.samsungcloud.org is not running! ) |
|
560
|
+
| ap-ne-test | java | 2012-08-04 08:34:39.0 | ERROR | Fail to get log , the detail is :( Target: http://ap-ne-test.samsungcloud.org is not running! ) |
|
561
|
+
| ap-ne-test | java | 2012-08-04 08:36:05.0 | INFO | Success to add env : aa=bb |
|
562
|
+
| ap-ne-test | java | 2012-08-04 08:36:45.0 | INFO | Success to delete env. |
|
563
|
+
| ap-ne-test | java | 2012-08-04 08:40:01.0 | INFO | Success to map url. |
|
564
|
+
| ap-ne-test | java | 2012-08-04 08:40:10.0 | INFO | Success to unmap url. |
|
565
|
+
+------------+---------+-----------------------+-----------+--------------------------------------------------------------------------------------------------+
|
608
566
|
|
609
567
|
ubuntu@admin:~$ pi project-tags
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
568
|
+
1: javagithub
|
569
|
+
2: javatest
|
570
|
+
3: javawj
|
571
|
+
4: railsgithub
|
572
|
+
5: railswj
|
573
|
+
6: sinatra
|
574
|
+
Select Project: 2
|
575
|
+
Selected Project: javatest
|
617
576
|
|
618
577
|
+--------+
|
619
578
|
| Tag |
|
@@ -622,47 +581,52 @@ Selected Project: railswj
|
|
622
581
|
+--------+
|
623
582
|
|
624
583
|
ubuntu@admin:~$ pi project-commits
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
1. v0.0.0
|
584
|
+
1: javagithub
|
585
|
+
2: javatest
|
586
|
+
3: javawj
|
587
|
+
4: railsgithub
|
588
|
+
5: railswj
|
589
|
+
6: sinatra
|
590
|
+
Select Project: 2
|
591
|
+
Selected Project: javatest
|
592
|
+
1: v0.0.0
|
635
593
|
Select Tag: 1
|
636
594
|
Selected Tag: v0.0.0
|
637
595
|
+------------------------------------------+---------------------------+--------------+
|
638
596
|
| CommitId | Date | Comment |
|
639
597
|
+------------------------------------------+---------------------------+--------------+
|
640
|
-
|
|
598
|
+
| e6ea3d82736f742ce2e4b1f36a27889ca8b150ac | 2012-08-04 08:14:13 +0000 | init project |
|
641
599
|
+------------------------------------------+---------------------------+--------------+
|
642
600
|
|
643
601
|
ubuntu@admin:~$ pi delete-app
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
602
|
+
1: all
|
603
|
+
2: project
|
604
|
+
3: target
|
605
|
+
Select application by: 2
|
606
|
+
Select application by project
|
607
|
+
1: javagithub
|
608
|
+
2: javatest
|
609
|
+
3: javawj
|
610
|
+
4: railsgithub
|
611
|
+
5: railswj
|
612
|
+
6: sinatra
|
649
613
|
Select Project: 2
|
650
|
-
Selected Project:
|
651
|
-
|
652
|
-
1. javaapp
|
614
|
+
Selected Project: javatest
|
615
|
+
1: java
|
653
616
|
Select Application: 1
|
654
|
-
Selected Application:
|
655
|
-
Deleting application:
|
617
|
+
Selected Application: java
|
618
|
+
Deleting application: ...OK
|
656
619
|
|
657
620
|
ubuntu@admin:~$ pi delete-project
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
621
|
+
1: javagithub
|
622
|
+
2: javatest
|
623
|
+
3: javawj
|
624
|
+
4: railsgithub
|
625
|
+
5: railswj
|
626
|
+
6: sinatra
|
663
627
|
Select Project: 2
|
664
|
-
Selected Project:
|
665
|
-
Deleting project "
|
628
|
+
Selected Project: javatest
|
629
|
+
Deleting project "javatest": ............OK
|
666
630
|
|
667
631
|
ubuntu@admin:~$ pi logout
|
668
632
|
Successfully logged out of [http://api.staging.samsungcloud.org]
|
@@ -672,9 +636,8 @@ Successfully logged out of [http://api.staging.samsungcloud.org]
|
|
672
636
|
ubuntu@admin:~$ pi login
|
673
637
|
Attempting login to 'http://api.staging.samsungcloud.org'? [Yn]: n
|
674
638
|
Please input URL: http://test.org
|
675
|
-
|
676
|
-
|
677
|
-
Problem with login, Cannot access target (getaddrinfo: Name or service not known), try again or register for an account.
|
639
|
+
Host is not available or is not valid: 'http://test.org'
|
640
|
+
Problem with login, Cannot access target (getaddrinfo: Name or service not known), try again.
|
678
641
|
|
679
642
|
ubuntu@admin:~$ pi github
|
680
643
|
Please input your name: ruanzhimin
|