项目所在:https://github.com/yudai/cf_nise_installer
一键安装
bash < <(curl -s -k -B https://raw.github.com/yudai/cf_nise_installer/${INSTALLER_BRANCH:-master}/local/bootstrap.sh)
然后启动
cd cf_nise_installer/ &&./local/start_processes.sh
我自己更改了一下代码,虽然不多,但对于国内用户的网络、和网速来说一次运行即成功的概率比较小。重复运行时,可以帮你减少一点等待时间。项目在https://github.com/kelby/cf_nise_installer
运行报错
The following templates and packages forjob micro_ng will be installed.
#nats
* common
* nats
* ruby
#health_manager_next
* health_manager_next
* common
* ruby
* syslog_aggregator
#uaa
* common
* ruby
* syslog_aggregator
* uaa
#cloud_controller_ng
* common
* cloud_controller_ng
* nginx
* libpq
* mysqlclient
* sqlite
* ruby
* syslog_aggregator
#gorouter
* common
* golang
* gorouter
* syslog_aggregator
#dea_next
* common
* dea_next
* warden
* rootfs_lucid64
* ruby
* golang
* sqlite
* mysqlclient
* syslog_aggregator
* libpq
* git
* buildpack_cache
* insight_agent
* libyaml
#[11684] INFO: Resolving packagedependencies...
#[11684] INFO: Installing the followingpackages:
#[11684] INFO: * common
#[11684] INFO: * libyaml
#[11684] INFO: * ruby
#[11684] INFO: * nats
#[11684] INFO: * health_manager_next
#[11684] INFO: * syslog_aggregator
#[11684] INFO: * uaa
#[11684] INFO: * libpq
#[11684] INFO: * mysqlclient
#[11684] INFO: * sqlite
#[11684] INFO: * cloud_controller_ng
#[11684] INFO: * nginx
#[11684] INFO: * golang
#[11684] INFO: * gorouter
#[11684] INFO: * buildpack_cache
#[11684] INFO: * insight_agent
#[11684] INFO: * dea_next
#[11684] INFO: * warden
#[11684] INFO: * rootfs_lucid64
#[11684] INFO: * git
#[8121] INFO: Installing package common
#[8121] INFO: The same version of thepackage is already installed. Skipping
#[8121] INFO: Installing package libyaml
#[8121] INFO: The same version of thepackage is already installed. Skipping
#[8121] INFO: Installing package ruby
#[8121] INFO: Running the packaging scriptfor ruby
/home/cloud/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/bundler/gems/bosh-fbb73b1d320c/bosh_cli/lib/cli/release_compiler.rb:163:in`rescue in find_in_indices': Blobstore error: Failed to create object,underlying error: execution expired/home/cloud/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/httpclient-2.2.4/lib/httpclient/session.rb:300:in`connect' (Bosh::Cli::BlobstoreError)
/home/cloud/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/httpclient-2.2.4/lib/httpclient/session.rb:300:in`ssl_connect'
/home/cloud/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/httpclient-2.2.4/lib/httpclient/session.rb:739:in`block in connect'
省略……。
/home/cloud/cf_nise_installer/nise_bosh/lib/nise_bosh/builder.rb:189:in`install_packages'
/home/cloud/cf_nise_installer/nise_bosh/lib/nise_bosh/builder.rb:263:in`install_job'
/home/cloud/cf_nise_installer/nise_bosh/lib/nise_bosh/runner.rb:101:in`run_default_mode'
/home/cloud/cf_nise_installer/nise_bosh/lib/nise_bosh/runner.rb:65:in`run'
./bin/nise-bosh:4:in `<main>'
from/home/cloud/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/bundler/gems/bosh-fbb73b1d320c/bosh_cli/lib/cli/release_compiler.rb:121:in`find_in_indices'
from/home/cloud/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/bundler/gems/bosh-fbb73b1d320c/bosh_cli/lib/cli/release_compiler.rb:109:in`find_package'
from/home/cloud/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/bundler/gems/bosh-fbb73b1d320c/bosh_agent/lib/bosh_agent/message/compile_package.rb:62:in`start'
from/home/cloud/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/bundler/gems/bosh-fbb73b1d320c/bosh_agent/lib/bosh_agent/message/compile_package.rb:31:in`process'
from /home/cloud/cf_nise_installer/nise_bosh/lib/nise_bosh/builder.rb:215:in`run_packaging'
from/home/cloud/cf_nise_installer/nise_bosh/lib/nise_bosh/builder.rb:203:in`install_package'
from /home/cloud/cf_nise_installer/nise_bosh/lib/nise_bosh/builder.rb:191:in`block in install_packages'
from/home/cloud/cf_nise_installer/nise_bosh/lib/nise_bosh/runner.rb:101:in`run_default_mode'
from /home/cloud/cf_nise_installer/nise_bosh/lib/nise_bosh/runner.rb:65:in`run'
from ./bin/nise-bosh:4:in `<main>'
类似
https://github.com/yudai/cf_nise_installer/issues/16
https://github.com/yudai/cf_nise_installer/issues/11
https://github.com/nttlabs/nise_bosh/issues/18
解决方法:多运行几次安装脚本就行了。
安装脚本(顺利)
cloud:~$ bash < <(curl -s -k -Bhttps://raw.github.com/yudai/cf_nise_installer/${INSTALLER_BRANCH:-master}/local/bootstrap.sh)
/usr/bin/git
Already on 'master'
Already up-to-date.
+ rvm
+ which git
/usr/bin/git
+ '[' '!' -d nise_bosh ']'
+ cd nise_bosh
+ sudo ./bin/init
[sudo] password for cloud:
+ bosh_app_dir=/var/vcap
+ bosh_dir=/var/vcap/bosh
+ apt-get update
Hit http://mirrors.163.com lucidRelease.gpg
Ign http://mirrors.163.com/ubuntu/lucid/main Translation-en_US
Hit http://mirrors.163.comlucid-backports/multiverse Sources
Reading package lists... Done
+ DEBIAN_FRONTEND=noninteractive
+ apt-get install -f -y --force-yes--no-install-recommends build-essential libssl-dev lsof strace bind9-hostdnsutils tcpdump iputils-arping curl wget libcurl3 libcurl3-dev bisonlibreadline6-dev libxml2 libxml2-dev libxslt1.1 libxslt1-dev zip unzipnfs-common flex psmisc apparmor-utils iptables sysstat rsync openssh-server traceroutelibncurses5-dev quota libaio1 gdb tripwire libcap2-bin libyaml-dev
Reading package lists... Done
Building dependency tree
gettext is already the newest version.
0 upgraded, 0 newly installed, 0 to removeand 72 not upgraded.
+ cat
++ grep '^vcap$' -c
++ cut -f1 -d :
++ cat /etc/passwd
+ '[' 1 -eq 0 ']'
+ echo 'User vcap exists already, skippkingadduser...'
User vcap exists already, skippkingadduser...
++ lsb_release -cs
+ '[' lucid == lucid ']'
+ variant=lts-backport-oneiric
+ apt-get install -ylinux-image-virtual-lts-backport-oneiriclinux-headers-virtual-lts-backport-oneiric
Reading package lists... Done
Building dependency tree
Reading state information... Done
linux-image-virtual-lts-backport-oneiric isalready the newest version.
linux-headers-virtual-lts-backport-oneiricis already the newest version.
0 upgraded, 0 newly installed, 0 to removeand 72 not upgraded.
+ monit_basename=monit-5.2.4
+ cd /tmp
+ wgethttp://mmonit.com/monit/dist/monit-5.2.4.tar.gz -O monit-5.2.4.tar.gz
--2013-09-17 17:50:05-- http://mmonit.com/monit/dist/monit-5.2.4.tar.gz
Resolving mmonit.com... 62.109.39.247
Connecting tommonit.com|62.109.39.247|:80... connected.
HTTP request sent, awaiting response... 200OK
Length: 609225 (595K) [application/x-gzip]
Saving to: `monit-5.2.4.tar.gz'
100%[=====================================================================================================================================================>]609,225 116K/s in 5.3s
2013-09-17 17:50:11 (112 KB/s) -`monit-5.2.4.tar.gz' saved [609225/609225]
monit 每次运行安装脚本都会重新下载、编译、安装,并且默认存放在 /tmp 里。
针对国内的网络、网速,这是一个特烦的过程,建议修改。相应源代码在 nise_bosh的bin/init里。
+ tar xvzf monit-5.2.4.tar.gz
monit-5.2.4/
monit-5.2.4/http/
monit-5.2.4/sendmail.c
+ cd monit-5.2.4
+ ./configure --prefix=/var/vcap/bosh--without-ssl
checking for gcc... gcc
checking whether the C compiler works...yes
config.status: config.h is unchanged
monit has been configured with thefollowing options:
Architecture: LINUX
PAM support: enabled
SSL support: disabled
large files support: enabled
Compiler flags: -g -O2 -Wall -D_REENTRANT
Linker flags: -lpthread -lcrypt-lresolv -lnsl
pid file location: /var/run
+ make -j4
flex -i l.l
gcc -c -DLINUX-DSYSCONFDIR="\"/var/vcap/bosh/etc\"" -I. -I./device-I./http -I./process -I./protocols -g -O2 -Wall -D _REENTRANT lex.yy.c -o lex.yy.o
lex.yy.c:4818: warning: ?.nput?.defined butnot used
gcc -rdynamic alert.o collector.o control.odaemonize.o env.o event.o file.o gc.o http.o log.o md5.o monitor.o net.oprocess.o sendmail.o sha.o signal.o socket.o spawn.o ssl.o state.o status.outil.o validate.o xmalloc.o xml.o device/device_common.o http/base64.ohttp/cervlet.o http/engine.o http/processor.o process/process_common.oprotocols/apache_status.o protocols/clamav.o protocols/default.oprotocols/dns.o protocols/dwp.o protocols/ftp.o protocols/generic.oprotocols/gps.o protocols/http.o protocols/imap.o protocols/ldap2.oprotocols/ldap3.o protocols/lmtp.o protocols/memcache.o protocols/mysql.oprotocols/nntp.o protocols/ntp3.o protocols/pgsql.o protocols/pop.oprotocols/postfix_policy.o protocols/protocol.o protocols/radius.oprotocols/rdate.o protocols/rsync.o protocols/sip.o protocols/smtp.oprotocols/ssh.o protocols/tns.o device/sysdep_LINUX.o process/sysdep_LINUX.oy.tab.o lex.yy.o -lfl -lpthread -lcrypt-lresolv -lnsl -o monit
+ make install
/usr/bin/install -c -m 755 -d /var/vcap/bosh/bin || exit 1
/usr/bin/install -c -m 755 -d /var/vcap/bosh/share/man/man1 ||exit 1
/usr/bin/install -c -m 555 monit /var/vcap/bosh/bin || exit 1
/usr/bin/install -c -m 444 monit.1/var/vcap/bosh/share/man/man1/monit.1 || exit 1
+ mkdir -p /var/vcap/bosh/etc
+ cat
+ chmod 0700 /var/vcap/bosh/etc/monitrc
+ mkdir -p /var/vcap/monit
+ touch /var/vcap/monit/empty.monitrc
+ echo Done.
Done.
+ '[' '!' -d /sys/fs/cgroup ']'
+ '[' '!' -d /home/cloud/.rbenv ']'
+ . /home/cloud/.profile
++ '[' -n '4.1.5(1)-release' ']'
++ '[' -f /home/cloud/.bashrc ']'
++ . /home/cloud/.bashrc
+++ '[' -z '' ']'
+++ return
++ '[' -d /home/cloud/bin ']'
++ exportPATH=/home/cloud/.rbenv/bin:/home/cloud/.rbenv/bin:/home/cloud/.rbenv/shims:/home/cloud/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
++PATH=/home/cloud/.rbenv/bin:/home/cloud/.rbenv/bin:/home/cloud/.rbenv/shims:/home/cloud/.rbenv/bin:/usr/local/sbin:/usr/l