Created
November 12, 2015 11:44
-
-
Save allomov-altoros/04a858e910b9f885911b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export CC_JOB_DIR=/var/vcap/jobs/cloud_controller_ng | |
source $CC_JOB_DIR/bin/ruby_version.sh | |
CC_PACKAGE_DIR=/var/vcap/packages/cloud_controller_ng | |
RUN_DIR=/var/vcap/sys/run/cloud_controller_ng | |
LOG_DIR=/var/vcap/sys/log/cloud_controller_ng | |
PIDFILE=$RUN_DIR/cloud_controller_ng.pid | |
export CONFIG_DIR=$CC_JOB_DIR/config | |
export CLOUD_CONTROLLER_NG_CONFIG=$CONFIG_DIR/cloud_controller_ng.yml | |
export BUNDLE_GEMFILE=$CC_PACKAGE_DIR/cloud_controller_ng/Gemfile | |
export HOME=/home/vcap # rake needs it to be set to run tasks | |
export TMPDIR=/var/vcap/data/cloud_controller_ng/tmp | |
export PATH=$PATH:$CC_PACKAGE_DIR/cloud_controller_ng/bin | |
export C_INCLUDE_PATH=/var/vcap/packages/libpq/include:$C_INCLUDE_PATH | |
export LIBRARY_PATH=/var/vcap/packages/libpq/lib:$LIBRARY_PATH | |
export LANG=en_US.UTF-8 | |
export NEWRELIC_ENABLE=false | |
export NRCONFIG=$CONFIG_DIR/newrelic.yml | |
# chpst -u vcap:vcap $CC_PACKAGE_DIR/cloud_controller_ng/bin/console | |
# $CC_PACKAGE_DIR/cloud_controller_ng/bin/console $CLOUD_CONTROLLER_NG_CONFIG | |
pushd $CC_PACKAGE_DIR/cloud_controller_ng | |
$@ | |
popd | |
# To use for console run following | |
# /var/vcap/jobs/cloud_controller_ng/bin/cloud_controller_env console /var/vcap/jobs/cloud_controller_ng/config/cloud_controller_ng.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __FILE__) | |
require 'bundler/setup' | |
require 'yaml' | |
require 'sequel' | |
require 'steno' | |
require 'cloud_controller' | |
require_relative 'lib/tasks/rake_config' | |
BackgroundJobEnvironment.new(RakeConfig.config).setup_environment |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment