mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-12-03 04:07:51 +08:00
528 lines
28 KiB
JSON
528 lines
28 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"paths": {
|
|
"/v2/job": {
|
|
"get": {
|
|
"description": "get job list",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"v2"
|
|
],
|
|
"summary": "获取job列表",
|
|
"operationId": "JobList",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"format": "string",
|
|
"description": "node name",
|
|
"name": "node",
|
|
"in": "form"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"format": "string",
|
|
"description": "group name",
|
|
"name": "group",
|
|
"in": "form"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{\"ok\":true}"
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"description": "add or update job",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"v2"
|
|
],
|
|
"summary": "添加或者更新job",
|
|
"operationId": "UpdateJob",
|
|
"parameters": [
|
|
{
|
|
"type": "json",
|
|
"format": "string",
|
|
"description": "{\"id\":\"\",\"kind\":0,\"name\":\"aac\",\"oldGroup\":\"\",\"group\":\"default\",\"user\":\"\",\"cmd\":\"echo \\\"hello \\\"\u003e/tmp/aac.txt\",\"pause\":true,\"parallels\":0,\"timeout\":0,\"interval\":0,\"retry\":0,\"rules\":[{\"id\":\"NEW0.5930536330436825\",\"nids\":[\"172.16.0.118\"],\"timer\":\"* 5 * * * *\",\"exclude_nids\":[\"172.16.0.131\"]}],\"fail_notify\":false,\"to\":[]}",
|
|
"name": "job",
|
|
"in": "body",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{\"ok\":true}"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v2/job/group": {
|
|
"get": {
|
|
"description": "get all groups",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"v2"
|
|
],
|
|
"summary": "获取所有job的group",
|
|
"operationId": "GetAllGroup",
|
|
"responses": {
|
|
"200": {
|
|
"description": "[\"group1\",...]"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v2/job/{group}-{id}": {
|
|
"get": {
|
|
"description": "get job by group and id",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"v2"
|
|
],
|
|
"summary": "获取 job",
|
|
"operationId": "GetJob",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"format": "string",
|
|
"description": "group name",
|
|
"name": "group",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"format": "string",
|
|
"description": "job id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{\"id\":\"\",\"kind\":0,\"name\":\"aac\",\"group\":\"default\",\"user\":\"\",\"cmd\":\"echo \\\"hello \\\"\u003e/tmp/aac.txt\",\"pause\":true,\"parallels\":0,\"timeout\":0,\"interval\":0,\"retry\":0,\"rules\":[{\"id\":\"NEW0.5930536330436825\",\"nids\":[\"172.16.0.118\"],\"timer\":\"* 5 * * * *\",\"exclude_nids\":[\"172.16.0.131\"]}],\"fail_notify\":false,\"to\":[]}"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "change job status",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"v2"
|
|
],
|
|
"summary": "更改 job 状态",
|
|
"operationId": "ChangeJobStatus",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"format": "string",
|
|
"description": "group name",
|
|
"name": "group",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"format": "string",
|
|
"description": "job id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"format": "string",
|
|
"description": "{\"id\":\"\",\"kind\":0,\"name\":\"aac\",\"group\":\"default\",\"user\":\"\",\"cmd\":\"echo \\\"hello \\\"\u003e/tmp/aac.txt\",\"pause\":true,\"parallels\":0,\"timeout\":0,\"interval\":0,\"retry\":0,\"rules\":[{\"id\":\"NEW0.5930536330436825\",\"nids\":[\"172.16.0.118\"],\"timer\":\"* 5 * * * *\",\"exclude_nids\":[\"172.16.0.131\"]}],\"fail_notify\":false,\"to\":[]}",
|
|
"in": "body",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{\"id\":\"\",\"kind\":0,\"name\":\"aac\",\"group\":\"default\",\"user\":\"\",\"cmd\":\"echo \\\"hello \\\"\u003e/tmp/aac.txt\",\"pause\":true,\"parallels\":0,\"timeout\":0,\"interval\":0,\"retry\":0,\"rules\":[{\"id\":\"NEW0.5930536330436825\",\"nids\":[\"172.16.0.118\"],\"timer\":\"* 5 * * * *\",\"exclude_nids\":[\"172.16.0.131\"]}],\"fail_notify\":false,\"to\":[]}"
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "delete job by group and id",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"v2"
|
|
],
|
|
"summary": "删除 job",
|
|
"operationId": "DeleteJob",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"format": "string",
|
|
"description": "group name",
|
|
"name": "group",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"format": "string",
|
|
"description": "job id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{\"ok\":true}"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v2/job/{group}-{id}/execute/{name}": {
|
|
"put": {
|
|
"description": "execute job",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"v2"
|
|
],
|
|
"summary": "立即在 node上 执行一次指定group/id 的job",
|
|
"operationId": "JobExecute",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"format": "string",
|
|
"description": "group name",
|
|
"name": "group",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"format": "string",
|
|
"description": "job id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"format": "string",
|
|
"description": "node name",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{\"ok\":true}"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v2/job/{group}-{id}/nodes": {
|
|
"get": {
|
|
"description": "get job runnable nodes",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"v2"
|
|
],
|
|
"summary": "获取job的可执行节点",
|
|
"operationId": "GetJobNodes",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"format": "string",
|
|
"description": "group name",
|
|
"name": "group",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"format": "string",
|
|
"description": "job id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "[\"10.1.1.2\",...]"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v2/node": {
|
|
"get": {
|
|
"description": "get node list info from etcd",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"v2"
|
|
],
|
|
"summary": "从etcd获取节点简单列表信息",
|
|
"operationId": "GetNodeList",
|
|
"responses": {
|
|
"200": {
|
|
"description": "[{\"uuid\": \"ccc\", \"Status\":\"create\",\"host_name\": \"10.0.55.73\", \"internal_ip\": \"10.0.55.73\", \"external_ip\": \"10.0.55.73\", \"available_memory\": 16267956, \"available_cpu\": 4, \"role\": \"\", \"labels\": {\"key1\": \"value1\"}, \"unschedulable\": false},{}]"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v2/node/details/{node}": {
|
|
"get": {
|
|
"description": "get node details info from k8s\n",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"v2"
|
|
],
|
|
"summary": "从服务器获取节点详细信息",
|
|
"operationId": "GetNodeDetails",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"format": "string",
|
|
"description": "nodeuid",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{\"metadata\":{\"name\":\"10.0.55.73\",\"selfLink\":\"/api/v1/nodes10.0.55.73\",\"uid\":\"84014c3d-985c-11e7-bab9-00163e020ab5\",\"resourceVersion\":\"25615083\",\"creationTimestamp\":\"2017-09-13T08:21:17Z\",\"labels\":{\"key1\":\"value1\"},\"annotations\":{\"node.alpha.kubernetes.io/ttl\":\"0\",\"volumes.kubernetes.io/controller-managed-attach-detach\":\"true\"}},\"spec\":{\"externalID\":\"10.0.55.73\"},\"status\":{\"capacity\":{\"cpu\":\"4\",\"memory\":\"16267956Ki\",\"pods\":\"10k\"},\"allocatable\":{\"cpu\":\"4\",\"memory\":\"16165556Ki\",\"pods\":\"10k\"},\"conditions\":[{\"type\":\"OutOfDisk\",\"status\":\"False\",\"lastHeartbeatTime\":\"2017-09-13T10:41:16Z\",\"lastTransitionTime\":\"2017-09-13T10:20:27Z\",\"reason\":\"KubeletHasSufficientDisk\",\"message\":\"kubelet has sufficient disk space available\"},{\"type\":\"MemoryPressure\",\"status\":\"False\",\"lastHeartbeatTime\":\"2017-09-13T10:41:16Z\",\"lastTransitionTime\":\"2017-09-13T10:20:27Z\",\"reason\":\"KubeletHasSufficientMemory\",\"message\":\"kubelet has sufficient memory available\"},{\"type\":\"DiskPressure\",\"status\":\"False\",\"lastHeartbeatTime\":\"2017-09-13T10:41:16Z\",\"lastTransitionTime\":\"2017-09-13T10:20:27Z\",\"reason\":\"KubeletHasNoDiskPressure\",\"message\":\"kubelet has no disk pressure\"},{\"type\":\"Ready\",\"status\":\"True\",\"lastHeartbeatTime\":\"2017-09-13T10:41:16Z\",\"lastTransitionTime\":\"2017-09-13T10:38:25Z\",\"reason\":\"KubeletReady\",\"message\":\"kubelet is posting ready status\"}],\"addresses\":[{\"type\":\"Hostname\",\"address\":\"10.0.55.73\"},{\"type\":\"InternalIP\",\"address\":\"10.0.55.73\"},{\"type\":\"LegacyHostIP\",\"address\":\"10.0.55.73\"}],\"daemonEndpoints\":{\"kubeletEndpoint\":{\"Port\":10250}},\"nodeInfo\":{\"machineID\":\"df39b3efbcee4d5c84b2feab34009235\",\"systemUUID\":\"08A7D00A-C4B6-4AB7-8D8D-DA14C104A4DC\",\"bootID\":\"b4cd3c6c-e18d-43ae-9f11-3125110e9179\",\"kernelVersion\":\"3.10.0-514.21.2.el7.x86_64\",\"osImage\":\"CentOS Linux 7 (Core)\",\"containerRuntimeVersion\":\"docker://1.12.6\",\"kubeletVersion\":\"v1.6.4-48+61221fc61897e2-dirty\",\"kubeProxyVersion\":\"v1.6.4-48+61221fc61897e2-dirty\",\"operatingSystem\":\"linux\",\"architecture\":\"amd64\"},\"images\":[{\"names\":[\"goodrain.me/2e4c4e027008_dockerfile_spark-2.2.0-alluxio@sha256:ce197c224ff66443a08f7dfc9fed760c32757dd0f0679799b9d269d9db51e13d\",\"goodrain.me/2e4c4e027008_dockerfile_spark-2.2.0-alluxio:20170830143118\",\"goodrain.me/2e4c4e027008_dockerfile_spark-2.2.0-alluxio:20170830184733\"],\"sizeBytes\":2647820101},{\"names\":[\"goodrain.me/2e4c4e027008_dockerfile_spark-2.2.0-alluxio@sha256:8f9eb080bbf1d3032345fb8706ae0745501a1efa1fcea8f50f5dbafce4c84b65\",\"goodrain.me/2e4c4e027008_goodrain-apps_spark-2.2.0-alluxio@sha256:8f9eb080bbf1d3032345fb8706ae0745501a1efa1fcea8f50f5dbafce4c84b65\",\"goodrain.me/88c078b8ea97_dockerfile_spark-2.2.0-alluxio@sha256:8f9eb080bbf1d3032345fb8706ae0745501a1efa1fcea8f50f5dbafce4c84b65\",\"goodrain.me/2e4c4e027008_dockerfile_spark-2.2.0-alluxio:20170830142750\",\"goodrain.me/2e4c4e027008_goodrain-apps_spark-2.2.0-alluxio:20170830122343\"],\"sizeBytes\":2647820100},{\"names\":[\"goodrain.me/2e4c4e027008_goodrain-apps_spark-2.2.0-alluxio@sha256:19249e625e7a8ab1855ce95ae4fcc9ad97577953f2699ace4c9b804da085c867\",\"goodrain.me/2e4c4e027008_goodrain-apps_spark-2.2.0-alluxio:20170830113536\",\"goodrain.me/2e4c4e027008_goodrain-apps_spark-2.2.0-alluxio:20170830115858\"],\"sizeBytes\":2647820048},{\"names\":[\"goodrain.me/2e4c4e027008_goodrain-apps_spark-2.2.0-alluxio@sha256:c6145a1fa0eb1a042498d5e00269ce8d84712b35b47ebb93e41065f63aea31da\",\"goodrain.me/2e4c4e027008_goodrain-apps_spark-2.2.0-alluxio:20170830112150\"],\"sizeBytes\":2647819994},{\"names\":[\"goodrain.me/goodrain/spark@sha256:9fd5e07fccc7fb368745b44890ccf78faf3bb81fb5989ad215383385681ef368\",\"goodrain.me/goodrain/spark:2.2.0-alluxio_gr3920e2\",\"goodrain.me/goodrain/spark:2.2.0-alluxio_gr3920e2_gr1ed98b\"],\"sizeBytes\":2647819621},{\"names\":[\"goodrain.me/runner@sha256:6e9a4e759aa087ea0fa0e376d821dde301ec1ef7884a4366cd9f49d51f03b2ff\"],\"sizeBytes\":1184005514},{\"names\":[\"goodraincloudframeworks/kafka@sha256:386d9258d1daf004f62694e2c3c68a4fe579d67f97f6f9ef114acfe420d980e7\",\"goodraincloudframeworks/kafka:latest\"],\"sizeBytes\":725299223},{\"names\":[\"goodrain.me/runner@sha256:1e91fcf11618dce578ce60aeb2acff69a8de93db95c0ba5981119a84bfa6eefe\",\"hub.goodrain.com/dc-deploy/runner@sha256:0e7c473dd54a12bb984bcfaa7f9801cb46891dbd67aba7d9bf55548b0a3f0fc8\"],\"sizeBytes\":657978825},{\"names\":[\"goodrain.me/runner@sha256:26c38d26dccc951c4b5b49bdc3f55d46e8ffad9cd504adcf2b915b3e8e1e9ae9\",\"hub.goodrain.com/dc-deploy/runner@sha256:6014772acfea34b64c7224e1d85bf02b530c395c2cd4234329b3bbb6d94420b0\"],\"sizeBytes\":657978237},{\"names\":[\"goodrain.me/runner@sha256:f9989662cf41688ca38cea5cc4d66d86af8008efabd01ff761c7dae4dc9b17a5\",\"hub.goodrain.com/dc-deploy/runner@sha256:3d80f4d375f349c9548deda59d4b59c880bf388007588e0f3745de1ae1fac175\",\"goodrain.me/runner:latest\",\"hub.goodrain.com/dc-deploy/runner:3.3\"],\"sizeBytes\":657978055},{\"names\":[\"hub.goodrain.com/dc-deploy/acp_db@sha256:e40389bc8873527ccef9765e7d68ce3e62dece0b5566c2b3dce4221c6ded85b6\",\"hub.goodrain.com/dc-deploy/acp_db:2017.06\"],\"sizeBytes\":512013214},{\"names\":[\"hub.goodrain.com/dc-deploy/acp_db@sha256:4b6523fad8b74108fe581a46f6f4c3ede2a6acb76ca7135e6f289d278b15d5f8\",\"hub.goodrain.com/dc-deploy/acp_db:3.2\"],\"sizeBytes\":512013214},{\"names\":[\"goodrain.me/phpadmin@sha256:30c9c7d454f56668ff866eff0e8ec385a2fcb480b4bc420a941b596751f1b753\",\"goodrain.me/phpadmin:latest_grae9eae\"],\"sizeBytes\":496684863},{\"names\":[\"goodrain.me/zipkin-mysql@sha256:ae749e0910bb8f223d02500cf2df393d9a733f31a99bc0bb6ffbe27997506319\",\"goodrain.me/zipkin-mysql:latest_gr143061\"],\"sizeBytes\":442364671},{\"names\":[\"goodrain.me/a0ec448a34b9_goodrain-apps_mysql@sha256:566ef9a71eeee90dd3165d5e13247bace24c7729f5be006fbaaf7083c26418e6\",\"goodrain.me/a0ec448a34b9_goodrain-apps_mysql:20160517200927\"],\"sizeBytes\":411234143},{\"names\":[\"goodrain.me/mysql@sha256:554f8de112aa7acacfd721b80598a37db6444a6ffc934c71a957ceac5e6c239f\",\"goodrain.me/mysql:5.7_gr4d011f\",\"goodrain.me/mysql:5.7_grf2f1e2\"],\"sizeBytes\":407254839},{\"names\":[\"kannix/monero-miner@sha256:6ab6ee80c0f7abe76dd28c7ab64b093043eb73adf3bb7976822cc08833358136\",\"kannix/monero-miner:latest\"],\"sizeBytes\":395474404},{\"names\":[\"goodrain.me/e81fdd2dc33a_bay1ts_dynamiccassandracluser@sha256:52489b8391e9838f83fe568c452e70a2c91e043c5219ca0adeb6e2374b77528e\",\"goodrain.me/e81fdd2dc33a_bay1ts_dynamiccassandracluser:20170830114420\"],\"sizeBytes\":389387489},{\"names\":[\"goodrain.me/de415f55f26a_bay1ts_dynamiccassandracluser@sha256:6f47807520e0527e3cc7aa367fe828ae12926ed4929689d8ad949b45c79fc42f\",\"goodrain.me/de415f55f26a_bay1ts_dynamiccassandracluser:20170830140451\"],\"sizeBytes\":377151102},{\"names\":[\"goodrain.me/piggymetrics-account-service@sha256:9baec8c56da21c6d42dd4320987dbc0799e941205e6d369db587c44016fb71b8\",\"goodrain.me/piggymetrics-account-service:latest_gr6132fc\"],\"sizeBytes\":353584344},{\"names\":[\"goodrain.me/piggymetrics-auth-service@sha256:d23981f6db94aeb767d465dab3e4212d158676acd89fd41ff135fe180b1c55fe\",\"goodrain.me/piggymetrics-auth-service:latest_gr0a920e\"],\"sizeBytes\":349752754},{\"names\":[\"goodrain.me/piggymetrics-config@sha256:a94ec7c797ce8bfba777ba06f7ab4fda2153d9ba7debb0b118c526f70e9e255e\",\"goodrain.me/piggymetrics-config:latest_gr1bffcc\"],\"sizeBytes\":332802082},{\"names\":[\"goodrain.me/function-ui@sha256:1e0a876d2d689cef5f12b3dafd9367730d989d8d47d141c4a769cb42135894df\",\"goodrain.me/function-ui:latest_gr1e23d2\",\"goodrain.me/function-ui:latest_gr2f5c28\",\"goodrain.me/function-ui:latest_gr6fc493\",\"goodrain.me/function-ui:latest_gr748412\"],\"sizeBytes\":307968019},{\"names\":[\"goodrain.me/tomcat@sha256:9fb41ccd974dbc26a661db1c543a8d6a0bad1484eb87623abc2051144831274f\",\"goodrain.me/tomcat:latest_grdae165\"],\"sizeBytes\":292388967},{\"names\":[\"goodrain.me/tomcat@sha256:d471ddccf8355b4287935383cae6170bb727a9ae914278ec1d3d9a3b7f639964\",\"goodrain.me/tomcat:latest_grad2224\"],\"sizeBytes\":292302023},{\"names\":[\"goodrain.me/05ec115cd5d3_bay1ts_zk_cluster_mini@sha256:d1b28be270f2a782d60130d4a76c9e16a94f10776891f5c7f9b022bc29996381\",\"goodrain.me/78b96e274d9e_bay1ts_zk_cluster_mini@sha256:d1b28be270f2a782d60130d4a76c9e16a94f10776891f5c7f9b022bc29996381\",\"goodrain.me/05ec115cd5d3_bay1ts_zk_cluster_mini:20170831115100\",\"goodrain.me/78b96e274d9e_bay1ts_zk_cluster_mini:20170901091945\"],\"sizeBytes\":266957262},{\"names\":[\"goodrain.me/05ec115cd5d3_bay1ts_zk_cluster_mini@sha256:586c7cdffed4da14498694e987fae415d2215ba9e49cf382ce15d44f33eb6b0e\",\"goodrain.me/05ec115cd5d3_bay1ts_zk_cluster_mini:20170831110530\"],\"sizeBytes\":266957230},{\"names\":[\"goodrain.me/05ec115cd5d3_bay1ts_zk_cluster_mini@sha256:517f584c9ab729565215f69f0164e99a499e779a42181f93654311c841ba7259\",\"goodrain.me/05ec115cd5d3_bay1ts_zk_cluster_mini:20170831100345\"],\"sizeBytes\":266957082},{\"names\":[\"goodrain.me/8d1fc732e7e3_bay1ts_zk_cluster_mini@sha256:af1d80a5dc92f12567b6c76b16b9d3d48af26baca389ff9ba8fb0408ed86b320\",\"goodrain.me/8d1fc732e7e3_bay1ts_zk_cluster_mini:20170830175522\",\"goodrain.me/8d1fc732e7e3_bay1ts_zk_cluster_mini:20170831095719\"],\"sizeBytes\":266957048},{\"names\":[\"goodrain.me/mysql@sha256:6df9336b0620bf834b7379b0dd439a505fee3ca63bf8c496510f8e97174c63d5\",\"goodrain.me/mysql:5.5_gr72a895\"],\"sizeBytes\":256344622},{\"names\":[\"goodrain.me/centos-nginx@sha256:ba81ab2f40c111d226d65ea957a9aff03f5c1755c38f5b34a0b3be89d55c4f0c\",\"goodrain.me/centos-nginx:centos7_gr82a0ac\"],\"sizeBytes\":255928483},{\"names\":[\"goodrain.me/mysql@sha256:08bbf3d0ef1f3b2de0300d08388fe3d1ea9cab9c8fe023743cc4bb97299c2902\",\"goodrain.me/mysql:5.5_gr1337cc\",\"goodrain.me/mysql:5.5_gr142fae\",\"goodrain.me/mysql:5.5_gr7f335f\",\"goodrain.me/mysql:5.5_gra3cc0b\"],\"sizeBytes\":255800911},{\"names\":[\"goodrain.me/piggymetrics-mongodb@sha256:4bb264cf08348973362c26b2096eb6e90b9d4aa21b77f1a6b9b5f0f9d4bd6677\",\"goodrain.me/piggymetrics-mongodb:latest_gr1adae0\",\"goodrain.me/piggymetrics-mongodb:latest_gr30d357\"],\"sizeBytes\":235491683},{\"names\":[\"goodrain.me/smack-influxdb@sha256:ea40d2b70379bd470306a22da42860dd9d4e1467463a23906e066528a2ae13b4\",\"goodrain.me/smack-influxdb:1.2.4_gr6f24a3\"],\"sizeBytes\":224177348},{\"names\":[\"goodrain.me/zipkin-dependencies@sha256:16d66043dcdad1ce8848ab09a26f0971d7d721c353d864aab01f03648aa00ca9\",\"goodrain.me/zipkin-dependencies:latest_gr82e322\"],\"sizeBytes\":212578703},{\"names\":[\"jocatalin/kubernetes-bootcamp@sha256:0d6b8ee63bb57c5f5b6156f446b3bc3b3c143d233037f3a2f00e279c8fcc64af\",\"jocatalin/kubernetes-bootcamp:v1\"],\"sizeBytes\":211287421},{\"names\":[\"centos@sha256:c1010e2fe2b635822d99a096b1f4184becf5d1c98707cbccae00be663a9b9131\"],\"sizeBytes\":192529651},{\"names\":[\"centos@sha256:26f74cefad82967f97f3eeeef88c1b6262f9b42bc96f2ad61d6f3fdf544759b8\",\"centos:latest\"],\"sizeBytes\":192503276},{\"names\":[\"nginx@sha256:e6693c20186f837fc393390135d8a598a96a833917917789d63766cab6c59582\",\"nginx:1.11\"],\"sizeBytes\":182476112},{\"names\":[\"goodrain.me/rabbitmq@sha256:290f3cdf4eda788bc215ba0a891032b2cccaabb42f1b6eba2ed6dc29570ba457\",\"goodrain.me/rabbitmq:3-management_gr54ef00\"],\"sizeBytes\":177035272},{\"names\":[\"goodrain.me/dc-deploy/mysql@sha256:d2ae097b586512e6448045c17253f44ab54981b2e9e35dbe3452bb389b3c11f5\",\"goodrain.me/dc-deploy/mysql:latest_gr6097c7\"],\"sizeBytes\":176566714},{\"names\":[\"goodrain.me/zipkin@sha256:768b88df3076f5e56b15068846d59d887f37b37f70b00d2eb6aacbc451e012c4\",\"goodrain.me/zipkin:latest_grfd56e2\"],\"sizeBytes\":174030884},{\"names\":[\"hub.goodrain.com/dc-deploy/registry@sha256:fb72efb7644521a49fdb0670e865da8ca2d0d2044f747451436929d43c686a8e\",\"hub.goodrain.com/dc-deploy/registry:2.3.1\"],\"sizeBytes\":165760106},{\"names\":[\"goodrain.me/8d1fc732e7e3_bay1ts_dynamiczookeepercluser@sha256:02be7217edf7a091941ad59d130883f80679f8418b727668fa5a085d591822a7\",\"goodrain.me/8d1fc732e7e3_bay1ts_dynamiczookeepercluser:20170829185556\"],\"sizeBytes\":145882479},{\"names\":[\"goodrain.me/8d1fc732e7e3_bay1ts_dynamiczookeepercluser@sha256:82e9062bf7b0012e6c0690a26208da58b9a386cee7d00535482691a568e9d59c\",\"goodrain.me/8d1fc732e7e3_bay1ts_dynamiczookeepercluser:20170829182544\"],\"sizeBytes\":145882479},{\"names\":[\"goodrain.me/8d1fc732e7e3_bay1ts_dynamiczookeepercluser@sha256:642c62567348e253930d53959fdf42f50e7953509d9552989b26cc2f085bb08b\",\"goodrain.me/8d1fc732e7e3_bay1ts_dynamiczookeepercluser:20170830145417\"],\"sizeBytes\":145882439},{\"names\":[\"goodrain.me/8d1fc732e7e3_bay1ts_dynamiczookeepercluser@sha256:3f652a23d11c87d95998ee136f27d48531da8e788b444da4bc1c784a952257aa\",\"goodrain.me/8d1fc732e7e3_bay1ts_dynamiczookeepercluser:20170829214100\"],\"sizeBytes\":145882389},{\"names\":[\"goodrain.me/7fb9880731b0_bay1ts_dynamiczookeepercluser@sha256:c4120f89dca633f3044e4457402cd4aedbf369bf1c6a39f904bcdc8add169dfd\",\"goodrain.me/8d1fc732e7e3_bay1ts_dynamiczookeepercluser@sha256:c4120f89dca633f3044e4457402cd4aedbf369bf1c6a39f904bcdc8add169dfd\",\"goodrain.me/f2d8d6d53cab_bay1ts_dynamiczookeepercluser@sha256:c4120f89dca633f3044e4457402cd4aedbf369bf1c6a39f904bcdc8add169dfd\",\"goodrain.me/7fb9880731b0_bay1ts_dynamiczookeepercluser:20170829172958\",\"goodrain.me/8d1fc732e7e3_bay1ts_dynamiczookeepercluser:20170829173421\"],\"sizeBytes\":145881471},{\"names\":[\"goodrain.me/8d1fc732e7e3_bay1ts_dynamiczookeepercluser@sha256:2dfd7ac05b42f0a0aa31cea39d17453fa84bdb908a7f8e5e35ba404824e6f1bf\",\"goodrain.me/8d1fc732e7e3_bay1ts_dynamiczookeepercluser:20170829175738\"],\"sizeBytes\":145881469},{\"names\":[\"goodrain.me/rabbitmq@sha256:aeefee7c1f854e7b401df387d6d23edb79b7a6cdd360d4800c25eba76cf6c33f\",\"goodrain.me/rabbitmq:3-management_gr9b461c\"],\"sizeBytes\":123614438}]}}"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v2/node/{name}": {
|
|
"delete": {
|
|
"description": "delete node from etcd",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"v2"
|
|
],
|
|
"summary": "从etcd 删除计算节点",
|
|
"operationId": "DeleteFromDB",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"format": "string",
|
|
"description": "nodeuid",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{\"ok\":true}"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v2/node/{name}/label": {
|
|
"post": {
|
|
"description": "add label to node",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"v2"
|
|
],
|
|
"summary": "为node添加label",
|
|
"operationId": "AddLabel",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"format": "string",
|
|
"description": "nodeuid",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"format": "string",
|
|
"description": "{\"LKey\":\"key1\",\"LValue\":\"value1\"}",
|
|
"in": "body",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{\"ok\":true}"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v2/node/{name}/reschedulable": {
|
|
"put": {
|
|
"description": "make node schedulable",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"v2"
|
|
],
|
|
"summary": "使节点可调度",
|
|
"operationId": "UnCordon",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"format": "string",
|
|
"description": "nodeuid",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{\"ok\":true}"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v2/node/{name}/unschedulable": {
|
|
"put": {
|
|
"description": "make node unschedulable",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"v2"
|
|
],
|
|
"summary": "使节点不可调度",
|
|
"operationId": "Cordon",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"format": "string",
|
|
"description": "nodeuid",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{\"ok\":true}"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v2/node/{node}": {
|
|
"put": {
|
|
"description": "add node",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"v2"
|
|
],
|
|
"summary": "重新上线计算节点",
|
|
"operationId": "AddNode",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"format": "string",
|
|
"description": "nodeuid",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{\"ok\":true}"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "update",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"v2"
|
|
],
|
|
"summary": "更新node",
|
|
"operationId": "UpdateNode",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"format": "string",
|
|
"description": "nodeuid",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"format": "string",
|
|
"description": "[{\"uuid\": \"ccc\", \"Status\":\"create\",\"host_name\": \"10.0.55.73\", \"internal_ip\": \"10.0.55.73\", \"external_ip\": \"10.0.55.73\", \"available_memory\": 16267956, \"available_cpu\": 4, \"role\": \"\", \"labels\": {\"key1\": \"value1\"}, \"unschedulable\": false},{}]",
|
|
"in": "body",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{\"ok\":true}"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v2/node/{node}/down": {
|
|
"post": {
|
|
"description": "offline node",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"v2"
|
|
],
|
|
"summary": "下线计算节点",
|
|
"operationId": "DeleteNode",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"format": "string",
|
|
"description": "nodeuid",
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "{\"ok\":true}"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |