控制器
所有请求都通过 basic auth 进行验证,其中用户名为空,密码为控制器密钥。可以为事件流(在浏览器中允许通过JS来使用)选择把控制器密码作为密钥 URL 参数,你可以通过运行以下命令获取控制器密钥:
flynn -a controller env get AUTH_KEY
API 根路径是控制器的域,默认为:
https://controller.$CLUSTER_DOMAIN
应用
应用是进程的组成及其依赖和元数据的命名空间。https://flynn.io/schema/controller/app#
属性 | 类型 | 描述 |
---|---|---|
id | uuid string | 唯一标示 |
name | string matching ^[a-z\d]+(-[a-z\d]+)*$ | 应用名称 |
protected | boolean | 假如为true,当删除或归零时应用会被保护 |
meta | object | 客户端指定的元数据 |
strategy | string | |
release | uuid string | 唯一标示 |
deploy_timeout | integer | 部署超时时间(默认30秒) |
created_at | date-time string | 对象创建的时间 |
updated_at | date-time string | 对象最新更新时间 |
创建App
实例:—————————————————————请求————————————————————
POST /apps HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
{
"name": "my-app-1422557606845347930",
"protected": false
}
—————————————————————响应————————————————————
Content-Type: application/json
{
"id": "7406a4d71a0c43d3ac4b39f006cb0342",
"name": "my-app-1422557606845347930",
"protected": false,
"strategy": "all-at-once",
"created_at": "2015-01-29T18:53:26.845896Z",
"updated_at": "2015-01-29T18:53:26.845896Z"
}
获取App
实例:—————————————————————请求————————————————————
GET /apps/7406a4d71a0c43d3ac4b39f006cb0342 HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
—————————————————————响应————————————————————
Content-Type: application/json
{
"id": "7406a4d71a0c43d3ac4b39f006cb0342",
"name": "my-app-1422557606845347930",
"protected": false,
"strategy": "all-at-once",
"created_at": "2015-01-29T18:53:26.845896Z",
"updated_at": "2015-01-29T18:53:26.845896Z"
}
获取App列表
实例:—————————————————————请求————————————————————
GET /apps HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
—————————————————————响应————————————————————
Content-Type: application/json
{
[
{
"id": "7406a4d71a0c43d3ac4b39f006cb0342",
"name": "my-app-1422557606845347930",
"protected": false,
"strategy": "all-at-once",
"created_at": "2015-01-29T18:53:26.845896Z",
"updated_at": "2015-01-29T18:53:26.845896Z"
},
{
"id": "79b56ad29bac4cefb83c37965ae4ce1c",
"name": "dashboard",
"protected": true,
"strategy": "all-at-once",
"created_at": "2015-01-29T18:53:24.997991Z",
"updated_at": "2015-01-29T18:53:25.015618Z"
},
{
"id": "b6f62b8fda484f6e825484a668e161b7",
"name": "taffy",
"protected": true,
"strategy": "all-at-once",
"created_at": "2015-01-29T18:53:24.981366Z",
"updated_at": "2015-01-29T18:53:24.996193Z"
},
{
"id": "48a30977ae9c4b64ba33b773f1808915",
"name": "gitreceive",
"protected": true,
"strategy": "all-at-once",
"created_at": "2015-01-29T18:53:22.46581Z",
"updated_at": "2015-01-29T18:53:22.480289Z"
},
{
"id": "b1061d0a149a4a7498a70367c42d4013",
"name": "router",
"protected": true,
"strategy": "all-at-once",
"created_at": "2015-01-29T18:53:21.72534Z",
"updated_at": "2015-01-29T18:53:21.7391Z"
},
{
"id": "3a6f75c62c68489c82c91922d45429ad",
"name": "blobstore",
"protected": true,
"strategy": "all-at-once",
"created_at": "2015-01-29T18:53:21.415441Z",
"updated_at": "2015-01-29T18:53:21.722021Z"
},
{
"id": "eb11600643d24b5f8e18c0a42afe7f91",
"name": "postgres",
"protected": true,
"strategy": "all-at-once",
"created_at": "2015-01-29T18:53:20.053148Z",
"updated_at": "2015-01-29T18:53:20.06459Z"
},
{
"id": "a78f01dc04fb4fe3bccd85c05ae3fd73",
"name": "controller",
"protected": false,
"strategy": "all-at-once",
"created_at": "2015-01-29T18:53:20.013969Z",
"updated_at": "2015-01-29T18:53:20.049305Z"
}
]}
更新App
实例:—————————————————————请求————————————————————
GET /apps/7406a4d71a0c43d3ac4b39f006cb0342 HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
{
"id": "7406a4d71a0c43d3ac4b39f006cb0342",
"protected": false,
"meta": {
"bread": "with hemp"
}
}
—————————————————————响应————————————————————
Content-Type: application/json
{
"id": "7406a4d71a0c43d3ac4b39f006cb0342",
"name": "my-app-1422557606845347930",
"protected": false,
"meta": {
"bread": "with hemp"
},
"strategy": "all-at-once",
"created_at": "2015-01-29T18:53:26.845896Z",
"updated_at": "2015-01-29T18:53:26.845896Z"
}
删除App
实例:—————————————————————请求————————————————————
GET /apps/7406a4d71a0c43d3ac4b39f006cb0342 HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
—————————————————————响应————————————————————
Content-Type: text/plain; charset=utf-8
获取应用日志
属性 | 类型 | 描述 |
---|---|---|
follow | boolean | 当新日志产生时将它们发送出去 |
job_id | uuid string | 唯一标识 |
lines | integer | 从缓冲区要返回的行数 |
process_type | string | 只返回给定进程类型的 log |
以 JSON 格式来返回每个日志的每行条目
实例:—————————————————————请求————————————————————
GET /apps/7406a4d71a0c43d3ac4b39f006cb0342 HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
—————————————————————响应————————————————————
Content-Type: text/plain
{"host_id":"host","job_id":"host-9869a97a-ef83-4c39-91a2-ca3110f91079","msg":"t=2015-12-16T02:20:56+0000 lvl=info msg=\"request completed\" component=controller req_id=344d4b61-d437-437c-a3c4-e4aa015647cd status=200 duration=6.151899ms","process_type":"web","source":"app","stream":"stdout","timestamp":"2015-12-16T02:20:56.663589985Z"}
{"host_id":"host","job_id":"host-9869a97a-ef83-4c39-91a2-ca3110f91079","msg":"t=2015-12-16T02:20:56+0000 lvl=info msg=\"request started\" component=controller req_id=312895c5-4b45-4e65-b906-a46ee9bf3599 method=GET path=/apps/gitreceive/release client_ip=100.100.45.12","process_type":"web","source":"app","stream":"stdout","timestamp":"2015-12-16T02:20:56.664482277Z"}
{"host_id":"host","job_id":"host-9869a97a-ef83-4c39-91a2-ca3110f91079","msg":"t=2015-12-16T02:20:56+0000 lvl=info msg=\"request completed\" component=controller req_id=312895c5-4b45-4e65-b906-a46ee9bf3599 status=200 duration=1.274184ms","process_type":"web","source":"app","stream":"stdout","timestamp":"2015-12-16T02:20:56.66574836Z"}
{"host_id":"host","job_id":"host-9869a97a-ef83-4c39-91a2-ca3110f91079","msg":"t=2015-12-16T02:20:56+0000 lvl=info msg=\"request started\" component=controller req_id=cea0a133-93c9-4ff6-b532-cd719c888eb6 method=GET path=/apps/adcccdb4-b1a4-4209-a03a-762f4e021632 client_ip=100.100.45.12","process_type":"web","source":"app","stream":"stdout","timestamp":"2015-12-16T02:20:56.667514227Z"}
{"host_id":"host","job_id":"host-9869a97a-ef83-4c39-91a2-ca3110f91079","msg":"t=2015-12-16T02:20:56+0000 lvl=info msg=\"request completed\" component=controller req_id=cea0a133-93c9-4ff6-b532-cd719c888eb6 status=200 duration=1.132266ms","process_type":"web","source":"app","stream":"stdout","timestamp":"2015-12-16T02:20:56.66782991Z"}
{"host_id":"host","job_id":"host-9869a97a-ef83-4c39-91a2-ca3110f91079","msg":"t=2015-12-16T02:20:56+0000 lvl=info msg=\"request started\" req_id=7cce8772-bdad-485e-ac35-320465d70b6e component=controller method=GET path=/apps client_ip=100.100.45.12","process_type":"web","source":"app","stream":"stdout","timestamp":"2015-12-16T02:20:56.668616602Z"}
{"host_id":"host","job_id":"host-9869a97a-ef83-4c39-91a2-ca3110f91079","msg":"t=2015-12-16T02:20:56+0000 lvl=info msg=\"request completed\" req_id=7cce8772-bdad-485e-ac35-320465d70b6e component=controller status=200 duration=750.095µs","process_type":"web","source":"app","stream":"stdout","timestamp":"2015-12-16T02:20:56.669398265Z"}
{"host_id":"host","job_id":"host-9869a97a-ef83-4c39-91a2-ca3110f91079","msg":"t=2015-12-16T02:20:56+0000 lvl=info msg=\"request started\" component=controller req_id=99c6ab06-b4be-4996-8321-9f41847ac50c method=GET path=/apps/controller client_ip=100.100.45.12","process_type":"web","source":"app","stream":"stdout","timestamp":"2015-12-16T02:20:56.670213173Z"}
{"host_id":"host","job_id":"host-9869a97a-ef83-4c39-91a2-ca3110f91079","msg":"t=2015-12-16T02:20:56+0000 lvl=info msg=\"request completed\" component=controller req_id=99c6ab06-b4be-4996-8321-9f41847ac50c status=200 duration=492.8µs","process_type":"web","source":"app","stream":"stdout","timestamp":"2015-12-16T02:20:56.670729161Z"}
{"host_id":"host","job_id":"host-9869a97a-ef83-4c39-91a2-ca3110f91079","msg":"t=2015-12-16T02:20:56+0000 lvl=info msg=\"request started\" component=controller req_id=0738164d-2c09-41ae-a391-b550c0710fae method=GET path=/apps/f7064b9f-c968-4f16-be0e-f2efd1b2c7b7/log client_ip=100.100.45.12","process_type":"web","source":"app","stream":"stdout","timestamp":"2015-12-16T02:20:56.671577593Z"}
应用的日志流
属性 | 类型 | 描述 |
---|---|---|
follow | boolean | 当新日志产生时将它们发送出去 |
job_id | uuid string | 唯一标识 |
lines | integer | 从缓冲区要返回的行数 |
process_type | string | 只返回给定进程类型的 log |
实例:—————————————————————请求————————————————————
GET /apps/f7064b9f-c968-4f16-be0e-f2efd1b2c7b7/log?lines=10 HTTP/1.1
Accept: text/event-stream
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
—————————————————————响应————————————————————
Content-Type: text/plain
data: {"event":"message","data":{"host_id":"host","job_id":"host-9869a97a-ef83-4c39-91a2-ca3110f91079","msg":"t=2015-12-16T02:20:56+0000 lvl=info msg=\"request completed\" component=controller req_id=312895c5-4b45-4e65-b906-a46ee9bf3599 status=200 duration=1.274184ms","process_type":"web","source":"app","stream":"stdout","timestamp":"2015-12-16T02:20:56.66574836Z"}}
data: {"event":"message","data":{"host_id":"host","job_id":"host-9869a97a-ef83-4c39-91a2-ca3110f91079","msg":"t=2015-12-16T02:20:56+0000 lvl=info msg=\"request started\" component=controller req_id=cea0a133-93c9-4ff6-b532-cd719c888eb6 method=GET path=/apps/adcccdb4-b1a4-4209-a03a-762f4e021632 client_ip=100.100.45.12","process_type":"web","source":"app","stream":"stdout","timestamp":"2015-12-16T02:20:56.667514227Z"}}
data: {"event":"message","data":{"host_id":"host","job_id":"host-9869a97a-ef83-4c39-91a2-ca3110f91079","msg":"t=2015-12-16T02:20:56+0000 lvl=info msg=\"request completed\" component=controller req_id=cea0a133-93c9-4ff6-b532-cd719c888eb6 status=200 duration=1.132266ms","process_type":"web","source":"app","stream":"stdout","timestamp":"2015-12-16T02:20:56.66782991Z"}}
data: {"event":"message","data":{"host_id":"host","job_id":"host-9869a97a-ef83-4c39-91a2-ca3110f91079","msg":"t=2015-12-16T02:20:56+0000 lvl=info msg=\"request started\" req_id=7cce8772-bdad-485e-ac35-320465d70b6e component=controller method=GET path=/apps client_ip=100.100.45.12","process_type":"web","source":"app","stream":"stdout","timestamp":"2015-12-16T02:20:56.668616602Z"}}
data: {"event":"message","data":{"host_id":"host","job_id":"host-9869a97a-ef83-4c39-91a2-ca3110f91079","msg":"t=2015-12-16T02:20:56+0000 lvl=info msg=\"request completed\" req_id=7cce8772-bdad-485e-ac35-320465d70b6e component=controller status=200 duration=750.095µs","process_type":"web","source":"app","stream":"stdout","timestamp":"2015-12-16T02:20:56.669398265Z"}}
data: {"event":"message","data":{"host_id":"host","job_id":"host-9869a97a-ef83-4c39-91a2-ca3110f91079","msg":"t=2015-12-16T02:20:56+0000 lvl=info msg=\"request started\" component=controller req_id=99c6ab06-b4be-4996-8321-9f41847ac50c method=GET path=/apps/controller client_ip=100.100.45.12","process_type":"web","source":"app","stream":"stdout","timestamp":"2015-12-16T02:20:56.670213173Z"}}
data: {"event":"message","data":{"host_id":"host","job_id":"host-9869a97a-ef83-4c39-91a2-ca3110f91079","msg":"t=2015-12-16T02:20:56+0000 lvl=info msg=\"request completed\" component=controller req_id=99c6ab06-b4be-4996-8321-9f41847ac50c status=200 duration=492.8µs","process_type":"web","source":"app","stream":"stdout","timestamp":"2015-12-16T02:20:56.670729161Z"}}
data: {"event":"message","data":{"host_id":"host","job_id":"host-9869a97a-ef83-4c39-91a2-ca3110f91079","msg":"t=2015-12-16T02:20:56+0000 lvl=info msg=\"request started\" component=controller req_id=0738164d-2c09-41ae-a391-b550c0710fae method=GET path=/apps/f7064b9f-c968-4f16-be0e-f2efd1b2c7b7/log client_ip=100.100.45.12","process_type":"web","source":"app","stream":"stdout","timestamp":"2015-12-16T02:20:56.671577593Z"}}
data: {"event":"message","data":{"host_id":"host","job_id":"host-9869a97a-ef83-4c39-91a2-ca3110f91079","msg":"t=2015-12-16T02:20:56+0000 lvl=info msg=\"request completed\" component=controller req_id=0738164d-2c09-41ae-a391-b550c0710fae status=200 duration=7.132192ms","process_type":"web","source":"app","stream":"stdout","timestamp":"2015-12-16T02:20:56.678703917Z"}}
data: {"event":"message","data":{"host_id":"host","job_id":"host-9869a97a-ef83-4c39-91a2-ca3110f91079","msg":"t=2015-12-16T02:20:56+0000 lvl=info msg=\"request started\" req_id=2809d7e8-dcc6-4457-971e-307ebb5919e5 component=controller method=GET path=/apps/f7064b9f-c968-4f16-be0e-f2efd1b2c7b7/log client_ip=100.100.45.12","process_type":"web","source":"app","stream":"stdout","timestamp":"2015-12-16T02:20:56.679319917Z"}}
data: {"event":"eof"}
中间件
中间件是进程所使用的镜像的固定引用。https://flynn.io/schema/controller/artifact#
属性 | 类型 | 描述 |
---|---|---|
id | uuid string | 唯一标示 |
type | string | 中间件类型 |
uri | uri string | 用于获取中间件的uri |
created_at | date-time string | 对象的创建时间 |
创建中间件
实例:—————————————————————请求————————————————————
POST /artifacts HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
{
"type": "docker",
"uri": "https://registry.hub.docker.com/flynn/slugrunner?id=039222f9884412eb0667988933caeb0ed06da28f71e3dff540a61d13d0d85ae0"
}
—————————————————————响应————————————————————
Content-Type: application/json
{
"id": "4d365e6cdb1d47b8b98c9cd9a7b047fd",
"type": "docker",
"uri": "https://registry.hub.docker.com/flynn/slugrunner?id=039222f9884412eb0667988933caeb0ed06da28f71e3dff540a61d13d0d85ae0",
"created_at": "2015-01-29T18:53:26.889875Z"
}
获取中间件列表
实例:—————————————————————请求————————————————————
POST /artifacts HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
—————————————————————响应————————————————————
Content-Type: application/json
[
{
"id": "4d365e6cdb1d47b8b98c9cd9a7b047fd",
"type": "docker",
"uri": "https://registry.hub.docker.com/flynn/slugrunner?id=039222f9884412eb0667988933caeb0ed06da28f71e3dff540a61d13d0d85ae0",
"created_at": "2015-01-29T18:53:26.889875Z"
},
{
"id": "8b6548e25bc8477e905deee8a33eab2a",
"type": "docker",
"uri": "https://registry.hub.docker.com/flynn/dashboard?id=04b11c64060562a786281b73481049c7867658fc979d62c102e9a095fd73aadd",
"created_at": "2015-01-29T18:53:25.000437Z"
},
{
"id": "03f9d97aeab94f2b9bb23f4ade0eb270",
"type": "docker",
"uri": "https://registry.hub.docker.com/flynn/taffy?id=f9fec4547fcec06160a32da164cad79541b1e2edd96c4a55dee7fc64814a8b26",
"created_at": "2015-01-29T18:53:24.983953Z"
},
{
"id": "74010365c551463386bae39cf4ad0a47",
"type": "docker",
"uri": "https://registry.hub.docker.com/flynn/receiver?id=c2cfc8c7715c8300f3d0d1c318eb7a2fbeba6fd678a5a7d7ab8bd0f1659fad2f",
"created_at": "2015-01-29T18:53:22.469009Z"
},
{
"id": "73d37c1bdacd432f9e5c3cbe121c365e",
"type": "docker",
"uri": "https://registry.hub.docker.com/flynn/router?id=9ff4d42de0758dfe3278dbc0877e08b596c5f726cbb06819ff99fe4fdb448aa5",
"created_at": "2015-01-29T18:53:21.728047Z"
},
{
"id": "afe339ec9a0f46b28cfa5dff383e5179",
"type": "docker",
"uri": "https://registry.hub.docker.com/flynn/blobstore?id=75231ad60a567fa118cc003462612abc37a4646e5688ced2e7308f0951392f87",
"created_at": "2015-01-29T18:53:21.711605Z"
},
{
"id": "61b804fd0f9c42359ac8d8e3131d16bf",
"type": "docker",
"uri": "https://registry.hub.docker.com/flynn/postgresql?id=5cb8db666db41d1f86091c06d709f282295ded77e854241bef6ebee25fda09d0",
"created_at": "2015-01-29T18:53:20.055663Z"
},
{
"id": "1b7c8dcfd0b14755a452367e5f6723b6",
"type": "docker",
"uri": "https://registry.hub.docker.com/flynn/controller?id=e65f0f3d5e5853f2fc1f60758fb134d8ba7b746da0d8f4fdda473ff5a57fee6c",
"created_at": "2015-01-29T18:53:20.024582Z"
}
]
Formation
Formation 是一个正在运行的版本。https://flynn.io/schema/controller/formation#
属性 | 类型 | 描述 |
---|---|---|
app | uuid string | 唯一标示 |
release | uuid string | 唯一标示 |
processes | object | 每种进程所运行的进程数 |
created_at | date-time string | 对象的创建时间 |
updated_at | date-time string | 对象最新更新时间 |
更新 Formation
实例:—————————————————————请求————————————————————
PUT /apps/7406a4d71a0c43d3ac4b39f006cb0342/formations/689ce5b9ad1541ab975d51cba1e051d0 HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
{
"app": "7406a4d71a0c43d3ac4b39f006cb0342",
"release": "689ce5b9ad1541ab975d51cba1e051d0",
"processes": {
"foo": 1
}
}
—————————————————————响应————————————————————
Content-Type: application/json
{
"app": "7406a4d71a0c43d3ac4b39f006cb0342",
"release": "689ce5b9ad1541ab975d51cba1e051d0",
"processes": {
"foo": 1
},
"created_at": "2015-01-29T18:53:26.907195Z",
"updated_at": "2015-01-29T18:53:26.907195Z"
}
获取 Formation
实例:—————————————————————请求————————————————————
GET /apps/7406a4d71a0c43d3ac4b39f006cb0342/formations/689ce5b9ad1541ab975d51cba1e051d0 HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
—————————————————————响应————————————————————
Content-Type: application/json
{
"app": "7406a4d71a0c43d3ac4b39f006cb0342",
"release": "689ce5b9ad1541ab975d51cba1e051d0",
"processes": {
"foo": 1
},
"created_at": "2015-01-29T18:53:26.907195Z",
"updated_at": "2015-01-29T18:53:26.907195Z"
}
获取 Formation 列表
实例:—————————————————————请求————————————————————
GET /apps/7406a4d71a0c43d3ac4b39f006cb0342/formations HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
—————————————————————响应————————————————————
Content-Type: application/json
[
{
"app": "7406a4d71a0c43d3ac4b39f006cb0342",
"release": "689ce5b9ad1541ab975d51cba1e051d0",
"processes": {
"foo": 1
},
"created_at": "2015-01-29T18:53:26.907195Z",
"updated_at": "2015-01-29T18:53:26.907195Z"
}
]
删除 Formation
实例:—————————————————————请求————————————————————
DELETE /apps/7406a4d71a0c43d3ac4b39f006cb0342/formations/40202cf3b0e946a4b2c4db42a0c14194 HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
—————————————————————响应————————————————————
Content-Type: text/plain; charset=utf-8
扩展的 Expanded
Formation 是一个正在运行的版本。https://flynn.io/schema/controller/expanded_formation#
属性 | 类型 | 描述 |
---|---|---|
app | object | 应用是进程的组成及其依赖和元数据的命名空间 |
app.id | uuid string | 唯一标示 |
app.name | string matching ^[a-z\d]+(-[a-z\d]+)*$ | 应用名称 |
app.protected | boolean | 若为真,则应用可以受保护不被删除 |
app.meta | object | 用户自定义元数据 |
app.strategy | string | all-at-once one-by-one postgres discoverd-meta |
app.release | uuid string | 唯一标示 |
app.deploy_timeout | integer | 部署超时时间(默认30秒) |
app.created_at | date-time string | 对象创建时间 |
app.updated_at | date-time string | 对象更新时间 |
release | object | |
release.id | uuid string | 唯一标示 |
release.artifact | uuid string | 唯一标示 |
release.meta | object | 用户自定义元数据 |
release.env | object | 环境变量 |
release.processes | object | |
release.created_at | date-time string | 对象创建时间 |
artifact | object | 中间件是进程所使用的镜像的固定引用 |
artifact.id | uuid string | 唯一标示 |
artifact.type | string | docker |
artifact.uri | uri string | 唯一标示 |
artifact.created_at | date-time string | 对象的创建时间 |
processes | object | 每种进程所运行的进程数 |
updated_at | date-time string | 对象最新更新时间 |
获取扩展的 formation
实例:—————————————————————请求————————————————————
GET /apps/adcccdb4-b1a4-4209-a03a-762f4e021632/formations/47154f8c-a604-469d-ae6a-e431990ddee8?expand=true HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
—————————————————————响应————————————————————
Content-Type: application/json
{
"app": {
"id": "adcccdb4-b1a4-4209-a03a-762f4e021632",
"name": "my-app-1450232456657062340",
"meta": null
},
"release": {
"id": "47154f8c-a604-469d-ae6a-e431990ddee8",
"artifact": "c1889f55-c244-43ce-af70-ead357daa6ec",
"env": {
"some": "info"
},
"processes": {
"foo": {
"cmd": [
"ls",
"-l"
],
"env": {
"BAR": "baz"
},
"resources": {
"max_fd": {
"request": 10000,
"limit": 10000
},
"memory": {
"request": 1073741824,
"limit": 1073741824
}
}
}
}
},
"artifact": {
"id": "c1889f55-c244-43ce-af70-ead357daa6ec",
"type": "docker",
"uri": "https://dl.flynn.io/tuf?name=flynn/slugrunner&id=dc1dadc66c31a1957bad101a22c4b607b2dd4f8f42ae5593ec28f3eef45e7b97"
},
"processes": {
"foo": 1
},
"updated_at": "2015-12-16T02:21:06.748757Z"
}
获取运行的 formation 列表
实例:—————————————————————请求————————————————————
GET /formations?active=true HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
—————————————————————响应————————————————————
Content-Type: application/json
[
{
"app": {
"id": "adcccdb4-b1a4-4209-a03a-762f4e021632",
"name": "my-app-1450232456657062340",
"meta": null
},
"release": {
"id": "47154f8c-a604-469d-ae6a-e431990ddee8",
"artifact": "c1889f55-c244-43ce-af70-ead357daa6ec",
"env": {
"some": "info"
},
"processes": {
"foo": {
"cmd": [
"ls",
"-l"
],
"env": {
"BAR": "baz"
},
"resources": {
"max_fd": {
"request": 10000,
"limit": 10000
},
"memory": {
"request": 1073741824,
"limit": 1073741824
}
}
}
}
},
"artifact": {
"id": "c1889f55-c244-43ce-af70-ead357daa6ec",
"type": "docker",
"uri": "https://dl.flynn.io/tuf?name=flynn/slugrunner&id=dc1dadc66c31a1957bad101a22c4b607b2dd4f8f42ae5593ec28f3eef45e7b97"
},
"processes": {
"foo": 1
},
"updated_at": "2015-12-16T02:21:06.748757Z"
},
{
"app": {
"id": "28a8aed1-a50d-446e-b4ad-38ca3e95fb8f",
"name": "status",
"meta": null
},
"release": {
"id": "fff9dd4b-9f38-4f71-b3c5-5cd5fc19d31a",
"artifact": "e88714df-27b5-40aa-900e-717384fddcdd",
"env": {
"AUTH_KEY": "44335767c99fb93b23c9a1500bf1ebeb"
},
"processes": {
"web": {
"ports": [
{
"port": 80,
"proto": "tcp",
"service": {
"name": "status-web",
"create": true
}
}
],
"resources": {
"max_fd": {
"request": 10000,
"limit": 10000
},
"memory": {
"request": 1073741824,
"limit": 1073741824
}
}
}
}
},
"artifact": {
"id": "e88714df-27b5-40aa-900e-717384fddcdd",
"type": "docker",
"uri": "https://dl.flynn.io/tuf?name=flynn/status&id=33c003b37b2919a841d6e14a6335ff440607957efeb2e9022dce05a36f86203f"
},
"processes": {
"web": 1
},
"updated_at": "2015-12-16T02:20:50.513318Z"
},
{
"app": {
"id": "52e4cac9-3e4a-42ab-8b87-b714403aafc6",
"name": "dashboard",
"meta": null
},
"release": {
"id": "93f1f03e-30c4-4c1f-8c4b-7c0c7e295421",
"artifact": "ec791440-fa5b-4d8e-903a-94999f634ea1",
"env": {
"APP_NAME": "dashboard",
"CA_CERT": "-----BEGIN CERTIFICATE-----\nMIIDBDCCAe6gAwIBAgIRAP6BP9TQKrq0l1CCcSI4gb4wCwYJKoZIhvcNAQELMC0x\nDjAMBgNVBAoTBUZseW5uMRswGQYDVQQLExJGbHlubiBFcGhlbWVyYWwgQ0EwHhcN\nMTUxMjE2MDIyMDQxWhcNMjAxMjE0MDIyMDQxWjAtMQ4wDAYDVQQKEwVGbHlubjEb\nMBkGA1UECxMSRmx5bm4gRXBoZW1lcmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOC\nAQ8AMIIBCgKCAQEAn+KUccUSVeWoJZTlOxqaiXacGECGAPETxfmnL9ep1rA/4DWi\n2OTpZoeSFdyL1yV5KJxPkq6XMNyl/BR72SOomCmoFRnZzDih//+gfuJAFVGaF1j9\nFOIX+VyO8jyFzqk2vZg9R+ncRyFgjEgpHn0gDdt4WLWDxPpfFMClEZU6Mpu02ngj\n1kmlNgzajl71qhhKtrv3W7ACKh6O3fMSBg4n/ZiVnVQjdkejHskV5R43FH4bpZzP\nhb82rI6FNBNOCKqwbQ/AdGGVvJSzXPypvzCMkGghhx8pckoZw7DONXhSojfIO6Kt\nlxUYO1Odmnb+nyJjxGyidSperhfm+CuSFPn2BwIDAQABoyMwITAOBgNVHQ8BAf8E\nBAMCAAYwDwYDVR0TAQH/BAUwAwEB/zALBgkqhkiG9w0BAQsDggEBAGvEqq1ko+pE\nS5RBHmTWW6mJom9rA+aii9n88lMhbdjikeVFkQkH6Qi8zR5O4hCdDUC4qYUp+rIF\nZ4XZ9Ogl4CcR1gEPGu1KX2EnjVKloS1LThugCuP5YJgQ5qoMsQs681s1ZpPd/0gh\ntjASQy1Y72wY1SxVWqJzkuzf8mMDg52I4wwD9Eif2zq1/+sJa9mdilhvd0Wp+hDV\n6qN6xbH65V2VKwDrkD2p7CIn3NmknYhmw+obezqRkSl6N5Is/QPVg59bOu0evWfS\nDyaOehm1EmmRVehNj8IR0noFwUMbIASnpTescLd4Nz9pEjbgHQ+m6Swe8hnaZ3dd\n1TvxABm/4VY=\n-----END CERTIFICATE-----\n",
"CONTROLLER_DOMAIN": "controller.dev.localflynn.com",
"CONTROLLER_KEY": "s3cr3t",
"DEFAULT_ROUTE_DOMAIN": "dev.localflynn.com",
"LOGIN_TOKEN": "c8414bceb41bd679535c76f87472a8c2",
"SECURE_COOKIES": "true",
"SESSION_SECRET": "f180d52702a70f23a5eb6b1d87d5ab3a",
"URL": "https://dashboard.dev.localflynn.com"
},
"processes": {
"web": {
"ports": [
{
"port": 80,
"proto": "tcp",
"service": {
"name": "dashboard-web",
"create": true,
"check": {
"type": "http",
"status.omitempty": 0
}
}
}
],
"resources": {
"max_fd": {
"request": 10000,
"limit": 10000
},
"memory": {
"request": 1073741824,
"limit": 1073741824
}
}
}
}
},
"artifact": {
"id": "ec791440-fa5b-4d8e-903a-94999f634ea1",
"type": "docker",
"uri": "https://dl.flynn.io/tuf?name=flynn/dashboard&id=d602235982d4d3e4a75253aae15f5ced25d2a6b3585518b644788ac5f0f943ec"
},
"processes": {
"web": 1
},
"updated_at": "2015-12-16T02:20:50.47223Z"
},
{
"app": {
"id": "3ccdfb02-1dfb-4148-9ade-caa9ac918947",
"name": "logaggregator",
"meta": null
},
"release": {
"id": "d755489a-89ce-4c8c-b717-73d5589bab41",
"artifact": "08d14942-65c0-456e-b1ef-e7d46717dcd4",
"processes": {
"app": {
"cmd": [
"-logaddr",
":514",
"-apiaddr",
":80"
],
"ports": [
{
"port": 80,
"proto": "tcp"
},
{
"port": 514,
"proto": "tcp"
}
],
"resources": {
"max_fd": {
"request": 10000,
"limit": 10000
},
"memory": {
"request": 1073741824,
"limit": 1073741824
}
}
}
}
},
"artifact": {
"id": "08d14942-65c0-456e-b1ef-e7d46717dcd4",
"type": "docker",
"uri": "https://dl.flynn.io/tuf?name=flynn/logaggregator&id=cd30beb1606288f61eae7a4fe83ad3652689e644d9bb3e8bc10ca22d8ca0652b"
},
"processes": {
"app": 1
},
"updated_at": "2015-12-16T02:20:50.392915Z"
},
{
"app": {
"id": "86750e3a-927f-4146-8651-4c8b7cc2de01",
"name": "gitreceive",
"meta": null
},
"release": {
"id": "ea333a70-5971-467a-ba92-1d2e724db07f",
"artifact": "1a5bf802-3337-48b3-b812-b994f1cde371",
"env": {
"CONTROLLER_KEY": "s3cr3t",
"SLUGBUILDER_IMAGE_URI": "https://dl.flynn.io/tuf?name=flynn/slugbuilder&id=304a939ca74764b7e356133d7559cc245207deca8c65e782d4a043f14a566cae",
"SLUGRUNNER_IMAGE_URI": "https://dl.flynn.io/tuf?name=flynn/slugrunner&id=dc1dadc66c31a1957bad101a22c4b607b2dd4f8f42ae5593ec28f3eef45e7b97"
},
"processes": {
"app": {
"ports": [
{
"port": 0,
"proto": "tcp",
"service": {
"name": "gitreceive",
"create": true
}
}
],
"resources": {
"max_fd": {
"request": 10000,
"limit": 10000
},
"memory": {
"request": 1073741824,
"limit": 1073741824
}
}
}
}
},
"artifact": {
"id": "1a5bf802-3337-48b3-b812-b994f1cde371",
"type": "docker",
"uri": "https://dl.flynn.io/tuf?name=flynn/gitreceive&id=426e13b19a91af29a373f59d7edae7e54fe9d035961738d342e4b2c001027cde"
},
"processes": {
"app": 1
},
"updated_at": "2015-12-16T02:20:47.071423Z"
},
{
"app": {
"id": "aaae4e4b-dc79-4753-bc99-71e40c7d24dd",
"name": "router",
"meta": null
},
"release": {
"id": "c8268dcf-8f16-48e5-9c40-797a399dac99",
"artifact": "48953db6-1c0a-4af2-b687-7fe6971fcf84",
"env": {
"COOKIE_KEY": "7AaXi7KZDeWu4FotDN+7wi6RbHWywW6ClN2qap78cSg=",
"DATABASE_URL": "postgres://975487bc5a45fc80ade5765db668d873:46aabd4df6f39a1a23e63d9a76dece78@leader.postgres.discoverd:5432/6e63ce03061c8788f766994d9a9be92a",
"FLYNN_POSTGRES": "postgres",
"PGDATABASE": "6e63ce03061c8788f766994d9a9be92a",
"PGHOST": "leader.postgres.discoverd",
"PGPASSWORD": "46aabd4df6f39a1a23e63d9a76dece78",
"PGUSER": "975487bc5a45fc80ade5765db668d873",
"TLSCERT": "-----BEGIN CERTIFICATE-----\nMIIDSjCCAjSgAwIBAgIQDH8zACle7B+pqJB3QfwthDALBgkqhkiG9w0BAQswLTEO\nMAwGA1UEChMFRmx5bm4xGzAZBgNVBAsTEkZseW5uIEVwaGVtZXJhbCBDQTAeFw0x\nNTEyMTYwMjIwNDJaFw0yMDEyMTQwMjIwNDJaMC0xDjAMBgNVBAoTBUZseW5uMRsw\nGQYDVQQDExJkZXYubG9jYWxmbHlubi5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IB\nDwAwggEKAoIBAQC3NsEp+fYsbgr94cOBVnSK3ZcHBobwcCdzNvNqh6y1V9wn7x4C\nS6Rk0pn1Zz/FS1F+uA8KMVUzwWCCSl/jW4BNAqbLbVi4I5oap8mCDQDt+MDPZyn5\noOCn6vj5OCJXva3RmhJRocF88oXcH4lXWUyfKMOb+0/+tRC7lg5gqBxnvkiJrW7D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YTIcOxPG9bYZ+VAD+GIEraT+boD28Z1DZKgJUABylYnFkIxBnAS6i\nzwaxAoGAa3TWYsK0VUrn1EwlI9zzCLW8myjzyPLgpEQ6264ETNSw4K42M2fthcS4\nzlVMrPJ5yhftxCkxbXNFp74lt5Nhryv9K3RWdnL6aXoxR4juhfXBPUBPK+bk/g6F\nohfHj/PeDJFBe0MWC1Q4x7jbeHgqXQ9q7mun+9xH8ZziMdknHc4=\n-----END RSA PRIVATE KEY-----\n"
},
"processes": {
"app": {
"cmd": [
"-http-port",
"80",
"-https-port",
"443",
"-tcp-range-start",
"3000",
"-tcp-range-end",
"3500"
],
"omni": true,
"host_network": true,
"resources": {
"max_fd": {
"request": 10000,
"limit": 10000
},
"memory": {
"request": 1073741824,
"limit": 1073741824
}
}
}
}
},
"artifact": {
"id": "48953db6-1c0a-4af2-b687-7fe6971fcf84",
"type": "docker",
"uri": "https://dl.flynn.io/tuf?name=flynn/router&id=35dd76cf940ed67fdb4f373f79fc79dda327a0fb36d3dffb3894cb5f981b4a21"
},
"processes": {
"app": 1
},
"updated_at": "2015-12-16T02:20:47.037485Z"
},
{
"app": {
"id": "0b5fb9b4-af2b-462e-aaca-cc64591573e5",
"name": "blobstore",
"meta": null
},
"release": {
"id": "53815de9-8a78-4ab1-909e-a465242f57e7",
"artifact": "a436a3d6-a2c5-430e-961d-96518dacddff",
"env": {
"DATABASE_URL": "postgres://8a4906b3587c5faabef321d34936ac3a:6ac0c933a4abba2a2f8ec0e87ccb8f68@leader.postgres.discoverd:5432/d2f1b01c72f997dc2dbc0e1bc6c4c6ec",
"FLYNN_POSTGRES": "postgres",
"PGDATABASE": "d2f1b01c72f997dc2dbc0e1bc6c4c6ec",
"PGHOST": "leader.postgres.discoverd",
"PGPASSWORD": "6ac0c933a4abba2a2f8ec0e87ccb8f68",
"PGUSER": "8a4906b3587c5faabef321d34936ac3a"
},
"processes": {
"web": {
"ports": [
{
"port": 80,
"proto": "tcp"
}
],
"resources": {
"max_fd": {
"request": 10000,
"limit": 10000
},
"memory": {
"request": 1073741824,
"limit": 1073741824
}
}
}
}
},
"artifact": {
"id": "a436a3d6-a2c5-430e-961d-96518dacddff",
"type": "docker",
"uri": "https://dl.flynn.io/tuf?name=flynn/blobstore&id=8b27756a551d5dd5e29181209b842c71288494d2fd7aded04fe7608c74bf4f9c"
},
"processes": {
"web": 1
},
"updated_at": "2015-12-16T02:20:46.608041Z"
},
{
"app": {
"id": "f7064b9f-c968-4f16-be0e-f2efd1b2c7b7",
"name": "controller",
"meta": null
},
"release": {
"id": "9afcffd7-6278-47c9-a2f0-1326b42b4a03",
"artifact": "c8400666-26d9-493f-9630-3d34045f8498",
"env": {
"AUTH_KEY": "s3cr3t",
"CA_CERT": "-----BEGIN CERTIFICATE-----\nMIIDBDCCAe6gAwIBAgIRAP6BP9TQKrq0l1CCcSI4gb4wCwYJKoZIhvcNAQELMC0x\nDjAMBgNVBAoTBUZseW5uMRswGQYDVQQLExJGbHlubiBFcGhlbWVyYWwgQ0EwHhcN\nMTUxMjE2MDIyMDQxWhcNMjAxMjE0MDIyMDQxWjAtMQ4wDAYDVQQKEwVGbHlubjEb\nMBkGA1UECxMSRmx5bm4gRXBoZW1lcmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOC\nAQ8AMIIBCgKCAQEAn+KUccUSVeWoJZTlOxqaiXacGECGAPETxfmnL9ep1rA/4DWi\n2OTpZoeSFdyL1yV5KJxPkq6XMNyl/BR72SOomCmoFRnZzDih//+gfuJAFVGaF1j9\nFOIX+VyO8jyFzqk2vZg9R+ncRyFgjEgpHn0gDdt4WLWDxPpfFMClEZU6Mpu02ngj\n1kmlNgzajl71qhhKtrv3W7ACKh6O3fMSBg4n/ZiVnVQjdkejHskV5R43FH4bpZzP\nhb82rI6FNBNOCKqwbQ/AdGGVvJSzXPypvzCMkGghhx8pckoZw7DONXhSojfIO6Kt\nlxUYO1Odmnb+nyJjxGyidSperhfm+CuSFPn2BwIDAQABoyMwITAOBgNVHQ8BAf8E\nBAMCAAYwDwYDVR0TAQH/BAUwAwEB/zALBgkqhkiG9w0BAQsDggEBAGvEqq1ko+pE\nS5RBHmTWW6mJom9rA+aii9n88lMhbdjikeVFkQkH6Qi8zR5O4hCdDUC4qYUp+rIF\nZ4XZ9Ogl4CcR1gEPGu1KX2EnjVKloS1LThugCuP5YJgQ5qoMsQs681s1ZpPd/0gh\ntjASQy1Y72wY1SxVWqJzkuzf8mMDg52I4wwD9Eif2zq1/+sJa9mdilhvd0Wp+hDV\n6qN6xbH65V2VKwDrkD2p7CIn3NmknYhmw+obezqRkSl6N5Is/QPVg59bOu0evWfS\nDyaOehm1EmmRVehNj8IR0noFwUMbIASnpTescLd4Nz9pEjbgHQ+m6Swe8hnaZ3dd\n1TvxABm/4VY=\n-----END CERTIFICATE-----\n",
"DATABASE_URL": "postgres://df60a79e03b92c3157aaad47dab10278:623f1831ed89cd811ea1da0fb985bd81@leader.postgres.discoverd:5432/33c5b220c9eed7307d65a2b367236d10",
"DEFAULT_ROUTE_DOMAIN": "dev.localflynn.com",
"FLYNN_POSTGRES": "postgres",
"NAME_SEED": "e53b1785be43a8569707",
"PGDATABASE": "33c5b220c9eed7307d65a2b367236d10",
"PGHOST": "leader.postgres.discoverd",
"PGPASSWORD": "623f1831ed89cd811ea1da0fb985bd81",
"PGUSER": "df60a79e03b92c3157aaad47dab10278"
},
"processes": {
"scheduler": {
"cmd": [
"scheduler"
],
"ports": [
{
"port": 0,
"proto": "tcp"
}
],
"omni": true,
"service": "controller-scheduler",
"resurrect": true,
"resources": {
"max_fd": {
"request": 10000,
"limit": 10000
},
"memory": {
"request": 1073741824,
"limit": 1073741824
}
}
},
"web": {
"cmd": [
"controller"
],
"ports": [
{
"port": 80,
"proto": "tcp"
}
],
"resurrect": true,
"resources": {
"max_fd": {
"request": 10000,
"limit": 10000
},
"memory": {
"request": 1073741824,
"limit": 1073741824
}
}
},
"worker": {
"cmd": [
"worker"
],
"ports": [
{
"port": 0,
"proto": "tcp"
}
],
"resources": {
"max_fd": {
"request": 10000,
"limit": 10000
},
"memory": {
"request": 1073741824,
"limit": 1073741824
}
}
}
}
},
"artifact": {
"id": "c8400666-26d9-493f-9630-3d34045f8498",
"type": "docker",
"uri": "https://dl.flynn.io/tuf?name=flynn/controller&id=38242063cc75f2f6e3cfc15ce44899d103191c0be9b11403e44ee4bf4749db72"
},
"processes": {
"scheduler": 1,
"web": 1,
"worker": 1
},
"updated_at": "2015-12-16T02:20:44.205169Z"
},
{
"app": {
"id": "4940a4fe-3acc-4be7-aa97-7c3f982ba552",
"name": "discoverd",
"meta": null
},
"release": {
"id": "dd6a3a63-a920-4954-8a0b-7f6e9e4e1b79",
"artifact": "b2b4c646-aef0-4b3b-a501-cd282c31299e",
"env": {
"DISCOVERD": "none",
"DISCOVERD_PEERS": "10.0.2.15:1111,"
},
"processes": {
"app": {
"ports": [
{
"port": 1111,
"proto": "tcp"
},
{
"port": 53,
"proto": "tcp"
}
],
"data": true,
"omni": true,
"host_network": true,
"service": "discoverd",
"resurrect": true,
"resources": {
"max_fd": {
"request": 10000,
"limit": 10000
},
"memory": {
"request": 1073741824,
"limit": 1073741824
}
}
}
}
},
"artifact": {
"id": "b2b4c646-aef0-4b3b-a501-cd282c31299e",
"type": "docker",
"uri": "https://dl.flynn.io/tuf?name=flynn/discoverd&id=da0bd1401a6df09efb904a852992cd3a19b657223347bad6b427350e52c254a4"
},
"processes": {
"app": 1
},
"updated_at": "2015-12-16T02:20:44.193653Z"
},
{
"app": {
"id": "291b591e-ea67-4393-9dd8-f8b8f79ea34c",
"name": "flannel",
"meta": null
},
"release": {
"id": "ce17ef61-be09-4f60-b12d-d8aa87eb0a82",
"artifact": "172410eb-4e75-4597-a366-efe596b0af27",
"env": {
"DISCOVERD": "none"
},
"processes": {
"app": {
"ports": [
{
"port": 5002,
"proto": "tcp"
}
],
"omni": true,
"host_network": true,
"resurrect": true,
"resources": {
"max_fd": {
"request": 10000,
"limit": 10000
},
"memory": {
"request": 1073741824,
"limit": 1073741824
}
}
}
}
},
"artifact": {
"id": "172410eb-4e75-4597-a366-efe596b0af27",
"type": "docker",
"uri": "https://dl.flynn.io/tuf?name=flynn/flannel&id=7d6c9acf4dc854210cc753c6a8c889899200b35fd45f50fb35d1bb9189c92510"
},
"processes": {
"app": 1
},
"updated_at": "2015-12-16T02:20:44.170687Z"
},
{
"app": {
"id": "2b18fac0-cb75-4243-ba0e-1a96d5e2ddda",
"name": "postgres",
"meta": null
},
"release": {
"id": "6244ff18-44a3-4db1-a0d4-ceab0abded24",
"artifact": "e3e69c33-dd0c-4381-b9a9-30cf0c417ce7",
"env": {
"FLYNN_POSTGRES": "postgres",
"PGDATABASE": "postgres",
"PGHOST": "leader.postgres.discoverd",
"PGPASSWORD": "2b12bf3d5a0bfae0ed5723947e21af7b",
"PGUSER": "flynn"
},
"processes": {
"postgres": {
"cmd": [
"postgres"
],
"env": {
"SINGLETON": "true"
},
"ports": [
{
"port": 5432,
"proto": "tcp"
}
],
"data": true,
"service": "postgres",
"resurrect": true,
"resources": {
"max_fd": {
"request": 10000,
"limit": 10000
},
"memory": {
"request": 1073741824,
"limit": 1073741824
}
}
},
"web": {
"cmd": [
"api"
],
"ports": [
{
"port": 80,
"proto": "tcp"
}
],
"resources": {
"max_fd": {
"request": 10000,
"limit": 10000
},
"memory": {
"request": 1073741824,
"limit": 1073741824
}
}
}
}
},
"artifact": {
"id": "e3e69c33-dd0c-4381-b9a9-30cf0c417ce7",
"type": "docker",
"uri": "https://dl.flynn.io/tuf?name=flynn/postgresql&id=7447010d0a300f45d6785bb6cef4858500821d7afcb8febaabefbe55bf03fd0f"
},
"processes": {
"postgres": 1,
"web": 1
},
"updated_at": "2015-12-16T02:20:44.152134Z"
}
]
部署
https://flynn.io/schema/controller/deployment#
属性 | 类型 | 描述 |
---|---|---|
id | uuid string | 唯一标示 |
app | uuid string | 唯一标示 |
old_release | object | 唯一标示 |
new_release | date-time string | 唯一标示 |
status | date-time string | pending running complete failed |
strategy | uuid string | all-at-once one-by-one postgres discoverd-meta |
processes | uuid string | 每种进程运行的进程数 |
deploy_timeout | integer | 部署超时时间(默认30秒) |
created_at | date-time string | 对象的创建时间 |
finished_at | date-time string | |
name | string | null |
url | url string | null |
创建部署
实例:—————————————————————请求————————————————————
POST /apps/7406a4d71a0c43d3ac4b39f006cb0342/deploy HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
{
"id": "40202cf3b0e946a4b2c4db42a0c14194"
}
—————————————————————响应————————————————————
Content-Type: application/json
{
"id": "ccef998b56374bca8d4c402c655b4534",
"app": "7406a4d71a0c43d3ac4b39f006cb0342",
"old_release": "689ce5b9ad1541ab975d51cba1e051d0",
"new_release": "40202cf3b0e946a4b2c4db42a0c14194",
"strategy": "all-at-once",
"created_at": "2015-01-29T18:53:26.927187Z"
}
获取部署
实例:—————————————————————请求————————————————————
GET /deployments/aab1ee14-776d-4ba4-979b-1b4bda2d9b35 HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
—————————————————————响应————————————————————
Content-Type: application/json
{
"id": "aab1ee14-776d-4ba4-979b-1b4bda2d9b35",
"app": "adcccdb4-b1a4-4209-a03a-762f4e021632",
"old_release": "47154f8c-a604-469d-ae6a-e431990ddee8",
"new_release": "77e9e956-ecf9-427f-a031-222c2f394fb8",
"strategy": "all-at-once",
"status": "pending",
"processes": {
"foo": 1
},
"deploy_timeout": 30,
"created_at": "2015-12-16T02:21:16.782263Z"
}
列出所有部署
实例:—————————————————————请求————————————————————
GET /apps/adcccdb4-b1a4-4209-a03a-762f4e021632/deployments HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
—————————————————————响应————————————————————
Content-Type: application/json
[
{
"id": "aab1ee14-776d-4ba4-979b-1b4bda2d9b35",
"app": "adcccdb4-b1a4-4209-a03a-762f4e021632",
"old_release": "47154f8c-a604-469d-ae6a-e431990ddee8",
"new_release": "77e9e956-ecf9-427f-a031-222c2f394fb8",
"strategy": "all-at-once",
"status": "pending",
"processes": {
"foo": 1
},
"deploy_timeout": 30,
"created_at": "2015-12-16T02:21:16.782263Z"
}
]
新任务
新任务描述了一个所需流程配置https://flynn.io/schema/controller/new_job#
属性 | 类型 | 描述 |
---|---|---|
release | uuid string | 唯一标示 |
cmd | array of strings | shell命令 |
entrypoint | array of strings | |
env | object | 环境变量 |
meta | object | 客户端指定元数据 |
tty | boolean | 初始化tty会话 |
tty_columns | integer | tty中的列数 |
tty_lines | integer | tty中的行数 |
release_env | boolean | 包括版本环境 |
disable_log | boolean | 不拷贝标准输入/输出到日志流中 |
resources | object | 资源请求和限制 |
运行任务
实例:—————————————————————请求————————————————————
POST /apps/7406a4d71a0c43d3ac4b39f006cb0342/jobs HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
{
"release": "40202cf3b0e946a4b2c4db42a0c14194",
"cmd": [
"echo",
"$BODY"
],
"env": {
"BODY": "Hello!"
}
}
—————————————————————响应————————————————————
Content-Type: application/json
{
"id": "flynn-cef74685c83b47889c69fa95451e75b3",
"release": "40202cf3b0e946a4b2c4db42a0c14194",
"cmd": [
"echo",
"$BODY"
]
}
任务
一个任务就是容器中的一个单进程。https://flynn.io/schema/controller/job#
属性 | 类型 | 描述 |
---|---|---|
id | uuid string | 唯一标示 |
app | uuid string | 唯一标示 |
release | uuid string | 唯一标示 |
type | string | 进程类型名字 |
state | string | 客户端指定元数据 |
cmd | array of strings | shell命令 |
meta | object | 客户端指定元数据 |
exit_status | integer | 任务退出状态 |
created_at | date-time string | 对象创建时间 |
updated_at | date-time string | 对象最新更新时间 |
获取任务列表
实例:—————————————————————请求————————————————————
GET /apps/7406a4d71a0c43d3ac4b39f006cb0342/jobs HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
—————————————————————响应————————————————————
Content-Type: application/jsonb
[
{
"id": "flynn-68940e0fe9664ce0b369baaeb10b4cc4",
"app": "7406a4d71a0c43d3ac4b39f006cb0342",
"release": "40202cf3b0e946a4b2c4db42a0c14194",
"type": "foo",
"state": "starting",
"created_at": "2015-01-29T18:53:28.595924Z",
"updated_at": "2015-01-29T18:53:28.595924Z"
},
{
"id": "flynn-cef74685c83b47889c69fa95451e75b3",
"app": "7406a4d71a0c43d3ac4b39f006cb0342",
"release": "40202cf3b0e946a4b2c4db42a0c14194",
"state": "starting",
"created_at": "2015-01-29T18:53:27.81058Z",
"updated_at": "2015-01-29T18:53:27.81058Z"
},
{
"id": "flynn-c96be7a9527047e4b11e3c19d3bef904",
"app": "7406a4d71a0c43d3ac4b39f006cb0342",
"release": "689ce5b9ad1541ab975d51cba1e051d0",
"type": "foo",
"state": "crashed",
"created_at": "2015-01-29T18:53:26.933346Z",
"updated_at": "2015-01-29T18:53:27.954494Z"
}
]
更新任务
实例:—————————————————————请求————————————————————
PUT /apps/7406a4d71a0c43d3ac4b39f006cb0342/jobs/flynn-cef74685c83b47889c69fa95451e75b3 HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/
{
"id": "flynn-cef74685c83b47889c69fa95451e75b3",
"app": "7406a4d71a0c43d3ac4b39f006cb0342",
"release": "40202cf3b0e946a4b2c4db42a0c14194",
"state": "down"
}
—————————————————————响应————————————————————
Content-Type: application/json
{
"id": "flynn-cef74685c83b47889c69fa95451e75b3",
"app": "7406a4d71a0c43d3ac4b39f006cb0342",
"release": "40202cf3b0e946a4b2c4db42a0c14194",
"state": "down",
"created_at": "2015-01-29T18:53:27.81058Z",
"updated_at": "2015-01-29T18:53:28.723854Z"
}
获取任务
实例:—————————————————————请求————————————————————
GET /apps/adcccdb4-b1a4-4209-a03a-762f4e021632/jobs/host-40cc2d07-7a48-4fda-9790-ba9768a3f616 HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
—————————————————————响应————————————————————
Content-Type: application/json
{
"id": "host-40cc2d07-7a48-4fda-9790-ba9768a3f616",
"app": "adcccdb4-b1a4-4209-a03a-762f4e021632",
"release": "77e9e956-ecf9-427f-a031-222c2f394fb8",
"state": "down",
"created_at": "2015-12-16T02:21:16.799294Z",
"updated_at": "2015-12-16T02:21:16.811094Z"
}
删除任务
实例:—————————————————————请求————————————————————
DELETE /apps/7406a4d71a0c43d3ac4b39f006cb0342/jobs/flynn-cef74685c83b47889c69fa95451e75b3 HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
—————————————————————响应————————————————————
Content-Type: text/plain; charset=utf-8
端口
https://flynn.io/schema/controller/port#
属性 | 类型 | 描述 |
---|---|---|
port | integer | null |
proto | string | tcp udp |
进程类型
https://flynn.io/schema/controller/process_type#
属性 | 类型 | 描述 |
---|---|---|
cmd | array of strings | shell命令 |
env | object | 环境变量 |
entrypoint | array of strings | null |
ports | array of objects | null |
ports[].port | integer | null |
ports[].proto | string | null |
data | boolean | null |
omni | boolean | null |
提供程序
https://flynn.io/schema/controller/provider#
属性 | 类型 | 描述 |
---|---|---|
id | uuid string | 唯一标识符 |
created_at | date-time string | 对象的创建时间戳 |
updated_at | date-time string | 对象最后更新的时间戳 |
name | string | null |
url | uri string | null |
创建提供程序
实例:—————————————————————请求————————————————————
POST /providers HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
{
"url": "http://example-provider-1422557608732167310.discoverd:12345/providers/1422557608732167310",
"name": "example-provider-1422557608732167310"
}
—————————————————————响应————————————————————
Content-Type: application/json
{
"id": "7277db2655e44b4ba7128ff5ff01a0ff",
"url": "http://example-provider-1422557608732167310.discoverd:12345/providers/1422557608732167310",
"name": "example-provider-1422557608732167310",
"created_at": "2015-01-29T18:53:28.733018Z",
"updated_at": "2015-01-29T18:53:28.733018Z"
}
获取提供程序
实例:—————————————————————请求————————————————————
GET /providers/7277db2655e44b4ba7128ff5ff01a0ff HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
—————————————————————响应————————————————————
Content-Type: application/json
{
"id": "7277db2655e44b4ba7128ff5ff01a0ff",
"url": "http://example-provider-1422557608732167310.discoverd:12345/providers/1422557608732167310",
"name": "example-provider-1422557608732167310",
"created_at": "2015-01-29T18:53:28.733018Z",
"updated_at": "2015-01-29T18:53:28.733018Z"
}
获取提供程序列表
实例:—————————————————————请求————————————————————
GET /providers HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
—————————————————————响应————————————————————
Content-Type: application/json
[
{
"id": "7277db2655e44b4ba7128ff5ff01a0ff",
"url": "http://example-provider-1422557608732167310.discoverd:12345/providers/1422557608732167310",
"name": "example-provider-1422557608732167310",
"created_at": "2015-01-29T18:53:28.733018Z",
"updated_at": "2015-01-29T18:53:28.733018Z"
},
{
"id": "d9ba709dc3e7413db3cba9b86e7cf325",
"url": "http://pg-api.discoverd/databases",
"name": "postgres",
"created_at": "2015-01-29T18:53:20.031975Z",
"updated_at": "2015-01-29T18:53:20.031975Z"
}
]
版本
https://flynn.io/schema/controller/release#
属性 | 类型 | 描述 |
---|---|---|
id | uuid string | 唯一标识 |
artifact | uuid string | 唯一标识 |
meta | object | 客户指定元数据 |
env | object | 环境变量 |
processes | object | |
created_at | object | 对象的创建时间戳 |
获取应用初始化版本
实例:—————————————————————请求————————————————————
GET /apps/gitreceive/release HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
—————————————————————响应————————————————————
Content-Type: application/json
{
"id": "8a9760deeba7486c987267196edd9032",
"artifact": "74010365c551463386bae39cf4ad0a47",
"processes": {
"app": {
"env": {
"CONTROLLER_AUTH_KEY": "s3cr3t",
"SLUGBUILDER_IMAGE_URI": "https://registry.hub.docker.com/flynn/slugbuilder?id=a4a8a9489eacbad331ced4ad5b4b63238c7592d42d30b04058aac914912344f3",
"SLUGRUNNER_IMAGE_URI": "https://registry.hub.docker.com/flynn/slugrunner?id=039222f9884412eb0667988933caeb0ed06da28f71e3dff540a61d13d0d85ae0",
"SSH_PRIVATE_KEYS": "-----BEGIN RSA PRIVATE KEY-----\nMIIEpAIBAAKCAQEAvVM5o2jcAO9qN/Bza+omOXxqJlPySHkxGEmpBBGOJ/thjF63\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X1r7vLsP9K70sv/Buq89t55kmpR5JuZYFe8H\n5/lJqw0f6e/5B6LCEUcha1KLXQA43fPle9SCvnVx6q2VNyGJcx+ZNyUpW/2aLbMI\nRi7755xNrluhocoSMOuCFKECgYAA0OYoscTqnFTXhtOS2BJipz90ZwdMrAB6+2SO\nLBjeUPaCM8qRxNG3xsM0BC5CN5Bd6lh5BMWMKBcwH3pBYqmYdX6jE0UtUDkK6/iP\ns797TB+wLNEZ7aZPVdOGXLcHHWWsYQENcQ0rdF0JsEuWW0A1vk3aQ6WDQ2LqF7hi\nIpg+TQKBgQDalWyZwwbIYI8K6BB2wA8PkZV46egnLQCqaGmhPdJcdE7tBjmdTGgj\nVZ0d77Cxik08hsQofyXjB6zufih/zan4VV37pBgQ7SZFBgOEu8ScqMz1EpeVCFC3\nFvOUZ0ed0/mql57JqsYKJ3ZroKMAJZs0wLKYOLZ8N88fVNJdmWI16g==\n-----END RSA PRIVATE KEY-----\n-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIFGhKRLx3WqbFxYc9RMwIaJK/xa7WWcj90p2q/3DTNdPoAoGCCqGSM49\nAwEHoUQDQgAE7m4eZSDcX7hJ0+iyv8m1t0f/BkQW6tBO3McnTYWjoU07JN/mxYlk\nAfiET9Yqq5viMFr2ydOKXGlVU5khmjiOnA==\n-----END EC PRIVATE KEY-----\n"
},
"ports": [
{
"port": 0,
"proto": "tcp",
"range_end": 0
}
]
}
},
"created_at": "2015-01-29T18:53:22.471286Z"
}
设置应用版本
实例:—————————————————————请求————————————————————
PUT /apps/7406a4d71a0c43d3ac4b39f006cb0342/release HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
{
"id": "689ce5b9ad1541ab975d51cba1e051d0"
}
—————————————————————响应————————————————————
Content-Type: application/json
获取应用版本
实例:—————————————————————请求————————————————————
GET /apps/7406a4d71a0c43d3ac4b39f006cb0342/release HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
—————————————————————响应————————————————————
Content-Type: application/json
{
"id": "689ce5b9ad1541ab975d51cba1e051d0",
"artifact": "4d365e6cdb1d47b8b98c9cd9a7b047fd",
"env": {
"some": "info"
},
"processes": {
"foo": {
"cmd": [
"ls",
"-l"
],
"env": {
"BAR": "baz"
}
}
},
"created_at": "2015-01-29T18:53:26.89224Z"
}
创建版本
实例:—————————————————————请求————————————————————
POST /releases HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
{
"artifact": "4d365e6cdb1d47b8b98c9cd9a7b047fd",
"env": {
"some": "info"
},
"processes": {
"foo": {
"cmd": [
"ls",
"-l"
],
"env": {
"BAR": "baz"
}
}
}
}
—————————————————————响应————————————————————
Content-Type: application/json
{
"id": "689ce5b9ad1541ab975d51cba1e051d0",
"artifact": "4d365e6cdb1d47b8b98c9cd9a7b047fd",
"env": {
"some": "info"
},
"processes": {
"foo": {
"cmd": [
"ls",
"-l"
],
"env": {
"BAR": "baz"
}
}
},
"created_at": "2015-01-29T18:53:26.89224Z"
}
获取版本列表
实例:—————————————————————请求————————————————————
GET /releases HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
—————————————————————响应————————————————————
Content-Type: application/json
[
{
"id": "689ce5b9ad1541ab975d51cba1e051d0",
"artifact": "4d365e6cdb1d47b8b98c9cd9a7b047fd",
"env": {
"some": "info"
},
"processes": {
"foo": {
"cmd": [
"ls",
"-l"
],
"env": {
"BAR": "baz"
}
}
},
"created_at": "2015-01-29T18:53:26.89224Z"
},
{
"id": "258c9a2f43124c76b85ba24fa127dc3b",
"artifact": "8b6548e25bc8477e905deee8a33eab2a",
"env": {
"APP_NAME": "dashboard",
"CA_CERT": "-----BEGIN CERTIFICATE-----\nMIIC5DCCAc6gAwIBAgIRAL1sRMV4diGUf9Lztaw9/OkwCwYJKoZIhvcNAQELMB0x\nDjAMBgNVBAoTBUZseW5uMQswCQYDVQQLEwJDQTAeFw0xNTAxMjkxODUzMjNaFw0y\nMDAxMjgxODUzMjNaMB0xDjAMBgNVBAoTBUZseW5uMQswCQYDVQQLEwJDQTCCASIw\nDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJeMZ5RC7Aan+JImyIDEN4dfikjO\nr323YWPdYiLM7bi/o4x6Lp2+LOeeV+1Y7xky3gybuekBtNveEp6wHg3pqXCvAfxV\nQ4EGDXs0/9RyXNCgHsiDmnftB1OtmjPTZjtbgDWVhkJZcq1X6hlcTgD9rs1HOVmg\n7m/gPCa0avI30QTajb2/DBQbKIQovY7vcQLaPbhqknVK1WZoCnxDomT0ueFllD8h\n6p/sJ5qk/ZQF2WL8gL9elQOUm/K7jUjkfLbHN3hzx2QQgNqlTDKMgPApMri5UjUa\nnxdLoYOPiUj0QZmMyZkaYwG0cyGp/8MuEzY6F/dgSEt1gemS5lGI7s+TDNECAwEA\nAaMjMCEwDgYDVR0PAQH/BAQDAgAGMA8GA1UdEwEB/wQFMAMBAf8wCwYJKoZIhvcN\nAQELA4IBAQAjiAj10RbsCxzp0wp79g/BLRaYcypFWnjenn6aWUD2pvc7oK2n8XX1\nbhSym0O4aUlTbx1lc+N4R+MI/Hx83MPFEMXNoLGMnwZ+6IxYKuoXnqt6rFdm2kh4\nOUABwknyNx4jLFniAEIlPa+fcbHacgJtkxm85OpdW9kVrZU3Af7NaXl9u1TDJ0ww\nwtOlMRGBMByuKxU5zwXBz28rgmBIZ2F3w5guZxnNUDKuk8z9WIowJumB+DymDYxh\nSSAfL2jHwdDBeZK5XMmXRobWpf4oSm2z6Nx+0RWHms8tKTQXUDOlwLdMMho1jj/l\nJAvqe8tmpQBg90lc3bCCLmaeJG3nkfSA\n-----END CERTIFICATE-----\n",
"CONTROLLER_DOMAIN": "controller.dev.localflynn.com",
"CONTROLLER_KEY": "s3cr3t",
"DEFAULT_ROUTE_DOMAIN": "dev.localflynn.com",
"LOGIN_TOKEN": "a9b51e131d3f444074aa35425eb8fdc3",
"SECURE_COOKIES": "true",
"SESSION_SECRET": "4fd6d9c447b02a5e3b8d03ab818652d9",
"STATIC_PATH": "/app",
"URL": "https://dashboard.dev.localflynn.com"
},
"processes": {
"web": {
"ports": [
{
"port": 80,
"proto": "tcp",
"range_end": 0
}
]
}
},
"created_at": "2015-01-29T18:53:25.003718Z"
},
{
"id": "b9aa14dd9fbe4ea6a06acd88da3b3c80",
"artifact": "03f9d97aeab94f2b9bb23f4ade0eb270",
"env": {
"CONTROLLER_AUTH_KEY": "s3cr3t",
"SLUGBUILDER_IMAGE_URI": "https://registry.hub.docker.com/flynn/slugbuilder?id=a4a8a9489eacbad331ced4ad5b4b63238c7592d42d30b04058aac914912344f3",
"SLUGRUNNER_IMAGE_URI": "https://registry.hub.docker.com/flynn/slugrunner?id=039222f9884412eb0667988933caeb0ed06da28f71e3dff540a61d13d0d85ae0"
},
"created_at": "2015-01-29T18:53:24.986924Z"
},
{
"id": "8a9760deeba7486c987267196edd9032",
"artifact": "74010365c551463386bae39cf4ad0a47",
"processes": {
"app": {
"env": {
"CONTROLLER_AUTH_KEY": "s3cr3t",
"SLUGBUILDER_IMAGE_URI": "https://registry.hub.docker.com/flynn/slugbuilder?id=a4a8a9489eacbad331ced4ad5b4b63238c7592d42d30b04058aac914912344f3",
"SLUGRUNNER_IMAGE_URI": "https://registry.hub.docker.com/flynn/slugrunner?id=039222f9884412eb0667988933caeb0ed06da28f71e3dff540a61d13d0d85ae0",
"SSH_PRIVATE_KEYS": "-----BEGIN RSA PRIVATE KEY-----\nMIIEpAIBAAKCAQEAvVM5o2jcAO9qN/Bza+omOXxqJlPySHkxGEmpBBGOJ/thjF63\njrx4nsDAYB8x5fkVYNR4QPqIEfAAvvRAK1walOPrvPcrtp/TAD1csYYADIj11gs7\nD5VcNo46H9gc8Bw7ZQN+vB20/ZfhjdJHVVS3oi1co74rBIwEQq3FEQUTMEsLESJb\nzr4JqllKq4VsDHUqxEcIUVllnt0l/3Y1ou9kp2s0EGIzbGL8W0ku8V+PrG3/3iI9\n8eEQ043hawSrQTYY8zCQxQvss3GlKpMQDT4y14g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ns797TB+wLNEZ7aZPVdOGXLcHHWWsYQENcQ0rdF0JsEuWW0A1vk3aQ6WDQ2LqF7hi\nIpg+TQKBgQDalWyZwwbIYI8K6BB2wA8PkZV46egnLQCqaGmhPdJcdE7tBjmdTGgj\nVZ0d77Cxik08hsQofyXjB6zufih/zan4VV37pBgQ7SZFBgOEu8ScqMz1EpeVCFC3\nFvOUZ0ed0/mql57JqsYKJ3ZroKMAJZs0wLKYOLZ8N88fVNJdmWI16g==\n-----END RSA PRIVATE KEY-----\n-----BEGIN EC PRIVATE KEY-----\nMHcCAQEEIFGhKRLx3WqbFxYc9RMwIaJK/xa7WWcj90p2q/3DTNdPoAoGCCqGSM49\nAwEHoUQDQgAE7m4eZSDcX7hJ0+iyv8m1t0f/BkQW6tBO3McnTYWjoU07JN/mxYlk\nAfiET9Yqq5viMFr2ydOKXGlVU5khmjiOnA==\n-----END EC PRIVATE KEY-----\n"
},
"ports": [
{
"port": 0,
"proto": "tcp",
"range_end": 0
}
]
}
},
"created_at": "2015-01-29T18:53:22.471286Z"
},
{
"id": "2222dd828450483d96b425b8b1294040",
"artifact": "73d37c1bdacd432f9e5c3cbe121c365e",
"processes": {
"app": {
"cmd": [
"-httpaddr",
":80",
"-httpsaddr",
":443",
"-tcp-range-start",
"3000",
"-tcp-range-end",
"3500"
],
"omni": true,
"host_network": true
}
},
"created_at": "2015-01-29T18:53:21.730018Z"
},
{
"id": "e48208857b6e42c1baaba738e766ec7e",
"artifact": "afe339ec9a0f46b28cfa5dff383e5179",
"env": {
"FLYNN_POSTGRES": "pg",
"PGDATABASE": "c69edca77f27f07c70f10521dc1b9271",
"PGPASSWORD": "5883fcfe1603a1bc54883cab0e835b6e",
"PGUSER": "af3dd154197bb764a5fb377fa6d39f31"
},
"processes": {
"web": {
"ports": [
{
"port": 80,
"proto": "tcp",
"range_end": 0
}
]
}
},
"created_at": "2015-01-29T18:53:21.713992Z"
},
{
"id": "fdaba774be0a4332bfb5be1d440cdc60",
"artifact": "61b804fd0f9c42359ac8d8e3131d16bf",
"processes": {
"postgres": {
"cmd": [
"postgres"
],
"ports": [
{
"port": 5432,
"proto": "tcp",
"range_end": 0
}
],
"data": true
},
"web": {
"cmd": [
"api"
],
"ports": [
{
"port": 80,
"proto": "tcp",
"range_end": 0
}
]
}
},
"created_at": "2015-01-29T18:53:20.058243Z"
},
{
"id": "a665aa801cbb45f4a41831b66416f4b9",
"artifact": "1b7c8dcfd0b14755a452367e5f6723b6",
"env": {
"AUTH_KEY": "s3cr3t",
"BACKOFF_PERIOD": "",
"DEFAULT_ROUTE_DOMAIN": "dev.localflynn.com",
"FLYNN_POSTGRES": "pg",
"NAME_SEED": "f09d8d597f0a39acf991",
"PGDATABASE": "51b7cf0edd53ca6921147823f40737eb",
"PGPASSWORD": "4bbb7b6bdff41444d876e02e9bfc7133",
"PGUSER": "f331aec77952871eeec5f7b5f16253bd"
},
"processes": {
"deployer": {
"cmd": [
"deployer"
]
},
"scheduler": {
"cmd": [
"scheduler"
],
"omni": true
},
"web": {
"cmd": [
"controller"
],
"ports": [
{
"port": 80,
"proto": "tcp",
"range_end": 0
}
]
}
},
"created_at": "2015-01-29T18:53:20.02833Z"
}
]
资源请求
https://flynn.io/schema/controller/resource_req#
属性 | 类型 | 描述 |
---|---|---|
apps | array of uuid string | |
config | object |
创建资源
实例:—————————————————————请求————————————————————
POST /providers/7277db2655e44b4ba7128ff5ff01a0ff/resources HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
{
"config": {
}
}
—————————————————————响应————————————————————
Content-Type: application/json
{
"id": "5489d2758d9b452783de686c0ca5fe9d",
"provider": "7277db2655e44b4ba7128ff5ff01a0ff",
"env": {
"some": "data"
},
"created_at": "2015-01-29T18:53:28.757571Z"
}
资源
https://flynn.io/schema/controller/resource#
属性 | 类型 | 描述 |
---|---|---|
id | uuid string | 唯一标示 |
provider | uuid string | 唯一标示 |
external_id | uuid string | 唯一标示 |
env | object | 环境变量 |
apps | array of uuid strings | |
created_at | date-time string | 对象创建时间 |
添加资源
实例:—————————————————————请求————————————————————
PUT /providers/0952f692-2667-4be0-a159-9d68382a262c/resources/cc9f3342-bed0-4ed3-840e-c462e05808c6 HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
{
"id": "cc9f3342-bed0-4ed3-840e-c462e05808c6",
"provider": "0952f692-2667-4be0-a159-9d68382a262c",
"external_id": "/foo/bar",
"env": {
"FOO": "BAR"
},
"apps": [
"adcccdb4-b1a4-4209-a03a-762f4e021632"
]
}
—————————————————————响应————————————————————
Content-Type: application/json
{
"id": "cc9f3342-bed0-4ed3-840e-c462e05808c6",
"provider": "0952f692-2667-4be0-a159-9d68382a262c",
"external_id": "/foo/bar",
"env": {
"FOO": "BAR"
},
"apps": [
"adcccdb4-b1a4-4209-a03a-762f4e021632"
],
"created_at": "2015-12-16T02:21:16.838613Z"
}
列出应用资源
实例:—————————————————————请求————————————————————
GET /apps/7406a4d71a0c43d3ac4b39f006cb0342/resources HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
—————————————————————响应————————————————————
Content-Type: application/json
[
{
"id": "cc9f3342-bed0-4ed3-840e-c462e05808c6",
"provider": "0952f692-2667-4be0-a159-9d68382a262c",
"external_id": "/foo/bar",
"env": {
"FOO": "BAR"
},
"apps": [
"adcccdb4-b1a4-4209-a03a-762f4e021632"
],
"created_at": "2015-12-16T02:21:16.838613Z"
}
]
获取资源
实例:—————————————————————请求————————————————————
GET /providers/7277db2655e44b4ba7128ff5ff01a0ff/resources/5489d2758d9b452783de686c0ca5fe9d HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
—————————————————————响应————————————————————
Content-Type: application/json
{
"id": "5489d2758d9b452783de686c0ca5fe9d",
"provider": "7277db2655e44b4ba7128ff5ff01a0ff",
"env": {
"some": "data"
},
"created_at": "2015-01-29T18:53:28.757571Z"
}
获取资源列表
实例:—————————————————————请求————————————————————
GET /providers/7277db2655e44b4ba7128ff5ff01a0ff/resources HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
—————————————————————响应————————————————————
Content-Type: application/json
[
{
"id": "5489d2758d9b452783de686c0ca5fe9d",
"provider": "7277db2655e44b4ba7128ff5ff01a0ff",
"env": {
"some": "data"
},
"created_at": "2015-01-29T18:53:28.757571Z"
}
]
删除资源
实例:—————————————————————请求————————————————————
DELETE /providers/0952f692-2667-4be0-a159-9d68382a262c/resources/ HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
—————————————————————响应————————————————————
Content-Type: text/plain; charset=utf-8
路由
https://flynn.io/schema/controller/route#
属性 | 类型 | 描述 |
---|---|---|
id | uuid string | 唯一标示 |
parent_ref | uuid string | 唯一标示 |
type | string | |
service | uuid string | 唯一标示 |
domain | string | 路由域名。仅适用于HTTP路由。 |
tls_cert | string | 路由可选的TLS公证书。仅用于HTTP路由。 |
tls_key | string | 路由可选的TLS私钥。仅用于HTTP路由。 |
sticky | boolean | 无论路由是否使用粘性会话。仅用于HTTP路由。 |
port | integer | TCP端口上监听TCP路由。 |
created_at | date-time string | 对象创建的时间 |
updated_at | date-time string | 对象最新更新时间 |
创建路由
实例:—————————————————————请求————————————————————
POST /apps/7406a4d71a0c43d3ac4b39f006cb0342/routes HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
{
"type": "http",
"config": {
"domain": "http://example.com",
"service": "my-app-1422557606845347930-web"
}
}
—————————————————————响应————————————————————
Content-Type: application/json
{
"id": "http/a9b9f04336ce0181a08e774e01113b31",
"parent_ref": "controller/apps/7406a4d71a0c43d3ac4b39f006cb0342",
"type": "http",
"config": {
"domain": "http://example.com",
"service": "my-app-1422557606845347930-web"
},
"created_at": "2015-01-29T18:53:26.870533465Z",
"updated_at": "2015-01-29T18:53:26.870533465Z"
}
获取路由
实例:—————————————————————请求————————————————————
GET /apps/7406a4d71a0c43d3ac4b39f006cb0342/routes/http/a9b9f04336ce0181a08e774e01113b31 HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
—————————————————————响应————————————————————
Content-Type: application/json
{
"id": "http/a9b9f04336ce0181a08e774e01113b31",
"parent_ref": "controller/apps/7406a4d71a0c43d3ac4b39f006cb0342",
"type": "http",
"config": {
"domain": "http://example.com",
"service": "my-app-1422557606845347930-web"
},
"created_at": "2015-01-29T18:53:26.870533465Z",
"updated_at": "2015-01-29T18:53:26.870533465Z"
}
更新路由
实例:—————————————————————请求————————————————————
PUT /apps/adcccdb4-b1a4-4209-a03a-762f4e021632/routes/http/5bfb9c8b-ae1f-4a5a-af0c-94fa2996d543 HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
{
"type": "http",
"id": "5bfb9c8b-ae1f-4a5a-af0c-94fa2996d543",
"parent_ref": "controller/apps/adcccdb4-b1a4-4209-a03a-762f4e021632",
"service": "my-app-1450232456657062340-other",
"created_at": "2015-12-16T02:21:06.704111Z",
"updated_at": "2015-12-16T02:21:06.704111Z",
"domain": "http://example.com",
"sticky": true,
"path": "/"
}
—————————————————————响应————————————————————
Content-Type: application/json
{
"type": "http",
"id": "5bfb9c8b-ae1f-4a5a-af0c-94fa2996d543",
"parent_ref": "controller/apps/adcccdb4-b1a4-4209-a03a-762f4e021632",
"service": "my-app-1450232456657062340-other",
"created_at": "2015-12-16T02:21:06.704111Z",
"updated_at": "2015-12-16T02:21:06.71424Z",
"domain": "http://example.com",
"sticky": true,
"path": "/"
}
获取路由列表
实例:—————————————————————请求————————————————————
GET /apps/7406a4d71a0c43d3ac4b39f006cb0342/routes HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
—————————————————————响应————————————————————
Content-Type: application/json
[
{
"id": "http/a9b9f04336ce0181a08e774e01113b31",
"parent_ref": "controller/apps/7406a4d71a0c43d3ac4b39f006cb0342",
"type": "http",
"config": {
"domain": "http://example.com",
"service": "my-app-1422557606845347930-web"
},
"created_at": "2015-01-29T18:53:26.870533465Z",
"updated_at": "2015-01-29T18:53:26.870533465Z"
},
{
"id": "http/55b43353e8ae0779b3579ef7661bee91",
"parent_ref": "controller/apps/7406a4d71a0c43d3ac4b39f006cb0342",
"type": "http",
"config": {
"domain": "my-app-1422557606845347930.dev.localflynn.com",
"service": "my-app-1422557606845347930-web"
},
"created_at": "2015-01-29T18:53:26.847692447Z",
"updated_at": "2015-01-29T18:53:26.847692447Z"
}
]
删除路由
实例:—————————————————————请求————————————————————
DELETE /apps/7406a4d71a0c43d3ac4b39f006cb0342/routes/http/a9b9f04336ce0181a08e774e01113b31 HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
—————————————————————响应————————————————————
Content-Type: text/plain; charset=utf-8
错误
https://flynn.io/schema/controller/error#
属性 | 类型 | 描述 |
---|---|---|
code | string | not_found object_not_found object_exists syntax_error validation_error unknown_error |
message | string | |
detail | boolean |
创建无效应用
实例:—————————————————————请求————————————————————
POST /apps HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
{
"name": "this is not valid",
"protected": false
}
—————————————————————响应————————————————————
Content-Type: application/json
{
"code": "validation_error",
"message": "name String must match the pattern: \"^[a-z\\d]+(-[a-z\\d]+)*$\".",
"detail": {
"field": "name"
}
}
事件
https://flynn.io/schema/controller/event#
属性 | 类型 | 描述 |
---|---|---|
id | integer | |
app | uuid string | 唯一标志符 |
object_type | string | app app_deletion app_release deployment job scale release artifact provider resource resource_deletion key key_deletion route route_deletion domain_migration |
object_id | uuid string | 唯一标志符 |
data | object | |
created_at | date-time string | 对象创建时间戳 |
事件流
属性 | 类型 | 描述 |
---|---|---|
app_id | uuid string | 唯一标志符 |
object_types | string | app app_deletion app_release deployment job scale release artifact provider resource resource_deletion key key_deletion route route_deletion domain_migration |
past | boolean | 返回之前运行的事件 |
count | integer | 限制返回的之前运行事件的数量 |
实例:—————————————————————请求————————————————————
GET /events?count=10&past=true HTTP/1.1
Accept: text/event-stream
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
Last-Event-Id: 0
—————————————————————响应————————————————————
Content-Type: text/event-stream; charset=utf-8
data: {"id":102,"app":"adcccdb4-b1a4-4209-a03a-762f4e021632","object_type":"job","object_id":"host-26c0ea34-e655-40d2-8d5e-c5694470af6c","data":{"id":"host-26c0ea34-e655-40d2-8d5e-c5694470af6c","app":"adcccdb4-b1a4-4209-a03a-762f4e021632","meta":{"bread":"with hemp"},"type":"foo","state":"up","release":"47154f8c-a604-469d-ae6a-e431990ddee8","created_at":"2015-12-16T02:21:06.765744Z","updated_at":"2015-12-16T02:21:07.689399Z"},"created_at":"2015-12-16T02:21:07.691418Z"}
data: {"id":103,"app":"adcccdb4-b1a4-4209-a03a-762f4e021632","object_type":"job","object_id":"host-26c0ea34-e655-40d2-8d5e-c5694470af6c","data":{"id":"host-26c0ea34-e655-40d2-8d5e-c5694470af6c","app":"adcccdb4-b1a4-4209-a03a-762f4e021632","meta":{"bread":"with hemp"},"type":"foo","state":"down","release":"47154f8c-a604-469d-ae6a-e431990ddee8","created_at":"2015-12-16T02:21:06.765744Z","updated_at":"2015-12-16T02:21:07.704057Z","exit_status":2},"created_at":"2015-12-16T02:21:07.707269Z"}
data: {"id":104,"app":"adcccdb4-b1a4-4209-a03a-762f4e021632","object_type":"job","object_id":"host-e6582097-9aee-4b6d-94fc-83c0a3d1b51c","data":{"id":"host-e6582097-9aee-4b6d-94fc-83c0a3d1b51c","app":"adcccdb4-b1a4-4209-a03a-762f4e021632","meta":{"bread":"with hemp"},"type":"foo","state":"starting","release":"47154f8c-a604-469d-ae6a-e431990ddee8","created_at":"2015-12-16T02:21:07.710312Z","updated_at":"2015-12-16T02:21:07.710312Z"},"created_at":"2015-12-16T02:21:07.711479Z"}
data: {"id":105,"app":"adcccdb4-b1a4-4209-a03a-762f4e021632","object_type":"job","object_id":"host-e6582097-9aee-4b6d-94fc-83c0a3d1b51c","data":{"id":"host-e6582097-9aee-4b6d-94fc-83c0a3d1b51c","app":"adcccdb4-b1a4-4209-a03a-762f4e021632","meta":{"bread":"with hemp"},"type":"foo","state":"up","release":"47154f8c-a604-469d-ae6a-e431990ddee8","created_at":"2015-12-16T02:21:07.710312Z","updated_at":"2015-12-16T02:21:08.529747Z"},"created_at":"2015-12-16T02:21:08.531191Z"}
data: {"id":106,"app":"adcccdb4-b1a4-4209-a03a-762f4e021632","object_type":"job","object_id":"host-e6582097-9aee-4b6d-94fc-83c0a3d1b51c","data":{"id":"host-e6582097-9aee-4b6d-94fc-83c0a3d1b51c","app":"adcccdb4-b1a4-4209-a03a-762f4e021632","meta":{"bread":"with hemp"},"type":"foo","state":"down","release":"47154f8c-a604-469d-ae6a-e431990ddee8","created_at":"2015-12-16T02:21:07.710312Z","updated_at":"2015-12-16T02:21:08.534753Z","exit_status":2},"created_at":"2015-12-16T02:21:08.5359Z"}
data: {"id":107,"object_type":"release","object_id":"77e9e956-ecf9-427f-a031-222c2f394fb8","data":{"id":"77e9e956-ecf9-427f-a031-222c2f394fb8","env":{"some":"info"},"artifact":"c1889f55-c244-43ce-af70-ead357daa6ec","processes":{"foo":{"cmd":["ls","-l"],"env":{"BAR":"baz"},"resources":{"max_fd":{"limit":10000,"request":10000},"memory":{"limit":1073741824,"request":1073741824}}}},"created_at":"2015-12-16T02:21:16.775714Z"},"created_at":"2015-12-16T02:21:16.775714Z"}
data: {"id":108,"app":"adcccdb4-b1a4-4209-a03a-762f4e021632","object_type":"deployment","object_id":"aab1ee14-776d-4ba4-979b-1b4bda2d9b35","data":{"app":"adcccdb4-b1a4-4209-a03a-762f4e021632","status":"pending","release":"77e9e956-ecf9-427f-a031-222c2f394fb8","deployment":"aab1ee14-776d-4ba4-979b-1b4bda2d9b35"},"created_at":"2015-12-16T02:21:16.784374Z"}
data: {"id":109,"app":"adcccdb4-b1a4-4209-a03a-762f4e021632","object_type":"job","object_id":"host-40cc2d07-7a48-4fda-9790-ba9768a3f616","data":{"id":"host-40cc2d07-7a48-4fda-9790-ba9768a3f616","app":"adcccdb4-b1a4-4209-a03a-762f4e021632","state":"starting","release":"77e9e956-ecf9-427f-a031-222c2f394fb8","created_at":"2015-12-16T02:21:16.799294Z","updated_at":"2015-12-16T02:21:16.799294Z"},"created_at":"2015-12-16T02:21:16.806296Z"}
data: {"id":110,"app":"adcccdb4-b1a4-4209-a03a-762f4e021632","object_type":"job","object_id":"host-40cc2d07-7a48-4fda-9790-ba9768a3f616","data":{"id":"host-40cc2d07-7a48-4fda-9790-ba9768a3f616","app":"adcccdb4-b1a4-4209-a03a-762f4e021632","state":"down","release":"77e9e956-ecf9-427f-a031-222c2f394fb8","created_at":"2015-12-16T02:21:16.799294Z","updated_at":"2015-12-16T02:21:16.811094Z"},"created_at":"2015-12-16T02:21:16.812493Z"}
data: {"id":111,"app":"adcccdb4-b1a4-4209-a03a-762f4e021632","object_type":"resource","object_id":"cc9f3342-bed0-4ed3-840e-c462e05808c6","data":{"id":"cc9f3342-bed0-4ed3-840e-c462e05808c6","env":{"FOO":"BAR"},"apps":["adcccdb4-b1a4-4209-a03a-762f4e021632"],"provider":"0952f692-2667-4be0-a159-9d68382a262c","created_at":"2015-12-16T02:21:16.838613Z","external_id":"/foo/bar"},"created_at":"2015-12-16T02:21:16.838613Z"}
data: {"id":112,"app":"adcccdb4-b1a4-4209-a03a-762f4e021632","object_type":"deployment","object_id":"aab1ee14-776d-4ba4-979b-1b4bda2d9b35","data":{"app":"adcccdb4-b1a4-4209-a03a-762f4e021632","status":"running","release":"77e9e956-ecf9-427f-a031-222c2f394fb8","job_type":"foo","job_state":"starting","deployment":"aab1ee14-776d-4ba4-979b-1b4bda2d9b35"},"created_at":"2015-12-16T02:21:17.017287Z"}
data: {"id":113,"app":"adcccdb4-b1a4-4209-a03a-762f4e021632","object_type":"scale","object_id":"adcccdb4-b1a4-4209-a03a-762f4e021632:77e9e956-ecf9-427f-a031-222c2f394fb8","data":{"release":"77e9e956-ecf9-427f-a031-222c2f394fb8","processes":{"foo":1}},"created_at":"2015-12-16T02:21:17.018787Z"}
data: {"id":114,"app":"adcccdb4-b1a4-4209-a03a-762f4e021632","object_type":"job","object_id":"host-8ba33370-e3b5-4b09-8eaa-629279403202","data":{"id":"host-8ba33370-e3b5-4b09-8eaa-629279403202","app":"adcccdb4-b1a4-4209-a03a-762f4e021632","meta":{"bread":"with hemp"},"type":"foo","state":"starting","release":"77e9e956-ecf9-427f-a031-222c2f394fb8","created_at":"2015-12-16T02:21:17.062294Z","updated_at":"2015-12-16T02:21:17.062294Z"},"created_at":"2015-12-16T02:21:17.064426Z"}
data: {"id":115,"app":"adcccdb4-b1a4-4209-a03a-762f4e021632","object_type":"route_deletion","object_id":"32cd199d-9e83-48e6-96c2-05ab7167eab8","data":{"id":"32cd199d-9e83-48e6-96c2-05ab7167eab8","path":"/","type":"http","domain":"my-app-1450232456657062340.dev.localflynn.com","service":"my-app-1450232456657062340-web","created_at":"2015-12-16T02:20:56.661301Z","parent_ref":"controller/apps/adcccdb4-b1a4-4209-a03a-762f4e021632","updated_at":"2015-12-16T02:20:56.661301Z"},"created_at":"2015-12-16T02:21:17.532255Z"}
data: {"id":116,"app":"adcccdb4-b1a4-4209-a03a-762f4e021632","object_type":"resource_deletion","object_id":"cc9f3342-bed0-4ed3-840e-c462e05808c6","data":{"id":"cc9f3342-bed0-4ed3-840e-c462e05808c6","env":{"FOO":"BAR"},"apps":["adcccdb4-b1a4-4209-a03a-762f4e021632"],"provider":"0952f692-2667-4be0-a159-9d68382a262c","created_at":"2015-12-16T02:21:16.838613Z","external_id":"/foo/bar"},"created_at":"2015-12-16T02:21:17.537413Z"}
data: {"id":117,"app":"adcccdb4-b1a4-4209-a03a-762f4e021632","object_type":"app_deletion","object_id":"adcccdb4-b1a4-4209-a03a-762f4e021632","data":{"error":"","app_deletion":{"app":"adcccdb4-b1a4-4209-a03a-762f4e021632","deleted_routes":[{"id":"32cd199d-9e83-48e6-96c2-05ab7167eab8","path":"/","type":"http","domain":"my-app-1450232456657062340.dev.localflynn.com","service":"my-app-1450232456657062340-web","created_at":"2015-12-16T02:20:56.661301Z","parent_ref":"controller/apps/adcccdb4-b1a4-4209-a03a-762f4e021632","updated_at":"2015-12-16T02:20:56.661301Z"}],"deleted_resources":[{"id":"cc9f3342-bed0-4ed3-840e-c462e05808c6","env":{"FOO":"BAR"},"apps":["adcccdb4-b1a4-4209-a03a-762f4e021632"],"provider":"0952f692-2667-4be0-a159-9d68382a262c","created_at":"2015-12-16T02:21:16.838613Z","external_id":"/foo/bar"}]}},"created_at":"2015-12-16T02:21:17.564196Z"}
列出事件
属性 | 类型 | 描述 |
---|---|---|
app_id | uuid string | 唯一标志符 |
object_types | string | app app_deletion app_release deployment job scale release artifact provider resource resource_deletion key key_deletion route route_deletion domain_migration |
before_id | integer | 只返回发生在指定 ID 事件之前的事件 |
since_id | integer | 只返回发生在指定 ID 事件之后的事件 |
count | integer | 限制返回的之前运行事件的数量 |
实例:—————————————————————请求————————————————————
GET /events?count=10 HTTP/1.1
Accept: application/json
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
—————————————————————响应————————————————————
Content-Type: text/event-stream; charset=utf-8
[
{
"id": 111,
"app": "adcccdb4-b1a4-4209-a03a-762f4e021632",
"object_type": "resource",
"object_id": "cc9f3342-bed0-4ed3-840e-c462e05808c6",
"data": {
"id": "cc9f3342-bed0-4ed3-840e-c462e05808c6",
"env": {
"FOO": "BAR"
},
"apps": [
"adcccdb4-b1a4-4209-a03a-762f4e021632"
],
"provider": "0952f692-2667-4be0-a159-9d68382a262c",
"created_at": "2015-12-16T02:21:16.838613Z",
"external_id": "/foo/bar"
},
"created_at": "2015-12-16T02:21:16.838613Z"
},
{
"id": 110,
"app": "adcccdb4-b1a4-4209-a03a-762f4e021632",
"object_type": "job",
"object_id": "host-40cc2d07-7a48-4fda-9790-ba9768a3f616",
"data": {
"id": "host-40cc2d07-7a48-4fda-9790-ba9768a3f616",
"app": "adcccdb4-b1a4-4209-a03a-762f4e021632",
"state": "down",
"release": "77e9e956-ecf9-427f-a031-222c2f394fb8",
"created_at": "2015-12-16T02:21:16.799294Z",
"updated_at": "2015-12-16T02:21:16.811094Z"
},
"created_at": "2015-12-16T02:21:16.812493Z"
},
{
"id": 109,
"app": "adcccdb4-b1a4-4209-a03a-762f4e021632",
"object_type": "job",
"object_id": "host-40cc2d07-7a48-4fda-9790-ba9768a3f616",
"data": {
"id": "host-40cc2d07-7a48-4fda-9790-ba9768a3f616",
"app": "adcccdb4-b1a4-4209-a03a-762f4e021632",
"state": "starting",
"release": "77e9e956-ecf9-427f-a031-222c2f394fb8",
"created_at": "2015-12-16T02:21:16.799294Z",
"updated_at": "2015-12-16T02:21:16.799294Z"
},
"created_at": "2015-12-16T02:21:16.806296Z"
},
{
"id": 108,
"app": "adcccdb4-b1a4-4209-a03a-762f4e021632",
"object_type": "deployment",
"object_id": "aab1ee14-776d-4ba4-979b-1b4bda2d9b35",
"data": {
"app": "adcccdb4-b1a4-4209-a03a-762f4e021632",
"status": "pending",
"release": "77e9e956-ecf9-427f-a031-222c2f394fb8",
"deployment": "aab1ee14-776d-4ba4-979b-1b4bda2d9b35"
},
"created_at": "2015-12-16T02:21:16.784374Z"
},
{
"id": 107,
"object_type": "release",
"object_id": "77e9e956-ecf9-427f-a031-222c2f394fb8",
"data": {
"id": "77e9e956-ecf9-427f-a031-222c2f394fb8",
"env": {
"some": "info"
},
"artifact": "c1889f55-c244-43ce-af70-ead357daa6ec",
"processes": {
"foo": {
"cmd": [
"ls",
"-l"
],
"env": {
"BAR": "baz"
},
"resources": {
"max_fd": {
"limit": 10000,
"request": 10000
},
"memory": {
"limit": 1073741824,
"request": 1073741824
}
}
}
},
"created_at": "2015-12-16T02:21:16.775714Z"
},
"created_at": "2015-12-16T02:21:16.775714Z"
},
{
"id": 106,
"app": "adcccdb4-b1a4-4209-a03a-762f4e021632",
"object_type": "job",
"object_id": "host-e6582097-9aee-4b6d-94fc-83c0a3d1b51c",
"data": {
"id": "host-e6582097-9aee-4b6d-94fc-83c0a3d1b51c",
"app": "adcccdb4-b1a4-4209-a03a-762f4e021632",
"meta": {
"bread": "with hemp"
},
"type": "foo",
"state": "down",
"release": "47154f8c-a604-469d-ae6a-e431990ddee8",
"created_at": "2015-12-16T02:21:07.710312Z",
"updated_at": "2015-12-16T02:21:08.534753Z",
"exit_status": 2
},
"created_at": "2015-12-16T02:21:08.5359Z"
},
{
"id": 105,
"app": "adcccdb4-b1a4-4209-a03a-762f4e021632",
"object_type": "job",
"object_id": "host-e6582097-9aee-4b6d-94fc-83c0a3d1b51c",
"data": {
"id": "host-e6582097-9aee-4b6d-94fc-83c0a3d1b51c",
"app": "adcccdb4-b1a4-4209-a03a-762f4e021632",
"meta": {
"bread": "with hemp"
},
"type": "foo",
"state": "up",
"release": "47154f8c-a604-469d-ae6a-e431990ddee8",
"created_at": "2015-12-16T02:21:07.710312Z",
"updated_at": "2015-12-16T02:21:08.529747Z"
},
"created_at": "2015-12-16T02:21:08.531191Z"
},
{
"id": 104,
"app": "adcccdb4-b1a4-4209-a03a-762f4e021632",
"object_type": "job",
"object_id": "host-e6582097-9aee-4b6d-94fc-83c0a3d1b51c",
"data": {
"id": "host-e6582097-9aee-4b6d-94fc-83c0a3d1b51c",
"app": "adcccdb4-b1a4-4209-a03a-762f4e021632",
"meta": {
"bread": "with hemp"
},
"type": "foo",
"state": "starting",
"release": "47154f8c-a604-469d-ae6a-e431990ddee8",
"created_at": "2015-12-16T02:21:07.710312Z",
"updated_at": "2015-12-16T02:21:07.710312Z"
},
"created_at": "2015-12-16T02:21:07.711479Z"
},
{
"id": 103,
"app": "adcccdb4-b1a4-4209-a03a-762f4e021632",
"object_type": "job",
"object_id": "host-26c0ea34-e655-40d2-8d5e-c5694470af6c",
"data": {
"id": "host-26c0ea34-e655-40d2-8d5e-c5694470af6c",
"app": "adcccdb4-b1a4-4209-a03a-762f4e021632",
"meta": {
"bread": "with hemp"
},
"type": "foo",
"state": "down",
"release": "47154f8c-a604-469d-ae6a-e431990ddee8",
"created_at": "2015-12-16T02:21:06.765744Z",
"updated_at": "2015-12-16T02:21:07.704057Z",
"exit_status": 2
},
"created_at": "2015-12-16T02:21:07.707269Z"
},
{
"id": 102,
"app": "adcccdb4-b1a4-4209-a03a-762f4e021632",
"object_type": "job",
"object_id": "host-26c0ea34-e655-40d2-8d5e-c5694470af6c",
"data": {
"id": "host-26c0ea34-e655-40d2-8d5e-c5694470af6c",
"app": "adcccdb4-b1a4-4209-a03a-762f4e021632",
"meta": {
"bread": "with hemp"
},
"type": "foo",
"state": "up",
"release": "47154f8c-a604-469d-ae6a-e431990ddee8",
"created_at": "2015-12-16T02:21:06.765744Z",
"updated_at": "2015-12-16T02:21:07.689399Z"
},
"created_at": "2015-12-16T02:21:07.691418Z"
}
]
获取事件
实例:—————————————————————请求————————————————————
GET /events/111 HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
—————————————————————响应————————————————————
Content-Type: application/json
{
"id": 111,
"app": "adcccdb4-b1a4-4209-a03a-762f4e021632",
"object_type": "resource",
"object_id": "cc9f3342-bed0-4ed3-840e-c462e05808c6",
"data": {
"id": "cc9f3342-bed0-4ed3-840e-c462e05808c6",
"env": {
"FOO": "BAR"
},
"apps": [
"adcccdb4-b1a4-4209-a03a-762f4e021632"
],
"provider": "0952f692-2667-4be0-a159-9d68382a262c",
"created_at": "2015-12-16T02:21:16.838613Z",
"external_id": "/foo/bar"
},
"created_at": "2015-12-16T02:21:16.838613Z"
}
CA 证书
获取 CA 证书
实例:—————————————————————请求————————————————————
GET /ca-cert HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
—————————————————————响应————————————————————
Content-Type: application/x-x509-ca-cert
-----BEGIN CERTIFICATE-----
MIIDBDCCAe6gAwIBAgIRAP6BP9TQKrq0l1CCcSI4gb4wCwYJKoZIhvcNAQELMC0x
DjAMBgNVBAoTBUZseW5uMRswGQYDVQQLExJGbHlubiBFcGhlbWVyYWwgQ0EwHhcN
MTUxMjE2MDIyMDQxWhcNMjAxMjE0MDIyMDQxWjAtMQ4wDAYDVQQKEwVGbHlubjEb
MBkGA1UECxMSRmx5bm4gRXBoZW1lcmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOC
AQ8AMIIBCgKCAQEAn+KUccUSVeWoJZTlOxqaiXacGECGAPETxfmnL9ep1rA/4DWi
2OTpZoeSFdyL1yV5KJxPkq6XMNyl/BR72SOomCmoFRnZzDih//+gfuJAFVGaF1j9
FOIX+VyO8jyFzqk2vZg9R+ncRyFgjEgpHn0gDdt4WLWDxPpfFMClEZU6Mpu02ngj
1kmlNgzajl71qhhKtrv3W7ACKh6O3fMSBg4n/ZiVnVQjdkejHskV5R43FH4bpZzP
hb82rI6FNBNOCKqwbQ/AdGGVvJSzXPypvzCMkGghhx8pckoZw7DONXhSojfIO6Kt
lxUYO1Odmnb+nyJjxGyidSperhfm+CuSFPn2BwIDAQABoyMwITAOBgNVHQ8BAf8E
BAMCAAYwDwYDVR0TAQH/BAUwAwEB/zALBgkqhkiG9w0BAQsDggEBAGvEqq1ko+pE
S5RBHmTWW6mJom9rA+aii9n88lMhbdjikeVFkQkH6Qi8zR5O4hCdDUC4qYUp+rIF
Z4XZ9Ogl4CcR1gEPGu1KX2EnjVKloS1LThugCuP5YJgQ5qoMsQs681s1ZpPd/0gh
tjASQy1Y72wY1SxVWqJzkuzf8mMDg52I4wwD9Eif2zq1/+sJa9mdilhvd0Wp+hDV
6qN6xbH65V2VKwDrkD2p7CIn3NmknYhmw+obezqRkSl6N5Is/QPVg59bOu0evWfS
DyaOehm1EmmRVehNj8IR0noFwUMbIASnpTescLd4Nz9pEjbgHQ+m6Swe8hnaZ3dd
1TvxABm/4VY=
-----END CERTIFICATE-----
备份
获取集群备份
下载集群的全备份实例:—————————————————————请求————————————————————
GET /backup HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
—————————————————————响应————————————————————
Content-Disposition: attachment; filename="flynn-backup-2015-12-16_022126.tar"
Content-Type: application/tar
域名迁移
https://flynn.io/schema/controller/domain_migration#
属性 | 类型 | 描述 |
---|---|---|
id | uuid string | 唯一标志符 |
old_tls_cert | string | 旧域名的 TLS 证书,迁移任务时会设置它 |
tls_cert | string | 域名的 TLS 证书,若没有会生成一个 |
old_domain | uri string | 旧的迁出的域名 |
domain | uri string | 新的迁入的域名 |
created_at | date-time string | 对象创建时间戳 |
finished_at | date-time string | 迁入完成时间 |
迁移集群域名
将集群域名迁移的任务排队。从 domain_migration 事件流来看什么时候完成集群域名迁移。实例:—————————————————————请求————————————————————
PUT /domain HTTP/1.1
Authorization: Basic OnMzY3IzdA==
Content-Type: application/json
{
"id": "",
"old_domain": "dev.localflynn.com",
"domain": "127.0.0.1.xip.io"
}
—————————————————————响应————————————————————
Content-Type: application/json
{
"id": "5d4c321b-fe6a-42df-867e-ea1a55282396",
"old_tls_cert": {
"ca_cert": "",
"cert": "-----BEGIN CERTIFICATE-----\nMIIDSjCCAjSgAwIBAgIQDH8zACle7B+pqJB3QfwthDALBgkqhkiG9w0BAQswLTEO\nMAwGA1UEChMFRmx5bm4xGzAZBgNVBAsTEkZseW5uIEVwaGVtZXJhbCBDQTAeFw0x\nNTEyMTYwMjIwNDJaFw0yMDEyMTQwMjIwNDJaMC0xDjAMBgNVBAoTBUZseW5uMRsw\nGQYDVQQDExJkZXYubG9jYWxmbHlubi5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IB\nDwAwggEKAoIBAQC3NsEp+fYsbgr94cOBVnSK3ZcHBobwcCdzNvNqh6y1V9wn7x4C\nS6Rk0pn1Zz/FS1F+uA8KMVUzwWCCSl/jW4BNAqbLbVi4I5oap8mCDQDt+MDPZyn5\noOCn6vj5OCJXva3RmhJRocF88oXcH4lXWUyfKMOb+0/+tRC7lg5gqBxnvkiJrW7D\nyq0+FoZViBgrN3JcxAgWFx9FK8sITzWpgPqJvJiS4Ry54o8hBTQCKyFCHTwdoufd\nKyBwm6tNn/KLhUXcAEsBD3qvdI0AEX9rssGxVErCualgPaBAvDCFz2H+wwvKnHpK\nCcwIflE04YYOjCHphq9j7FIzd5/+fp0Ng53pAgMBAAGjajBo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+bk/g6F\nohfHj/PeDJFBe0MWC1Q4x7jbeHgqXQ9q7mun+9xH8ZziMdknHc4=\n-----END RSA PRIVATE KEY-----\n"
},
"old_domain": "dev.localflynn.com",
"domain": "127.0.0.1.xip.io",
"created_at": "2015-12-16T02:21:26.911192Z"
}