Managing projects as a domain administrator
To manage a project as a domain administrator, do the following:
-
Use the environment file for the domain administrator to authorize further OpenStack commands:
# unset OS_PROJECT_NAME; unset OS_DOMAIN_NAME; source domain-admin.sh
-
List all accessible domains to get the domain ID:
# openstack --insecure federation domain list +----------------------------------+---------+------+-------------+ | ID | Enabled | Name | Description | +----------------------------------+---------+------+-------------+ | b41c5bd8ca1e43f19f9720390c2869d5 | True | test | | +----------------------------------+---------+------+-------------+
-
Create a project. For example:
# openstack --insecure project create \ --domain b41c5bd8ca1e43f19f9720390c2869d5 testproject
-
To set and update project quotas, authorize in the new project. For example:
# export OS_PROJECT_NAME=testproject
-
Set a quota for the project:
-
To limit the number of virtual CPUs, use the
--cores
option. For example, to limit the number of vCPUs to 128, execute:# openstack --insecure quota set --cores 128 testproject
-
To limit the amount of RAM, use the
--ram
option. For example, to limit the amount of RAM to 100 Gib, execute:# openstack --insecure quota set --ram 102400 testproject
-
To limit the storage space size, specify the policy with the
--volume-type
option and the required space with the--gigabytes
option. For example, to limit the storage space size for thedefault
storage policy to 1 Tib, execute:# openstack --insecure quota set --volume-type default \ --gigabytes 1024 testproject
-
To limit the number of floating IP addresses, use the
--floating-ips
option. For example, to limit the number of floating IP addresses to 128, execute:# openstack --insecure quota set --floating-ips 128 testproject
-
To limit the number of Kubernetes clusters, get the project ID first, and then execute the
coe quotas create
command with the--resource
and--hard-limit
options. For example, to limit the number of Kubernetes clusters to 10, execute:# openstack --insecure federation project list +----------------------------------+-----------+---------+-------------+ | ID | Domain ID | Enabled | Name | +----------------------------------+-----------+---------+-------------+ | d746acd8b2e847c4925685b8ad95b828 | b41c<...> | True | testproject | +----------------------------------+-----------+---------+-------------+ # openstack --insecure coe quotas create \ --project-id d746acd8b2e847c4925685b8ad95b828 --resource Cluster \ --hard-limit 10 +------------+----------------------------------+ | Property | Value | +------------+----------------------------------+ | resource | Cluster | | in_use | 0 | | created_at | 2021-01-13T16:14:28.003861+00:00 | | updated_at | - | | id | 3 | | project_id | d746acd8b2e847c4925685b8ad95b828 | | hard_limit | 10 | +------------+----------------------------------+
-
To limit the number of load balancers, use the
loadbalancer quota set
command with the--loadbalancer
option. For example, to limit the number of load balancers to 20, execute:# openstack --insecure loadbalancer quota set testproject --loadbalancer 20 +----------------+-------+ | Field | Value | +----------------+-------+ | load_balancer | 20 | | listener | -1 | | pool | -1 | | health_monitor | -1 | | member | -1 | +----------------+-------+
-
You can check the applied project quotas by executing the following command:
# openstack --insecure quota show
Changes you make to project quotas are also reflected in the admin panel.