summaryrefslogtreecommitdiffstats
path: root/build/templates/RedHat_juno.tmpl
diff options
context:
space:
mode:
authorbaigk <baiguoku@huawei.com>2015-09-08 07:47:19 -0400
committerbaigk <baiguoku@huawei.com>2015-09-08 08:24:09 -0400
commitcf87d3067a63cb8be315a3addfd9c27d86be3b5a (patch)
tree861d46aebc75c73cc13a19fecfb5c48aa88a56a1 /build/templates/RedHat_juno.tmpl
parent633175ed2c5d0ab339027ba0a542bcdd4d3769c0 (diff)
Build improvement for speedup and using public repo
JIRA: COMPASS-19 Change-Id: Iba101807e1bd2f843f1253791b7e87e1acb7934b Signed-off-by: baigk <baiguoku@huawei.com>
Diffstat (limited to 'build/templates/RedHat_juno.tmpl')
-rw-r--r--build/templates/RedHat_juno.tmpl53
1 files changed, 53 insertions, 0 deletions
diff --git a/build/templates/RedHat_juno.tmpl b/build/templates/RedHat_juno.tmpl
new file mode 100644
index 00000000..8efd23b8
--- /dev/null
+++ b/build/templates/RedHat_juno.tmpl
@@ -0,0 +1,53 @@
+#!/bin/bash
+set -x
+
+# add 163 repo
+yum install wget -y
+wget -O /etc/yum.repos.d/CentOS7-Base-163.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo
+yum remove wget iptables-services -y
+rm -f /etc/yum.repos.d/CentOS-*.repo
+yum repolist
+yum cleanall
+# add openstack juno repo
+yum install yum-plugin-priorities -y
+yum install http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm -y
+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]
+name =MariaDB
+baseurl = http://yum.mariadb.org/5.5/centos7-amd64
+gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
+gpgcheck=1
+EOF
+
+yum update -y
+yum install createrepo -y
+yum install tar -y
+
+#download packages
+#set packages = $getVar('default_packages', [])
+#for pkg in $packages
+yum -y install $pkg --downloadonly
+#end for
+#set packages = $getVar('packages', [])
+#for pkg in $packages
+yum -y install $pkg --downloadonly
+#end for
+
+#make repo
+
+mkdir -p /centos7-juno-ppa/{Packages,repodata}
+
+find /var/cache/yum/ -name *.rpm | xargs -i cp {} /centos7-juno-ppa/Packages/
+
+rm /centos7-juno-ppa/Packages/selinux-policy* -f
+rm /centos7-juno-ppa/Packages/systemd* -f
+
+cp /centos7-comps.xml /centos7-juno-ppa/
+createrepo -g centos7-comps.xml /centos7-juno-ppa
+tar -zcvf /centos7-juno-ppa.tar.gz /centos7-juno-ppa