PI

This is the command line interface to CloudPi Cloud Application Platform

_Copyright 2010-2012, Samsung.

  1. For Users

1.1 Prerequisite: Installing Ruby and RubyGems

Currently support Ruby version v1.8.7 and v1.9.2
Installing Ruby and RubyGems on Windows and Linux computers(If you have already installed Ruby and RubyGems, then you can skip to Installing pi Steps):
Windows:

Download and install Ruby Installer for Windows from www.rubyinstaller.org. The installer already includes RubyGems. Be sure you use the Ruby-enabled command prompt window when you later install and use pi. You access this command prompt from the Windows Start menu (All Programs > Ruby <version> > Start Command Prompt with Ruby). Linux: Install the full Ruby package and RubyGems: $ apt-get install ruby-full rubygems $ ruby -v $ gem -v 1.2 Installing pi

$ gem install pi
$ pi version

1.3 Quick Start

To get full help for pi command line, run:
$ pi help
To get info for pi command line, run:
$ pi info
To login, run:
$ pi login
  1. For Developers

2.1 Dependency

"json_pure", "~> 1.5.1"
"highline", "~> 1.6.1"
"rest-client", ">= 1.6.1", "< 1.7.0"
"terminal-table", "~> 1.4.2"
"interact", ">= 0.4.7"

2.2 Creating Your Own Gem

