cf-release编译版本

一、下载代码

1
2
3
4
$ git clone https://github.com/cloudfoundry/cf-release.git
$ cd cf-relrease
$ git checkout v225
$ ./scripts/update

二、修改final.yml

1
2
$ cd cf-release
$ vim ./config/final.yml

1、修改为本地目录

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/config/final.yml b/config/final.yml
--- a/config/final.yml
+++ b/config/final.yml
@@ -2,6 +2,6 @@
final_name: cf
min_cli_version: 1.5.0.pre.1001
blobstore:
- provider: s3
+ provider: local
options:
- bucket_name: blob.cfblob.com
+ blobstore_path: /home/dtdream/paas/blobstore

2、修改为本地文件服务器

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/config/final.yml b/config/final.yml
--- a/config/final.yml
+++ b/config/final.yml
@@ -2,6 +2,7 @@
final_name: cf
min_cli_version: 1.5.0.pre.1001
blobstore:
- provider: s3
+ provider: simple
options:
bucket_name: cf-release-blobs
+ url: http://10.158.240.3/blobstore

四、安装ruby

1
install_ruby.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash -ex

if [ ! -d ~/.rbenv ]; then
sudo apt-get -y install build-essential libreadline-dev libssl-dev zlib1g-dev git-core
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.profile
echo 'eval "$(rbenv init -)"' >> ~/.profile
#change sources to ruby.taobao.org
fi
source ~/.profile
if ! (rbenv versions | grep -q 1.9.3-p484 ); then
rbenv install 1.9.3-p484
fi
rbenv local 1.9.3-p484
gem sources -r http://rubygems.org/
gem sources -r https://ruby.taobao.org
gem sources -a https://ruby.taobao.org

gem install bundler --no-rdoc --no-ri
bundle config mirror.https://rubygems.org https://ruby.taobao.org
bundle config mirror.http://rubygems.org https://ruby.taobao.org
rbenv rehash

五、安装bundler

1
2
3
$ cd cf-release
$ gem install bundler --no-rdoc --no-ri
$ bundle install

六、执行编译

1
$ bosh -n create release --force

七、打patch文件

1
2
$ cd cf-release/src/
$ patch -p1 < ../v215.diff

有问题反馈

在使用中有任何问题,欢迎反馈给我,可以用以下联系方式跟我交流

  • 邮件:wabcwang@126.com
  • 电话:15210838036

关于作者