aboutsummaryrefslogtreecommitdiffstats
path: root/build/templates
diff options
context:
space:
mode:
authorgrakiss <grakiss.wanglei@huawei.com>2015-09-21 09:48:33 +0800
committergrakiss <grakiss.wanglei@huawei.com>2015-09-24 15:43:56 +0800
commit47cfbaa9070f5a12272627ff3648e28388f279f5 (patch)
tree407b03c64a1255f57f1c3eb18043ce3d63201236 /build/templates
parentd16d74fbbe738f0d15366dedf9f5e042505ee1e8 (diff)
support ceph deploy for centos
JIRA: COMPASS-60 Change-Id: I9bcc5009b7d9b2f3cc48f1f1a448a1f07af65494 Signed-off-by: grakiss <grakiss.wanglei@huawei.com>
Diffstat (limited to 'build/templates')
-rw-r--r--build/templates/RedHat_juno.tmpl29
1 files changed, 29 insertions, 0 deletions
diff --git a/build/templates/RedHat_juno.tmpl b/build/templates/RedHat_juno.tmpl
index 9741b860..91be6151 100644
--- a/build/templates/RedHat_juno.tmpl
+++ b/build/templates/RedHat_juno.tmpl
@@ -1,10 +1,13 @@
#!/bin/bash
set -x
+yum remove systemd -y
# 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
+wget -O /epel-release-7-5.noarch.rpm http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
yum remove wget iptables-services -y
+yum update -y
rm -f /etc/yum.repos.d/CentOS-*.repo
yum repolist
yum clean all
@@ -35,6 +38,26 @@ gpgkey=http://rpms.adiscon.com/RPM-GPG-KEY-Adiscon
protect=1
EOF
+cat <<EOF >/etc/yum.repos.d/ceph.repo
+[ceph]
+name=Ceph packages for x86_64
+baseurl=http://ceph.com/rpm-hammer/rhel7/x86_64
+enabled=1
+priority=2
+gpgcheck=1
+type=rpm-md
+gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc
+
+[ceph-noarch]
+name=Ceph noarch packages
+baseurl=http://ceph.com/rpm-hammer/rhel7/noarch
+enabled=1
+priority=2
+gpgcheck=1
+type=rpm-md
+gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc
+EOF
+
yum update -y
yum install createrepo -y
yum install tar -y
@@ -58,6 +81,12 @@ 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
+mv /epel-release-7-5.noarch.rpm /centos7-juno-ppa/Packages/
cp /comps.xml /centos7-juno-ppa/
+cp /ceph_key_release.asc /centos7-juno-ppa/
createrepo -g comps.xml /centos7-juno-ppa
+mkdir /centos7-juno-ppa/noarch
+mkdir /centos7-juno-ppa/noarch/Packages
+cp -r /centos7-juno-ppa/Packages/ceph* /centos7-juno-ppa/noarch/Packages/
+cp -r /centos7-juno-ppa/repodata/ /centos7-juno-ppa/noarch/
tar -zcvf /centos7-juno-ppa.tar.gz /centos7-juno-ppa