If you want to use your own pi command line based on currently pi command line, you can rewrite your own code, then create a gem. You can refer to RubyGems Manuals (http://docs.rubygems.org/read/chapter/5). Here are simple steps:
a.create a gem specification(for example, you can define my_pi.gemspec)
b.$ gem build my_pi.gemspec, after that my_pi.gem is created.
c.$ gem push my_pi-1.0.0.gem, that will instantly deploy your gem to the rubygems.org servers, and other users will be able to install it using gem install.
d.$ gem install my_pi.gem
  1. Help

Usage: pi [options] command [<args>] [command_options] Try ‘pi help [command]’ or ‘pi help options’ for more information.

Currently available pi commands are:

User
  login [env] [--user,--password]                                   Login
  logout                                                            Logs current user out of the system
  info                                                              List system information
  user                                                              Display user information
  targets                                                           List available targets infomation
  password [oldpassword] [--password PASS]                          Change the password for the current user
  github [name] [--email,--password]                                Bind to the github account
  runtimes                                                          Display the supported runtimes of the system
  frameworks                                                        Display the supported frameworks of the system
  version                                                           Display version information
  help [command]                                                    Get general help or help on a specific command
  help options                                                      Get help on available options

Project
  projects                                                          List created projects
  create-project [project]                                          Create a new project
  delete-project [projectid]                                        Delete the project
  project-events [projectid]                                        List the event info for the project
  project-tags [projectid]                                          List the tags for the project
  project-commits [projectid]                                       List the commit log for the project
  upload [projectid] [--path,--ver,--desc]                          Upload the war package for java project

Application
  apps [--projectid,--target]                                       List deployed applications
  create-app [appname]                                              Create a new application
  delete-app [appid]                                                Delete the application
  delete-app <appname> <--target TARGET>                            Delete the application
  start-app [appid]                                                 Start the application
  start-app <appname> <--target TARGET>                             Start the application
  stop-app [appid]                                                  Stop the application
  stop-app <appname> <--target TARGET>                              Stop the application
  stop-app --graceful                                               Stop the application in a graceful mode
  restart-app [appid]                                               Restart the application
  restart-app <appname> <--target TARGET>                           Restart the application
  restart-app --graceful                                            Restart the application in a graceful mode
  scale-app [appid] [--instance N]                                  Scale the application instances up or down
  scale-app <appname> <--target TARGET> [--instance N]              Scale the application instances up or down
  update-app [appid] [--ver VERSION]                                Update the application
  update-app <appname> <--target TARGET> [--ver VERSION]            Update the application
  update-app --graceful                                             Update the application in a graceful mode
  status [appid]                                                    Display resource usage for the application
  status <appname> <--target TARGET>                                Display resource usage for the application
  app-env [appid]                                                   Display the environments for the application
  app-env <appname> <--target TARGET>                               Display the environments for the application
  create-env [appid] [--name,--value]                               Create the environment for the application
  create-env <appname> <--target TARGET> [--name,--value]           Create the environment for the application
  delete-env [appid] [--name NAME]                                  Delete the environment for the application
  delete-env <appname> <--target TARGET> [--name NAME]              Delete the environment for the application
  app-log [appid] [--instanceid,--file]                             List the logs for the application
  app-log <appname> <--target TARGET> [--instanceid,--file]         List the logs for the application

Service
  app-service [appid]                                               Display the binded services for the application
  app-service <appname> <--target TARGET>                           Display the binded services for the application
  bind-service [appid] [--service SERVICE]                          Bind the services for the application
  bind-service <appname> <--target TARGET> [--service]              Bind the services for the application
  unbind-service [appid] [--service SERVICE]                        Unbind the services for the application
  unbind-service <appname> <--target TARGET> [--service]            Unbind the services for the application
  services                                                          List dedicated services
  service [serviceid]                                               List the connection info for the service
  export-service [serviceid]                                        Export dedicated service url
  import-service [url]                                              Import dedicated service
  check-service [serviceid]                                         Check availability for the service
  delete-service [serviceid]                                        Delete the service
  register-service [serviceid] [--target TARGET]                    Register to target
  deregister-service [serviceid] [--target TARGET]                  Deregister to target

DNS
  app-dns [appid]                                                   Display the mapped urls for the application
  app-dns <appname> <--target TARGET>                               Display the mapped urls for the application
  map-dns [appid] [--dns DNS]                                       Map the urls for the application
  map-dns <appname> <--target TARGET> [--dns DNS]                   Map the urls for the application
  unmap-dns [appid] [--dns DNS]                                     Unmap the urls for the application
  unmap-dns <appname> <--target TARGET> [--dns DNS]                 Unmap the urls for the application
  dns                                                               List the dns
  zones                                                             List the dns zones
  dns-records [dnsid]                                               List the record info for the registered dns
  create-dns [dnsname] [--zoneid,--projectid,--desc]                Create a new dns
  register-dns [dnsid] [--target,--continent,--country,--region]    Register to target
  deregister-dns [dnsid] [--recordid ID]                            Deregister to target
  delete-dns [dnsid]                                                Delete the dns
  1. Example

wangjing@wangjing-pc:~$ pi login 1: www 2: staging 3: qa Select CloudPi Environment [www]: 1 User: wangjing Password: ******* Successfully logged into [api.samsungcloud.org]

wangjing@wangjing-pc:~$ pi login www –user wangjing –password cloudpi Successfully logged into [api.samsungcloud.org]

wangjing@wangjing-pc:~$ pi version pi 0.1.36

wangjing@wangjing-pc:~$ pi info

Name: api Description: CloudPi API Component Build: nightly-20121011055902-110 Version: coulibiac-21463d

wangjing@wangjing-pc:~$ pi help

Usage: pi [options] command [<args>] [command_options] Try ‘pi help [command]’ or ‘pi help options’ for more information.

Currently available pi commands are:

User
  login [env] [--user,--password]                                   Login
  logout                                                            Logs current user out of the system
  info                                                              List system information
  user                                                              Display user information
  targets                                                           List available targets infomation
  password [oldpassword] [--password PASS]                          Change the password for the current user
  github [name] [--email,--password]                                Bind to the github account
  runtimes                                                          Display the supported runtimes of the system
  frameworks                                                        Display the supported frameworks of the system
  version                                                           Display version information
  help [command]                                                    Get general help or help on a specific command
  help options                                                      Get help on available options

Project
  projects                                                          List created projects
  create-project [project]                                          Create a new project
  delete-project [projectid]                                        Delete the project
  project-events [projectid]                                        List the event info for the project
  project-tags [projectid]                                          List the tags for the project
  project-commits [projectid]                                       List the commit log for the project
  upload [projectid] [--path,--ver,--desc]                          Upload the war package for java project

Application
  apps [--projectid,--target]                                       List deployed applications
  create-app [appname]                                              Create a new application
  delete-app [appid]                                                Delete the application
  delete-app <appname> <--target TARGET>                            Delete the application
  start-app [appid]                                                 Start the application
  start-app <appname> <--target TARGET>                             Start the application
  stop-app [appid]                                                  Stop the application
  stop-app <appname> <--target TARGET>                              Stop the application
  stop-app --graceful                                               Stop the application in a graceful mode
  restart-app [appid]                                               Restart the application
  restart-app <appname> <--target TARGET>                           Restart the application
  restart-app --graceful                                            Restart the application in a graceful mode
  scale-app [appid] [--instance N]                                  Scale the application instances up or down
  scale-app <appname> <--target TARGET> [--instance N]              Scale the application instances up or down
  update-app [appid] [--ver VERSION]                                Update the application
  update-app <appname> <--target TARGET> [--ver VERSION]            Update the application
  update-app --graceful                                             Update the application in a graceful mode
  status [appid]                                                    Display resource usage for the application
  status <appname> <--target TARGET>                                Display resource usage for the application
  app-env [appid]                                                   Display the environments for the application
  app-env <appname> <--target TARGET>                               Display the environments for the application
  create-env [appid] [--name,--value]                               Create the environment for the application
  create-env <appname> <--target TARGET> [--name,--value]           Create the environment for the application
  delete-env [appid] [--name NAME]                                  Delete the environment for the application
  delete-env <appname> <--target TARGET> [--name NAME]              Delete the environment for the application
  app-log [appid] [--instanceid,--file]                             List the logs for the application
  app-log <appname> <--target TARGET> [--instanceid,--file]         List the logs for the application

Service
  app-service [appid]                                               Display the binded services for the application
  app-service <appname> <--target TARGET>                           Display the binded services for the application
  bind-service [appid] [--service SERVICE]                          Bind the services for the application
  bind-service <appname> <--target TARGET> [--service]              Bind the services for the application
  unbind-service [appid] [--service SERVICE]                        Unbind the services for the application
  unbind-service <appname> <--target TARGET> [--service]            Unbind the services for the application
  services                                                          List dedicated services
  service [serviceid]                                               List the connection info for the service
  export-service [serviceid]                                        Export dedicated service url
  import-service [url]                                              Import dedicated service
  check-service [serviceid]                                         Check availability for the service
  delete-service [serviceid]                                        Delete the service
  register-service [serviceid] [--target TARGET]                    Register to target
  deregister-service [serviceid] [--target TARGET]                  Deregister to target

DNS
  app-dns [appid]                                                   Display the mapped urls for the application
  app-dns <appname> <--target TARGET>                               Display the mapped urls for the application
  map-dns [appid] [--dns DNS]                                       Map the urls for the application
  map-dns <appname> <--target TARGET> [--dns DNS]                   Map the urls for the application
  unmap-dns [appid] [--dns DNS]                                     Unmap the urls for the application
  unmap-dns <appname> <--target TARGET> [--dns DNS]                 Unmap the urls for the application
  dns                                                               List the dns
  zones                                                             List the dns zones
  dns-records [dnsid]                                               List the record info for the registered dns
  create-dns [dnsname] [--zoneid,--projectid,--desc]                Create a new dns
  register-dns [dnsid] [--target,--continent,--country,--region]    Register to target
  deregister-dns [dnsid] [--recordid ID]                            Deregister to target
  delete-dns [dnsid]                                                Delete the dns

wangjing@wangjing-pc:~$ pi help options

Available options:

    --user USER
    --password PASS
    --name NAME
    --email EMAIL
    --path PATH
    --ver VERSION
    --desc [DESC]
    --projectid ID
    --target TARG
    --instance N
    --value VALUE
    --service SERVICE
    --dns DNS
    --zoneid ID
    --region REGION
    --instanceid N
    --file FILE
    --continent CONT
    --country COUNTRY
    --recordid ID
    --graceful
-t [TKEY]
    --trace [TKEY]
-q, --quiet
    --verbose
    --json
-v, --version
-h, --help
    --options

wangjing@wangjing-pc:~$ pi user

UserName: wangjing DomainName: bst RoleName: user State: Active Github Account Name: ruanzhimin Github Account Email: [email protected]

wangjing@wangjing-pc:~$ pi targets

-----------———————————+ | Name | URL | -----------———————————+ | bst-dev | bst-dev.samsungcloud.org | | target-hq | target-hq.cloudtao.net | -----------———————————+

wangjing@wangjing-pc:~$ pi runtimes

-------- | Name | -------- | java | | ruby18 | --------

wangjing@wangjing-pc:~$ pi frameworks

---------- | Name | ---------- | lift | | spring | | grails | | java_web | | rails3 | | sinatra | ----------

wangjing@wangjing-pc:~$ pi password Old Password: ******* New Password: **** Verify Password: **** ok

wangjing@wangjing-pc:~$ pi github Please input your name: ruanzhimin Please input your email: [email protected] Please input your password: **************** ok

wangjing@wangjing-pc:~$ pi help stop-app Usage: pi stop-app [appid] [–graceful] or pi stop-app <appname> <–target TARGET> [–graceful]

wangjing@wangjing-pc:~$ pi projects

------————----------———–----------—————————————————————-------------- | ID | Name | Runtime | Framework | Git Type | GitUrl | Description | ------————----------———–----------—————————————————————-------------- | 3288 | javagithub | java | spring | github | [email protected]/ruanzhimin/javagithub.git | test | | 3287 | railsgithub | ruby18 | rails3 | github | [email protected]/ruanzhimin/railsgithub.git | test | | 3285 | ruby | ruby18 | rails3 | cloudpi | [email protected]/wangjing/ruby.git | test | ------————----------———–----------—————————————————————--------------

wangjing@wangjing-pc:~$ pi create-project Project Name: java 1: java 2: ruby18 Select Runtime: 1 Selected Runtime: java 1: lift 2: spring 3: grails 4: java_web Select Framework: 2 Selected Framework: spring Please enter in the description: test 1: cloudpi 2: github Select Repository Type: 1 Selected Repository Type: cloudpi Creating project “java”: .….….….OK

wangjing@wangjing-pc:~$ pi upload 1: java 2: javagithub Select Project: 1 Selected Project: java Please enter the path of upload war file: /home/wangjing/spring4mysql-master-slave.war Please enter the version: v1 Please enter in the description: spring4mysql Uploading “spring4mysql-master-slave.war”: .….….….….….….….….….….….….….….OK

wangjing@wangjing-pc:~$ pi create-app 1: bst-dev 2: target-hq 3: func-test Select Target: 1 Selected Target: bst-dev Application Name: spring4mysql 1: java 2: javagithub 3: railsgithub 4: ruby Select Project: 1 Selected Project: java 1: v1 Select Version: 1 Selected Version: v1 URL: spring4mysql.wangjing.bst-dev.samsungpaas.com Memory reservation (64M, 128M, 256M, 512M, 1G, 2G) [64M]: Available memory: 1600 M, maximum instances: 25 How many instances(from 1 to 25)? [1]: Need debug? [yN]: y 1: restart 2: notify Reaction when service changed [notify]: 1 Need JMX monitoring? [yN]: y Creating application “spring4mysql”: .….….….….….….….….…Success to create appliation.

wangjing@wangjing-pc:~$ pi apps ------———--------------———————————————–-------------———---------———–------------------- | ID | Target | App name | URL | Deploy Type | Version | Status | Instances | Running Instances | ------———--------------———————————————–-------------———---------———–------------------- | 3213 | bst-dev | spring4mysql | spring4mysql.wangjing.bst-dev.samsungpaas.com | binary | v1 | STARTED | 1 | 1 | ------———--------------———————————————–-------------———---------———–-------------------

ubuntu@admin:~$ pi apps –target bst-dev ------———--------------———————————————–-------------———----------———–------------------- | ID | Target | App name | URL | Deploy Type | Version | Status | Instances | Running Instances | ------———--------------———————————————–-------------———----------———–------------------- | 2413 | bst-dev | grails4redis | grails4redis.wangjing.bst-dev.samsungpaas.com | binary | v3 | STARTED | 1 | 1 | | 2399 | bst-dev | testdebug | testdebug.wangjing.bst-dev.samsungpaas.com | binary | paashelp | STARTED | 1 | 1 | ------———--------------———————————————–-------------———----------———–-------------------

wangjing@wangjing-pc:~$ pi services -----———————————————————------------------————–---------———–+ | ID | Name | Farm Name | Service Type | Version | Owner | -----———————————————————------------------————–---------———–+ | 310 | membase4appdev_304_cloudpi-dedicated-membase_xiaoliang | membase4appdev | membase | 1.7.1.1 | xiaoliang | | 309 | mongodb4appdev_307_cloudpi-dedicated-mongodb_xiaoliang | mongodb4appdev | mongodb | 2.0.2 | xiaoliang | | 307 | rabbitmq4appdev_305_cloudpi-dedicated-rabbitmq_xiaoliang | rabbitmq4appdev | rabbitmq | 2.7.0 | xiaoliang | | 306 | redis4appdev_306_cloudpi-dedicated-redis_xiaoliang | redis4appdev | redis | 2.2.11 | xiaoliang | | 354 | redisxin_320_cloudpi-dedicated-redis_guanghe | redisxin | redis | 2.2.11 | guanghe | -----———————————————————------------------————–---------———–+

wangjing@wangjing-pc:~$ pi import-service Input the url to import: api.staging.samsungcloud.org/dedicatedservice/MzAz OK

wangjing@wangjing-pc:~$ pi services -----———————————————————------------------————–---------———–+ | ID | Name | Farm Name | Service Type | Version | Owner | -----———————————————————------------------————–---------———–+ | 310 | membase4appdev_304_cloudpi-dedicated-membase_xiaoliang | membase4appdev | membase | 1.7.1.1 | xiaoliang | | 309 | mongodb4appdev_307_cloudpi-dedicated-mongodb_xiaoliang | mongodb4appdev | mongodb | 2.0.2 | xiaoliang | | 456 | mysql4appdev_303_cloudpi-dedicated-mysql_xiaoliang | mysql4appdev | mysql | 5.1.41 | xiaoliang | | 307 | rabbitmq4appdev_305_cloudpi-dedicated-rabbitmq_xiaoliang | rabbitmq4appdev | rabbitmq | 2.7.0 | xiaoliang | | 306 | redis4appdev_306_cloudpi-dedicated-redis_xiaoliang | redis4appdev | redis | 2.2.11 | xiaoliang | | 354 | redisxin_320_cloudpi-dedicated-redis_guanghe | redisxin | redis | 2.2.11 | guanghe | -----———————————————————------------------————–---------———–+

wangjing@wangjing-pc:~$ pi service 456 href="{"username":"scalr","host":"ec2-54-248-48-9.ap-northeast-1.compute.amazonaws.com","password":"XgKk7XmAX5fqvpJWw47v","user":"scalr","hostname":"ec2-54-248-48-9.ap-northeast-1.compute.amazonaws.com","type":"master","port":3306,"name":"cloudpidb"">version”:“5.1.41”,“vendor”:“mysql”,“plan”:“free”,“credentials”:,“url”:“mysql.com/”,“service_id”:“mysql4appdev_303_cloudpi-dedicated-mysql_xiaoliang”}

