Currently the oslo.messaging has update its configuration to use transport_url for message bus configuration, and openstack endpoint creation aslo has new strutucture, need to update the installation guide to make it work in new release. python-kingbirdclient was introduced, so the usage guide is updated to use python-kingbirdclient. The new feature key pair synchronization is also included in the usage guide. Change-Id: I725da3a8dbb83109130473d9bc86381303d2c174 Signed-off-by: joehuang <joehuang@huawei.com>
8.9 KiB
Kingbird user guide
Quota management for OpenStack multi-region deployments
Kingbird is centralized synchronization service for multi-region OpenStack deployments. In OPNFV Colorado release, Kingbird provides centralized quota management feature. Administrator can set quota per project based in Kingbird and sync the quota limit to multi-region OpenStack periodiclly or on-demand. The tenant can check the total quota limit and usage from Kingbird for all regions. Administrator can also manage the default quota by quota class setting.
Following quota items are supported to be managed in Kingbird:
- instances: Number of instances allowed per project.
- cores: Number of instance cores allowed per project.
- ram: Megabytes of instance RAM allowed per project.
- metadata_items: Number of metadata items allowed per instance.
- key_pairs: Number of key pairs per user.
- fixed_ips: Number of fixed IPs allowed per project, valid if Nova Network is used.
- security_groups: Number of security groups per project, valid if Nova Network is used.
- floating_ips: Number of floating IPs allowed per project, valid if Nova Network is used.
- network: Number of networks allowed per project, valid if Neutron is used.
- subnet: Number of subnets allowed per project, valid if Neutron is used.
- port: Number of ports allowed per project, valid if Neutron is used.
- security_group: Number of security groups allowed per project, valid if Neutron is used.
- security_group_rule: Number of security group rules allowed per project, valid if Neutron is used.
- router: Number of routers allowed per project, valid if Neutron is used.
- floatingip: Number of floating IPs allowed per project, valid if Neutron is used.
- volumes: Number of volumes allowed per project.
- snapshots: Number of snapshots allowed per project.
- gigabytes: Total amount of storage, in gigabytes, allowed for volumes and snapshots per project.
- backups: Number of volume backups allowed per project.
- backup_gigabytes: Total amount of storage, in gigabytes, allowed for volume backups per project.
Key pair is the only resource type supported in resource synchronization.
Only restful APIs are provided for Kingbird in Colorado release, so curl or other http client can be used to call Kingbird API.
Before use the following command, get token, project id, and kingbird service endpoint first. Use $kb_token to repesent the token, and $admin_tenant_id as administrator project_id, and $tenant_id as the target project_id for quota management and $kb_ip_addr for the kingbird service endpoint ip address.
Note: To view all tenants (projects), run:
openstack project list
To get token, run:
openstack token issue
To get Kingbird service endpoint, run:
openstack endpoint list
Quota Management API
Update global limit for a tenant
Use python-kingbirdclient:
kingbird quota update $tenant_id --port 10 --security_groups 10
Use curl:
curl \ "Content-Type: application/json" \ -H "X-Auth-Token: $kb_token" \ -H \ -X PUT '{"quota_set":{"cores": 10,"ram": 51200, "metadata_items": 100,"key_pairs": 100, "network":20,"security_group": 20,"security_group_rule": 20}}' \ -d $kb_ip_addr:8118/v1.0/$admin_tenant_id/os-quota-sets/$tenant_id http://
Get global limit for a tenant
Use python-kingbirdclient:
kingbird quota show --tenant $tenant_id
Use curl:
curl \ "Content-Type: application/json" \ -H "X-Auth-Token: $kb_token" \ -H $kb_ip_addr:8118/v1.0/$admin_tenant_id/os-quota-sets/$tenant_id http://
A tenant can also get the global limit by himself
Use python-kingbirdclient:
kingbird quota show
Use curl:
curl \ "Content-Type: application/json" \ -H "X-Auth-Token: $kb_token" \ -H $kb_ip_addr:8118/v1.0/$tenant_id/os-quota-sets/$tenant_id http://
Get defaults limits
Use python-kingbirdclient:
kingbird quota defaults
Use curl:
curl \ "Content-Type: application/json" \ -H "X-Auth-Token: $kb_token" \ -H $kb_ip_addr:8118/v1.0/$admin_tenant_id/os-quota-sets/defaults http://
Get total usage for a tenant
Use python-kingbirdclient:
kingbird quota detail --tenant $tenant_id
Use curl:
curl \ "Content-Type: application/json" \ -H "X-Auth-Token: $kb_token" \ -H \ -X GET $kb_ip_addr:8118/v1.0/$admin_tenant_id/os-quota-sets/$tenant_id/detail http://
A tenant can also get the total usage by himself
Use python-kingbirdclient:
kingbird quota detail
Use curl:
curl \ "Content-Type: application/json" \ -H "X-Auth-Token: $kb_token" \ -H \ -X GET $kb_ip_addr:8118/v1.0/$tenant_id/os-quota-sets/$tenant_id/detail http://
On demand quota sync
Use python-kingbirdclient:
kingbird quota sync $tenant_id
Use curl:
curl \ "Content-Type: application/json" \ -H "X-Auth-Token: $kb_token" \ -H \ -X PUT $kb_ip_addr:8118/v1.0/$admin_tenant_id/os-quota-sets/$tenant_id/sync http://
Delete specific global limit for a tenant
Use curl:
curl \ "Content-Type: application/json" \ -H "X-Auth-Token: $kb_token" \ -H \ -X DELETE '{"quota_set": [ "cores", "ram"]}' \ -d $kb_ip_addr:8118/v1.0/$admin_tenant_id/os-quota-sets/$tenant_id http://
Delete all kingbird global limit for a tenant
Use python-kingbirdclient:
kingbird quota delete $tenant_id
Use curl:
curl \ "Content-Type: application/json" \ -H "X-Auth-Token: $kb_token" \ -H \ -X DELETE $kb_ip_addr:8118/v1.0/$admin_tenant_id/os-quota-sets/$tenant_id http://
Quota Class API
Update default quota class
Use python-kingbirdclient:
kingbird quota-class update --port 10 --security_groups 10 <quota class>
Use curl:
curl \ "Content-Type: application/json" \ -H "X-Auth-Token: $kb_token" \ -H \ -X PUT '{"quota_class_set":{"cores": 100, "network":50,"security_group": 50,"security_group_rule": 50}}' \ -d $kb_ip_addr:8118/v1.0/$admin_tenant_id/os-quota-class-sets/default http://
Get default quota class
Use python-kingbirdclient:
kingbird quota-class show default
Use curl:
curl \ "Content-Type: application/json" \ -H "X-Auth-Token: $kb_token" \ -H $kb_ip_addr:8118/v1.0/$admin_tenant_id/os-quota-class-sets/default http://
Delete default quota class
Use python-kingbirdclient:
kingbird quota-class delete default
Use curl:
curl \ "Content-Type: application/json" \ -H "X-Auth-Token: $kb_token" \ -H \ -X DELETE $kb_ip_addr:8118/v1.0/$admin_tenant_id/os-quota-class-sets/default http://
Resource Synchronization API
Create synchronization job
curl \ "Content-Type: application/json" \ -H "X-Auth-Token: $kb_token" \ -H -d \ -X POST '{"resource_set":{"resources": ["<Keypair_name>"],"force":<True/False>,"resource_type": "keypair","source": <"Source_Region">,"target": [<"List_of_target_regions">]}}' \ $kb_ip_addr:8118/v1.0/$tenant_id/os-sync http://
Get synchronization job
curl \ "Content-Type: application/json" \ -H "X-Auth-Token: $kb_token" \ -H $kb_ip_addr:8118/v1.0/$tenant_id/os-sync/ http://
Get active synchronization job
curl \ "Content-Type: application/json" \ -H "X-Auth-Token: $kb_token" \ -H $kb_ip_addr:8118/v1.0/$tenant_id/os-sync/active http://
Get detail information of a synchronization job
curl \ "Content-Type: application/json" \ -H "X-Auth-Token: $kb_token" \ -H $kb_ip_addr:8118/v1.0/$tenant_id/os-sync/$job_id http://
Delete a synchronization job
curl \ "Content-Type: application/json" \ -H "X-Auth-Token: $kb_token" \ -H \ -X DELETE $kb_ip_addr:8118/v1.0/$tenant_id/os-sync/$job_id http://