开通Cloud Foundry试用账户
登录cockpit首页开通Cloud Foundry试用
目前有4个区域选择,不同的区域影响后续的cf 登录API Endpoint 地址
可供选择区域
安装Cloud Foundry CLI ( Command Line Interface )
有两种方式,一种是通过Package Manager方式进行安装,一种是直接下载installer进行安装(安装文档:https://docs.cloudfoundry.org/cf-cli/install-go-cli.html)
我通过第一种方式(Pkg Mgr)安装
输入命令进行安装
brew install cloudfoundry/tap/cf-cli
备注:
期间安装出现了一些小插曲,出现报错
上网查了下,说是升级的mac的问题需要重新安装下CommandLineTools,命令如下:
xcode-select --install
设置环境并登录
Region | URL |
---|---|
US East (VA) running on AWS | https://api.cf.us10.hana.ondemand.com |
US West (CA) running on Azure | https://api.cf.us20.hana.ondemand.com |
Europe (Frankfurt) running on AWS | https://api.cf.eu10.hana.ondemand.com |
之前的账户选择的区域是法兰克福,所以使用地址:https://api.cf.eu10.hana.ondemand.com
输入命令
cf api https://api.cf.eu10.hana.ondemand.com
输入登录命令
cf login
并输入登录的账号和密码(登录cockpit的邮箱和密码)
登录成功!