(only supported verbs are shown for each endpoint)
Contents
Server objects represent the physical servers to which you want to deploy code or apply actions.
Attention
As of the current version, Elita does not do any provisioning (mainly because nobody has had time to implement it yet). Elita assumes that any server objects you create refer to machines accessible to the local salt installation (the name of the minion must match the name of the server object).
GET
/server
¶Returns list of available servers.
Example request:
$ curl -XGET '/server'
Example response
{
"servers": [
"server0",
"server1"
]
}
GET
/server/(string: server)
¶Returns detailed information about a particular server, including a list of gitdeploys (see: Gitdeploys).
Example request:
$ curl -XGET '/server/server0'
Example response
{
"created_datetime": "2014-01-27 20:23:58+00:00",
"environment": "production",
"gitdeploys": [ "MainGD" ],
"server_name": "server0",
"attributes": {}
}
PUT
/server
¶Parameters: |
|
---|
Create a server object.
Attention
Elita assumes that any server can be accessed via salt by name. For example, if you create a server object ‘web01’, you should be able to issue the following command successfully from the machine running Elita: .. sourcecode:: bash
$ salt ‘web01’ test.ping
Example request:
$ curl -XPUT '/server?name=web01&environment=production&existing=true'
DELETE
/server/(string: server_name)
¶Remove a server object. This does not remove the server from Salt.
Example request:
$ curl -XDELETE '/server/web01'
Environments are created using an attribute specified on the server object, used to logically group servers.
Note
Elita environments are entirely independent from Salt environments. They are calculated from the “environment” field on all available server objects.
GET
/server/environments
¶View a census of all available environments with a list of associated servers for each.
Example request:
$ curl -XGET '/server/environments'
Example response
{
"environments": {
"production": [
"server0",
"server1"
],
"testing": [
"testing0",
"testing1"
]
}
}