JDC

The JingDong Cloud CLI. This is the command line interface to JingDong's Application Platform

_Copyright 2013, JingDong. Please see the License file.

Installation

You can install the JDC for Ruby with rubygems

$gem install jdc
$jdc -v
jdc 0.1.0

If you are using Bundler, we recommend that you express a major version dependency:

gem 'jdc', '~> 0.1.0'

Development

$git clone https://github.com/jingdong-app-engine/jdc.git
$cd jdc 
$bundle install

Basic Configuration

You need to provide your JingDong security credentials

You can also specify these values via ENV:

export ACCESS_KEY_ID='...'
export SECRET_KEY='...'

Usage

Usage: jdc [options] command [<args>] [command_options]
Try 'jdc help [command]' or 'jdc help options' for more information.

Currently available jdc commands are:

Getting Started
    target [url]                                 Reports current target or sets a new target
    info                                         System and account information

Applications
    user                                         Display current user account information
    apps                                         List deployed applications

Application Creation
    push [appname]                               Create, push, map, and start a new application
    push [appname] --path                        Push application from specified path
    push [appname] --url                         Set the url for the application
    push [appname] --instances <N>               Set the expected number <N> of instances
    push [appname] --mem M                       Set the memory reservation for the application
    push [appname] --runtime RUNTIME             Set the runtime to use for the application
    push [appname] --debug [MODE]                Push application and start in a debug mode
    push [appname] --no-start                    Do not auto-start the application

Application Operations
    start <appname> [--debug [MODE]]             Start the application
    stop  <appname>                              Stop the application
    restart <appname> [--debug [MODE]]           Restart the application
    delete <appname>                             Delete the application

Application Updates
    update <appname> [--path,--debug [MODE]]     Update the application bits
    mem <appname> [memsize]                      Update the memory reservation for an application
    map <appname> <url>                          Register the application to the url
    unmap <appname> <url>                        Unregister the application from the url
    instances <appname> <num|delta>              Scale the application instances up or down

Application Information
    crashes <appname>                            List recent application crashes
    crashlogs <appname>                          Display log information for crashed applications
    logs <appname> [--all]                       Display log information for the application
    files <appname> [path] [--all]               Display directory listing or file download for [path]
    stats <appname>                              Display resource usage for the application
    instances <appname>                          List application instances

Application Environment
    env <appname>                                List application environment variables
    env-add <appname> <variable[=]value>         Add an environment variable to an application
    env-del <appname> <variable>                 Delete an environment variable to an application

System
    runtimes                                     Display the supported runtimes of the target system
    frameworks                                   Display the recognized frameworks of the target system

Misc
    aliases                                      List aliases
    alias <alias[=]command>                      Create an alias for a command
    unalias <alias>                              Remove an alias

Help
    help [command]                               Get general help or help on a specific command
    help options                                 Get help on available options

Simple Story (for Ruby apps)

jdc target api.jd-app.com
jdc push ruby_app