summaryrefslogtreecommitdiffstats
path: root/repo/openstack/make_ppa/centos/rhel7/compass
diff options
context:
space:
mode:
authorYifei Xue <xueyifei@huawei.com>2016-11-02 18:09:35 +0800
committerYifei Xue <xueyifei@huawei.com>2016-11-17 15:24:46 +0800
commit35086233fdfb4163c589fc258229a931bb02df1a (patch)
tree7732c2e11fc4964ccaa65c74242386c4743a7edb /repo/openstack/make_ppa/centos/rhel7/compass
parentb15421ac53b8f57011613e29505cd8c0275b5066 (diff)
Create make_repo directory and optimize the current repo making related script
JIRA: COMPASS-496 Change-Id: I662d996382d38a3e9d0de6598dabe403b9d51665 Signed-off-by: Yifei Xue <xueyifei@huawei.com>
Diffstat (limited to 'repo/openstack/make_ppa/centos/rhel7/compass')
-rw-r--r--repo/openstack/make_ppa/centos/rhel7/compass/download_pkg.tmpl42
1 files changed, 42 insertions, 0 deletions
diff --git a/repo/openstack/make_ppa/centos/rhel7/compass/download_pkg.tmpl b/repo/openstack/make_ppa/centos/rhel7/compass/download_pkg.tmpl
new file mode 100644
index 00000000..1cb34b49
--- /dev/null
+++ b/repo/openstack/make_ppa/centos/rhel7/compass/download_pkg.tmpl
@@ -0,0 +1,42 @@
+#!/bin/bash
+set -x
+
+# 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', [])
+yum -y install --skip-broken --downloadonly --downloaddir=/centos7-compass-core #echo ' '.join(packages)
+#set packages = $getVar('packages', [])
+yum -y install --skip-broken --downloadonly --downloaddir=/centos7-compass-core #echo ' '.join(packages)
+#make repo
+
+find /var/cache/yum/ -name "*.rpm" | xargs -i cp {} /centos7-compass-core
+
+yum install tar -y
+tar -zcvf /centos7-compass-core.tar.gz /centos7-compass-core