wangjing@wangjing-pc:~$ pi check-service 1: redis4appdev_306_cloudpi-dedicated-redis_xiaoliang 2: rabbitmq4appdev_305_cloudpi-dedicated-rabbitmq_xiaoliang 3: mysql4appdev_303_cloudpi-dedicated-mysql_xiaoliang 4: mongodb4appdev_307_cloudpi-dedicated-mongodb_xiaoliang 5: membase4appdev_304_cloudpi-dedicated-membase_xiaoliang 6: redisxin_320_cloudpi-dedicated-redis_guanghe Select service: 3 Service is available.

wangjing@wangjing-pc:~$ pi register-service 1: redis4appdev_306_cloudpi-dedicated-redis_xiaoliang 2: rabbitmq4appdev_305_cloudpi-dedicated-rabbitmq_xiaoliang 3: mysql4appdev_303_cloudpi-dedicated-mysql_xiaoliang 4: mongodb4appdev_307_cloudpi-dedicated-mongodb_xiaoliang 5: membase4appdev_304_cloudpi-dedicated-membase_xiaoliang 6: redisxin_320_cloudpi-dedicated-redis_guanghe Select service: 3 1: bst-dev 2: test-farm Select target: 1 OK

wangjing@wangjing-pc:~$ pi bind-service 1: all 2: project 3: target Select application by: 1 Select application by all 1: spring4mysql Select Application: 1 Selected Application: spring4mysql 1: mysql4appdev_303_cloudpi-dedicated-mysql_xiaoliang Select services, indexed list?: 1 Binding service: .….….….….….….….….….….….….Success to bind service.

