Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 107 lines (73 sloc) 4.198 kb
7fda591 @pgodel initial commit
pgodel authored
1 # SGControlBundle
2
eb7bb59 @pgodel added shell instructions
pgodel authored
3 The SGControlBundle is a Symfony2 bundle that provides command line tools to interact with the ServerGrove Control Panel. It also provides an interactive shell.
7fda591 @pgodel initial commit
pgodel authored
4
5 The following command line tools are provided:
6
7 * API client Command Line Interface
8
9 The API client CLI allows to connect to the ServerGrove Control Panel through a HTTP API. To connect to the API you will
10 need to be a registered customer with access to the Control Panel and API, and you will need to enable API access in the
11 user profile.
12
13 ## Installation:
14
7df2ada @pgodel added deps and autoload instructions
pgodel authored
15 Download or clone the bundle. If you use deps file add it like this:
16
17 [SGControlBundle]
18 git=git://github.com/servergrove/SGControlBundle.git
19 target=/bundles/ServerGrove/Bundle/SGControlBundle
20
21 Add ServerGrove namespace to app/autoload.php:
22
23 $loader->registerNamespaces(array(
24 ...
25 'ServerGrove' => __DIR__.'/../vendor/bundles',
26 ...
27 ));
28
29
30 Enable it in your app/AppKernel.php
7fda591 @pgodel initial commit
pgodel authored
31
32 public function registerBundles()
33 {
34 $bundles = array(
35 ...
36
37 new ServerGrove\Bundle\SGControlBundle\SGControlBundle(),
38 );
39
40 ...
41 }
42
43
44 ## Configuration:
45
46 By default, the API client will use our demo API secret/key combination. This only lets you runs some tests against the
47 server but it won't allow you to access your account and servers.
48
49 You will need to enable API access in your user profile in https://control.servergrove.com/profile
50
51 Once you have the API key and secret, add it to app/config.yml:
52
53 parameters:
54 sgc_api.client.apiKey: your-key
55 sgc_api.client.apiSecret: your-secret
56
57
58 ## Usage:
59
60 ./console sgc:api:client call [args]
61
62 * call: call composed of namespace and action (ie. server/list)
63 * args: (optional) list of variables to send to the call (ie. serverId=abc123&isActive=0)
64
65 ## Example:
66
67 ./console sgc:api:client test/version
68 ./console sgc:api:client server/list
69 ./console sgc:api:client server/stop serverId=abc123
70
eb7bb59 @pgodel added shell instructions
pgodel authored
71 ## Interactive shell:
72
73 ./console sgc:shell
74
75 Commands:
b310471 @pgodel added shell instructions
pgodel authored
76
eb7bb59 @pgodel added shell instructions
pgodel authored
77 * help/h/? - list commands
78 * servers - list servers
410d1df @pgodel fixed list of commands
pgodel authored
79 * server [option] - selects a server from the servers list. option can be an numeric option from the list or a server name. A partial name can also be provided and it will select the first match
3b2d03b @pgodel fixed list of commands
pgodel authored
80 * exec cmd - executes a command in the selected server
410d1df @pgodel fixed list of commands
pgodel authored
81 * reboot [server] - reboots a server. [server] is optional. If not given it will use the selected server. It will ask for confirmation before proceding
82 * shutdown [server] - shuts down a server. [server] is optional. If not given it will use the selected server. It will ask for confirmation before proceding
83 * bootup [server] - boots up a server. [server] is optional. If not given it will use the selected server
eb7bb59 @pgodel added shell instructions
pgodel authored
84 * domains - list domains under selected server
410d1df @pgodel fixed list of commands
pgodel authored
85 * domain [option] - selects a domain from the domains list. option can be an numeric option from the list or a domain name. A partial name can also be provided and it will select the first match
eb7bb59 @pgodel added shell instructions
pgodel authored
86 * apps - list apps under selected server
410d1df @pgodel fixed list of commands
pgodel authored
87 * app [option] - selects a app from the apps list. option can be an numeric option from the list or a app name. A partial name can also be provided and it will select the first match
88 * restart [app] - restarts an application. [app] is optional. If not given it will use the selected app. It will ask for confirmation before proceding
89 * stop [app] - restarts an application. [app] is optional. If not given it will use the selected app. It will ask for confirmation before proceding
90 * start [app] - restarts an application. [app] is optional. If not given it will use the selected app
eb7bb59 @pgodel added shell instructions
pgodel authored
91 * . - runs the last command again
92 * x/q - resets internal selections
93 * exit/quit - exits shell
94
7fda591 @pgodel initial commit
pgodel authored
95 ## WARNING
96
97 **Notice:** The API is still under heavy development, so things MAY change. Please be aware of this.
98
99 ## More information:
100
fae17f6 @pgodel better link names
pgodel authored
101 * [List of available API calls and parameters](https://control.servergrove.com/docs/api)
102 * [ServerGrove Website](http://www.servergrove.com/)
103 * [ServerGrove Blog](http://blog.servergrove.com/)
104 * [ServerGrove Control Panel](https://control.servergrove.com/)
105 * [ServerGrove Knowledge Base](https://secure.servergrove.com/clients)
106 * [Follow ServerGrove @ Twitter](http://twitter.com/servergrove)
107 * [GitHub Downloads](http://github.com/servergrove)
Something went wrong with that request. Please try again.