Shell wrapper for the runcloud.io API https://runcloud.io/
Run installation command and follow the instructions:
git clone https://github.com/RunCloud-cdk/shell-api-wrapper.git rcdk && cd rcdk && chmod +x install.sh && ./install.sh
After the installation will be created a config directory named rcdkConfigs
in the $HOME/rcdk
directory.
Now you can run rcdk ping
to test the API connection.
The Runcloud API requires you to pass the server_id
on each request (in addition to the ping
command and some of the servers
commands).
Therefore it was decided that before you start working with the API it is better to initialize work with a specific server.
Run rcdk init
. The program will show the first page of server list and offer to choose one of them by entering server id
.
To show any page watch List of all your servers.
This function supporting only Ubuntu/Debian users with bash interpreter.
See GNU documentation for more info about bash completion.
After the server has been selected, you can start working with most of the features from the API:
- Create new system user
- Delete exists system user
- Get list of all system users
- Change passwd for a system user
- Add new server to Runcloud
- Delete exists server from Runcloud
- Check current server
- Show server hardware info
- List of all your servers
- Create a new database user
- Delete exists database user
- view one page of database users list
- Attach database user to database
- Revoke database user from database
- Change password for the database user
- Show list of domains for the web application
- Add new domain names for the web application
- Delete domain name from the web application by id
- Show info about SSL sertificate
- On SSL for the web application
- Update SSL for the web application
- Off SSL for the web application
- Add SSH public key to the system user of selected server
- Delete exists public key by id
- Show list of all pubic keys of the selected server
- Add or delete keys in store
rcdk sysusers create $name $password
parameter | Description | Required |
---|---|---|
name | Name of the system user. | yes |
password | Password for the system user. If leave blank this field then password will be generated automaticly. | no |
rcdk sysusers delete $name $id
parameter | Description | Required |
---|---|---|
name | Name of the system user. | yes |
id | ID of the system user. | yes |
rcdk sysusers list $string || rcdk sysusers list $number
parameter | Description | Required |
---|---|---|
string | Search string for the list. | yes |
number | The page number of the list. | yes |
rcdk sysusers passwd $id $password
parameter | Description | Required |
---|---|---|
id | ID of the system user. | yes |
password | Password for the system user. If leave blank this field then password will be generated automaticly. | no |
rcdk servers add $name $ip $provider
parameter | Description | Required |
---|---|---|
name | Server name. | yes |
ip | IP address of the new server. | yes |
provider | Hoster of the new server. | no |
rcdk servers delete $id
parameter | Description | Required |
---|---|---|
id | ID of the server. | yes |
rcdk servers info
rcdk servers check
rcdk servers list $string || rcdk servers list $number
parameter | Description | Required |
---|---|---|
string | Search string for the list. | yes |
number | The page number of the list. | yes |
rcdk services list
rcdk services $action $name
parameter | Description | Required |
---|---|---|
action | A command for a service like start , stop , restart or reload . |
yes |
name | The name of service, one of: nginx-rc , apache2-rc , mysql , supervisord , redis-server , memcached , beanstalkd . |
yes |
rcdk apps create
This command asks you for all the arguments.
rcdk apps delete $name $id
parameter | Description | Required |
---|---|---|
name | Name of the web application. | yes |
id | ID of the web application. | yes |
rcdk apps list $string || rcdk apps list $number
parameter | Description | Required |
---|---|---|
string | Search string for the list. | yes |
number | The page number of the list. | yes |
rcdk dbs create $name $collation
parameter | Description | Required |
---|---|---|
name | Name of the database. | yes |
collation | Collation of the database. | no |
rcdk dbs delete $name $id
parameter | Description | Required |
---|---|---|
name | Name of the database. | yes |
id | ID of the database. | no |
rcdk dbs list $string || rcdk dbs list $number
parameter | Description | Required |
---|---|---|
string | Search string for the list. | yes |
number | The page number of the list. | yes |
rcdk dbusers create $name $pass
parameter | Description | Required |
---|---|---|
name | Name of the database user. | yes |
pass | Password for the database user. If leave blank this field then password will be generated automaticly. | no |
rcdk dbusers delete $name $id
parameter | Description | Required |
---|---|---|
name | Name of the database user. | yes |
id | ID of the database user. | yes |
rcdk dbusers list $string || rcdk dbusers list $number
parameter | Description | Required |
---|---|---|
string | Search string for the list. | yes |
number | The page number of the list. | yes |
rcdk dbusers attach $name $id
parameter | Description | Required |
---|---|---|
name | Name of the database user. | yes |
id | ID of the database. | yes |
rcdk dbusers revoke $name $id
parameter | Description | Required |
---|---|---|
name | Name of the database user. | yes |
id | ID of the database. | yes |
rcdk dbusers passwd $id $pass
parameter | Description | Required |
---|---|---|
id | ID of the database user. | yes |
pass | Password for the database user. If leave blank this field then password will be generated automaticly. | no |
rcdk dns list $id
parameter | Description | Required |
---|---|---|
id | ID of the web application. | yes |
rcdk dns add $id $name_1 $name_n
parameter | Description | Required |
---|---|---|
id | ID of the web application. | yes |
name | New domain name for the application. | yes |
rcdk dns delete $app_id $domain_id
parameter | Description | Required |
---|---|---|
app_id | ID of the web application. | yes |
domain_id | ID of the domain name. | yes |
rcdk ssl info $id
parameter | Description | Required |
---|---|---|
id | ID of the web application. | yes |
rcdk ssl on $id
parameter | Description | Required |
---|---|---|
id | ID of the web application. | yes |
rcdk ssl update $app_id $ssl_id
parameter | Description | Required |
---|---|---|
app_id | ID of the web application. | yes |
ssl_id | ID of the ssl sertficate for the web application. | yes |
rcdk ssl off $app_id $ssl_id
parameter | Description | Required |
---|---|---|
app_id | ID of the web application. | yes |
ssl_id | ID of the ssl sertficate for the web application. | yes |
rcdk ssh add $label $name $pub_key
parameter | Description | Required |
---|---|---|
label | Label of this key in the web interface. | yes |
name | The name of the system user to which the public key will bound. | yes |
pub_key | Public key. WARNING: The key must be written in apostrophes!. | yes |
rcdk ssh delete $label $key_id
parameter | Description | Required |
---|---|---|
label | Label of this key in the web interface. | yes |
key_id | ID of the ssh key. | yes |
rcdk ssh list $string || rcdk ssh list $number
parameter | Description | Required |
---|---|---|
string | Search string for the list. | yes |
number | The page number of the list. | yes |
rcdk ssh store