summaryrefslogtreecommitdiffstats
path: root/build/templates
diff options
context:
space:
mode:
authorbaigk <baiguoku@huawei.com>2015-12-18 14:48:26 +0800
committerbaigk <baiguoku@huawei.com>2015-12-22 04:57:11 +0000
commit5e3b598f5999a7ab6d49cb294d8e5514003ae20c (patch)
tree0bfaf0a566c523380aeaa7e255e0e26103e92e6c /build/templates
parent8375e207ff0e79abe1db56733c9b4da433fc7791 (diff)
install compass-core in centos7
JIRA: COMPASS-208 Change-Id: Ie98615df37115beaa0ad8f744cc87162452af751 Signed-off-by: baigk <baiguoku@huawei.com>
Diffstat (limited to 'build/templates')
-rw-r--r--build/templates/compass_core.tmpl47
1 files changed, 33 insertions, 14 deletions
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