wangjing@wangjing-pc:~$ pi create-dns 1: ruby 2: railsgithub 3: javagithub 4: java Project name: 4 1: samsungpaas.com Select dns zone: 1 DNS name: spring4mysql Description: test OK

wangjing@wangjing-pc:~$ pi dns -----——————————--------------————-+ | ID | DNS Name | Project Name | Description | -----——————————--------------————-+ | 514 | spring4mysql.samsungpaas.com | java | test | -----——————————--------------————-+

wangjing@wangjing-pc:~$ pi register-dns 1: spring4mysql.samsungpaas.com Select DNS: 1 1: bst-dev 2: test-farm Select target: 1 1: Africa 2: Antarctica 3: Asia 4: Default 5: Europe 6: North America 7: Oceania 8: South America Select continent: 4 Select continent: Default OK

wangjing@wangjing-pc:~$ pi register-dns 1: wangjingtest.samsungpaas.com 2: picture.samsungpaas.com 3: testapp.cloudtao.net Select DNS: 3 1: bst-dev 2: target-hq Select target: 2 1: eu-west-1 2: sa-east-1 3: us-east-1 4: ap-northeast-1 5: us-west-2 6: us-west-1 7: ap-southeast-1 8: ap-southeast-2 9: DEFAULT Select region: 1 OK

