aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarry Huang <huangxiangyu5@huawei.com>2017-01-18 16:47:25 +0800
committerHarry Huang <huangxiangyu5@huawei.com>2017-01-23 15:02:30 +0800
commit6f279a7362504418cfcc453e11b3a9c2d458a2ea (patch)
tree4ab9f1edf274b289c006225059295ced06831cf5
parent66e8997c590523fdda22f6251a96bc08e001ae76 (diff)
Adjust make repo
Demand: 1.Compass4nfv master code only support one OPNFV version now, no need to keep previous version's repo scripts 2.Currently java packages are in /var/www/package/onos directory which is unreasonable 3.repo.conf has a lot of download URL which can turn into pip requirements Modification: 1.Remove previous version's directory in compass4nfv/repo 2.Only leave java and odl in compass4nfv/repo/features. Other features can be added when they are ready 3.Seperate URLs in repo.conf into compass-core and openstack pip requirements. Therefore pip.tar.gz only contains pip packages for compass-core and pip-openstack.tar.gz only contains pip packages for openstack 3.Move java packages into /var/www/package/java directory 4.Add make pip wheel package function to support congress 5.Use ODL package distribution-karaf-0.5.0-Boron.tar.gz 6.Use python package netwoking-odl-3.2.0 Change-Id: Ifa818e7630ac4435e3bdb7756b83f80f50c24a76 Signed-off-by: Harry Huang <huangxiangyu5@huawei.com>
-rwxr-xr-xbuild.sh2
-rw-r--r--deploy/adapters/ansible/roles/odl_cluster/tasks/01_00_download_packages.yml4
-rw-r--r--repo/features/brahmaputra/make_opencon-trail.sh20
-rw-r--r--repo/features/colorado/make_kvmfornfv.sh65
-rw-r--r--repo/features/colorado/make_moon.sh20
-rw-r--r--repo/features/colorado/make_odl.sh18
-rw-r--r--repo/features/colorado/make_opencon-trail.sh20
-rw-r--r--repo/features/danube/make_moon.sh20
-rw-r--r--repo/features/danube/make_odl.sh22
-rw-r--r--repo/features/danube/make_onos.sh18
-rw-r--r--repo/features/danube/make_opencon-trail.sh20
-rw-r--r--repo/features/scripts/download_java.sh (renamed from repo/features/colorado/make_onos.sh)11
-rw-r--r--repo/features/scripts/download_odl.sh (renamed from repo/features/brahmaputra/make_odl.sh)9
-rw-r--r--repo/pip/Dockerfile (renamed from repo/openstack/pip/Dockerfile)16
-rw-r--r--repo/pip/code_url.conf (renamed from repo/openstack/pip/code_url.conf)3
-rw-r--r--repo/pip/core-requirement.txt62
-rw-r--r--repo/pip/extra-requirement-tar.txt4
-rw-r--r--repo/pip/extra-requirement-wheel.txt11
-rw-r--r--repo/repo.conf81
-rwxr-xr-xrepo/repo_func.sh201
20 files changed, 174 insertions, 453 deletions
diff --git a/build.sh b/build.sh
index 5765aa11..249e6e53 100755
--- a/build.sh
+++ b/build.sh
@@ -64,7 +64,7 @@ function download_git()
function download_url()
{
rm -f $CACHE_DIR/$1.md5
- curl --connect-timeout 10 -o $CACHE_DIR/$1.md5 $2.md5 2>/dev/null
+ curl --connect-timeout 10 -o $CACHE_DIR/$1.md5 $2.md5 2>/dev/null || true
if [[ -f $CACHE_DIR/$1 ]]; then
local_md5=`md5sum $CACHE_DIR/$1 | cut -d ' ' -f 1`
repo_md5=`cat $CACHE_DIR/$1.md5 | cut -d ' ' -f 1`
diff --git a/deploy/adapters/ansible/roles/odl_cluster/tasks/01_00_download_packages.yml b/deploy/adapters/ansible/roles/odl_cluster/tasks/01_00_download_packages.yml
index 6c2063f9..565fc7ef 100644
--- a/deploy/adapters/ansible/roles/odl_cluster/tasks/01_00_download_packages.yml
+++ b/deploy/adapters/ansible/roles/odl_cluster/tasks/01_00_download_packages.yml
@@ -14,12 +14,12 @@
- name: download oracle-jdk8 package file
get_url:
- url: "http://{{ http_server.stdout_lines[0] }}/packages/onos/{{ jdk8_pkg_name }}"
+ url: "http://{{ http_server.stdout_lines[0] }}/packages/java/{{ jdk8_pkg_name }}"
dest: /opt/{{ jdk8_pkg_name }}
- name: download oracle-jdk8 script file
get_url:
- url: "http://{{ http_server.stdout_lines[0] }}/packages/onos/{{ jdk8_script_name }}"
+ url: "http://{{ http_server.stdout_lines[0] }}/packages/java/{{ jdk8_script_name }}"
dest: /opt/
- name: download odl package
diff --git a/repo/features/brahmaputra/make_opencon-trail.sh b/repo/features/brahmaputra/make_opencon-trail.sh
deleted file mode 100644
index b68fa3c8..00000000
--- a/repo/features/brahmaputra/make_opencon-trail.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-##############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-set -ex
-
-TIMEOUT=10
-
-PACKAGE_URL=http://205.177.226.237:9999
-
-for i in open-contrail.tar.gz; do
- curl --connect-timeout $TIMEOUT -o /$i $PACKAGE_URL/$i
-done
-
-
diff --git a/repo/features/colorado/make_kvmfornfv.sh b/repo/features/colorado/make_kvmfornfv.sh
deleted file mode 100644
index 734083a6..00000000
--- a/repo/features/colorado/make_kvmfornfv.sh
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/bin/bash
-##############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-set -ex
-
-TEMP_DIR=/work/repo/temp
-DST_DIR=/work/repo/packages/kvmfornfv/
-export KVMFORNFV=${kvmfornfv:-https://gerrit.opnfv.org/gerrit/p/kvmfornfv.git}
-
-
-function prepare()
-{
- sudo apt-get install -y bc libtool libglib2.0-dev autoconf automake make flex bison
- mkdir -p $TEMP_DIR
- mkdir -p $DST_DIR
-
- if [ "git ls-remote $KVMFORNFV" ];
- then
- git clone $KVMFORNFV $TEMP_DIR/kvmfornfv
- mkdir -p $TEMP_DIR/kvmfornfv/build/{boot,usr}
- fi
-}
-
-function make_kernel()
-{
- cd $TEMP_DIR/kvmfornfv/kernel
- cp arch/x86/configs/opnfv.config .config
- make -j8
- make -j8 modules
- make INSTALL_PATH=$TEMP_DIR/kvmfornfv/build/boot install
- make INSTALL_MOD_PATH=$TEMP_DIR/kvmfornfv/build modules_install
-}
-
-function make_qemu()
-{
- mkdir -p $TEMP_DIR/kvmfornfv/qemu/build
- cd $TEMP_DIR/kvmfornfv/qemu/build
- ../configure --prefix=$TEMP_DIR/kvmfornfv/build/usr --enable-system --enable-kvm
- make -j8
- make install
-}
-
-function make_kvmfornfv()
-{
- pushd .
-
- prepare
- make_kernel
- make_qemu
-
- tar -czf /kvmfornfv.tar.gz \
- -C $TEMP_DIR/kvmfornfv/build .
- cd -
-
- popd
-}
-
-make_kvmfornfv
-
diff --git a/repo/features/colorado/make_moon.sh b/repo/features/colorado/make_moon.sh
deleted file mode 100644
index f484d8ef..00000000
--- a/repo/features/colorado/make_moon.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-##############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-set -ex
-
-TIMEOUT=10
-
-PACKAGE_URL=http://205.177.226.237:9999
-
-for i in moon.tar.gz; do
- curl --connect-timeout $TIMEOUT -o /$i $PACKAGE_URL/$i
-done
-
-
diff --git a/repo/features/colorado/make_odl.sh b/repo/features/colorado/make_odl.sh
deleted file mode 100644
index 32d5f6e0..00000000
--- a/repo/features/colorado/make_odl.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/bash
-##############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-set -ex
-
-TIMEOUT=10
-
-PACKAGE_URL=http://205.177.226.237:9999
-
-curl --connect-timeout $TIMEOUT -o /odl.tar.gz $PACKAGE_URL/odl.tar.gz
-
-
diff --git a/repo/features/colorado/make_opencon-trail.sh b/repo/features/colorado/make_opencon-trail.sh
deleted file mode 100644
index b68fa3c8..00000000
--- a/repo/features/colorado/make_opencon-trail.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-##############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-set -ex
-
-TIMEOUT=10
-
-PACKAGE_URL=http://205.177.226.237:9999
-
-for i in open-contrail.tar.gz; do
- curl --connect-timeout $TIMEOUT -o /$i $PACKAGE_URL/$i
-done
-
-
diff --git a/repo/features/danube/make_moon.sh b/repo/features/danube/make_moon.sh
deleted file mode 100644
index f484d8ef..00000000
--- a/repo/features/danube/make_moon.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-##############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-set -ex
-
-TIMEOUT=10
-
-PACKAGE_URL=http://205.177.226.237:9999
-
-for i in moon.tar.gz; do
- curl --connect-timeout $TIMEOUT -o /$i $PACKAGE_URL/$i
-done
-
-
diff --git a/repo/features/danube/make_odl.sh b/repo/features/danube/make_odl.sh
deleted file mode 100644
index 6a9afb9e..00000000
--- a/repo/features/danube/make_odl.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash
-##############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-set -ex
-
-TIMEOUT=10
-
-PACKAGE_URL=http://205.177.226.237:9999
-
-mkdir -p odl
-
-curl --connect-timeout $TIMEOUT -o /odl/distribution-karaf-0.5.0-Boron.tar.gz $PACKAGE_URL/distribution-karaf-0.5.0-Boron.tar.gz
-
-tar -zcvf odl.tar.gz /odl
-
-
diff --git a/repo/features/danube/make_onos.sh b/repo/features/danube/make_onos.sh
deleted file mode 100644
index ede941e9..00000000
--- a/repo/features/danube/make_onos.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/bash
-##############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-set -ex
-
-TIMEOUT=10
-
-PACKAGE_URL=http://205.177.226.237:9999
-
-curl --connect-timeout $TIMEOUT -o /onos.tar.gz $PACKAGE_URL/onos.tar.gz
-
-
diff --git a/repo/features/danube/make_opencon-trail.sh b/repo/features/danube/make_opencon-trail.sh
deleted file mode 100644
index b68fa3c8..00000000
--- a/repo/features/danube/make_opencon-trail.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-##############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-set -ex
-
-TIMEOUT=10
-
-PACKAGE_URL=http://205.177.226.237:9999
-
-for i in open-contrail.tar.gz; do
- curl --connect-timeout $TIMEOUT -o /$i $PACKAGE_URL/$i
-done
-
-
diff --git a/repo/features/colorado/make_onos.sh b/repo/features/scripts/download_java.sh
index ede941e9..89cc55a3 100644
--- a/repo/features/colorado/make_onos.sh
+++ b/repo/features/scripts/download_java.sh
@@ -1,6 +1,6 @@
#!/bin/bash
##############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
+# Copyright (c) 2016-2017 HUAWEI TECHNOLOGIES CO.,LTD and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
@@ -11,8 +11,7 @@ set -ex
TIMEOUT=10
-PACKAGE_URL=http://205.177.226.237:9999
-
-curl --connect-timeout $TIMEOUT -o /onos.tar.gz $PACKAGE_URL/onos.tar.gz
-
-
+for i in REPLACE_JAVA_PKG; do
+ mkdir -p /pkg/java
+ curl --connect-timeout $TIMEOUT -o /pkg/java/${i##*/} $i
+done
diff --git a/repo/features/brahmaputra/make_odl.sh b/repo/features/scripts/download_odl.sh
index 32d5f6e0..57732c8b 100644
--- a/repo/features/brahmaputra/make_odl.sh
+++ b/repo/features/scripts/download_odl.sh
@@ -11,8 +11,7 @@ set -ex
TIMEOUT=10
-PACKAGE_URL=http://205.177.226.237:9999
-
-curl --connect-timeout $TIMEOUT -o /odl.tar.gz $PACKAGE_URL/odl.tar.gz
-
-
+for i in REPLACE_ODL_PKG; do
+ mkdir -p /pkg/odl
+ curl --connect-timeout $TIMEOUT -o /pkg/odl/${i##*/} $i
+done
diff --git a/repo/openstack/pip/Dockerfile b/repo/pip/Dockerfile
index 195b6a01..e8fed1ba 100644
--- a/repo/openstack/pip/Dockerfile
+++ b/repo/pip/Dockerfile
@@ -1,4 +1,4 @@
-FROM ubuntu:14.04.3
+FROM ubuntu:16.04
MAINTAINER Yifei Xue <xueyifei@huawei.com>
ADD ./code_url.conf /code_url.conf
@@ -9,22 +9,28 @@ ADD ./make_pip.sh /make_pip.sh
RUN chmod +x make_pip.sh
+ADD ./make_pip_wheel.sh /make_pip_wheel.sh
+
+RUN chmod +x make_pip_wheel.sh
+
ADD ./cp_pip.sh /cp_pip.sh
RUN chmod +x cp_pip.sh
RUN apt-get update
-RUN apt-get install -y git python-setuptools
+RUN apt-get install -y git python-pip
-RUN easy_install -U pip
+RUN apt-get install -y libssl-dev libffi-dev
RUN mkdir -p /home/tmp
-RUN mkdir -p openstack_pip
+RUN mkdir -p /pip-openstack
RUN /make_pip.sh
-RUN tar -zcvf openstack_pip.tar.gz openstack_pip/
+RUN /make_pip_wheel.sh
+
+RUN tar -zcvf pip-openstack.tar.gz /pip-openstack
CMD ["/cp_pip.sh"]
diff --git a/repo/openstack/pip/code_url.conf b/repo/pip/code_url.conf
index fa7b02e3..062e0bff 100644
--- a/repo/openstack/pip/code_url.conf
+++ b/repo/pip/code_url.conf
@@ -19,3 +19,6 @@ export GIT_URL="https://github.com/openstack/keystone.git \
https://github.com/openstack/python-aodhclient.git \
https://github.com/openstack/tacker.git \
https://github.com/openstack/python-tackerclient.git "
+
+export PIP_GIT_URL="https://github.com/openstack/congress.git \
+ https://github.com/openstack/python-congressclient.git"
diff --git a/repo/pip/core-requirement.txt b/repo/pip/core-requirement.txt
new file mode 100644
index 00000000..ce654d7c
--- /dev/null
+++ b/repo/pip/core-requirement.txt
@@ -0,0 +1,62 @@
+# python packages used to install compass-core
+
+ez_setup
+setuptools==18.2
+ansible==2.2.0.0
+virtualenv==13.1.2
+pexpect==3.3
+amqplib==1.0.2
+Cheetah==2.4.1
+daemon==1.1
+Flask==0.10.1
+Flask-Login==0.2.11
+Flask_RESTful==0.3.4
+Flask_WTF==0.12
+importlib==1.0.3
+lockfile==0.10.2
+MySQL-python==1.2.5
+netaddr==0.7.18
+PyChef==0.2.3
+SQLAlchemy==1.0.8
+simplejson==3.8.0
+requests==2.7.0
+celery==3.1.18
+Werkzeug==0.10.4
+ciso8601==1.0.1
+six==1.9.0
+WTForms==2.0.2
+docutils==0.12
+amqp==1.4.6
+Markdown<2.5
+argparse==1.3.0
+Flask-Script==2.0.5
+Flask-SQLAlchemy==0.10
+pytz==2014.3
+ecdsa==0.12
+itsdangerous==0.24
+paramiko==1.12.3
+python_daemon==2.0.4
+redis==2.7.1
+billiard==3.3.0.20
+kombu==3.0.26
+Jinja2==2.8
+aniso8601==0.85
+anyjson==0.3.3
+ordereddict==1.0
+lazypy==0.5
+pycrypto-on-pypi==2.3
+pymongo==3.0.3
+crudini==0.7
+python-keyczar==0.715
+pyasn1==0.1.9
+cliff==1.15.0
+Babel==2.3.4
+tosca-parser==0.5.0
+heat-translator==0.5.0
+yang2tosca==0.13
+oslo.concurrency==3.11.0
+oslo.service==1.12.0
+neutron-lib==0.2.0
+python-dateutil==2.4.2
+pycrypto>=2.6.1
+MarkupSafe>=0.23
diff --git a/repo/pip/extra-requirement-tar.txt b/repo/pip/extra-requirement-tar.txt
new file mode 100644
index 00000000..a13c1305
--- /dev/null
+++ b/repo/pip/extra-requirement-tar.txt
@@ -0,0 +1,4 @@
+# extra python packages used in deployment
+# download format tar.gz
+
+networking-odl==3.2.0
diff --git a/repo/pip/extra-requirement-wheel.txt b/repo/pip/extra-requirement-wheel.txt
new file mode 100644
index 00000000..5cdc6469
--- /dev/null
+++ b/repo/pip/extra-requirement-wheel.txt
@@ -0,0 +1,11 @@
+# extra python packages used in deployment
+# download format pip wheel
+
+python-cloudfoundryclient==1.0.2
+pip==9.0.1
+oslosphinx==4.5.0
+policy2tosca==1.0
+yang2tosca==0.13
+python-keyczar==0.715
+crudini==0.7
+pexpect==3.3
diff --git a/repo/repo.conf b/repo/repo.conf
index 6b3d82a8..21dee026 100644
--- a/repo/repo.conf
+++ b/repo/repo.conf
@@ -16,81 +16,6 @@ export PACKAGE_URL=${PACKAGE_URL:-http://205.177.226.237:9999}
# feature packages
export KVMFORNFV=${kvmfornfv:-https://gerrit.opnfv.org/gerrit/p/kvmfornfv.git}
-
-export OPNFV_VERSION="brahmaputra colorado danube"
-
-export SPECIAL_PIP_PACKAGE="https://bootstrap.pypa.io/ez_setup.py \
- https://pypi.python.org/packages/source/s/setuptools/setuptools-18.2.zip \
- https://pypi.python.org/packages/source/p/pip/pip-7.1.2.tar.gz \
- https://pypi.python.org/packages/source/a/ansible/ansible-1.9.2.tar.gz \
- https://pypi.python.org/packages/source/v/virtualenv/virtualenv-13.1.2.tar.gz \
- https://pypi.python.org/packages/source/p/pexpect/pexpect-3.3.tar.gz \
- https://pypi.python.org/packages/source/a/amqplib/amqplib-1.0.2.tgz \
- https://pypi.python.org/packages/source/M/Markdown/Markdown-2.4.tar.gz \
- https://pypi.python.org/packages/source/C/Cheetah/Cheetah-2.4.1.tar.gz \
- https://pypi.python.org/packages/source/d/daemon/daemon-1.1.tar.gz \
- https://pypi.python.org/packages/source/F/Flask/Flask-0.10.1.tar.gz \
- https://pypi.python.org/packages/source/F/Flask-Login/Flask-Login-0.2.11.tar.gz \
- https://pypi.python.org/packages/2.7/F/Flask-RESTful/Flask_RESTful-0.3.4-py2.py3-none-any.whl \
- https://pypi.python.org/packages/2.7/F/Flask-WTF/Flask_WTF-0.12-py2-none-any.whl \
- https://pypi.python.org/packages/source/i/importlib/importlib-1.0.3.tar.bz2 \
- https://pypi.python.org/packages/py2/l/lockfile/lockfile-0.10.2-py2-none-any.whl \
- https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.5.zip \
- https://pypi.python.org/packages/any/n/netaddr/netaddr-0.7.18-py2.py3-none-any.whl \
- https://pypi.python.org/packages/source/P/PyChef/PyChef-0.2.3.tar.gz \
- https://pypi.python.org/packages/source/S/SQLAlchemy/SQLAlchemy-1.0.8.tar.gz \
- https://pypi.python.org/packages/source/s/simplejson/simplejson-3.8.0.tar.gz \
- https://pypi.python.org/packages/2.7/r/requests/requests-2.7.0-py2.py3-none-any.whl \
- https://pypi.python.org/packages/2.7/c/celery/celery-3.1.18-py2.py3-none-any.whl \
- https://pypi.python.org/packages/2.7/W/Werkzeug/Werkzeug-0.10.4-py2.py3-none-any.whl \
- https://pypi.python.org/packages/source/c/ciso8601/ciso8601-1.0.1.tar.gz \
- https://pypi.python.org/packages/3.3/s/six/six-1.9.0-py2.py3-none-any.whl \
- https://pypi.python.org/packages/2.7/W/WTForms/WTForms-2.0.2-py2.py3-none-any.whl \
- https://pypi.python.org/packages/source/d/docutils/docutils-0.12.tar.gz \
- https://pypi.python.org/packages/2.7/a/amqp/amqp-1.4.6-py2-none-any.whl \
- https://pypi.python.org/packages/any/M/Markdown/Markdown-2.6.2-py2.py3-none-any.whl \
- https://pypi.python.org/packages/2.7/a/argparse/argparse-1.3.0-py2.py3-none-any.whl \
- https://pypi.python.org/packages/source/F/Flask-Script/Flask-Script-2.0.5.tar.gz \
- https://pypi.python.org/packages/source/F/Flask-SQLAlchemy/Flask-SQLAlchemy-0.10.tar.gz \
- https://pypi.python.org/packages/source/l/lazypy/lazypy-0.2.tar.gz \
- https://pypi.python.org/packages/source/p/pytz/pytz-2014.3.zip \
- https://pypi.python.org/packages/source/b/billiard/billiard-3.3.0.3.tar.gz \
- https://pypi.python.org/packages/source/a/anyjson/anyjson-0.1.tar.gz \
- https://pypi.python.org/packages/2.7/k/kombu/kombu-3.0.17-py2.py3-none-any.whl \
- https://pypi.python.org/packages/source/a/aniso8601/aniso8601-0.48.tar.gz \
- https://pypi.python.org/packages/2.7/e/ecdsa/ecdsa-0.12-py2.py3-none-any.whl \
- https://pypi.python.org/packages/source/p/pycrypto/pycrypto-2.6.1.tar.gz \
- https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-0.24.tar.gz \
- https://pypi.python.org/packages/source/p/paramiko/paramiko-1.12.3.tar.gz \
- https://pypi.python.org/packages/3.4/p/python-daemon/python_daemon-2.0.4-py2.py3-none-any.whl \
- https://pypi.python.org/packages/source/r/redis/redis-2.7.1.tar.gz \
- https://pypi.python.org/packages/source/b/billiard/billiard-3.3.0.20.tar.gz \
- https://pypi.python.org/packages/2.7/k/kombu/kombu-3.0.26-py2.py3-none-any.whl \
- https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.8.tar.gz \
- https://pypi.python.org/packages/source/a/aniso8601/aniso8601-0.85.tar.gz \
- https://pypi.python.org/packages/source/a/anyjson/anyjson-0.3.3.tar.gz \
- https://pypi.python.org/packages/source/o/ordereddict/ordereddict-1.0.tar.gz \
- https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.23.tar.gz \
- https://pypi.python.org/packages/source/l/lazypy/lazypy-0.5.tar.gz \
- https://pypi.python.org/packages/source/p/pycrypto-on-pypi/pycrypto-on-pypi-2.3.tar.gz \
- https://pypi.python.org/packages/source/p/pymongo/pymongo-3.0.3.tar.gz \
- https://pypi.python.org/packages/source/c/crudini/crudini-0.7.tar.gz \
- https://pypi.python.org/packages/source/n/networking-odl/networking-odl-1.0.1.tar.gz \
- https://pypi.python.org/packages/source/p/python-keyczar/python-keyczar-0.715.tar.gz \
- https://pypi.python.org/packages/source/p/pyasn1/pyasn1-0.1.9.tar.gz \
- https://pypi.python.org/packages/source/p/pycrypto/pycrypto-2.6.1.tar.gz \
- https://pypi.python.org/packages/source/c/cliff/cliff-1.15.0.tar.gz \
- https://pypi.python.org/packages/6e/96/ba2a2462ed25ca0e651fb7b66e7080f5315f91425a07ea5b34d7c870c114/Babel-2.3.4.tar.gz \
- https://pypi.python.org/packages/93/ba/7be92c44a984ff23bc13fa4dfffe01422cfd343b09ada7356bb16bae4ef7/tosca-parser-0.5.0.tar.gz \
- https://pypi.python.org/packages/c3/52/85a606f541d627164b8159fd68da9e945ecec375d185069c05b84d5e4aa1/heat-translator-0.5.0.tar.gz \
- https://pypi.python.org/packages/98/92/9c91d88316ecab35e0b1f23a2d757bd9a4ce73de6caba309ac29e66f2cfd/yang2tosca-0.13.tar.gz \
- https://pypi.python.org/packages/41/40/0c951f9c78a9be150b432ff50700c3b8d1cd3ef1ec53f00d08b2a7ecc64e/oslo.concurrency-3.11.0.tar.gz \
- https://pypi.python.org/packages/61/b9/74514d774df110799ff2b100979de6180ead1d5eec6fa15c52e6299361ea/oslo.service-1.12.0.tar.gz \
- https://pypi.python.org/packages/9f/ec/d8bf0623d7d940c09052368ee859f726410e54b16b13f477ac0e70416de6/neutron-lib-0.2.0.tar.gz \
- https://pypi.python.org/packages/source/p/python-dateutil/python-dateutil-2.4.2.tar.gz "
-
-export PIP_PACKAGE="https://pypi.python.org/packages/0d/af/8ccfb73834a6ddf9d57ecac61466557b7ca0722620bbb16d2d069ce312db/networking-odl-2.0.0.tar.gz \
- https://pypi.python.org/packages/90/4f/74b730294de1db393e3e82211b5d2115f9a763849abca7d014348a550d2a/oslosphinx-4.5.0.tar.gz \
- https://pypi.python.org/packages/48/da/5e51cf931e4c7849ba698654877e2951ade8f842f28f0c904453a1d317d7/ansible-2.2.0.0.tar.gz \
- https://pypi.python.org/packages/74/f0/386f7f73aa6628c1bef53874c5d453b556356d77732add69000aa53b353b/policy2tosca-1.0.tar.gz "
-
+export ODL_PKG="$PACKAGE_URL/distribution-karaf-0.5.0-Boron.tar.gz"
+export JAVA_PKG="$PACKAGE_URL/jdk-8u51-linux-x64.tar.gz \
+ $PACKAGE_URL/install_jdk8.tar"
diff --git a/repo/repo_func.sh b/repo/repo_func.sh
index 72c653e3..4a9e469e 100755
--- a/repo/repo_func.sh
+++ b/repo/repo_func.sh
@@ -183,106 +183,43 @@ function make_repo()
sudo docker rmi -f ${image_id}
}
-function _try_fetch_dependency()
+function make_pip_repo()
{
- local dir_name=''
- if [ -f $1 ];then
- case $1 in
- *.tar.bz2)
- tar xjf $1
- dir_name="$(basename $1 .tar.bz2)"
- ;;
- *.tar.gz)
- tar xzf $1
- dir_name="$(basename $1 .tar.gz)"
- ;;
- *.bz2)
- bunzip2 $1
- dir_name="$(basename $1 .bz2)"
- ;;
- *.rar)
- unrar e $1
- dir_name="$(basename $1 .rar)"
- ;;
- *.gz)
- gunzip $1
- dir_name="$(basename $1 .gz)"
- ;;
- *.tar)
- tar xf $1
- dir_name="$(basename $1 .tar)"
- ;;
- *.tbz2)
- tar xjf $1
- dir_name="$(basename $1 .tbz2)"
- ;;
- *.tgz)
- tar xzf $1
- dir_name="$(basename $1 .tgz)"
- ;;
- *.zip)
- gunzip $1
- dir_name="$(basename $1 .zip)"
- ;;
- *)
- echo "'$1' cannot be extract()"
- return
- ;;
- esac
- else
- echo "'$1' is not a valid file"
- return
- fi
+ local work_repo=$COMPASS_PATH/work/repo
+ local pip_path=$work_repo/pip
+ local pip_tmp=$work_repo/pip_tmp
+ local pip_openstack=$work_repo/pip-openstack
- if [ ! -f ${dir_name}/requirements.txt ]; then
- echo "${dir_name}/requirements.txt does not exist"
- return
+ if [[ -d $pip_tmp ]]; then
+ rm -rf $pip_tmp
fi
- pip install --download=$2 -r ${dir_name}/requirements.txt
-
- rm -rf $dir_name
-}
-
-function try_fetch_dependency()
-{
- cd $3
- _try_fetch_dependency $1/$2 $1
- cd -
-}
-
-function make_pip_repo()
-{
- source $COMPASS_PATH/repo/repo.conf
- local pip_path=$COMPASS_PATH/work/repo/pip
- local pip_tmp_path=$COMPASS_PATH/work/repo/pip_tmp
-
- for i in $SPECIAL_PIP_PACKAGE; do
- curl --connect-timeout 10 -o $pip_path/`basename $i` $i
- done
+ if [[ -d $pip_path ]]; then
+ rm -rf $pip_path
+ fi
- mkdir -p $pip_tmp_path
+ if [[ -d $pip_openstack ]]; then
+ rm -rf $pip_openstack
+ fi
- for i in $PIP_PACKAGE; do
- curl --connect-timeout 10 -o $pip_path/$(basename $i) $i
- try_fetch_dependency $pip_path $(basename $i) $pip_tmp_path
- done
+ mkdir -p $pip_path $pip_tmp $pip_openstack
- rm -rf $pip_tmp_path
+ # download python packages for compass-core
+ pip install --no-cache-dir -d $pip_path -r $REPO_PATH/pip/core-requirement.txt
+ pip install --no-cache-dir -d $pip_path pip --no-use-wheel
_make_pip
- cd $COMPASS_PATH/work/repo
-
- rm -rf openstack_pip
-
- rm -rf pip-openstack; mkdir -p pip-openstack
+ tar -zxvf $pip_tmp/pip-openstack.tar.gz -C $work_repo
- tar -zxvf openstack_pip.tar.gz; cp -f openstack_pip/* pip-openstack/
+ # download extra python packages for deployment
+ pip install --no-cache-dir -d $pip_openstack -r $REPO_PATH/pip/extra-requirement-wheel.txt
+ pip install --no-cache-dir -d $pip_openstack -r $REPO_PATH/pip/extra-requirement-tar.txt --no-use-wheel
- cp -f pip/* pip-openstack/
-
- tar -zcvf pip-openstack.tar.gz ./pip-openstack; cd -
+ cd $work_repo
+ tar -zcvf pip.tar.gz pip/
+ tar -zcvf pip-openstack.tar.gz pip-openstack/
+ cd -
}
@@ -336,42 +273,52 @@ EOF
function _make_pip()
{
- if [[ ! -f ${COMPASS_PATH}/repo/openstack/pip/Dockerfile ]]; then
+ local pip_tmp=${COMPASS_PATH}/work/repo/pip_tmp
+
+ if [[ ! -f ${COMPASS_PATH}/repo/pip/Dockerfile ]]; then
echo "No Dockerfile for making pip repo!"
return
fi
- if [[ -d ${COMPASS_PATH}/repo/openstack_pip ]]; then
- rm -rf ${COMPASS_PATH}/work/repo/openstack_pip
- fi
-
- mkdir -p ${COMPASS_PATH}/work/repo/openstack_pip
-
- cp -f ${COMPASS_PATH}/repo/openstack/pip/Dockerfile ${COMPASS_PATH}/work/repo/openstack_pip/
- cp -f ${COMPASS_PATH}/repo/openstack/pip/code_url.conf ${COMPASS_PATH}/work/repo/openstack_pip/
+ cp -f ${COMPASS_PATH}/repo/pip/Dockerfile $pip_tmp
+ cp -f ${COMPASS_PATH}/repo/pip/code_url.conf $pip_tmp
-cat <<EOF >${COMPASS_PATH}/work/repo/openstack_pip/cp_pip.sh
+cat <<EOF >$pip_tmp/cp_pip.sh
#!/bin/bash
set -ex
cp /*.tar.gz /env -f
EOF
-cat <<EOF >${COMPASS_PATH}/work/repo/openstack_pip/make_pip.sh
+cat <<EOF >$pip_tmp/make_pip.sh
#!/bin/bash
set -ex
source code_url.conf
for i in \$GIT_URL; do
mkdir -p /home/tmp
git clone \$i -b \$BRANCH /home/tmp
- pip install -r /home/tmp/requirements.txt -d openstack_pip/
+ pip install -r /home/tmp/requirements.txt -d pip-openstack/
+ rm -rf /home/tmp
+done
+EOF
+
+cat <<EOF >$pip_tmp/make_pip_wheel.sh
+#!/bin/bash
+set -ex
+pip install pip --upgrade
+source code_url.conf
+for i in \$PIP_GIT_URL; do
+ mkdir -p /home/tmp
+ repo=\${i##*/}
+ git clone \$i -b \$BRANCH /home/tmp/\${repo%.*}
+ pip wheel --wheel-dir /pip-openstack/ /home/tmp/\${repo%.*}
rm -rf /home/tmp
done
EOF
pip_docker_tag="pip/env"
- sudo docker build --no-cache=true -t ${pip_docker_tag} -f ${COMPASS_PATH}/work/repo/openstack_pip/Dockerfile ${COMPASS_PATH}/work/repo/openstack_pip
- sudo docker run -t -v ${COMPASS_PATH}/work/repo:/env ${pip_docker_tag}
+ sudo docker build --no-cache=true -t ${pip_docker_tag} -f $pip_tmp/Dockerfile $pip_tmp
+ sudo docker run -t -v $pip_tmp:/env ${pip_docker_tag}
image_id=$(sudo docker images|grep ${pip_docker_tag}|awk '{print $3}')
@@ -417,37 +364,31 @@ function make_feature_repo()
mkdir -p $COMPASS_PATH/work/repo/packages
mkdir -p $COMPASS_PATH/work/repo/temp
- echo "$OPNFV_VERSION"
+ if [[ -d $COMPASS_PATH/work/repo/temp/make_pkg ]]; then
+ rm -rf $COMPASS_PATH/work/repo/temp/make_pkg
+ fi
- for i in $OPNFV_VERSION; do
- mkdir -p $COMPASS_PATH/work/repo/packages/$i
- mkdir -p $COMPASS_PATH/work/repo/temp/$i
- if [[ -d $COMPASS_PATH/work/repo/temp/make_pkg ]]; then
- rm -rf $COMPASS_PATH/work/repo/temp/make_pkg
- fi
- mkdir -p $COMPASS_PATH/work/repo/temp/make_pkg
+ mkdir -p $COMPASS_PATH/work/repo/temp/make_pkg
- if [[ ! -d $COMPASS_PATH/repo/features/$i ]]; then
- echo "No $i in compass feature directory."
- return
- fi
+ cp -rf $COMPASS_PATH/repo/features/scripts/* $COMPASS_PATH/work/repo/temp/make_pkg
- cp -rf $COMPASS_PATH/repo/features/$i/* $COMPASS_PATH/work/repo/temp/make_pkg
+ sed -i "s#REPLACE_ODL_PKG#$ODL_PKG#g" $COMPASS_PATH/work/repo/temp/make_pkg/download_odl.sh
+ sed -i "s#REPLACE_JAVA_PKG#$JAVA_PKG#g" $COMPASS_PATH/work/repo/temp/make_pkg/download_java.sh
- feature_dockerfile=Dockerfile
- feature_docker_tag=trusty/feature
+ feature_dockerfile=Dockerfile
+ feature_docker_tag=trusty/feature
- if [[ ! -f $COMPASS_PATH/repo/features/$feature_dockerfile ]]; then
- echo "No Dockerfile in compass feature directory."
- return
- fi
+ if [[ ! -f $COMPASS_PATH/repo/features/$feature_dockerfile ]]; then
+ echo "No Dockerfile in compass feature directory."
+ return
+ fi
- cp -f $COMPASS_PATH/repo/features/$feature_dockerfile $COMPASS_PATH/work/repo/temp/
+ cp -f $COMPASS_PATH/repo/features/$feature_dockerfile $COMPASS_PATH/work/repo/temp/
cat <<EOF >${COMPASS_PATH}/work/repo/temp/cp_pkg.sh
#!/bin/bash
set -ex
-cp /*.tar.gz /feature -f
+cp /pkg/* /feature -rf
EOF
cat <<EOF >${COMPASS_PATH}/work/repo/temp/feature_run.sh
@@ -458,20 +399,14 @@ for z in \$_script; do
. /run_script/\$z
done
EOF
- sudo docker build --no-cache=true -t ${feature_docker_tag} -f ${COMPASS_PATH}/work/repo/temp/${feature_dockerfile} ${COMPASS_PATH}/work/repo/temp
- sudo docker run -t -v ${COMPASS_PATH}/work/repo/packages:/feature ${feature_docker_tag}
-
- image_id=$(sudo docker images|grep ${feature_docker_tag}|awk '{print $3}')
+ sudo docker build --no-cache=true -t ${feature_docker_tag} -f ${COMPASS_PATH}/work/repo/temp/${feature_dockerfile} ${COMPASS_PATH}/work/repo/temp
+ sudo docker run -t -v ${COMPASS_PATH}/work/repo/packages:/feature ${feature_docker_tag}
- sudo docker rmi -f ${image_id}
-
- mv ${COMPASS_PATH}/work/repo/packages/*.tar.gz $COMPASS_PATH/work/repo/packages/$i
+ image_id=$(sudo docker images|grep ${feature_docker_tag}|awk '{print $3}')
- done
+ sudo docker rmi -f ${image_id}
cd ${COMPASS_PATH}/work/repo/
tar -zcvf ${COMPASS_PATH}/work/repo/packages.tar.gz packages/
cd -
}
-
-