This resource represents a remote server to which Beanstalk should deploy code from a specified location in your Repository.
Every ReleaseServer belongs to a specific ServerEnvironment resource, that can have multiple servers at once. This allows deploying to a cluster of different servers simultaneously.
id | integer | Unique ID of Server. |
---|---|---|
account_id | integer | ID of the associated Account. |
repository_id | integer | ID of the repository that Server is deploying. |
server_environment_id | integer | ID of ServerEnvironment to which Server belongs. |
environment_name | string | Human-readable name of the associated ServerEnvironment. |
name | string | Human-readable name of Server. |
protocol | string | Protocol that should be use for deployments. See list of supported protocols below. |
local_path | string | A path in Repository that should be deployed. |
remote_path | string | A path on remote server to which files should be deployed. |
port | integer | A port on remote server to which Server should connect to deploy. |
remote_addr | string | An IP address (or URL) to which Server should connect to deploy. |
revision | string | A revision number (or hash ID) of the last commit deployed to the Server. |
shell_code | string | Shell code that will be executed on the remote server during deploy. SSH deployments only. |
bucket_name | string | Name of the Amazon S3 bucket to which server should deploy to. S3 deployments only. |
s3_reduced_redundancy | boolean | Use RRS option when deploying files to S3. S3 deployments only. |
s3_cloudfront_id | string | ID of the Amazon CloudFront Distribution that Beanstalk should invalidate after every deployment. S3 deployments only. |
pre_release_hook | string | A URL to which POST request with information will be sent at the beginning of every deployment. |
post_release_hook | string | A URL to which POST request with information will be sent at the end of every deployment. |
use_feat | boolean | Use FEAT FTP command when communicating with the remote server. FTP deployments only. Only change this if you know what you’re doing. |
use_active_mode | boolean | Use Active Mode when communicating with the remote server. FTP deployments only. Only change this if you know what you’re doing. |
parallel_uploading | boolean | Use multiple threads when uploading files to remote server. FTP and SFTP deployments only. Can speed-up deployments significantly, but can cause issues with some setups. |
exclude_paths | string | A list of paths from Repository that should be ignored during deployments. Multiple paths should be separated with new line characters. |
authenticate_by_key | boolean | Use SSH key authentication instead of login & password. |
public_key | string | Unique public SSH key of the server. Can be installed on the remote server to allow authentication by key. |
updated_at | datetime | Time when the server was last updated. |
created_at | datetime | Time when the server was first added to the system. |
name | string | Must be unique in specified ServerEnvironment. Must be no longer than 20 characters. Required on create. |
---|---|---|
protocol | string | See list of supported protocols below. Required on create. |
local_path | string | Required for FTP and SFTP deployments only. |
remote_path | string | Required on create for FTP and SFTP deployments only. |
port | integer | Required on create. |
remote_addr | string | Required on create. |
login | string | Required on create. |
password | string | Required on create unless authenticate_by_key is set to true. |
shell_code | string | Required on create for SSH deployments only. |
bucket_name | string | Required on create for S3 deployments only. |
s3_reduced_redundancy | boolean | Optional. S3 deployments only. |
s3_cloudfront_id | string | Optional. S3 deployments only. |
revision | string | Optional. |
pre_release_hook | string | Optional. |
post_release_hook | string | Optional. |
use_feat | boolean | Optional. Defaults to true. |
use_active_mode | boolean | Optional. Defaults to false. |
parallel_uploading | boolean | Optional. |
exclude_paths | string | Optional. |
authenticate_by_key | boolean | Optional. Defaults to false. |
ftp
sftp
shell
s3
cloud_files
dreamobjects
heroku
ReleaseServer is a model that contains connection settings used by Releases for deployments. Amount of Release Servers that you can create is limited by your account’s plan.
GET /api/{REPOSITORY_ID}/release_servers.json?environment_id={ENVIRONMENT_ID}
Click to expand…
json http-response[
{
"release_server": {
"public_key": "ssh-rsa AAAAB3...",
"name": "Softlayer 1",
"use_feat": true,
"remote_path": null,
"created_at": "2012/04/19 08:55:23 -0700",
"authenticate_by_key": false,
"exclude_paths": null,
"updated_at": "2012/04/19 08:55:24 -0700",
"port": 22,
"protocol": "shell",
"account_id": 253434,
"server_environment_id": 6345224,
"local_path": null,
"id": 7567876,
"use_active_mode": false,
"post_release_hook": "",
"revision": null,
"environment_name": "Staging",
"repository_id": 34567754,
"parallel_uploading": false,
"shell_code": "",
"remote_addr": "192.168.100.243",
"pre_release_hook": ""
}
}
]
GET /api/{REPOSITORY_ID}/release_servers.xml?environment_id={ENVIRONMENT_ID}
Click to expand…
xml http-response<?xml version="1.0" encoding="UTF-8"?>
<release-servers type="array">
<release-server>
<account-id type="integer">2444</account-id>
<authenticate-by-key type="boolean">false</authenticate-by-key>
<created-at type="datetime">2012-04-19T08:55:23-07:00</created-at>
<exclude-paths nil="true"/>
<id type="integer">7532566</id>
<local-path nil="true"/>
<name>Linode Server</name>
<parallel-uploading type="boolean">false</parallel-uploading>
<port type="integer">22</port>
<post-release-hook/>
<pre-release-hook/>
<protocol>shell</protocol>
<public-key>ssh-rsa ...</public-key>
<remote-addr>192.168.100.243</remote-addr>
<remote-path nil="true"/>
<repository-id type="integer">35435234</repository-id>
<revision nil="true"/>
<server-environment-id type="integer">634234</server-environment-id>
<shell-code/>
<updated-at type="datetime">2012-04-19T08:55:24-07:00</updated-at>
<use-active-mode type="boolean">false</use-active-mode>
<use-feat type="boolean">true</use-feat>
<environment-name>Staging</environment-name>
</release-server>
</release-servers>
GET /api/{REPOSITORY_ID}/release_servers/{RELEASE_SERVER_ID}.json
Click to expand…
json http-response{
"release_server": {
"public_key": "ssh-rsa AAAAB3...",
"name": "Softlayer 1",
"use_feat": true,
"remote_path": null,
"created_at": "2012/04/19 08:55:23 -0700",
"authenticate_by_key": false,
"exclude_paths": null,
"updated_at": "2012/04/19 08:55:24 -0700",
"port": 22,
"protocol": "shell",
"account_id": 253434,
"server_environment_id": 6345224,
"local_path": null,
"id": 7567876,
"use_active_mode": false,
"post_release_hook": "",
"revision": null,
"environment_name": "Staging",
"repository_id": 34567754,
"parallel_uploading": false,
"shell_code": "",
"remote_addr": "192.168.100.243",
"pre_release_hook": ""
}
}
GET /api/{REPOSITORY_ID}/release_servers/{RELEASE_SERVER_ID}.xml
Click to expand…
xml http-response<?xml version="1.0" encoding="UTF-8"?>
<release-server>
<account-id type="integer">2444</account-id>
<authenticate-by-key type="boolean">false</authenticate-by-key>
<created-at type="datetime">2012-04-19T08:55:23-07:00</created-at>
<exclude-paths nil="true"/>
<id type="integer">7532566</id>
<local-path nil="true"/>
<name>Linode Server</name>
<parallel-uploading type="boolean">false</parallel-uploading>
<port type="integer">22</port>
<post-release-hook/>
<pre-release-hook/>
<protocol>shell</protocol>
<public-key>ssh-rsa ...</public-key>
<remote-addr>192.168.100.243</remote-addr>
<remote-path nil="true"/>
<repository-id type="integer">35435234</repository-id>
<revision nil="true"/>
<server-environment-id type="integer">634234</server-environment-id>
<shell-code/>
<updated-at type="datetime">2012-04-19T08:55:24-07:00</updated-at>
<use-active-mode type="boolean">false</use-active-mode>
<use-feat type="boolean">true</use-feat>
<environment-name>Staging</environment-name>
</release-server>
See the list of writable attributes at the top of the page. Only attributes from the next example are required.
POST /api/{REPOSITORY_ID}/release_servers.json?environment_id={ENVIRONMENT_ID}
{
"release_server": {
"name": "Mac Pro",
"use_feat": false,
"remote_path": "/tmp/bla",
"authenticate_by_key": false,
"port": 22,
"protocol": "sftp",
"local_path": "/",
"use_active_mode": false,
"remote_addr": "127.0.0.1",
"pre_release_hook": "",
"post_release_hook": ""
}
}
Click to expand…
json http-response{
"release_server": {
"public_key": "ssh-rsa AAAAB3...",
"name": "Mac Pro",
"use_feat": false,
"remote_path": "/tmp/bla",
"created_at": "2012/04/19 08:55:23 -0700",
"authenticate_by_key": false,
"exclude_paths": null,
"updated_at": "2012/04/19 08:55:24 -0700",
"port": 22,
"protocol": "sftp",
"account_id": 253434,
"server_environment_id": 6345224,
"local_path": "/",
"id": 7567876,
"use_active_mode": false,
"post_release_hook": "",
"revision": null,
"environment_name": "Staging",
"repository_id": 34567754,
"parallel_uploading": false,
"shell_code": "",
"remote_addr": "127.0.0.1",
"pre_release_hook": ""
}
}
--OR IF INVALID--
{
"errors": ["Error message"]
}
POST /api/{REPOSITORY_ID}/release_servers.xml?environment_id={ENVIRONMENT_ID}
<?xml version="1.0" encoding="UTF-8"?>
<release_server>
<name>Rackspace Server</name>
<local_path>/trunk</local_path>
<remote_path>/var/www/my_site</remote_path>
<remote_addr>myftpserver.com</remote_addr>
<protocol>ftp</protocol>
<port>21</port>
<login>username</login>
<password>topsecret</password>
<pre-release-hook>https://somedomain.com/pre-deploy.php</pre-release-hook>
<post-release-hook>https://somedomain.com/post-deploy.php</post-release-hook>
</release_server>
Click to expand…
xml http-response<?xml version="1.0" encoding="UTF-8"?>
<release-server>
<account-id type="integer">2444</account-id>
<authenticate-by-key type="boolean">false</authenticate-by-key>
<created-at type="datetime">2012-04-19T08:55:23-07:00</created-at>
<exclude-paths nil="true"/>
<id type="integer">7532566</id>
<local-path>/trunk</local-path>
<name>Rackspace Server</name>
<parallel-uploading type="boolean">false</parallel-uploading>
<port type="integer">21</port>
<post-release-hook>https://somedomain.com/pre-deploy.php</post-release-hook>
<pre-release-hook>https://somedomain.com/post-deploy.php</post-release-hook>
<protocol>ftp</protocol>
<public-key>ssh-rsa ...</public-key>
<remote-addr>myftpserver.com</remote-addr>
<remote-path>/var/www/my_site</remote-path>
<repository-id type="integer">35435234</repository-id>
<revision nil="true"/>
<server-environment-id type="integer">634234</server-environment-id>
<shell-code/>
<updated-at type="datetime">2012-04-19T08:55:24-07:00</updated-at>
<use-active-mode type="boolean">false</use-active-mode>
<use-feat type="boolean">true</use-feat>
<environment-name>Staging</environment-name>
</release-server>
--OR IF INVALID--
<?xml version="1.0" encoding="UTF-8"?>
<errors>
<error>Remote path can't be blank</error>
</errors>
See the list of writable attributes at the top of the page. You only need to pass the attributes that you want to change.
PUT /api/{REPOSITORY_ID}/release_servers/{RELEASE_SERVER_ID}.json
{
"release_server": {
"name": "Moon"
}
}
Click to expand…
json http-responseHEAD 200 OK
--OR IF INVALID--
{
"errors": ["Error message"]
}
PUT /api/{REPOSITORY_ID}/release_servers/{RELEASE_SERVER_ID}.xml
<?xml version="1.0" encoding="UTF-8"?>
<release_server>
<port>22</port>
<post-release-hook>https://somedomain.com/post-deploy.php</post-release-hook>
</release_server>
Click to expand…
xml http-responseHEAD 200 OK
--OR IF INVALID--
<?xml version="1.0" encoding="UTF-8"?>
<errors>
<error>Remote path can't be blank</error>
</errors>
DELETE /api/{REPOSITORY_ID}/release_servers/{RELEASE_SERVER_ID}.json
Click to expand…
json http-responseHEAD 200 OK
DELETE /api/{REPOSITORY_ID}/release_servers/{RELEASE_SERVER_ID}.xml
Click to expand…
xml http-responseHEAD 200 OK