- Quota Plans可用于配置memory,service,instance usage(内存大小,服务,实例)
- Quota Plans通过用户友好的名字来区分不同的配额计划,但是在CloudFoundry内部系统中通过唯一的GUIDs进行区分
- CloudFoundry中的每个Organization(组织)都有一个记录可用的Quota Plans的列表,组织中的管理员通过指定明确的Quota Plan到Organization中,组织中每个用户都共享这个Quota Plan,同一时间只可以指定一个Quota Plan
- Quota Plan Attributes
- CloudFoundry有一个默认的Quota Plan名字为default
Memory Limit: 10240 MB Total Routes:1000 Total Services:100 Non-basic Services Allowed:True Trial DB Allowed:True
- 创建一个新的Quota Plan
在部署CloudFoundry前直接修改CF deployment manifest部署清单文件 在部署之后通过cf curl命令进行创建
修改Manifest 打开控制台终端,输入bosh edit deployment 找到quota_definitions 以default为模板增加新的Quota Plan quota_definitions: default: memory_limit: 10240 non_basic_services_allowed: true total_routes: 1000 total_services: 100 trial_db_allowed: true silver_quota: memory_limit: 2048 non_basic_services_allowed: true total_routes: 500 total_services: 25 trial_db_allowed: true
使用 cf curl #cf curl /v2/quota_definitions -X 'POST' -d ‘ { "name": "NAME", "non_basic_services_allowed": NBS_ALLOWED, "total_services": SERVICES, "total_routes": ROUTES, "memory_limit": MEMORY, "trial_db_allowed": DB_ALLOWED } ’ cf curl /v2/quota_definitions -X 'POST' -d ‘ { "name": "small", "non_basic_services_allowed": false, "total_services": 10, "total_routes": 10, "memory_limit": 2048, "trial_db_allowed": false } ’
- 修改Quota Plan
在部署之前直接修改CF deployment manifest进行修改 在部署之后使用cf curl进行修改
修改Manifest 打开终端,输入bosh edit deployment 找到quota_definitions 修改你要修改的属性
使用cf curl修改 输入cf curl /v2/quota_definitions -X 'GET'来获得Organization中可用的所有Quota GUIDs #cf curl /v2/quota_definitions/QUOTA_PLAN_GUID -X ‘PUT’ -d "{\"ATTRIBUTE\":VALUE}" cf curl /v2/quota_definitions/cccc-4567-b4b4-5432-33412ad1123e -X ‘PUT’ -d "{\"memory_limit\":40960}"
CloudFoundry Quota Plans 配额计划
最新推荐文章于 2019-04-30 10:50:31 发布