Fix the automated building issue for DIB

Change-Id: Ibebf1c7cef23f48c472c7b09df505221d7b91307
This commit is contained in:
Yichen Wang 2015-11-10 10:33:26 -08:00
parent e4bab5c222
commit e0408bb653
10 changed files with 23 additions and 10 deletions

View File

@ -20,13 +20,13 @@ Ubuntu/Debian based:
.. code-block:: bash
$ sudo apt-get install python-dev python-pip python-virtualenv
$ sudo apt-get install python-dev python-pip python-virtualenv libyaml-dev
RHEL/Fedora/CentOS based:
.. code-block:: bash
$ sudo yum install gcc python-devel python-pip python-virtualenv
$ sudo yum install gcc python-devel python-pip python-virtualenv libyaml-devel
MacOSX:

View File

@ -3,6 +3,7 @@ cmake:
git:
iperf:
libssl-dev:
libyaml-dev:
nginx:
nodejs:
nodejs-legacy:

View File

@ -91,13 +91,13 @@ npm install
bower install --allow-root --config.interactive=false --force
grunt build
rm -rf ../kb_server/public/ui/*
mkdir -p ../kb_server/public/ui
mv dist/* ../kb_server/public/ui
# =======
# Cleanup
# =======
# Remove HdrHistogram_c and wrk2 builds
rm -rf /tmp/HdrHistogram_c
rm -rf /tmp/wrk2
@ -108,7 +108,7 @@ rm -rf /kb_test/kloudbuster/kb_web/bower_components
rm -rf /kb_test/kloudbuster/kb_web/.tmp
# Uninstall unneeded packages
apt-get -y --purge remove git
apt-get -y --purge remove libyaml-dev
apt-get -y --purge remove python-pip
apt-get -y --purge remove python-dev
apt-get -y --purge remove build-essential

View File

@ -44,8 +44,8 @@ def get_image_name():
def get_image_version():
return __version__
def exec_command(cmd):
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
def exec_command(cmd, cwd=None):
p = subprocess.Popen(cmd, cwd=cwd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
(stdout, stderr) = p.communicate()
return p.returncode
@ -293,9 +293,12 @@ if __name__ == "__main__":
user_data = dict(eval(f.read()))
except Exception as e:
# KloudBuster starts without user-data
config_file = 'kloudbuster/kb_server/config.py'
cmd = ['pecan', 'serve', config_file]
sys.exit(exec_command(cmd))
cwd = 'kloudbuster/kb_server'
cmd = ['python', 'config.py', 'develop']
rc = exec_command(cmd, cwd=cwd)
if not rc:
cmd = ['pecan', 'serve', 'config.py']
sys.exit(exec_command(cmd, cwd=cwd))
if user_data.get('role') == 'KB-PROXY':
agent = KBA_Proxy()

View File

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
</head>
<body>
<p>Test</p>
</body>
</html>

BIN
kb_web/.idea/.DS_Store vendored

Binary file not shown.

Binary file not shown.

BIN
kb_web/test/.DS_Store vendored

Binary file not shown.

Binary file not shown.

View File

@ -5,11 +5,11 @@
pbr>=1.3
Babel>=1.3
python-openstackclient>=1.5.0
attrdict>=2.0.0
hdrhistogram>=0.3.1
oslo.log>=1.0.0
pecan>=0.9.0
python-openstackclient>=1.5.0
redis>=2.10.3
tabulate>=0.7.3