wangjing@wangjing-pc:~$ pi map-dns 1: all 2: project 3: target Select application by: 1 Select application by all 1: spring4mysql Select Application: 1 Selected Application: spring4mysql 1: spring4mysql.samsungpaas.com Select dns, indexed list?: 1 Mapping dns: .…OK

wangjing@wangjing-pc:~$ pi create-env 1: all 2: project 3: target Select application by: 1 Select application by all 1: spring4mysql Select Application: 1 Selected Application: spring4mysql Environment Name: aa Environment Value: bb OK

wangjing@wangjing-pc:~$ pi app-env 3213 ----------————————————–+ | Name | Value | ----------————————————–+ | aa | bb | | app_uuid | 6b05c39d-f067-4ef0-b814-a81fc8b32a50 | | endpoint | api.staging.samsungcloud.org | ----------————————————–+

wangjing@wangjing-pc:~$ pi app-dns 3213 Mapped DNS Name: spring4mysql.samsungpaas.com

wangjing@wangjing-pc:~$ pi app-service 3213 ----------------------------------------------------———----------- | Name | Version | Type | ----------------------------------------------------———----------- | mysql4appdev_303_cloudpi-dedicated-mysql_xiaoliang | 5.1.410 | dedicated | ----------------------------------------------------———-----------

