aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/arch/RedHat/make_kibana.sh1
-rw-r--r--build/build.conf16
-rwxr-xr-xbuild/make_repo.sh42
-rw-r--r--build/os/centos/rhel7/compass/Dockerfile.tmpl25
-rw-r--r--build/templates/RedHat_juno.tmpl18
-rw-r--r--build/templates/RedHat_kilo.tmpl17
-rw-r--r--build/templates/RedHat_liberty.tmpl8
-rw-r--r--build/templates/compass_core.tmpl47
8 files changed, 103 insertions, 71 deletions
diff --git a/build/arch/RedHat/make_kibana.sh b/build/arch/RedHat/make_kibana.sh
index 51af5209..95047022 100644
--- a/build/arch/RedHat/make_kibana.sh
+++ b/build/arch/RedHat/make_kibana.sh
@@ -48,5 +48,4 @@ rpmbuild -bb rpmbuild/SPECS/kibana.spec
cp -rf rpmbuild/RPMS/* /var/cache/yum/
-find /var/cache/yum -name "perl*" | xargs rm -rf
popd
diff --git a/build/build.conf b/build/build.conf
index c72451ee..3fb6d02f 100644
--- a/build/build.conf
+++ b/build/build.conf
@@ -2,17 +2,17 @@ TIMEOUT=10
export PACKAGE_URL=${PACKAGE_URL:-http://205.177.226.235:9999}
#begin: package download
-export CENTOS_BASE=${CENTOS_BASE:-$PACKAGE_URL/centos_base.iso}
-export COMPASS_CORE=${COMPASS_CORE:-http://github.com/baigk/compass-core.git}
+export CENTOS_BASE=${CENTOS_BASE:-$PACKAGE_URL/CentOS-7-x86_64-Minimal-1511.iso}
+export COMPASS_CORE=${COMPASS_CORE:-https://github.com/openstack/compass-core.git}
export COMPASS_WEB=${COMPASS_WEB:-http://github.com/baigk/compass-web.git}
export COMPASS_INSTALL=${COMPASS_INSTALL:-http://github.com/baigk/compass-install.git}
export UBUNTU_ISO=${UBUNTU_ISO:-$PACKAGE_URL/ubuntu-14.04.3-server-amd64.iso}
export TRUSTY_JUNO_PPA=${TRUSTY_JUNO_PPA:-$PACKAGE_URL/trusty-juno-ppa.tar.gz}
export TRUSTY_LIBERTY_PPA=${TRUSTY_LIBERTY_PPA:-$PACKAGE_URL/trusty-liberty-ppa.tar.gz}
-export CENTOS_ISO=${CENTOS_ISO:-$PACKAGE_URL/CentOS-7-x86_64-Minimal-1503-01.iso}
+export CENTOS_ISO=${CENTOS_ISO:-$PACKAGE_URL/CentOS-7-x86_64-Minimal-1511.iso}
export CENTOS7_JUNO_PPA=${CENTOS7_JUNO_PPA:-$PACKAGE_URL/centos7-juno-ppa.tar.gz}
#export CENTOS7_KILO_PPA=${CENTOS7_KILO_PPA:-$PACKAGE_URL/centos7-kilo-ppa.tar.gz}
-export COMPASS_PKG=${COMPASS_PKG:-$PACKAGE_URL/centos6-package.tar.gz}
+export COMPASS_PKG=${COMPASS_PKG:-$PACKAGE_URL/centos7-compass-core.tar.gz}
export LOADERS=${LOADERS:-$PACKAGE_URL/loaders.tar.gz}
export CIRROS=${CIRROS:-$PACKAGE_URL/cirros-0.3.3-x86_64-disk.img}
export APP_PACKAGE=${APP_PACKAGE:-$PACKAGE_URL/packages.tar.gz}
@@ -74,5 +74,9 @@ export PIP_CONF="https://bootstrap.pypa.io/ez_setup.py \
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/2.6/p/pymongo/pymongo-3.0.3-cp26-none-macosx_10_10_intel.whl \
- https://pypi.python.org/packages/source/c/crudini/crudini-0.7.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 "
diff --git a/build/make_repo.sh b/build/make_repo.sh
index c4afd4fa..c165c99f 100755
--- a/build/make_repo.sh
+++ b/build/make_repo.sh
@@ -23,24 +23,6 @@ set -ex
cp /*.tar.gz /result -f
EOF
-cat << EOF >${WORK_PATH}/work/repo/elasticsearch.repo
-[elasticsearch-2.x]
-name=Elasticsearch repository for 2.x packages
-baseurl=http://packages.elastic.co/elasticsearch/2.x/centos
-gpgcheck=1
-gpgkey=http://packages.elastic.co/GPG-KEY-elasticsearch
-enabled=1
-EOF
-
-cat << EOF > ${WORK_PATH}/work/repo/logstash.repo
-[logstash-2.0]
-name=Logstash repository for 2.0.x packages
-baseurl=http://packages.elastic.co/logstash/2.0/centos
-gpgcheck=1
-gpgkey=http://packages.elastic.co/GPG-KEY-elasticsearch
-enabled=1
-EOF
-
sudo apt-get install python-yaml -y
sudo apt-get install python-cheetah -y
}
@@ -179,9 +161,13 @@ function make_all_repo()
{
make_repo --package-tag pip
- make_repo --os-ver rhel6 --package-tag compass \
+ make_repo --os-ver rhel7 --package-tag compass \
--tmpl "${WORK_PATH}/build/templates/compass_core.tmpl" \
- --default-package "epel-release python-yaml python-jinja2 python-paramiko elasticsearch logstash" \
+ --default-package "kernel-devel epel-release wget libxml2 glibc gcc perl openssl-libs mkisofs createrepo lsof \
+ python-yaml python-jinja2 python-paramiko elasticsearch logstash bind-license vim nmap-ncat \
+ yum cobbler cobbler-web createrepo mkisofs syslinux pykickstart bind rsync fence-agents \
+ dhcp xinetd tftp-server httpd libselinux-python python-setuptools python-devel mysql-devel \
+ mysql-server mysql MySQL-python redis mod_wsgi net-tools rabbitmq-server nfs-utils" \
--special-package "kibana jdk"
make_repo --os-ver trusty --package-tag juno \
@@ -201,11 +187,13 @@ function make_all_repo()
make_repo --os-ver rhel7 --package-tag juno \
--ansible-dir $WORK_PATH/deploy/adapters/ansible \
- --default-package "rsyslog-7.6.7-1.el7 strace net-tools wget vim openssh-server dracut-config-rescue-033-241.el7_1.3 dracut-network-033-241.el7_1.3"
+ --default-package "rsyslog-7.6.7-1.el7 strace net-tools wget vim openssh-server \
+ dracut-config-rescue-033-241.el7_1.3 dracut-network-033-241.el7_1.3"
make_repo --os-ver rhel7 --package-tag kilo \
--ansible-dir $WORK_PATH/deploy/adapters/ansible \
- --default-package "rsyslog-7.6.7-1.el7 strace net-tools wget vim openssh-server dracut-config-rescue-033-241.el7_1.5 dracut-network-033-241.el7_1.5"
+ --default-package "rsyslog-7.6.7-1.el7 strace net-tools wget vim openssh-server \
+ dracut-config-rescue-033-241.el7_1.5 dracut-network-033-241.el7_1.5"
}
function main()
@@ -214,16 +202,6 @@ function main()
if [[ $# -eq 0 ]]; then
make_all_repo
- elif [ "$1" = "rhel7" ]; then
- echo "make rhel7"
- make_repo --os-ver rhel7 --package-tag juno \
- --ansible-dir $WORK_PATH/deploy/adapters/ansible \
- --default-package "rsyslog-7.6.7-1.el7 strace net-tools wget vim openssh-server dracut-config-rescue-033-241.el7_1.3 dracut-network-033-241.el7_1.3"
- elif [ "$1" = "rhel6" ]; then
- make_repo --os-ver rhel6 --package-tag compass \
- --tmpl "${WORK_PATH}/build/templates/compass_core.tmpl" \
- --default-package "epel-release python-yaml python-jinja2 python-paramiko elasticsearch logstash" \
- --special-package "kibana jdk"
else
make_repo $*
fi
diff --git a/build/os/centos/rhel7/compass/Dockerfile.tmpl b/build/os/centos/rhel7/compass/Dockerfile.tmpl
new file mode 100644
index 00000000..0d0fbe10
--- /dev/null
+++ b/build/os/centos/rhel7/compass/Dockerfile.tmpl
@@ -0,0 +1,25 @@
+FROM centos:7.2.1511
+MAINTAINER Chigang(Justin) <chigang@huawei.com>
+
+# set cache enable
+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/
+#end for
+#set scripts = $getVar('scripts', [])
+#for script in $scripts
+ADD ./RedHat/script/$script /tmp/chigang/$script
+RUN chmod +x /tmp/chigang/$script
+RUN /tmp/chigang/$script
+#end for
+ADD ./install_packages.sh /tmp/chigang/install_packages.sh
+RUN chmod +x /tmp/chigang/install_packages.sh
+RUN /tmp/chigang/install_packages.sh
+
+ADD ./cp_repo.sh /tmp/chigang/cp_repo.sh
+RUN chmod +x /tmp/chigang/cp_repo.sh
+RUN mkdir /result
+
+CMD ["/tmp/chigang/cp_repo.sh"]
+#VOLUME /tmp/chigang
diff --git a/build/templates/RedHat_juno.tmpl b/build/templates/RedHat_juno.tmpl
index e8a54ac8..60a03b9f 100644
--- a/build/templates/RedHat_juno.tmpl
+++ b/build/templates/RedHat_juno.tmpl
@@ -18,6 +18,7 @@ yum install http://rdo.fedorapeople.org/openstack-juno/rdo-release-juno.rpm -y
# modify centos7 repo for workaround
sed -i 's/epel-Derived from Red Hat Enterprise Linux 7.1 (Source)/epel-7/g' /etc/yum.repos.d/rdo-release.repo
+
# add galeracluster repo
cat <<EOF >/etc/yum.repos.d/MariaDB.repo
[mariadb]
@@ -57,19 +58,20 @@ type=rpm-md
gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc
EOF
+cat <<EOF >>/etc/yum.conf
+exclude=mongodb-org,mongodb-org-server
+EOF
+
yum update -y
-yum install createrepo -y
-yum install tar -y
+yum install createrepo tar -y
+yum -y install --downloadonly MariaDB-Galera-server
#download packages
#set packages = $getVar('default_packages', [])
-#for pkg in $packages
-yum -y install $pkg --downloadonly
-#end for
+yum -y install --skip-broken --downloadonly #echo ' '.join(packages)
#set packages = $getVar('packages', [])
-#for pkg in $packages
-yum -y install $pkg --downloadonly
-#end for
+#silent packages.pop(packages.index('MariaDB-Galera-server'))
+yum -y install --skip-broken --downloadonly #echo ' '.join(packages)
#make repo
diff --git a/build/templates/RedHat_kilo.tmpl b/build/templates/RedHat_kilo.tmpl
index 3d587250..826acb8d 100644
--- a/build/templates/RedHat_kilo.tmpl
+++ b/build/templates/RedHat_kilo.tmpl
@@ -64,19 +64,20 @@ baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
gpgcheck=0
EOF
+cat <<EOF >>/etc/yum.conf
+exclude=mongodb-org,mongodb-org-server
+EOF
+
yum update -y
-yum install createrepo -y
-yum install tar -y
+yum install createrepo tar -y
+yum -y install --downloadonly MariaDB-Galera-server
#download packages
#set packages = $getVar('default_packages', [])
-#for pkg in $packages
-yum -y install $pkg --downloadonly
-#end for
+yum -y install --skip-broken --downloadonly #echo ' '.join(packages)
#set packages = $getVar('packages', [])
-#for pkg in $packages
-yum -y install $pkg --downloadonly
-#end for
+#silent packages.pop(packages.index('MariaDB-Galera-server'))
+yum -y install --skip-broken --downloadonly #echo ' '.join(packages)
#make repo
diff --git a/build/templates/RedHat_liberty.tmpl b/build/templates/RedHat_liberty.tmpl
index 8473f070..29469437 100644
--- a/build/templates/RedHat_liberty.tmpl
+++ b/build/templates/RedHat_liberty.tmpl
@@ -53,16 +53,20 @@ type=rpm-md
gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc
EOF
+cat <<EOF >>/etc/yum.conf
+exclude=mongodb-org,mongodb-org-server
+EOF
+
yum update -y
yum install createrepo tar -y
yum -y install --downloadonly MariaDB-Galera-server
#download packages
#set packages = $getVar('default_packages', [])
-yum -y install --downloadonly #echo ' '.join(packages)
+yum -y install --skip-broken --downloadonly #echo ' '.join(packages)
#set packages = $getVar('packages', [])
#silent packages.pop(packages.index('MariaDB-Galera-server'))
-yum -y install --downloadonly #echo ' '.join(packages)
+yum -y install --skip-broken --downloadonly #echo ' '.join(packages)
#make repo
mkdir -p /centos7-liberty-ppa/{Packages,repodata}
diff --git a/build/templates/compass_core.tmpl b/build/templates/compass_core.tmpl
index afecba58..1cb34b49 100644
--- a/build/templates/compass_core.tmpl
+++ b/build/templates/compass_core.tmpl
@@ -1,23 +1,42 @@
#!/bin/bash
set -x
-yum install tar -y
+
+# add openstack kilo repo
+yum install http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm -y
+yum install http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm -y
+
+cat << EOF >/etc/yum.repos.d/elasticsearch.repo
+[elasticsearch-2.x]
+name=Elasticsearch repository for 2.x packages
+baseurl=http://packages.elastic.co/elasticsearch/2.x/centos
+gpgcheck=1
+gpgkey=http://packages.elastic.co/GPG-KEY-elasticsearch
+enabled=1
+EOF
+
+cat << EOF >/etc/yum.repos.d/logstash.repo
+[logstash-2.0]
+name=Logstash repository for 2.0.x packages
+baseurl=http://packages.elastic.co/logstash/2.0/centos
+gpgcheck=1
+gpgkey=http://packages.elastic.co/GPG-KEY-elasticsearch
+enabled=1
+EOF
+
+yum update -y
+
+mkdir -p /centos7-compass-core
+yum -y reinstall bind-license --downloadonly --downloaddir=/centos7-compass-core
+yum -y reinstall openssl-libs --downloadonly --downloaddir=/centos7-compass-core
#download packages
#set packages = $getVar('default_packages', [])
-#for pkg in $packages
-yum -y install $pkg
-#end for
+yum -y install --skip-broken --downloadonly --downloaddir=/centos7-compass-core #echo ' '.join(packages)
#set packages = $getVar('packages', [])
-#for pkg in $packages
-yum -y install $pkg
-#end for
-
+yum -y install --skip-broken --downloadonly --downloaddir=/centos7-compass-core #echo ' '.join(packages)
#make repo
-mkdir -p /centos6-package
-
-find /var/cache/yum/ -name "*.rpm" | xargs -i cp {} /centos6-package
+find /var/cache/yum/ -name "*.rpm" | xargs -i cp {} /centos7-compass-core
-find /centos6-package -size 0 -name "*.rpm" | xargs rm -f
-
-tar -zcvf /centos6-package.tar.gz /centos6-package
+yum install tar -y
+tar -zcvf /centos7-compass-core.tar.gz /centos7-compass-core