Managing projects as a domain administrator
Prerequisites
- The environment file for the domain administrator that will manage projects is created, as instructed in Creating and assigning the quota manager role.
To manage a project as a domain administrator
-
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 with
openstack quota set
:-
To limit the number of virtual CPUs, use the
--cores
option. For example, to limit the number of vCPUs to 128, run:# 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, run:# 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, run:# 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, run:# openstack --insecure quota set --floating-ips 128 testproject
-
To limit the number of Kubernetes clusters, get the project ID first, and then use the
coe quotas create
command with the--resource
and--hard-limit
options. For example, to limit the number of Kubernetes clusters to 10, run:# 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
-
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, run:# openstack --insecure loadbalancer quota set testproject --loadbalancer 20
-
You can check the applied project quotas by running:
# openstack --insecure quota show
Changes you make to project quotas are also reflected in the admin panel.