make gem source configurable

Change-Id: I5b44ad584aa8925ed832eee13a003385e8e59569
This commit is contained in:
Will 2017-02-11 23:13:23 +08:00
parent 87d5639d08
commit c1edb32eb1
2 changed files with 7 additions and 1 deletions

View File

@ -79,7 +79,10 @@ function nb_db_driver_install_server {
sudo make install
if ! sudo gem list redis | grep -q redis; then
sudo gem source -a https://rubygems.org/
sudo gem source -a $DF_RUBY_SOURCE_ADD
if [ -n "$DF_RUBY_SOURCE_REMOVE" ];then
sudo gem source -r $DF_RUBY_SOURCE_REMOVE
fi
sudo gem install redis
fi

View File

@ -39,3 +39,6 @@ OVS_INTEGRATION_BRIDGE_PROTOCOLS=${OVS_INTEGRATION_BRIDGE_PROTOCOLS:-"OpenFlow10
DF_REDIS_INSTALL_FROM_RUBY=${DF_REDIS_INSTALL_FROM_RUBY:-"True"}
PORT_STATUS_NOTIFIER=${PORT_STATUS_NOTIFIER:-""}
DF_RUBY_SOURCE_ADD=${DF_RUBY_SOURCE_ADD:-"https://rubygems.org/"}
DF_RUBY_SOURCE_REMOVE=${DF_RUBY_SOURCE_REMOVE:-""}