cloudfoundry常用cli命令

1 安装cloudfoundry cli 客户端

2  带密码等录
cf login --skip-ssl-validation -a https://api.yourcompany.com -u username -p password

3  显示组织(org)
cf orgs

4  创建组织(org)
cf create-org ORG_NAME

5 删除组织(org)
cf delete-org ORG_NAME

6 重命名组织(org)
cf rename-org ORG_NAME

7 选择组织(org)
cf target -o ORG_NAME

8  显示空间(space)
cf spaces

9  创建空间(space)
cf create-space dev

10 删除空间(space)
cf delete-space dev

11 重命名空间(space)
cf rename-space dev

12 选择空间(space)
cf target -s dev

13 选择组织和空间
cf target -o ORG_NAME -s SPACE_NAME

14 创建新用户
cf  create-user [email protected](用户名)  password(密码)

15 删除用户
cf  delete -user [email protected](用户名)

16 显示当前组织的用户
cf  org-users

17  给用户分配组织角色
cf set-org-role [email protected] ORG_NAME  OrgManager

18  删除用户在组织中的角色
cf unset -org-role [email protected] ORG_NAME  OrgManager

19 显示服务
cf m

20 显示服务实例
cf services

20 创建服务
cf  create-service service_name  service_plan  myservice

21 删除服务
cf delete-service  myservice

21 给应用绑定服务
cf bind-service myapp   myservice

22 发布应用
cf p myapp -i 1 -m 256M -p c:\demo\myapp.war

23  显示目标空间所有应用
cf apps

24  显示应用程序的健康状态
cf app myapp

25  改或查看应用程序的实例个数,磁盘空间配额和内存配额
cf scale myapp -i 2 -m 512M

26 删除一个应用程序
cf delete myapp

27 重命名应用程序
cf rename  myapp newmyapp

28 启动应用程序
cf  start myapp

29 停止应用程序
cf stop myapp

30 重新应用程序
cf restart  myapp

猜你喜欢

转载自fengtc.iteye.com/blog/2283917
今日推荐