summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbaigk <baiguoku@huawei.com>2016-01-01 00:35:12 +0800
committerbaigk <baiguoku@huawei.com>2016-01-04 21:24:04 +0800
commitbef20d54c7a1c7068534c0dedf4ca8759a74745d (patch)
tree6c919385867cf56d6096a22618fa974e282ede30
parent617877977bb49b9a97f24b0fee583d104ef68891 (diff)
xintegrate special keepalived package
JITA: COMPASS-234 Change-Id: I830bed488d5fd6e44ddada63a77c591be9581e45 Signed-off-by: baigk <baiguoku@huawei.com>
-rw-r--r--build/build.conf3
-rw-r--r--build/gen_ins_pkg_script.py16
-rwxr-xr-xbuild/make_repo.sh18
-rw-r--r--build/os/centos/rhel7/juno/Dockerfile.tmpl2
-rw-r--r--build/os/centos/rhel7/kilo/Dockerfile.tmpl2
-rw-r--r--build/os/ubuntu/trusty/juno/Dockerfile.tmpl2
-rw-r--r--build/os/ubuntu/trusty/kilo/Dockerfile.tmpl2
-rw-r--r--build/os/ubuntu/trusty/liberty/Dockerfile.tmpl2
-rw-r--r--deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml4
9 files changed, 32 insertions, 19 deletions
diff --git a/build/build.conf b/build/build.conf
index 3fb6d02f..0406d9fa 100644
--- a/build/build.conf
+++ b/build/build.conf
@@ -1,5 +1,5 @@
TIMEOUT=10
-export PACKAGE_URL=${PACKAGE_URL:-http://205.177.226.235:9999}
+export PACKAGE_URL=${PACKAGE_URL:-http://205.177.226.237:9999}
#begin: package download
export CENTOS_BASE=${CENTOS_BASE:-$PACKAGE_URL/CentOS-7-x86_64-Minimal-1511.iso}
@@ -18,6 +18,7 @@ export CIRROS=${CIRROS:-$PACKAGE_URL/cirros-0.3.3-x86_64-disk.img}
export APP_PACKAGE=${APP_PACKAGE:-$PACKAGE_URL/packages.tar.gz}
export PIP_REPO=${PIP_REPO:-$PACKAGE_URL/pip.tar.gz}
export ANSIBLE_MODULE=${ANSIBLE_MODULE:-https://github.com/openstack-ansible/openstack-ansible-modules.git}
+export SPECIAL_DEBIAN_PACKAGE=${SPECIAL_DEBIAN_PACKAGE-$PACKAGE_URL/debian-packages.tar.gz}
#end
export PIP_CONF="https://bootstrap.pypa.io/ez_setup.py \
diff --git a/build/gen_ins_pkg_script.py b/build/gen_ins_pkg_script.py
index c3c55cfc..132df25f 100644
--- a/build/gen_ins_pkg_script.py
+++ b/build/gen_ins_pkg_script.py
@@ -20,19 +20,25 @@ def get_packages_name_list(file_list, special_packages):
for file in file_list:
datas = yaml.load(open(file))
for key, value in datas.items():
+ if key == "pip_packages":
+ continue
+
if not key.endswith("packages") and not key.endswith("packages_noarch"):
continue
if not value:
continue
- if value in special_packages:
- continue
+ if not isinstance(value, list):
+ value = [value]
+
+ for i in value:
+ if i in special_packages:
+ continue
- if value not in package_name_list:
- package_name_list += value
+ package_name_list.append(value)
- return package_name_list
+ return list(set(package_name_list)
def generate_download_script(root="", arch="", tmpl="", docker_tmpl="", default_packages="",
special_packages="", special_packages_script_dir="", special_packages_dir=""):
diff --git a/build/make_repo.sh b/build/make_repo.sh
index c165c99f..ad7ef228 100755
--- a/build/make_repo.sh
+++ b/build/make_repo.sh
@@ -4,6 +4,8 @@ set -ex
BUILD_PATH=$(cd "$(dirname "$0")"; pwd)
WORK_PATH=$(cd "$(dirname "$0")"/..; pwd)
+source $BUILD_PATH/build.conf
+
function process_env()
{
mkdir -p ${WORK_PATH}/work/repo/ ${WORK_PATH}/work/repo/pip
@@ -117,8 +119,9 @@ function make_repo()
fi
# copy special package to work dir
- if [[ -n $special_package_dir && -d $special_package_dir ]]; then
- cp -rf $special_package_dir/* ${WORK_PATH}/work/repo/$arch/packages/
+ if [[ -n $special_package_dir ]]; then
+ curl --connect-timeout 10 -o $WORK_PATH/work/repo/$arch/`basename $special_package_dir` $special_package_dir
+ tar -zxvf $WORK_PATH/work/repo/$arch/`basename $special_package_dir` -C ${WORK_PATH}/work/repo/$arch/packages
fi
# copy docker file to work dir
@@ -133,7 +136,7 @@ function make_repo()
cp -rf ${WORK_PATH}/build/os/$os_name/ceph_key_release.asc ${WORK_PATH}/work/repo
fi
- sudo docker build -t ${docker_tag} -f ${WORK_PATH}/work/repo/${dockerfile} ${WORK_PATH}/work/repo/
+ sudo docker build --no-cache=true -t ${docker_tag} -f ${WORK_PATH}/work/repo/${dockerfile} ${WORK_PATH}/work/repo/
sudo docker run -t -v ${WORK_PATH}/work/repo:/result ${docker_tag}
@@ -173,17 +176,20 @@ function make_all_repo()
make_repo --os-ver trusty --package-tag juno \
--ansible-dir $WORK_PATH/deploy/adapters/ansible \
--default-package "openssh-server" \
- --special-package "openvswitch-datapath-dkms openvswitch-switch"
+ --special-package "openvswitch-switch keepalived" \
+ --special-package-dir "$SPECIAL_DEBIAN_PACKAGE"
make_repo --os-ver trusty --package-tag kilo \
--ansible-dir $WORK_PATH/deploy/adapters/ansible \
--default-package "openssh-server" \
- --special-package "openvswitch-datapath-dkms openvswitch-switch"
+ --special-package "openvswitch-switch keepalived" \
+ --special-package-dir "$SPECIAL_DEBIAN_PACKAGE"
make_repo --os-ver trusty --package-tag liberty \
--ansible-dir $WORK_PATH/deploy/adapters/ansible \
--default-package "openssh-server" \
- --special-package "openvswitch-datapath-dkms openvswitch-switch"
+ --special-package "openvswitch-switch keepalived" \
+ --special-package-dir "$SPECIAL_DEBIAN_PACKAGE"
make_repo --os-ver rhel7 --package-tag juno \
--ansible-dir $WORK_PATH/deploy/adapters/ansible \
diff --git a/build/os/centos/rhel7/juno/Dockerfile.tmpl b/build/os/centos/rhel7/juno/Dockerfile.tmpl
index 34945d00..adb930ff 100644
--- a/build/os/centos/rhel7/juno/Dockerfile.tmpl
+++ b/build/os/centos/rhel7/juno/Dockerfile.tmpl
@@ -5,7 +5,7 @@ MAINTAINER Chigang(Justin) <chigang@huawei.com>
RUN sed -i 's/keepcache=0/keepcache=1/g' /etc/yum.conf
#set packages = $getVar('spcial_packages', [])
#for package in $packages
-ADD ./RedHat/packages/$package /var/cache/yum/x86_64/7/base/packages/
+ADD ./RedHat/packages/redhat_packages/$package /var/cache/yum/x86_64/7/base/packages/
#end for
#set scripts = $getVar('scripts', [])
#for script in $scripts
diff --git a/build/os/centos/rhel7/kilo/Dockerfile.tmpl b/build/os/centos/rhel7/kilo/Dockerfile.tmpl
index 34945d00..adb930ff 100644
--- a/build/os/centos/rhel7/kilo/Dockerfile.tmpl
+++ b/build/os/centos/rhel7/kilo/Dockerfile.tmpl
@@ -5,7 +5,7 @@ MAINTAINER Chigang(Justin) <chigang@huawei.com>
RUN sed -i 's/keepcache=0/keepcache=1/g' /etc/yum.conf
#set packages = $getVar('spcial_packages', [])
#for package in $packages
-ADD ./RedHat/packages/$package /var/cache/yum/x86_64/7/base/packages/
+ADD ./RedHat/packages/redhat_packages/$package /var/cache/yum/x86_64/7/base/packages/
#end for
#set scripts = $getVar('scripts', [])
#for script in $scripts
diff --git a/build/os/ubuntu/trusty/juno/Dockerfile.tmpl b/build/os/ubuntu/trusty/juno/Dockerfile.tmpl
index 2071cb41..5972f883 100644
--- a/build/os/ubuntu/trusty/juno/Dockerfile.tmpl
+++ b/build/os/ubuntu/trusty/juno/Dockerfile.tmpl
@@ -6,7 +6,7 @@ MAINTAINER Chigang(Justin) <chigang@huawei.com>
RUN rm -f /etc/apt/apt.conf.d/docker-clean
#set packages = $getVar('spcial_packages', [])
#for package in $packages
-ADD ./Debian/packages/$package /var/cache/apt/archives/
+ADD ./Debian/packages/debian_packages/$package /var/cache/apt/archives/
#end for
#set scripts = $getVar('scripts', [])
#for script in $scripts
diff --git a/build/os/ubuntu/trusty/kilo/Dockerfile.tmpl b/build/os/ubuntu/trusty/kilo/Dockerfile.tmpl
index 2071cb41..5972f883 100644
--- a/build/os/ubuntu/trusty/kilo/Dockerfile.tmpl
+++ b/build/os/ubuntu/trusty/kilo/Dockerfile.tmpl
@@ -6,7 +6,7 @@ MAINTAINER Chigang(Justin) <chigang@huawei.com>
RUN rm -f /etc/apt/apt.conf.d/docker-clean
#set packages = $getVar('spcial_packages', [])
#for package in $packages
-ADD ./Debian/packages/$package /var/cache/apt/archives/
+ADD ./Debian/packages/debian_packages/$package /var/cache/apt/archives/
#end for
#set scripts = $getVar('scripts', [])
#for script in $scripts
diff --git a/build/os/ubuntu/trusty/liberty/Dockerfile.tmpl b/build/os/ubuntu/trusty/liberty/Dockerfile.tmpl
index 2071cb41..5972f883 100644
--- a/build/os/ubuntu/trusty/liberty/Dockerfile.tmpl
+++ b/build/os/ubuntu/trusty/liberty/Dockerfile.tmpl
@@ -6,7 +6,7 @@ MAINTAINER Chigang(Justin) <chigang@huawei.com>
RUN rm -f /etc/apt/apt.conf.d/docker-clean
#set packages = $getVar('spcial_packages', [])
#for package in $packages
-ADD ./Debian/packages/$package /var/cache/apt/archives/
+ADD ./Debian/packages/debian_packages/$package /var/cache/apt/archives/
#end for
#set scripts = $getVar('scripts', [])
#for script in $scripts
diff --git a/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml b/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml
index 199c14ab..d0eb1fea 100644
--- a/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml
+++ b/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml
@@ -77,8 +77,8 @@
- hosts: ceph_adm
remote_user: root
accelerate: true
- roles:
- - ceph-deploy
+ roles: []
+ #- ceph-deploy
- hosts: all
remote_user: root