CloudFoundry之warden安装

6 篇文章 0 订阅
5 篇文章 0 订阅

环境:物理机或虚拟机,ubuntu10.04或更高。
假设是一个新的ubutu系统。

1. 更新软件源

两种方法:

(1) ubuntu软件中心-编辑软件源-其他源,一般认为163的源速度比较快。

(2) 修改/etc/apt/sources.list,请事先备份,sources list请参考:http://wiki.ubuntu.org.cn/%E6%BA%90%E5%88%97%E8%A1%A8

修改后 sudo apt-get update 同步数据

安装过程中发现,163源有些软件没有,来回折腾,后来用ubuntu软件中心的自测当前优秀源,居然是中科大的。后来就是用这个源搞定之。

2. ruby 环境

网上很多人建议用rvm来管理ruby版本及配套,但是实验中发现很难用,可能是不太熟吧,放弃。

发现可用的ruby1.9.3

apt-cache search ruby
sudo apt-get install ruby1.9.3 

安装完核对下版本,ruby -v 应该是1.9.3了。

gem -v 查看gem 版本。一般是1.8以上。

sudo gem install bundler 

安装bundler ,有点类似java的maven里的功能,会下载工程的依赖包,后续的每个动作请都用sudo。不然会出现各种诡异问题,以及后期程序中执行

setlimit命令时,权限通不过。


3. git


 audo apt-get install git git-core 

这个不解释,本文只是clone,所以具体的ssh之类的配置可忽略。


4. warden前提

官方说明:

(1)install the ringt kernal

If you are running Ubuntu 10.04 (Lucid), make sure the backported Natty kernel is installed. After installing, reboot the system before continuing.

sudo apt-get install -y linux-image-generic-lts-backport-natty

如果是12.04的,就直接安装

sudo apt-get install -y linux-image

(2)install dependencies

sudo apt-get install -y build-essential debootstrap
sudo apt-get install -y cgroup-bin

虽然cgroup-bin,官方文档中没提到,但这是后续一个问题的解决方法,况且cgroup是必须的,这里先装上。

5. 安装warden

找一个目录,git clone https://github.com/cloudfoundry/warden.git

cd warden/warden

安装工程的依赖

sudo bundle install

warden配置安装

sudo bundle exec rake setup[config/linux.yml]

安装成功,会有如下日志:

Setting up build-essential (11.4build1) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

启动warden服务

sudo bundle exec rake warden:start[config/linux.yml]

启动成功,会有如下日志:

james@James:~/workspace/warden/warden$ sudo bundle exec rake warden:start[config/linux.yml]
[sudo] password for james:
{"timestamp":1355712452.4586444,"message":"rlimit_nofile: 1024 => 32768","log_level":"debug","source":"Warden::Server","data":{},"thread_id":19081340,"fiber_id":28239660,"process_id":24677,"file":"/home/james/workspace/warden/warden/lib/warden/server.rb","lineno":240,"method":"run!"}
{"timestamp":1355712453.9620073,"message":"Exited with status 0 (1.412s): [[\"/home/james/workspace/warden/warden/src/closefds/closefds\", \"/home/james/workspace/warden/warden/src/closefds/closefds\"], \"/home/james/workspace/warden/warden/root/linux/setup.sh\"]","log_level":"debug","source":"Warden::Container::Linux","data":{},"thread_id":19081340,"fiber_id":28239660,"process_id":24677,"file":"/home/james/workspace/warden/warden/lib/warden/container/spawn.rb","lineno":131,"method":"set_deferred_success"}
{"timestamp":1355712453.9641628,"message":"Listening on /tmp/warden.sock, and ready for action.","log_level":"info","source":"Warden::Server","data":{},"thread_id":19081340,"fiber_id":28243260,"process_id":24677,"file":"/home/james/workspace/warden/warden/lib/warden/server.rb","lineno":282,"method":"block (2 levels) in run!"}

启动命令行模式

sudo bundle exec bin/warden-repl

键入 help 查看具体用法。



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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值