解剖cloudfoundry(八)--vmc 的使用

部署好了以后我们很迫不及待的想要试试是不是能够正常的运行,这个时候我们需要一个工具,能够部署应用到CF上面的工具。

sudo gem install vmc
vmc target http://api.envcloud.nju.edu.cn --target到router的域名。
vmc regitser 
Email:79674293@qq.com
password:123456
vmc login
mkdir hello
cd hello
vim hello.rb
----hello.rb---- 
require 'sinatra'
get '/' do
"hello from cloudfoundry"
end
---hello.rb-----
vmc push
........yes
...........yes
............yes
...........64M
......
...ok
...ok
..ok
..ok
然后在bosh_cli中/etc/hosts

127.0.0.1       localhost
127.0.1.1       bosh-desktop
192.168.1.40 api.envcloud.nju.edu.cn
192.168.1.40 kent.envcloud.nju.edu.cn
192.168.1.40 hello.envcloud.nju.edu.cn
# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
vm的其他命令

vmc apps
vmc info
vmc delete app


最后就可以在浏览器访问了

url:hello.envcloud.nju.edu.cn


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值