Container Infrastructure Management API¶
API Versions¶
In order to bring new features to users over time, the Magnum API supports versioning. There are two kinds of versions in Magnum.
‘’major versions’’, which have dedicated urls
‘’microversions’’, which can be requested through the use of the
OpenStack-API-Version
.
Beginning with the Newton release, all API requests support the
OpenStack-API-Version
header. This header SHOULD be supplied
with every request; in the absence of this header, each request is treated
as though coming from an older pre-Newton client. This was done to preserve
backwards compatibility as we introduced new features.
The Version APIs work differently from other APIs as they do not require authentication.
This fetches all the information about all known major API versions in the deployment. Links to more specific information will be provided for each API version, as well as information about supported min and max microversions.
Response Codes¶
Success¶
Code |
Reason |
---|---|
200 - OK |
Request was successful. |
Error¶
Code |
Reason |
---|---|
503 - Service Unavailable |
Service is not available. This is mostly caused by service configuration errors which prevents the service from successful start up. |
Response¶
Name |
In |
Type |
Description |
---|---|---|---|
X-Openstack-Request-Id |
header |
UUID |
A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs. |
versions |
body |
string |
The version. |
status |
body |
string |
The status of this API version. This can be one of:
|
min_version |
body |
string |
If this version of the API supports microversions, the minimum microversion that is supported. This will be the empty string if microversions are not supported. |
max_version |
body |
string |
If this version of the API supports microversions, the maximum microversion that is supported. This will be the empty string if microversions are not supported. |
id |
body |
string |
A common name for the version in question. Informative only, it has no real semantic meaning. |
links |
body |
array |
Links to the resources in question. |
name |
body |
string |
Name of the resource. |
description |
body |
string |
Descriptive text about the Magnum service. |
Response Example¶
{
"versions":[
{
"status":"CURRENT",
"min_version":"1.1",
"max_version":"1.4",
"id":"v1",
"links":[
{
"href":"http://10.164.180.104:9511/v1/",
"rel":"self"
}
]
}
],
"name":"OpenStack Magnum API",
"description":"Magnum is an OpenStack project which aims to provide container management."
}
Show all the resources within the Magnum v1 API.
Response Codes¶
Success¶
Code |
Reason |
---|---|
200 - OK |
Request was successful. |
Error¶
Code |
Reason |
---|---|
503 - Service Unavailable |
Service is not available. This is mostly caused by service configuration errors which prevents the service from successful start up. |
Response¶
Name |
In |
Type |
Description |
---|---|---|---|
X-Openstack-Request-Id |
header |
UUID |
A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs. |
id |
body |
string |
A common name for the version in question. Informative only, it has no real semantic meaning. |
links |
body |
array |
Links to the resources in question. |
Note
The media-types
parameters in the response are
vestigial and provide no useful information. They will probably be
deprecated and removed in the future.
Response Example¶
{
"media_types":[
{
"base":"application/json",
"type":"application/vnd.openstack.magnum.v1+json"
}
],
"links":[
{
"href":"http://10.164.180.104:9511/v1/",
"rel":"self"
},
{
"href":"http://docs.openstack.org/developer/magnum/dev/api-spec-v1.html",
"type":"text/html",
"rel":"describedby"
}
],
"mservices":[
{
"href":"http://10.164.180.104:9511/v1/mservices/",
"rel":"self"
},
{
"href":"http://10.164.180.104:9511/mservices/",
"rel":"bookmark"
}
],
"clustertemplates":[
{
"href":"http://10.164.180.104:9511/v1/clustertemplates/",
"rel":"self"
},
{
"href":"http://10.164.180.104:9511/clustertemplates/",
"rel":"bookmark"
}
],
"certificates":[
{
"href":"http://10.164.180.104:9511/v1/certificates/",
"rel":"self"
},
{
"href":"http://10.164.180.104:9511/certificates/",
"rel":"bookmark"
}
],
"clusters":[
{
"href":"http://10.164.180.104:9511/v1/clusters/",
"rel":"self"
},
{
"href":"http://10.164.180.104:9511/clusters/",
"rel":"bookmark"
}
],
"id":"v1"
}
Magnum Base URLs¶
All API calls through the rest of this document require authentication
with the OpenStack Identity service. They also required a url
that
is extracted from the Identity token of type
container-infra
. This will be the root url that every call below will be
added to build a full path.
Note that if using OpenStack Identity service API v2, url
can be
represented via adminURL
, internalURL
or publicURL
in endpoint
catalog. In Identity service API v3, url
is represented with field
interface
including admin
, internal
and public
.
For instance, if the url
is
http://my-container-infra.org/magnum/v1
then the full API call for
/clusters
is http://my-container-infra.org/magnum/v1/clusters
.
Depending on the deployment the container infrastructure management service url might be http or https, a custom port, a custom path, and include your project id. The only way to know the urls for your deployment is by using the service catalog. The container infrastructure management URL should never be hard coded in applications, even if they are only expected to work at a single site. It should always be discovered from the Identity token.
As such, for the rest of this document we will be using short hand
where GET /clusters
really means
GET {your_container_infra_url}/clusters
.
Manage Cluster¶
Lists, creates, shows details for, updates, and deletes Cluster.
Create new cluster based on cluster template.
Response Codes¶
Success¶
Code |
Reason |
---|---|
202 - Accepted |
Request was accepted for processing, but the processing has not been completed. A ‘location’ header is included in the response which contains a link to check the progress of the request. |
Error¶
Code |
Reason |
---|---|
400 - Bad Request |
Some content in the request was invalid. |
401 - Unauthorized |
User must authenticate before making a request. |
403 - Forbidden |
Policy does not allow current user to do this operation. |
404 - Not Found |
The requested resource could not be found. |
Request¶
Name |
In |
Type |
Description |
---|---|---|---|
name |
body |
string |
Name of the resource. |
discovery_url |
body |
string |
The custom discovery url for node discovery. This is used by the COE to
discover the servers that have been created to host the containers. The
actual discovery mechanism varies with the COE. In some cases, Magnum fills
in the server info in the discovery service. In other cases, if the
https://discovery.etcd.io
In this case, Magnum will generate a unique url here for each uster and store the info for the servers. |
master_count |
body |
integer |
The number of servers that will serve as master for the cluster. The
default is 1. Set to more than 1 master to enable High Availability. If
the option |
cluster_template_id |
body |
UUID |
The UUID of the cluster template. |
node_count |
body |
integer |
The number of servers that will serve as node in the cluster. The default is 1. |
create_timeout |
body |
integer |
The timeout for cluster creation in minutes. The value expected is a
positive integer and the default is 60 minutes. If the timeout is reached
during cluster creation process, the operation will be aborted and the
cluster status will be set to |
keypair |
body |
string |
The name of the SSH keypair to configure in the cluster servers
for ssh access. Users will need the key to be able to ssh to the servers in
the cluster. The login name is specific to the cluster driver, for
example with fedora-atomic image, default login name is |
master_flavor_id (Optional) |
body |
string |
The flavor of the master node for this cluster template. |
labels (Optional) |
body |
array |
Arbitrary labels in the form of |
flavor_id |
body |
string |
The nova flavor ID or name for booting the node servers. The default is
|
fixed_subnet (Optional) |
body |
string |
Fixed subnet that are using to allocate network address for nodes in cluster. |
fixed_network (Optional) |
body |
string |
The name or network ID of a Neutron network to provide connectivity to the internal network for the cluster. |
floating_ip_enabled (Optional) |
body |
boolean |
Whether enable or not using the floating IP of cloud provider. Some cloud providers used floating IP, some used public IP, thus Magnum provide this option for specifying the choice of using floating IP. If it’s not set, the value of floating_ip_enabled in template will be used. |
master_lb_enabled (Optional) |
body |
boolean |
Since multiple masters may exist in a cluster, a Neutron load balancer
is created to provide the API endpoint for the cluster and to direct
requests to the masters. In some cases, such as when the LBaaS service is
not available, this option can be set to |
Note
Request for creating cluster is asynchronous from Newton.
Request Example¶
{
"name":"k8s",
"discovery_url":null,
"master_count":2,
"cluster_template_id":"0562d357-8641-4759-8fed-8173f02c9633",
"node_count":2,
"create_timeout":60,
"keypair":"my_keypair",
"master_flavor_id":null,
"labels":{
},
"flavor_id":null
}
Response¶
Name |
In |
Type |
Description |
---|---|---|---|
X-Openstack-Request-Id |
header |
UUID |
A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs. |
uuid |
body |
UUID |
The UUID of the cluster. |
Response Example¶
{
"uuid":"746e779a-751a-456b-a3e9-c883d734946f"
}
List all clusters in Magnum.
Response Codes¶
Success¶
Code |
Reason |
---|---|
200 - OK |
Request was successful. |
Error¶
Code |
Reason |
---|---|
401 - Unauthorized |
User must authenticate before making a request. |
403 - Forbidden |
Policy does not allow current user to do this operation. |
Response¶
Name |
In |
Type |
Description |
---|---|---|---|
X-Openstack-Request-Id |
header |
UUID |
A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs. |
clusters |
body |
array |
The list of all clusters in Magnum. |
status |
body |
string |
The current state of the cluster. |
uuid |
body |
UUID |
The UUID of the cluster. |
links |
body |
array |
Links to the resources in question. |
stack_id |
body |
UUID |
The reference UUID of orchestration stack from Heat orchestration service. |
keypair |
body |
string |
The name of the SSH keypair to configure in the cluster servers
for ssh access. Users will need the key to be able to ssh to the servers in
the cluster. The login name is specific to the cluster driver, for
example with fedora-atomic image, default login name is |
master_count |
body |
integer |
The number of servers that will serve as master for the cluster. The
default is 1. Set to more than 1 master to enable High Availability. If
the option |
cluster_template_id |
body |
UUID |
The UUID of the cluster template. |
node_count |
body |
integer |
The number of servers that will serve as node in the cluster. The default is 1. |
create_timeout |
body |
integer |
The timeout for cluster creation in minutes. The value expected is a
positive integer and the default is 60 minutes. If the timeout is reached
during cluster creation process, the operation will be aborted and the
cluster status will be set to |
name |
body |
string |
Name of the resource. |
Response Example¶
{
"clusters":[
{
"status":"CREATE_IN_PROGRESS",
"cluster_template_id":"0562d357-8641-4759-8fed-8173f02c9633",
"uuid":"731387cf-a92b-4c36-981e-3271d63e5597",
"links":[
{
"href":"http://10.164.180.104:9511/v1/clusters/731387cf-a92b-4c36-981e-3271d63e5597",
"rel":"self"
},
{
"href":"http://10.164.180.104:9511/clusters/731387cf-a92b-4c36-981e-3271d63e5597",
"rel":"bookmark"
}
],
"stack_id":"31c1ee6c-081e-4f39-9f0f-f1d87a7defa1",
"keypair":"my_keypair",
"master_count":1,
"create_timeout":60,
"node_count":1,
"name":"k8s"
}
]
}
Get all information of a cluster in Magnum.
Response Codes¶
Success¶
Code |
Reason |
---|---|
200 - OK |
Request was successful. |
Error¶
Code |
Reason |
---|---|
401 - Unauthorized |
User must authenticate before making a request. |
403 - Forbidden |
Policy does not allow current user to do this operation. |
404 - Not Found |
The requested resource could not be found. |
Request¶
Name |
In |
Type |
Description |
---|---|---|---|
cluster_ident |
path |
string |
The UUID or name of clusters in Magnum. |
Response¶
Name |
In |
Type |
Description |
---|---|---|---|
X-Openstack-Request-Id |
header |
UUID |
A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs. |
status |
body |
string |
The current state of the cluster. |
uuid |
body |
UUID |
The UUID of the cluster. |
links |
body |
array |
Links to the resources in question. |
stack_id |
body |
UUID |
The reference UUID of orchestration stack from Heat orchestration service. |
created_at |
body |
string |
The date and time when the resource was created. The date and time stamp format is ISO 8601: CCYY-MM-DDThh:mm:ss±hh:mm
For example, The |
api_address |
body |
string |
The endpoint URL of COE API exposed to end-users. |
discovery_url |
body |
string |
The custom discovery url for node discovery. This is used by the COE to
discover the servers that have been created to host the containers. The
actual discovery mechanism varies with the COE. In some cases, Magnum fills
in the server info in the discovery service. In other cases, if the
https://discovery.etcd.io
In this case, Magnum will generate a unique url here for each uster and store the info for the servers. |
updated_at |
body |
string |
The date and time when the resource was updated. The date and time stamp format is ISO 8601: CCYY-MM-DDThh:mm:ss±hh:mm
For example, The If the |
master_count |
body |
integer |
The number of servers that will serve as master for the cluster. The
default is 1. Set to more than 1 master to enable High Availability. If
the option |
coe_version |
body |
string |
Version info of chosen COE in cluster for helping client in picking the right version of client. |
keypair |
body |
string |
The name of the SSH keypair to configure in the cluster servers
for ssh access. Users will need the key to be able to ssh to the servers in
the cluster. The login name is specific to the cluster driver, for
example with fedora-atomic image, default login name is |
cluster_template_id |
body |
UUID |
The UUID of the cluster template. |
master_addresses |
body |
array |
List of floating IP of all master nodes. |
node_count |
body |
integer |
The number of servers that will serve as node in the cluster. The default is 1. |
node_addresses |
body |
array |
List of floating IP of all servers that serve as node. |
status_reason |
body |
string |
The reason of cluster current status. |
create_timeout |
body |
integer |
The timeout for cluster creation in minutes. The value expected is a
positive integer and the default is 60 minutes. If the timeout is reached
during cluster creation process, the operation will be aborted and the
cluster status will be set to |
floating_ip_enabled (Optional) |
body |
boolean |
Whether enable or not using the floating IP of cloud provider. Some cloud providers used floating IP, some used public IP, thus Magnum provide this option for specifying the choice of using floating IP. If it’s not set, the value of floating_ip_enabled in template will be used. |
master_lb_enabled (Optional) |
body |
boolean |
Since multiple masters may exist in a cluster, a Neutron load balancer
is created to provide the API endpoint for the cluster and to direct
requests to the masters. In some cases, such as when the LBaaS service is
not available, this option can be set to |
name |
body |
string |
Name of the resource. |
Response Example¶
{
"status":"CREATE_COMPLETE",
"uuid":"746e779a-751a-456b-a3e9-c883d734946f",
"links":[
{
"href":"http://10.164.180.104:9511/v1/clusters/746e779a-751a-456b-a3e9-c883d734946f",
"rel":"self"
},
{
"href":"http://10.164.180.104:9511/clusters/746e779a-751a-456b-a3e9-c883d734946f",
"rel":"bookmark"
}
],
"stack_id":"9c6f1169-7300-4d08-a444-d2be38758719",
"created_at":"2016-08-29T06:51:31+00:00",
"api_address":"https://172.24.4.6:6443",
"discovery_url":"https://discovery.etcd.io/cbeb580da58915809d59ee69348a84f3",
"updated_at":"2016-08-29T06:53:24+00:00",
"master_count":1,
"coe_version": "v1.2.0",
"keypair":"my_keypair",
"cluster_template_id":"0562d357-8641-4759-8fed-8173f02c9633",
"master_addresses":[
"172.24.4.6"
],
"node_count":1,
"node_addresses":[
"172.24.4.13"
],
"status_reason":"Stack CREATE completed successfully",
"create_timeout":60,
"name":"k8s"
}
Delete a cluster.
Response Codes¶
Success¶
Code |
Reason |
---|---|
204 - No Content |
The server has fulfilled the request by deleting the resource. |
Error¶
Code |
Reason |
---|---|
401 - Unauthorized |
User must authenticate before making a request. |
403 - Forbidden |
Policy does not allow current user to do this operation. |
404 - Not Found |
The requested resource could not be found. |
409 - Conflict |
This operation conflicted with another operation on this resource. |
Request¶
Name |
In |
Type |
Description |
---|---|---|---|
cluster_ident |
path |
string |
The UUID or name of clusters in Magnum. |
Response¶
This request does not return anything in the response body.
Name |
In |
Type |
Description |
---|---|---|---|
X-Openstack-Request-Id |
header |
UUID |
A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs. |
Update information of one cluster attributes using operations
including: add
, replace
or remove
. The attributes to add
and
replace
in the form of key=value
while remove
only needs the keys.
Response Codes¶
Success¶
Code |
Reason |
---|---|
202 - Accepted |
Request was accepted for processing, but the processing has not been completed. A ‘location’ header is included in the response which contains a link to check the progress of the request. |
Error¶
Code |
Reason |
---|---|
400 - Bad Request |
Some content in the request was invalid. |
401 - Unauthorized |
User must authenticate before making a request. |
403 - Forbidden |
Policy does not allow current user to do this operation. |
404 - Not Found |
The requested resource could not be found. |
Request¶
Name |
In |
Type |
Description |
---|---|---|---|
cluster_ident |
path |
string |
The UUID or name of clusters in Magnum. |
path |
body |
string |
Resource attribute’s name. |
value |
body |
string |
Resource attribute’s value. |
op |
body |
string |
The operation used to modify resource’s attributes. Supported operations
are following: |
Note
Request for updating cluster is asynchronous from Newton.
Currently only attribute node_count
are supported for operation
replace
and remove
.
Request Example¶
[
{
"path":"/node_count",
"value":2,
"op":"replace"
}
]
Response¶
Name |
In |
Type |
Description |
---|---|---|---|
X-Openstack-Request-Id |
header |
UUID |
A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs. |
uuid |
body |
UUID |
The UUID of the cluster. |
Response Example¶
{
"uuid":"746e779a-751a-456b-a3e9-c883d734946f"
}
Resize a cluster.
Response Codes¶
Success¶
Code |
Reason |
---|---|
202 - Accepted |
Request was accepted for processing, but the processing has not been completed. A ‘location’ header is included in the response which contains a link to check the progress of the request. |
Error¶
Code |
Reason |
---|---|
401 - Unauthorized |
User must authenticate before making a request. |
403 - Forbidden |
Policy does not allow current user to do this operation. |
404 - Not Found |
The requested resource could not be found. |
409 - Conflict |
This operation conflicted with another operation on this resource. |
Request¶
Name |
In |
Type |
Description |
---|---|---|---|
cluster_ident |
path |
string |
The UUID or name of clusters in Magnum. |
node_count |
body |
integer |
The number of servers that will serve as node in the cluster. The default is 1. |
nodes_to_remove (Optional) |
body |
array |
The server ID list will be removed. |
nodegroup (Optional) |
body |
string |
The ID of node group. A node group is a subset of node instances within a cluster that all have the same configuration. |
Note
The nodegroup is just a placeholder for future. It hasn’t been supported in Magnum now.
Request Example¶
{
"node_count": 3,
"nodes_to_remove": ["e74c40e0-d825-11e2-a28f-0800200c9a66"],
"nodegroup": "production_group"
}
Response¶
Name |
In |
Type |
Description |
---|---|---|---|
X-Openstack-Request-Id |
header |
UUID |
A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs. |
uuid |
body |
UUID |
The UUID of the cluster. |
Response Example¶
{
"uuid":"746e779a-751a-456b-a3e9-c883d734946f"
}
Resize a cluster.
Response Codes¶
Success¶
Code |
Reason |
---|---|
202 - Accepted |
Request was accepted for processing, but the processing has not been completed. A ‘location’ header is included in the response which contains a link to check the progress of the request. |
Error¶
Code |
Reason |
---|---|
401 - Unauthorized |
User must authenticate before making a request. |
403 - Forbidden |
Policy does not allow current user to do this operation. |
404 - Not Found |
The requested resource could not be found. |
409 - Conflict |
This operation conflicted with another operation on this resource. |
Request¶
Name |
In |
Type |
Description |
---|---|---|---|
cluster_ident |
path |
string |
The UUID or name of clusters in Magnum. |
cluster_template |
body |
UUID |
The UUID of the cluster template. |
max_batch_size (Optional) |
body |
int |
The max batch size each time when doing upgrade, default value is 1 |
nodegroup (Optional) |
body |
string |
The ID of node group. A node group is a subset of node instances within a cluster that all have the same configuration. |
Note
The nodegroup is just a placeholder for future. It hasn’t been supported in Magnum now.
Request Example¶
{
"cluster_template": "e74c40e0-d825-11e2-a28f-0800200c9a66",
"max_batch_size": 1,
"nodegroup": "production_group"
}
Response¶
Name |
In |
Type |
Description |
---|---|---|---|
X-Openstack-Request-Id |
header |
UUID |
A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs. |
uuid |
body |
UUID |
The UUID of the cluster. |
Response Example¶
{
"uuid":"746e779a-751a-456b-a3e9-c883d734946f"
}
Manage Cluster Templates¶
Lists, creates, shows details for, updates, and deletes Cluster Templates.
Create new cluster template.
Response Codes¶
Success¶
Code |
Reason |
---|---|
201 - Created |
Resource was created and is ready to use. |
Error¶
Code |
Reason |
---|---|
400 - Bad Request |
Some content in the request was invalid. |
401 - Unauthorized |
User must authenticate before making a request. |
403 - Forbidden |
Policy does not allow current user to do this operation. |
404 - Not Found |
The requested resource could not be found. |
Request¶
Name |
In |
Type |
Description |
---|---|---|---|
labels (Optional) |
body |
array |
Arbitrary labels in the form of |
fixed_subnet (Optional) |
body |
string |
Fixed subnet that are using to allocate network address for nodes in cluster. |
master_flavor_id (Optional) |
body |
string |
The flavor of the master node for this cluster template. |
no_proxy (Optional) |
body |
string |
When a proxy server is used, some sites should not go through the proxy
and should be accessed normally. In this case, users can specify these
sites as a comma separated list of IPs. The default is |
https_proxy (Optional) |
body |
string |
The IP address for a proxy to use when direct https access from the
servers to sites on the external internet is blocked. This may happen in
certain countries or enterprises, and the proxy allows the servers and
containers to access these sites. The format is a URL including a port
number. The default is |
http_proxy (Optional) |
body |
string |
The IP address for a proxy to use when direct http access from the servers
to sites on the external internet is blocked. This may happen in certain
countries or enterprises, and the proxy allows the servers and
containers to access these sites. The format is a URL including a port
number. The default is |
tls_disabled |
body |
boolean |
Transport Layer Security (TLS) is normally enabled to secure the cluster. In some cases, users may want to disable TLS in the cluster, for instance during development or to troubleshoot certain problems. Specifying this parameter will disable TLS so that users can access the COE endpoints without a certificate. The default is TLS enabled. |
keypair_id |
body |
string |
The name of the SSH keypair to configure in the cluster servers
for ssh access. Users will need the key to be able to ssh to the servers in
the cluster. The login name is specific to the cluster driver, for
example with fedora-atomic image, default login name is |
public |
body |
boolean |
Access to a cluster template is normally limited to the admin, owner or users within the same tenant as the owners. Setting this flag makes the cluster template public and accessible by other users. The default is not public. |
docker_volume_size |
body |
integer |
The size in GB for the local storage on each server for the Docker daemon
to cache the images and host the containers. Cinder volumes provide the
storage. The default is 25 GB. For the |
server_type |
body |
string |
The servers in the cluster can be |
external_network_id |
body |
string |
The name or network ID of a Neutron network to provide connectivity to the
external internet for the cluster. This network must be an external
network, i.e. its attribute |
image_id |
body |
string |
The name or UUID of the base image in Glance to boot the servers for the
cluster. The image must have the attribute |
volume_driver |
body |
string |
The name of a volume driver for managing the persistent storage for the containers. The functionality supported are specific to the driver. |
registry_enabled (Optional) |
body |
boolean |
Docker images by default are pulled from the public Docker registry, but in some cases, users may want to use a private registry. This option provides an alternative registry based on the Registry V2: Magnum will create a local registry in the cluster backed by swift to host the images. The default is to use the public registry. |
docker_storage_driver |
body |
string |
The name of a driver to manage the storage for the images and the
container’s writable layer. The default is |
name |
body |
string |
Name of the resource. |
network_driver |
body |
string |
The name of a network driver for providing the networks for the containers. Note that this is different and separate from the Neutron network for the cluster. The operation and networking model are specific to the particular driver. |
fixed_network (Optional) |
body |
string |
The name or network ID of a Neutron network to provide connectivity to the internal network for the cluster. |
coe |
body |
string |
Specify the Container Orchestration Engine to use. Supported COEs
include |
flavor_id |
body |
string |
The nova flavor ID or name for booting the node servers. The default is
|
master_lb_enabled |
body |
boolean |
Since multiple masters may exist in a cluster, a Neutron load balancer
is created to provide the API endpoint for the cluster and to direct
requests to the masters. In some cases, such as when the LBaaS service is
not available, this option can be set to |
dns_nameserver |
body |
string |
The DNS nameserver for the servers and containers in the cluster to
use. This is configured in the private Neutron network for the cluster.
The default is |
floating_ip_enabled |
body |
boolean |
Whether enable or not using the floating IP of cloud provider. Some cloud providers used floating IP, some used public IP, thus Magnum provide this option for specifying the choice of using floating IP. |
hidden (Optional) |
body |
boolean |
Indicates whether the ClusterTemplate is hidden or not, the default value is false. |
tags (Optional) |
body |
array |
Administrator tags for the cluster template. |
Request Example¶
{
"labels":{
},
"fixed_subnet":null,
"master_flavor_id":null,
"no_proxy":"10.0.0.0/8,172.0.0.0/8,192.0.0.0/8,localhost",
"https_proxy":"http://10.164.177.169:8080",
"tls_disabled":false,
"keypair_id":"kp",
"public":false,
"http_proxy":"http://10.164.177.169:8080",
"docker_volume_size":3,
"server_type":"vm",
"external_network_id":"public",
"image_id":"fedora-atomic-latest",
"volume_driver":"cinder",
"registry_enabled":false,
"docker_storage_driver":"devicemapper",
"name":"k8s-bm2",
"network_driver":"flannel",
"fixed_network":null,
"coe":"kubernetes",
"flavor_id":"m1.small",
"master_lb_enabled":true,
"dns_nameserver":"8.8.8.8"
}
Response¶
Name |
In |
Type |
Description |
---|---|---|---|
X-Openstack-Request-Id |
header |
UUID |
A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs. |
insecure_registry |
body |
string |
The URL pointing to users’s own private insecure docker registry to deploy and run docker containers. |
links |
body |
array |
Links to the resources in question. |
http_proxy (Optional) |
body |
string |
The IP address for a proxy to use when direct http access from the servers
to sites on the external internet is blocked. This may happen in certain
countries or enterprises, and the proxy allows the servers and
containers to access these sites. The format is a URL including a port
number. The default is |
updated_at |
body |
string |
The date and time when the resource was updated. The date and time stamp format is ISO 8601: CCYY-MM-DDThh:mm:ss±hh:mm
For example, The If the |
floating_ip_enabled |
body |
boolean |
Whether enable or not using the floating IP of cloud provider. Some cloud providers used floating IP, some used public IP, thus Magnum provide this option for specifying the choice of using floating IP. |
fixed_subnet (Optional) |
body |
string |
Fixed subnet that are using to allocate network address for nodes in cluster. |
master_flavor_id (Optional) |
body |
string |
The flavor of the master node for this cluster template. |
uuid |
body |
UUID |
The UUID of the cluster template. |
no_proxy (Optional) |
body |
string |
When a proxy server is used, some sites should not go through the proxy
and should be accessed normally. In this case, users can specify these
sites as a comma separated list of IPs. The default is |
https_proxy (Optional) |
body |
string |
The IP address for a proxy to use when direct https access from the
servers to sites on the external internet is blocked. This may happen in
certain countries or enterprises, and the proxy allows the servers and
containers to access these sites. The format is a URL including a port
number. The default is |
tls_disabled |
body |
boolean |
Transport Layer Security (TLS) is normally enabled to secure the cluster. In some cases, users may want to disable TLS in the cluster, for instance during development or to troubleshoot certain problems. Specifying this parameter will disable TLS so that users can access the COE endpoints without a certificate. The default is TLS enabled. |
keypair_id |
body |
string |
The name of the SSH keypair to configure in the cluster servers
for ssh access. Users will need the key to be able to ssh to the servers in
the cluster. The login name is specific to the cluster driver, for
example with fedora-atomic image, default login name is |
public |
body |
boolean |
Access to a cluster template is normally limited to the admin, owner or users within the same tenant as the owners. Setting this flag makes the cluster template public and accessible by other users. The default is not public. |
labels (Optional) |
body |
array |
Arbitrary labels in the form of |
docker_volume_size |
body |
integer |
The size in GB for the local storage on each server for the Docker daemon
to cache the images and host the containers. Cinder volumes provide the
storage. The default is 25 GB. For the |
server_type |
body |
string |
The servers in the cluster can be |
external_network_id |
body |
string |
The name or network ID of a Neutron network to provide connectivity to the
external internet for the cluster. This network must be an external
network, i.e. its attribute |
cluster_distro |
body |
string |
Display the attribute |
image_id |
body |
string |
The name or UUID of the base image in Glance to boot the servers for the
cluster. The image must have the attribute |
volume_driver |
body |
string |
The name of a volume driver for managing the persistent storage for the containers. The functionality supported are specific to the driver. |
registry_enabled (Optional) |
body |
boolean |
Docker images by default are pulled from the public Docker registry, but in some cases, users may want to use a private registry. This option provides an alternative registry based on the Registry V2: Magnum will create a local registry in the cluster backed by swift to host the images. The default is to use the public registry. |
docker_storage_driver |
body |
string |
The name of a driver to manage the storage for the images and the
container’s writable layer. The default is |
apiserver_port |
body |
integer |
The exposed port of COE API server. |
name |
body |
string |
Name of the resource. |
created_at |
body |
string |
The date and time when the resource was created. The date and time stamp format is ISO 8601: CCYY-MM-DDThh:mm:ss±hh:mm
For example, The |
network_driver |
body |
string |
The name of a network driver for providing the networks for the containers. Note that this is different and separate from the Neutron network for the cluster. The operation and networking model are specific to the particular driver. |
fixed_network (Optional) |
body |
string |
The name or network ID of a Neutron network to provide connectivity to the internal network for the cluster. |
coe |
body |
string |
Specify the Container Orchestration Engine to use. Supported COEs
include |
flavor_id |
body |
string |
The nova flavor ID or name for booting the node servers. The default is
|
master_lb_enabled |
body |
boolean |
Since multiple masters may exist in a cluster, a Neutron load balancer
is created to provide the API endpoint for the cluster and to direct
requests to the masters. In some cases, such as when the LBaaS service is
not available, this option can be set to |
dns_nameserver |
body |
string |
The DNS nameserver for the servers and containers in the cluster to
use. This is configured in the private Neutron network for the cluster.
The default is |
hidden (Optional) |
body |
boolean |
Indicates whether the ClusterTemplate is hidden or not, the default value is false. |
tags (Optional) |
body |
array |
Administrator tags for the cluster template. |
Response Example¶
{
"insecure_registry":null,
"links":[
{
"href":"http://10.164.180.104:9511/v1/clustertemplates/085e1c4d-4f68-4bfd-8462-74b9e14e4f39",
"rel":"self"
},
{
"href":"http://10.164.180.104:9511/clustertemplates/085e1c4d-4f68-4bfd-8462-74b9e14e4f39",
"rel":"bookmark"
}
],
"http_proxy":"http://10.164.177.169:8080",
"updated_at":null,
"floating_ip_enabled":true,
"fixed_subnet":null,
"master_flavor_id":null,
"uuid":"085e1c4d-4f68-4bfd-8462-74b9e14e4f39",
"no_proxy":"10.0.0.0/8,172.0.0.0/8,192.0.0.0/8,localhost",
"https_proxy":"http://10.164.177.169:8080",
"tls_disabled":false,
"keypair_id":"kp",
"public":false,
"labels":{
},
"docker_volume_size":3,
"server_type":"vm",
"external_network_id":"public",
"cluster_distro":"fedora-atomic",
"image_id":"fedora-atomic-latest",
"volume_driver":"cinder",
"registry_enabled":false,
"docker_storage_driver":"devicemapper",
"apiserver_port":null,
"name":"k8s-bm2",
"created_at":"2016-08-29T02:08:08+00:00",
"network_driver":"flannel",
"fixed_network":null,
"coe":"kubernetes",
"flavor_id":"m1.small",
"master_lb_enabled":true,
"dns_nameserver":"8.8.8.8"
}
List all available cluster templates in Magnum.
Response Codes¶
Success¶
Code |
Reason |
---|---|
200 - OK |
Request was successful. |
Error¶
Code |
Reason |
---|---|
401 - Unauthorized |
User must authenticate before making a request. |
403 - Forbidden |
Policy does not allow current user to do this operation. |
Response¶
Name |
In |
Type |
Description |
---|---|---|---|
X-Openstack-Request-Id |
header |
UUID |
A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs. |
clustertemplates |
body |
array |
The list of all cluster templates in Magnum. |
insecure_registry |
body |
string |
The URL pointing to users’s own private insecure docker registry to deploy and run docker containers. |
links |
body |
array |
Links to the resources in question. |
http_proxy (Optional) |
body |
string |
The IP address for a proxy to use when direct http access from the servers
to sites on the external internet is blocked. This may happen in certain
countries or enterprises, and the proxy allows the servers and
containers to access these sites. The format is a URL including a port
number. The default is |
updated_at |
body |
string |
The date and time when the resource was updated. The date and time stamp format is ISO 8601: CCYY-MM-DDThh:mm:ss±hh:mm
For example, The If the |
floating_ip_enabled |
body |
boolean |
Whether enable or not using the floating IP of cloud provider. Some cloud providers used floating IP, some used public IP, thus Magnum provide this option for specifying the choice of using floating IP. |
fixed_subnet (Optional) |
body |
string |
Fixed subnet that are using to allocate network address for nodes in cluster. |
master_flavor_id (Optional) |
body |
string |
The flavor of the master node for this cluster template. |
uuid |
body |
UUID |
The UUID of the cluster template. |
no_proxy (Optional) |
body |
string |
When a proxy server is used, some sites should not go through the proxy
and should be accessed normally. In this case, users can specify these
sites as a comma separated list of IPs. The default is |
https_proxy (Optional) |
body |
string |
The IP address for a proxy to use when direct https access from the
servers to sites on the external internet is blocked. This may happen in
certain countries or enterprises, and the proxy allows the servers and
containers to access these sites. The format is a URL including a port
number. The default is |
tls_disabled |
body |
boolean |
Transport Layer Security (TLS) is normally enabled to secure the cluster. In some cases, users may want to disable TLS in the cluster, for instance during development or to troubleshoot certain problems. Specifying this parameter will disable TLS so that users can access the COE endpoints without a certificate. The default is TLS enabled. |
keypair_id |
body |
string |
The name of the SSH keypair to configure in the cluster servers
for ssh access. Users will need the key to be able to ssh to the servers in
the cluster. The login name is specific to the cluster driver, for
example with fedora-atomic image, default login name is |
public |
body |
boolean |
Access to a cluster template is normally limited to the admin, owner or users within the same tenant as the owners. Setting this flag makes the cluster template public and accessible by other users. The default is not public. |
labels (Optional) |
body |
array |
Arbitrary labels in the form of |
docker_volume_size |
body |
integer |
The size in GB for the local storage on each server for the Docker daemon
to cache the images and host the containers. Cinder volumes provide the
storage. The default is 25 GB. For the |
server_type |
body |
string |
The servers in the cluster can be |
external_network_id |
body |
string |
The name or network ID of a Neutron network to provide connectivity to the
external internet for the cluster. This network must be an external
network, i.e. its attribute |
cluster_distro |
body |
string |
Display the attribute |
image_id |
body |
string |
The name or UUID of the base image in Glance to boot the servers for the
cluster. The image must have the attribute |
volume_driver |
body |
string |
The name of a volume driver for managing the persistent storage for the containers. The functionality supported are specific to the driver. |
registry_enabled (Optional) |
body |
boolean |
Docker images by default are pulled from the public Docker registry, but in some cases, users may want to use a private registry. This option provides an alternative registry based on the Registry V2: Magnum will create a local registry in the cluster backed by swift to host the images. The default is to use the public registry. |
docker_storage_driver |
body |
string |
The name of a driver to manage the storage for the images and the
container’s writable layer. The default is |
apiserver_port |
body |
integer |
The exposed port of COE API server. |
name |
body |
string |
Name of the resource. |
created_at |
body |
string |
The date and time when the resource was created. The date and time stamp format is ISO 8601: CCYY-MM-DDThh:mm:ss±hh:mm
For example, The |
network_driver |
body |
string |
The name of a network driver for providing the networks for the containers. Note that this is different and separate from the Neutron network for the cluster. The operation and networking model are specific to the particular driver. |
fixed_network (Optional) |
body |
string |
The name or network ID of a Neutron network to provide connectivity to the internal network for the cluster. |
coe |
body |
string |
Specify the Container Orchestration Engine to use. Supported COEs
include |
flavor_id |
body |
string |
The nova flavor ID or name for booting the node servers. The default is
|
master_lb_enabled |
body |
boolean |
Since multiple masters may exist in a cluster, a Neutron load balancer
is created to provide the API endpoint for the cluster and to direct
requests to the masters. In some cases, such as when the LBaaS service is
not available, this option can be set to |
dns_nameserver |
body |
string |
The DNS nameserver for the servers and containers in the cluster to
use. This is configured in the private Neutron network for the cluster.
The default is |
hidden (Optional) |
body |
boolean |
Indicates whether the ClusterTemplate is hidden or not, the default value is false. |
tags (Optional) |
body |
array |
Administrator tags for the cluster template. |
Response Example¶
{
"clustertemplates":[
{
"insecure_registry":null,
"links":[
{
"href":"http://10.164.180.104:9511/v1/clustertemplates/0562d357-8641-4759-8fed-8173f02c9633",
"rel":"self"
},
{
"href":"http://10.164.180.104:9511/clustertemplates/0562d357-8641-4759-8fed-8173f02c9633",
"rel":"bookmark"
}
],
"http_proxy":"http://10.164.177.169:8080",
"updated_at":null,
"floating_ip_enabled":true,
"fixed_subnet":null,
"master_flavor_id":null,
"uuid":"0562d357-8641-4759-8fed-8173f02c9633",
"no_proxy":"10.0.0.0/8,172.0.0.0/8,192.0.0.0/8,localhost",
"https_proxy":"http://10.164.177.169:8080",
"tls_disabled":false,
"keypair_id":"kp",
"public":false,
"labels":{
},
"docker_volume_size":3,
"server_type":"vm",
"external_network_id":"public",
"cluster_distro":"fedora-atomic",
"image_id":"fedora-atomic-latest",
"volume_driver":"cinder",
"registry_enabled":false,
"docker_storage_driver":"devicemapper",
"apiserver_port":null,
"name":"k8s-bm",
"created_at":"2016-08-26T09:34:41+00:00",
"network_driver":"flannel",
"fixed_network":null,
"coe":"kubernetes",
"flavor_id":"m1.small",
"master_lb_enabled":false,
"dns_nameserver":"8.8.8.8"
}
]
}
Get all information of a cluster template in Magnum.
Response Codes¶
Success¶
Code |
Reason |
---|---|
200 - OK |
Request was successful. |
Error¶
Code |
Reason |
---|---|
401 - Unauthorized |
User must authenticate before making a request. |
403 - Forbidden |
Policy does not allow current user to do this operation. |
404 - Not Found |
The requested resource could not be found. |
Request¶
Name |
In |
Type |
Description |
---|---|---|---|
clustertemplate_ident |
path |
string |
The UUID or name of cluster templates in Magnum. |
Response¶
Name |
In |
Type |
Description |
---|---|---|---|
X-Openstack-Request-Id |
header |
UUID |
A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs. |
clustertemplates |
body |
array |
The list of all cluster templates in Magnum. |
insecure_registry |
body |
string |
The URL pointing to users’s own private insecure docker registry to deploy and run docker containers. |
links |
body |
array |
Links to the resources in question. |
http_proxy (Optional) |
body |
string |
The IP address for a proxy to use when direct http access from the servers
to sites on the external internet is blocked. This may happen in certain
countries or enterprises, and the proxy allows the servers and
containers to access these sites. The format is a URL including a port
number. The default is |
updated_at |
body |
string |
The date and time when the resource was updated. The date and time stamp format is ISO 8601: CCYY-MM-DDThh:mm:ss±hh:mm
For example, The If the |
floating_ip_enabled |
body |
boolean |
Whether enable or not using the floating IP of cloud provider. Some cloud providers used floating IP, some used public IP, thus Magnum provide this option for specifying the choice of using floating IP. |
fixed_subnet (Optional) |
body |
string |
Fixed subnet that are using to allocate network address for nodes in cluster. |
master_flavor_id (Optional) |
body |
string |
The flavor of the master node for this cluster template. |
uuid |
body |
UUID |
The UUID of the cluster template. |
no_proxy (Optional) |
body |
string |
When a proxy server is used, some sites should not go through the proxy
and should be accessed normally. In this case, users can specify these
sites as a comma separated list of IPs. The default is |
https_proxy (Optional) |
body |
string |
The IP address for a proxy to use when direct https access from the
servers to sites on the external internet is blocked. This may happen in
certain countries or enterprises, and the proxy allows the servers and
containers to access these sites. The format is a URL including a port
number. The default is |
tls_disabled |
body |
boolean |
Transport Layer Security (TLS) is normally enabled to secure the cluster. In some cases, users may want to disable TLS in the cluster, for instance during development or to troubleshoot certain problems. Specifying this parameter will disable TLS so that users can access the COE endpoints without a certificate. The default is TLS enabled. |
keypair_id |
body |
string |
The name of the SSH keypair to configure in the cluster servers
for ssh access. Users will need the key to be able to ssh to the servers in
the cluster. The login name is specific to the cluster driver, for
example with fedora-atomic image, default login name is |
public |
body |
boolean |
Access to a cluster template is normally limited to the admin, owner or users within the same tenant as the owners. Setting this flag makes the cluster template public and accessible by other users. The default is not public. |
labels (Optional) |
body |
array |
Arbitrary labels in the form of |
docker_volume_size |
body |
integer |
The size in GB for the local storage on each server for the Docker daemon
to cache the images and host the containers. Cinder volumes provide the
storage. The default is 25 GB. For the |
server_type |
body |
string |
The servers in the cluster can be |
external_network_id |
body |
string |
The name or network ID of a Neutron network to provide connectivity to the
external internet for the cluster. This network must be an external
network, i.e. its attribute |
cluster_distro |
body |
string |
Display the attribute |
image_id |
body |
string |
The name or UUID of the base image in Glance to boot the servers for the
cluster. The image must have the attribute |
volume_driver |
body |
string |
The name of a volume driver for managing the persistent storage for the containers. The functionality supported are specific to the driver. |
registry_enabled (Optional) |
body |
boolean |
Docker images by default are pulled from the public Docker registry, but in some cases, users may want to use a private registry. This option provides an alternative registry based on the Registry V2: Magnum will create a local registry in the cluster backed by swift to host the images. The default is to use the public registry. |
docker_storage_driver |
body |
string |
The name of a driver to manage the storage for the images and the
container’s writable layer. The default is |
apiserver_port |
body |
integer |
The exposed port of COE API server. |
name |
body |
string |
Name of the resource. |
created_at |
body |
string |
The date and time when the resource was created. The date and time stamp format is ISO 8601: CCYY-MM-DDThh:mm:ss±hh:mm
For example, The |
network_driver |
body |
string |
The name of a network driver for providing the networks for the containers. Note that this is different and separate from the Neutron network for the cluster. The operation and networking model are specific to the particular driver. |
fixed_network (Optional) |
body |
string |
The name or network ID of a Neutron network to provide connectivity to the internal network for the cluster. |
coe |
body |
string |
Specify the Container Orchestration Engine to use. Supported COEs
include |
flavor_id |
body |
string |
The nova flavor ID or name for booting the node servers. The default is
|
master_lb_enabled |
body |
boolean |
Since multiple masters may exist in a cluster, a Neutron load balancer
is created to provide the API endpoint for the cluster and to direct
requests to the masters. In some cases, such as when the LBaaS service is
not available, this option can be set to |
dns_nameserver |
body |
string |
The DNS nameserver for the servers and containers in the cluster to
use. This is configured in the private Neutron network for the cluster.
The default is |
hidden (Optional) |
body |
boolean |
Indicates whether the ClusterTemplate is hidden or not, the default value is false. |
tags (Optional) |
body |
array |
Administrator tags for the cluster template. |
Response Example¶
{
"insecure_registry":null,
"links":[
{
"href":"http://10.164.180.104:9511/v1/clustertemplates/085e1c4d-4f68-4bfd-8462-74b9e14e4f39",
"rel":"self"
},
{
"href":"http://10.164.180.104:9511/clustertemplates/085e1c4d-4f68-4bfd-8462-74b9e14e4f39",
"rel":"bookmark"
}
],
"http_proxy":"http://10.164.177.169:8080",
"updated_at":null,
"floating_ip_enabled":true,
"fixed_subnet":null,
"master_flavor_id":null,
"uuid":"085e1c4d-4f68-4bfd-8462-74b9e14e4f39",
"no_proxy":"10.0.0.0/8,172.0.0.0/8,192.0.0.0/8,localhost",
"https_proxy":"http://10.164.177.169:8080",
"tls_disabled":false,
"keypair_id":"kp",
"public":false,
"labels":{
},
"docker_volume_size":3,
"server_type":"vm",
"external_network_id":"public",
"cluster_distro":"fedora-atomic",
"image_id":"fedora-atomic-latest",
"volume_driver":"cinder",
"registry_enabled":false,
"docker_storage_driver":"devicemapper",
"apiserver_port":null,
"name":"k8s-bm2",
"created_at":"2016-08-29T02:08:08+00:00",
"network_driver":"flannel",
"fixed_network":null,
"coe":"kubernetes",
"flavor_id":"m1.small",
"master_lb_enabled":true,
"dns_nameserver":"8.8.8.8"
}
Delete a cluster template.
Response Codes¶
Success¶
Code |
Reason |
---|---|
204 - No Content |
The server has fulfilled the request by deleting the resource. |
Error¶
Code |
Reason |
---|---|
401 - Unauthorized |
User must authenticate before making a request. |
403 - Forbidden |
Policy does not allow current user to do this operation. |
404 - Not Found |
The requested resource could not be found. |
409 - Conflict |
This operation conflicted with another operation on this resource. |
Request¶
Name |
In |
Type |
Description |
---|---|---|---|
clustertemplate_ident |
path |
string |
The UUID or name of cluster templates in Magnum. |
Response¶
This request does not return anything in the response body.
Name |
In |
Type |
Description |
---|---|---|---|
X-Openstack-Request-Id |
header |
UUID |
A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs. |
Update information of one cluster template attributes using operations
including: add
, replace
or remove
. The attributes to add
and
replace
in the form of key=value
while remove
only needs the keys.
Response Codes¶
Success¶
Code |
Reason |
---|---|
200 - OK |
Request was successful. |
Error¶
Code |
Reason |
---|---|
400 - Bad Request |
Some content in the request was invalid. |
401 - Unauthorized |
User must authenticate before making a request. |
403 - Forbidden |
Policy does not allow current user to do this operation. |
404 - Not Found |
The requested resource could not be found. |
Request¶
Name |
In |
Type |
Description |
---|---|---|---|
clustertemplate_ident |
path |
string |
The UUID or name of cluster templates in Magnum. |
path |
body |
string |
Resource attribute’s name. |
value |
body |
string |
Resource attribute’s value. |
op |
body |
string |
The operation used to modify resource’s attributes. Supported operations
are following: |
Request Example¶
[
{
"path":"/master_lb_enabled",
"value":"True",
"op":"replace"
},
{
"path":"/registry_enabled",
"value":"True",
"op":"replace"
}
]
Response¶
Return new cluster templates with updated attributes.
Name |
In |
Type |
Description |
---|---|---|---|
X-Openstack-Request-Id |
header |
UUID |
A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs. |
clustertemplates |
body |
array |
The list of all cluster templates in Magnum. |
insecure_registry |
body |
string |
The URL pointing to users’s own private insecure docker registry to deploy and run docker containers. |
links |
body |
array |
Links to the resources in question. |
http_proxy (Optional) |
body |
string |
The IP address for a proxy to use when direct http access from the servers
to sites on the external internet is blocked. This may happen in certain
countries or enterprises, and the proxy allows the servers and
containers to access these sites. The format is a URL including a port
number. The default is |
updated_at |
body |
string |
The date and time when the resource was updated. The date and time stamp format is ISO 8601: CCYY-MM-DDThh:mm:ss±hh:mm
For example, The If the |
floating_ip_enabled |
body |
boolean |
Whether enable or not using the floating IP of cloud provider. Some cloud providers used floating IP, some used public IP, thus Magnum provide this option for specifying the choice of using floating IP. |
fixed_subnet (Optional) |
body |
string |
Fixed subnet that are using to allocate network address for nodes in cluster. |
master_flavor_id (Optional) |
body |
string |
The flavor of the master node for this cluster template. |
uuid |
body |
UUID |
The UUID of the cluster template. |
no_proxy (Optional) |
body |
string |
When a proxy server is used, some sites should not go through the proxy
and should be accessed normally. In this case, users can specify these
sites as a comma separated list of IPs. The default is |
https_proxy (Optional) |
body |
string |
The IP address for a proxy to use when direct https access from the
servers to sites on the external internet is blocked. This may happen in
certain countries or enterprises, and the proxy allows the servers and
containers to access these sites. The format is a URL including a port
number. The default is |
tls_disabled |
body |
boolean |
Transport Layer Security (TLS) is normally enabled to secure the cluster. In some cases, users may want to disable TLS in the cluster, for instance during development or to troubleshoot certain problems. Specifying this parameter will disable TLS so that users can access the COE endpoints without a certificate. The default is TLS enabled. |
keypair_id |
body |
string |
The name of the SSH keypair to configure in the cluster servers
for ssh access. Users will need the key to be able to ssh to the servers in
the cluster. The login name is specific to the cluster driver, for
example with fedora-atomic image, default login name is |
public |
body |
boolean |
Access to a cluster template is normally limited to the admin, owner or users within the same tenant as the owners. Setting this flag makes the cluster template public and accessible by other users. The default is not public. |
labels (Optional) |
body |
array |
Arbitrary labels in the form of |
docker_volume_size |
body |
integer |
The size in GB for the local storage on each server for the Docker daemon
to cache the images and host the containers. Cinder volumes provide the
storage. The default is 25 GB. For the |
server_type |
body |
string |
The servers in the cluster can be |
external_network_id |
body |
string |
The name or network ID of a Neutron network to provide connectivity to the
external internet for the cluster. This network must be an external
network, i.e. its attribute |
cluster_distro |
body |
string |
Display the attribute |
image_id |
body |
string |
The name or UUID of the base image in Glance to boot the servers for the
cluster. The image must have the attribute |
volume_driver |
body |
string |
The name of a volume driver for managing the persistent storage for the containers. The functionality supported are specific to the driver. |
registry_enabled (Optional) |
body |
boolean |
Docker images by default are pulled from the public Docker registry, but in some cases, users may want to use a private registry. This option provides an alternative registry based on the Registry V2: Magnum will create a local registry in the cluster backed by swift to host the images. The default is to use the public registry. |
docker_storage_driver |
body |
string |
The name of a driver to manage the storage for the images and the
container’s writable layer. The default is |
apiserver_port |
body |
integer |
The exposed port of COE API server. |
name |
body |
string |
Name of the resource. |
created_at |
body |
string |
The date and time when the resource was created. The date and time stamp format is ISO 8601: CCYY-MM-DDThh:mm:ss±hh:mm
For example, The |
network_driver |
body |
string |
The name of a network driver for providing the networks for the containers. Note that this is different and separate from the Neutron network for the cluster. The operation and networking model are specific to the particular driver. |
fixed_network (Optional) |
body |
string |
The name or network ID of a Neutron network to provide connectivity to the internal network for the cluster. |
coe |
body |
string |
Specify the Container Orchestration Engine to use. Supported COEs
include |
flavor_id |
body |
string |
The nova flavor ID or name for booting the node servers. The default is
|
master_lb_enabled |
body |
boolean |
Since multiple masters may exist in a cluster, a Neutron load balancer
is created to provide the API endpoint for the cluster and to direct
requests to the masters. In some cases, such as when the LBaaS service is
not available, this option can be set to |
dns_nameserver |
body |
string |
The DNS nameserver for the servers and containers in the cluster to
use. This is configured in the private Neutron network for the cluster.
The default is |
hidden (Optional) |
body |
boolean |
Indicates whether the ClusterTemplate is hidden or not, the default value is false. |
tags (Optional) |
body |
array |
Administrator tags for the cluster template. |
Response Example¶
{
"insecure_registry":null,
"links":[
{
"href":"http://10.164.180.104:9511/v1/clustertemplates/085e1c4d-4f68-4bfd-8462-74b9e14e4f39",
"rel":"self"
},
{
"href":"http://10.164.180.104:9511/clustertemplates/085e1c4d-4f68-4bfd-8462-74b9e14e4f39",
"rel":"bookmark"
}
],
"http_proxy":"http://10.164.177.169:8080",
"updated_at":null,
"floating_ip_enabled":true,
"fixed_subnet":null,
"master_flavor_id":null,
"uuid":"085e1c4d-4f68-4bfd-8462-74b9e14e4f39",
"no_proxy":"10.0.0.0/8,172.0.0.0/8,192.0.0.0/8,localhost",
"https_proxy":"http://10.164.177.169:8080",
"tls_disabled":false,
"keypair_id":"kp",
"public":false,
"labels":{
},
"docker_volume_size":3,
"server_type":"vm",
"external_network_id":"public",
"cluster_distro":"fedora-atomic",
"image_id":"fedora-atomic-latest",
"volume_driver":"cinder",
"registry_enabled":false,
"docker_storage_driver":"devicemapper",
"apiserver_port":null,
"name":"k8s-bm2",
"created_at":"2016-08-29T02:08:08+00:00",
"network_driver":"flannel",
"fixed_network":null,
"coe":"kubernetes",
"flavor_id":"m1.small",
"master_lb_enabled":true,
"dns_nameserver":"8.8.8.8"
}
Manage certificates for cluster¶
Generates and show CA certificates for cluster.
Show CA certificate details that are associated with the created cluster based on the given CA certificate type.
Response Codes¶
Success¶
Code |
Reason |
---|---|
200 - OK |
Request was successful. |
Error¶
Code |
Reason |
---|---|
401 - Unauthorized |
User must authenticate before making a request. |
403 - Forbidden |
Policy does not allow current user to do this operation. |
Request¶
Name |
In |
Type |
Description |
---|---|---|---|
cluster_ident |
path |
string |
The UUID or name of clusters in Magnum. |
ca_cert_type (Optional) |
path |
string |
The CA certificate type. For Kubernetes, it could be kubelet, etcd or front-proxy. |
Response¶
Name |
In |
Type |
Description |
---|---|---|---|
X-Openstack-Request-Id |
header |
UUID |
A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs. |
cluster_uuid |
body |
UUID |
The UUID of the cluster. |
pem |
body |
string |
CA certificate for the cluster. |
links |
body |
array |
Links to the resources in question. |
Response Example¶
{
"cluster_uuid":"0b4b766f-1500-44b3-9804-5a6e12fe6df4",
"pem":"-----BEGIN CERTIFICATE-----\nMIICzDCCAbSgAwIBAgIQOOkVcEN7TNa9E80GoUs4xDANBgkqhkiG9w0BAQsFADAO\n-----END CERTIFICATE-----\n",
"links":[
{
"href":"http://10.164.180.104:9511/v1/certificates/0b4b766f-1500-44b3-9804-5a6e12fe6df4",
"rel":"self"
},
{
"href":"http://10.164.180.104:9511/certificates/0b4b766f-1500-44b3-9804-5a6e12fe6df4",
"rel":"bookmark"
}
]
}
Sign client key and generate the CA certificate for a cluster
Response Codes¶
Success¶
Code |
Reason |
---|---|
201 - Created |
Resource was created and is ready to use. |
Error¶
Code |
Reason |
---|---|
400 - Bad Request |
Some content in the request was invalid. |
401 - Unauthorized |
User must authenticate before making a request. |
403 - Forbidden |
Policy does not allow current user to do this operation. |
Request¶
Name |
In |
Type |
Description |
---|---|---|---|
cluster_uuid |
body |
UUID |
The UUID of the cluster. |
csr |
body |
string |
Certificate Signing Request (CSR) for authenticating client key. The CSR will be used by Magnum to generate a signed certificate that client will use to communicate with the Bay/Cluster. |
Request Example¶
{
"cluster_uuid":"0b4b766f-1500-44b3-9804-5a6e12fe6df4",
"csr":"-----BEGIN CERTIFICATE REQUEST-----\nMIIEfzCCAmcCAQAwFDESMBAGA1UEAxMJWW91ciBOYW1lMIICIjANBgkqhkiG9w0B\n-----END CERTIFICATE REQUEST-----\n"
}
Response¶
Name |
In |
Type |
Description |
---|---|---|---|
X-Openstack-Request-Id |
header |
UUID |
A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs. |
pem |
body |
string |
CA certificate for the cluster. |
cluster_uuid |
body |
UUID |
The UUID of the cluster. |
links |
body |
array |
Links to the resources in question. |
csr |
body |
string |
Certificate Signing Request (CSR) for authenticating client key. The CSR will be used by Magnum to generate a signed certificate that client will use to communicate with the Bay/Cluster. |
Response Example¶
{
"pem":"-----BEGIN CERTIFICATE-----\nMIIDxDCCAqygAwIBAgIRALgUbIjdKUy8lqErJmCxVfkwDQYJKoZIhvcNAQELBQAw\n-----END CERTIFICATE-----\n",
"cluster_uuid":"0b4b766f-1500-44b3-9804-5a6e12fe6df4",
"links":[
{
"href":"http://10.164.180.104:9511/v1/certificates/0b4b766f-1500-44b3-9804-5a6e12fe6df4",
"rel":"self"
},
{
"href":"http://10.164.180.104:9511/certificates/0b4b766f-1500-44b3-9804-5a6e12fe6df4",
"rel":"bookmark"
}
],
"csr":"-----BEGIN CERTIFICATE REQUEST-----\nMIIEfzCCAmcCAQAwFDESMBAGA1UEAxMJWW91ciBOYW1lMIICIjANBgkqhkiG9w0B\n-----END CERTIFICATE REQUEST-----\n"
}
Rotate the CA certificate for a cluster and invalidate all user certificates.
Response Codes¶
Success¶
Code |
Reason |
---|---|
202 - Accepted |
Request was accepted for processing, but the processing has not been completed. A ‘location’ header is included in the response which contains a link to check the progress of the request. |
Error¶
Code |
Reason |
---|---|
400 - Bad Request |
Some content in the request was invalid. |
Request¶
Name |
In |
Type |
Description |
---|---|---|---|
cluster |
body |
UUID |
The UUID of the cluster. |
Manage Magnum service¶
Enables administrative users to list all Magnum services.
Container infrastructure service information include service id, binary, host, report count, creation time, last updated time, health status, and the reason for disabling service.
Response Codes¶
Success¶
Code |
Reason |
---|---|
200 - OK |
Request was successful. |
Error¶
Code |
Reason |
---|---|
401 - Unauthorized |
User must authenticate before making a request. |
Response Parameters¶
Name |
In |
Type |
Description |
---|---|---|---|
X-Openstack-Request-Id |
header |
UUID |
A unique ID for tracking service request. The request ID associated with the request by default appears in the service logs. |
mservices |
body |
array |
A list of Magnum services. |
binary |
body |
string |
The name of the binary form of the Magnum service. |
created_at |
body |
string |
The date and time when the resource was created. The date and time stamp format is ISO 8601: CCYY-MM-DDThh:mm:ss±hh:mm
For example, The |
state |
body |
string |
The current state of Magnum services. |
report_count |
body |
integer |
The total number of report. |
updated_at |
body |
string |
The date and time when the resource was updated. The date and time stamp format is ISO 8601: CCYY-MM-DDThh:mm:ss±hh:mm
For example, The If the |
host |
body |
string |
The host for the service. |
disabled_reason |
body |
string |
The disable reason of the service, |
id |
body |
string |
The ID of the Magnum service. |
Response Example¶
{
"mservices":[
{
"binary":"magnum-conductor",
"created_at":"2016-08-23T10:52:13+00:00",
"state":"up",
"report_count":2179,
"updated_at":"2016-08-25T01:13:16+00:00",
"host":"magnum-manager",
"disabled_reason":null,
"id":1
}
]
}
Magnum Stats API¶
An admin user can get stats for the given tenant and also overall system stats. A non-admin user can get self stats.
Get stats based on project id.
Response Codes¶
Success¶
Code |
Reason |
---|---|
200 - OK |
Request was successful. |
Error¶
Code |
Reason |
---|---|
401 - Unauthorized |
User must authenticate before making a request. |
403 - Forbidden |
Policy does not allow current user to do this operation. |
Request¶
Name |
In |
Type |
Description |
---|---|---|---|
project_id |
path |
string |
Project ID. |
Response¶
Name |
In |
Type |
Description |
---|---|---|---|
clusters |
body |
integer |
The number of clusters. |
nodes |
body |
integer |
The total number of nodes including master nodes. |
Response Example¶
{
"clusters": 1,
"nodes": 2
}
Show overall Magnum system stats. If the requester is non-admin user show self stats.
Response Codes¶
Success¶
Code |
Reason |
---|---|
200 - OK |
Request was successful. |
Error¶
Code |
Reason |
---|---|
401 - Unauthorized |
User must authenticate before making a request. |
403 - Forbidden |
Policy does not allow current user to do this operation. |
Response¶
Name |
In |
Type |
Description |
---|---|---|---|
clusters |
body |
integer |
The number of clusters. |
nodes |
body |
integer |
The total number of nodes including master nodes. |
Response Example¶
{
"clusters": 1,
"nodes": 2
}
Magnum Quota API¶
Lists, creates, shows details, and updates Quotas.
Create new quota for a project.
Response Codes¶
Success¶
Code |
Reason |
---|---|
201 - Created |
Resource was created and is ready to use. |
Error¶
Code |
Reason |
---|---|
400 - Bad Request |
Some content in the request was invalid. |
401 - Unauthorized |
User must authenticate before making a request. |
403 - Forbidden |
Policy does not allow current user to do this operation. |
404 - Not Found |
The requested resource could not be found. |
Request Example¶
{
"project_id": "aa5436ab58144c768ca4e9d2e9f5c3b2",
"resource": "Cluster",
"hard_limit": 10
}
Response Example¶
{
"resource": "Cluster",
"created_at": "2017-01-17T17:35:48+00:00",
"updated_at": null,
"hard_limit": 1,
"project_id": "aa5436ab58144c768ca4e9d2e9f5c3b2",
"id": 26
}
List all quotas in Magnum.
Response Codes¶
Success¶
Code |
Reason |
---|---|
200 - OK |
Request was successful. |
Error¶
Code |
Reason |
---|---|
401 - Unauthorized |
User must authenticate before making a request. |
403 - Forbidden |
Policy does not allow current user to do this operation. |
Response Example¶
{
"quotas": [
{
"resource": "Cluster",
"created_at": "2017-01-17T17:35:49+00:00",
"updated_at": "2017-01-17T17:38:21+00:00",
"hard_limit": 10,
"project_id": "aa5436ab58144c768ca4e9d2e9f5c3b2",
"id": 26
}
]
}
Get quota information for the given project_id and resource.
Response Codes¶
Success¶
Code |
Reason |
---|---|
200 - OK |
Request was successful. |
Error¶
Code |
Reason |
---|---|
401 - Unauthorized |
User must authenticate before making a request. |
403 - Forbidden |
Policy does not allow current user to do this operation. |
404 - Not Found |
The requested resource could not be found. |
Response Example¶
{
"resource": "Cluster",
"created_at": "2017-01-17T17:35:49+00:00",
"updated_at": "2017-01-17T17:38:20+00:00",
"hard_limit": 10,
"project_id": "aa5436ab58144c768ca4e9d2e9f5c3b2",
"id": 26
}
Update resource quota for the given project id.
Response Codes¶
Success¶
Code |
Reason |
---|---|
202 - Accepted |
Request was accepted for processing, but the processing has not been completed. A ‘location’ header is included in the response which contains a link to check the progress of the request. |
Error¶
Code |
Reason |
---|---|
400 - Bad Request |
Some content in the request was invalid. |
401 - Unauthorized |
User must authenticate before making a request. |
403 - Forbidden |
Policy does not allow current user to do this operation. |
404 - Not Found |
The requested resource could not be found. |
Request Example¶
{
"project_id": "aa5436ab58144c768ca4e9d2e9f5c3b2",
"resource": "Cluster",
"hard_limit": 10
}
Response Example¶
{
"resource": "Cluster",
"created_at": "2017-01-17T17:35:49+00:00",
"updated_at": "2017-01-17T17:38:20+00:00",
"hard_limit": 10,
"project_id": "aa5436ab58144c768ca4e9d2e9f5c3b2",
"id": 26
}
Delete a resource quota for the given project id.
Response Codes¶
Success¶
Code |
Reason |
---|---|
204 - No Content |
The server has fulfilled the request by deleting the resource. |
Error¶
Code |
Reason |
---|---|
400 - Bad Request |
Some content in the request was invalid. |
401 - Unauthorized |
User must authenticate before making a request. |
403 - Forbidden |
Policy does not allow current user to do this operation. |
404 - Not Found |
The requested resource could not be found. |
Request Example¶
{
"project_id": "aa5436ab58144c768ca4e9d2e9f5c3b2",
"resource": "Cluster"
}