wangjing@wangjing-pc:~$ pi app-log 3213 Select instance index(from 0 to 0) [0]: 1: stderr.log 1.9K 2: stdout.log 7.7K Select logs, indexed list?: 1 Selected logs: stderr.log

Sep 9, 2012 3:56:08 AM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-43557 Sep 9, 2012 3:56:08 AM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1101 ms Sep 9, 2012 3:56:08 AM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Sep 9, 2012 3:56:08 AM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.32 Sep 9, 2012 3:56:08 AM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive probe.war Sep 9, 2012 3:56:13 AM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory ROOT Sep 9, 2012 3:56:13 AM org.apache.catalina.loader.WebappClassLoader validateJarFile INFO: validateJarFile(/var/vcap.local/dea/apps/3213-0-89561356a6bb36c12642d492c29a9f07/tomcat/webapps/ROOT/WEB-INF/lib/servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class Sep 9, 2012 3:56:15 AM org.cloudfoundry.reconfiguration.CloudAutoStagingBeanFactoryPostProcessor autoStagingOff INFO: No ‘META-INF/cloudfoundry.properties’ found, autostaging is active Sep 9, 2012 3:56:15 AM org.cloudfoundry.reconfiguration.CloudAutoStagingBeanFactoryPostProcessor processDatasources INFO: No datasources found in application context Sep 9, 2012 3:56:16 AM org.cloudfoundry.reconfiguration.CloudAutoStagingBeanFactoryPostProcessor autoStagingOff INFO: No ‘META-INF/cloudfoundry.properties’ found, autostaging is active Sep 9, 2012 3:56:16 AM org.cloudfoundry.reconfiguration.CloudAutoStagingBeanFactoryPostProcessor processDatasources INFO: No datasources found in application context Sep 9, 2012 3:56:17 AM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-43557 Sep 9, 2012 3:56:17 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 9180 ms

wangjing@wangjing-pc:~$ pi scale-app 3213 Available memory: 1536 M, maximum instances: 24 Current instance: 1, Instance number: 2 Scaling application: .….….….….….….….…Success to scale instances to 2

wangjing@wangjing-pc:~$ pi status 3213 -------------———--------———–---------————–------------ | Instance ID | Status | CPU(%) | Memory(M) | Disk(M) | RequestCount | ErrorCount | -------------———--------———–---------————–------------ | 895613 | running | 4.42 | 127 | 34 | 0 | 0 | | fa8220 | running | 66.18 | 135.12 | 34 | 0 | 0 | | 691e6d | dead | 0 | 0 | 0 | 0 | 0 | -------------———--------———–---------————–------------

wangjing@wangjing-pc:~$ pi stop-app 3213 Need graceful? [Yn]: Stoping application ‘spring4mysql’(target:bst-dev): OK

wangjing@wangjing-pc:~$ pi start-app 3213 Starting application ‘spring4mysql’(target:bst-dev): .….….….….….….….Success to start application.

wangjing@wangjing-pc:~$ pi restart-app 3213 Need graceful? [Yn]: Restart application ‘spring4mysql’(target:bst-dev): .….….….….….….…Success to restart application.

wangjing@wangjing-pc:~$ pi upload 1: java 2: javagithub Select Project: 1 Selected Project: java Please enter the path of upload war file: /home/wangjing/paashelp.war Please enter the version: v1 Version ‘v1’ already exists. Please enter the version: paashelp version Please enter in the description: paashelp Uploading “paashelp.war”: ..OK

wangjing@wangjing-pc:~$ pi update-app 3213 1: v1 2: paashelp version Select Version: 2 Need graceful? [Yn]: Updating application: .….….….….….….….….…Success to upgrade application to : paashelp version

wangjing@wangjing-pc:~$ pi delete-env 3213 1: app_uuid 2: endpoint 3: aa Environment Name: 3 Selected Environment Name: aa Deleting environment ‘aa=bb’: OK

wangjing@wangjing-pc:~$ pi unmap-dns 3213 1: spring4mysql.samsungpaas.com Select DNS: 1 Unmapping dns ‘spring4mysql.samsungpaas.com’: .…OK

wangjing@wangjing-pc:~$ pi deregister-dns 1: spring4mysql.samsungpaas.com Select DNS: 1 1: bst-dev 2: test-farm Select target: 1 1: DEFAULT Select record: 1 OK

wangjing@wangjing-pc:~$ pi delete-dns 1: spring4mysql.samsungpaas.com Select DNS: 1 OK

wangjing@wangjing-pc:~$ pi unbind-service 3213 1: mysql4appdev_303_cloudpi-dedicated-mysql_xiaoliang Select Service: 1 Unbinding service ‘mysql4appdev_303_cloudpi-dedicated-mysql_xiaoliang’: .….….….….….….….….….Success to unbind service.

wangjing@wangjing-pc:~$ pi deregister-service 1: redis4appdev_306_cloudpi-dedicated-redis_xiaoliang 2: rabbitmq4appdev_305_cloudpi-dedicated-rabbitmq_xiaoliang 3: mysql4appdev_303_cloudpi-dedicated-mysql_xiaoliang 4: mongodb4appdev_307_cloudpi-dedicated-mongodb_xiaoliang 5: membase4appdev_304_cloudpi-dedicated-membase_xiaoliang 6: redisxin_320_cloudpi-dedicated-redis_guanghe Select service: 3 1: bst-dev Select target: 1 OK

wangjing@wangjing-pc:~$ pi delete-service 1: redis4appdev_306_cloudpi-dedicated-redis_xiaoliang 2: rabbitmq4appdev_305_cloudpi-dedicated-rabbitmq_xiaoliang 3: mysql4appdev_303_cloudpi-dedicated-mysql_xiaoliang 4: mongodb4appdev_307_cloudpi-dedicated-mongodb_xiaoliang 5: membase4appdev_304_cloudpi-dedicated-membase_xiaoliang 6: redisxin_320_cloudpi-dedicated-redis_guanghe Select service: 3 OK

wangjing@wangjing-pc:~$ pi delete-app 3213 Deleting application: .…OK

wangjing@wangjing-pc:~$ pi project-events 3289 ---------————–-----------------------———–------------------------------------------------------ | Target | AppName | EventTime | EventInfo | EventDetail | ---------————–-----------------------———–------------------------------------------------------ | | | 2012-09-09 03:44:48.0 | INFO | Success to create project : java | | bst-dev | spring4mysql | 2012-09-09 03:50:07.0 | INFO | Success to create appliation. | | bst-dev | spring4mysql | 2012-09-09 03:55:57.0 | INFO | Success to stop application. | | bst-dev | spring4mysql | 2012-09-09 03:56:17.0 | INFO | Success to bind service. | | bst-dev | spring4mysql | 2012-09-09 04:00:06.0 | INFO | Success to map url. | | bst-dev | spring4mysql | 2012-09-09 04:00:52.0 | INFO | Success to add env : aa=bb | | bst-dev | spring4mysql | 2012-09-09 04:05:08.0 | INFO | Success to scale instances to 2 | | bst-dev | spring4mysql | 2012-09-09 04:07:20.0 | INFO | Success to stop application. | | bst-dev | spring4mysql | 2012-09-09 04:07:50.0 | INFO | Success to start application. | | bst-dev | spring4mysql | 2012-09-09 04:08:29.0 | INFO | Success to restart application. | | bst-dev | spring4mysql | 2012-09-09 04:10:46.0 | INFO | Success to upgrade application to : paashelp version | | bst-dev | spring4mysql | 2012-09-09 04:13:16.0 | INFO | Success to delete env. | | bst-dev | spring4mysql | 2012-09-09 04:14:27.0 | INFO | Success to unmap url. | | bst-dev | spring4mysql | 2012-09-09 04:15:59.0 | INFO | Success to stop application. | | bst-dev | spring4mysql | 2012-09-09 04:16:17.0 | INFO | Success to unbind service. | | bst-dev | spring4mysql | 2012-09-09 04:18:34.0 | INFO | Success to delete appliction. | ---------————–-----------------------———–------------------------------------------------------

wangjing@wangjing-pc:~$ pi project-tags 3289

-------- | Tag | -------- | v0.0.0 | --------

wangjing@wangjing-pc:~$ pi project-commits 3289 1: v0.0.0 Select Tag: 1 Selected Tag: v0.0.0 ------------------------------------------—————————-------------- | CommitId | Date | Comment | ------------------------------------------—————————-------------- | 98f090f331eaad56ead525524a0d08a4c8fcb2ae | 2012-09-09 03:43:40 +0000 | init project | ------------------------------------------—————————--------------

wangjing@wangjing-pc:~$ pi delete-project 3289 Deleting project: .….…OK

wangjing@wangjing-pc:~$ pi logout Successfully logged out of [api.staging.samsungcloud.org]

  1. Common Exception

ubuntu@admin:~$ pi github Please input your name: ruanzhimin Please input your email: [email protected] Please input your password: ***

Error (5001007): Invalid github account.

ubuntu@admin:~$ pi project-events 12345678

Error (4043004): The project is not belongs to current account.Project id : 12345678